Last modified October 9, 2017 by Shelly Wolfe

iOS SDK 5.0 upgrade guide

With the release of Swrve’s iOS SDK version 5.0, we have made major changes to the API to ensure internal consistency and make it easier to exclude optional iOS frameworks. This guide outlines the APIs that we have changed or deprecated.

Removed Summary
Static method + (Swrve*) sharedInstance from Swrve.h You should now access all public methods exposed via the Swrve.h instance via similarly named static methods from the SwrveSDK class. Import SwrveSDK.h instead of Swrve.h.
Deprecated method (id) initWithAppID:(int)swrveAppID apiKey:(NSString*)swrveAPIKey userID:(NSString*)swrveUserID from Swrve.h Use the userId property in SwrveConfig instead.
Deprecated method (id) initWithAppID:(int)swrveAppID apiKey:(NSString*)swrveAPIKey userID:(NSString*)swrveUserID config:(SwrveConfig*)swrveConfig from Swrve.h Use the userId property in SwrveConfig instead.
Deprecated method (BOOL) appInBackground from Swrve.h This method is no longer needed.
[[Swrve sharedInstance].talk] setDeviceToken Use [SwrveSDK setDeviceToken] instead.
[[Swrve sharedInstance].talk] pushNotificationReceived Use [SwrveSDK pushNotificationReceived] instead.
Deprecated maxConcurrentDownloads property from SwrveConfig.h This property is no longer needed.
talkEnabled property from SwrveConfig.h This property is no longer needed.
Renamed To
[[Swrve sharedInstance].talk] Use [SwrveSDK messaging] instead.
[[Swrve sharedInstance] getSwrveResourceManager] Use [SwrveSDK resourceManager] instead.
Changed To
SWRVE_NO_ADDRESS_BOOK
SWRVE_NO_LOCATION
SWRVE_NO_PHOTO_LIBRARY
SWRVE_NO_PHOTO_CAMERA
SWRVE_ADDRESS_BOOK
SWRVE_LOCATION
SWRVE_PHOTO_LIBRARY
SWRVE_PHOTO_CAMERANote: If you want to exclude the referenced app capabilities, you no longer need to add any GCC preprocessors. Instead, you now need to add GCC preprocessors if you want to include the capabilities. For more information, see How Do I Exclude Optional iOS Frameworks?