iOS SDK upgrade guide
Upgrading via CocoaPods
If you’re upgrading via CocoaPods, ensure you complete the following for every upgrade:
- Update all libraries to the latest SDK version; for example, 10.1.0.
- Run the command
pod repo update
to ensure all references are up to date (for example, Geo SDK).
Version 10.1.0
There are no code changes required to upgrade to Swrve iOS SDK v10.1.0.
Version 10.0.0
This section provides information for upgrading to Swrve iOS SDK v10.0.0.
The following enums have been migrated to Swift. Please see below for more details on the breaking changes and how to access the updated properties.
- SwrveStack
- SwrveInitMode
- SwrveMessageAction
- SwrveCampaignStatus
We recommend using @import SwrveSDK
instead of #import "SwrveSDK.h"
.
The following table lists the methods and fields that have changed or been removed:
Changed | Summary |
---|---|
#import "SwrveSDK.h" |
Use @import SwrveSDK instead |
SWRVE_STACK_EU |
Swift: .eu Obj-C: SwrveStackEu |
SWRVE_STACK_US |
Swift: .us Obj-C: SwrveStackUs |
SWRVE_INIT_MODE_AUTO |
Swift: .auto Obj-C: SwrveInitModeAuto |
SWRVE_INIT_MODE_MANAGED |
Swift: .managed Obj-C: SwrveInitModeManaged |
SwrveActionDismiss |
Swift: .dismiss Obj-C: SwrveMessageActionDismiss |
SwrveActionCustom |
Swift: .custom Obj-C: SwrveMessageActionCustom |
SwrveActionImpression |
Swift: .impression Obj-C: SwrveMessageActionImpression |
SwrveActionClipboard |
Swift: .clipboard Objc: SwrveMessageActionClipboard |
SWRVE_CAMPAIGN_STATUS_SEEN |
Swift: .seen Objc: SwrveCampaignStatusSeen |
SWRVE_CAMPAIGN_STATUS_UNSEEN |
Swift: .unseen Objc: SwrveCampaignStatusUnseen |
SWRVE_CAMPAIGN_STATUS_DELTETED |
Swift: .deleted Objc: SwrveCampaignStatusDeleted |
SWRVE_CAMPAIGN_STATUS_DELTETED |
Swift: .deleted Objc: SwrveCampaignStatusDeleted |
SwrveSDK.deviceUUID() |
SwrveSDK.deviceUUID() now returns an optional string |
SwrveSDK.config() |
SwrveSDK.config() returns SwrveConfig rather than SwrveImmutableConfig |
SwrveSDK.realTimeUserProperties |
SwrveSDK.realTimeUserProperties returns NSMutableDictionary rather than NSDictionary |
SwrveEmbeddedMessage.type kSwrveEmbeddedDataTypeJson |
Swift:.json ObjC: SwrveEmbeddedDataTypeJson |
SwrveEmbeddedMessage.type kSwrveEmbeddedDataTypeOther |
Swift:.other ObjC: SwrveEmbeddedDataTypeOther |
Removed | Summary |
---|---|
appStoreURLs |
This feature has been removed. |
SwrveImmutableConfig |
This class has been removed. SwrveSDK returns SwrveConfig instead. |
import SwrveSDKSwift |
Use import SwrveSDK instead. SwrveSDKSwift file has been removed. The API registerLiveActivity has been moved to SwrveSDK. |
Version 9.2.0
There are no code changes required to upgrade to Swrve iOS SDK v9.2.0.
Version 9.1.0
There are no code changes required to upgrade to Swrve iOS SDK v9.1.0.
Version 9.0.2
There are no code changes required to upgrade to Swrve iOS SDK v9.0.2.
Version 9.0.1
There are no code changes required to upgrade to Swrve iOS SDK v9.0.1.
Version 9.0.0
This section provides information for upgrading to Swrve iOS SDK v9.0.0.
The minimum iOS support has been increased from iOS 10 to iOS 12.
The following table lists the methods and fields that have changed or been removed:
Removed | Summary |
---|---|
SwrveCustomButtonPressedCallback |
Please use SwrveInAppMessageDelegate instead to get campaign and button metadata. |
SwrveDismissButtonPressedCallback |
Please use SwrveInAppMessageDelegate instead to get campaign and button metadata. |
SwrveClipboardButtonPressedCallback |
Please use SwrveInAppMessageDelegate instead to get campaign and button metadata. |
SwrveConfig.pushNotificationEvents |
Please use SwrveConfig.pushNotificationPermissionEvents instead and set it to Swrve.session.start to request the push notification upon install if required. |
SwrveEmbeddedMessageConfig.embeddedMessageCallback |
Please use SwrveEmbeddedMessageConfig.embeddedCallback instead. |
SwrveEmbeddedMessageConfig.embeddedMessageCallbackWithPersonalization |
Please use SwrveEmbeddedMessageConfig.embeddedCallback instead. |
startLiveActivityTracking(activityId: activity:) |
Please use registerLiveActivity(ofType attributesType: T.Type) instead. |
resumeLiveActivityTracking(ofType activityType: Activity.Type) |
This method is no longer needed |
Swrve.session.start
in the Swrveconfig.pushNotificationPermissionsEvents
API.Version 8.13.1
There are no code changes required to upgrade to Swrve iOS SDK v8.13.1.
Version 8.13.0
There are no code changes required to upgrade to Swrve iOS SDK v8.13.0.
Version 8.12.0
There are no code changes required to upgrade to Swrve iOS SDK v8.12.0.
Version 8.11.0
There are no code changes required to upgrade to Swrve iOS SDK v8.11.0.
Version 8.10.0
There are no code changes required to upgrade to Swrve iOS SDK v8.10.0.
Version 8.9.0
There are no code changes required to upgrade to Swrve iOS SDK v8.9.0.
Version 8.8.1
There are no code changes required to upgrade to Swrve iOS SDK v8.8.1.
Version 8.8.0
There are no code changes required to upgrade to Swrve iOS SDK v8.8.0.
Version 8.7.0
This section provides information for upgrading to Swrve iOS SDK v8.7.0.
The following table lists the methods and fields that have changed or been removed:
Changed | To |
---|---|
SwrveCustomButtonPressedCallback |
TheSwrveCustomButtonPressedCallback API is now deprecated. Please use SwrveInAppMessageDelegate instead to get campaign and button metadata. |
SwrveDismissButtonPressedCallback |
TheSwrveDismissButtonPressedCallback API is now deprecated. Please use SwrveInAppMessageDelegate instead to get campaign and button metadata. |
SwrveClipboardButtonPressedCallback |
TheSwrveClipboardButtonPressedCallback API is now deprecated. Please use SwrveInAppMessageDelegate instead to get campaign and button metadata. |
Version 8.6.0
There are no code changes required to upgrade to Swrve iOS SDK v8.6.0.
Version 8.5.0
This section provides information for upgrading to Swrve iOS SDK v8.5.0.
The following table lists the methods and fields that have changed or been removed:
Changed | To |
---|---|
SwrveConfig.pushNotificationEvents |
The SwrveConfig.pushNotificationEvents API is now deprecated. Please use SwrveConfig.pushNotificationPermissionEvents instead and set it to Swrve.session.start to request the push notification upon install. |
SwrveEmbeddedMessageConfig.embeddedMessageCallbackWithPersonalization |
The SwrveEmbeddedMessageConfig.embeddedMessageCallbackWithPersonalization API is now deprecated. Please use SwrveEmbeddedMessageConfig.embeddedCallback instead. |
Version 8.4.0
There are no code changes required to upgrade to Swrve iOS SDK v8.4.0.
Version 8.3.0
There are no code changes required to upgrade to Swrve iOS SDK v8.3.0.
Version 8.2.0
There are no code changes required to upgrade to Swrve iOS SDK v8.2.0.
Version 8.1.0
There are no code changes required to upgrade to Swrve iOS SDK v8.1.0.
Version 8.0.0
This section provides information for upgrading to Swrve iOS SDK v8.0.0.
The following table lists the methods and fields that have changed or been moved.
Removed | Summary |
---|---|
SwrveMessageDelegate |
If you want to override the default in-app message display, we recommend using embedded campaigns. |
userResourcesDiff |
userResourcesDiff is replaced by the userResourcesDiffWithListener API. This new API uses a callback listener that contains more information about where the result came from and any errors encountered. |
Changed | Summary |
SwrveCustomButtonPressedCallback |
This API now contains an extra string argument for the campaign name. |
SwrveDismissButtonPressedCallback |
This API now contains an extra string argument for the campaign name. |
GIF support for in-app messages
To support using animated GIFs as your in-app message images and buttons, the Swrve SDK now requires SDWebImage as a dependency. If you integrate the SDK via CocoaPods or Swift Package Manager, it is automatically included and does not require any further code changes. However, Carthage integrations require you to include the SDWebImage.xcframework
from our SwrveFramework
project, or manually add SDWebImage to your Cartfile: github "SDWebImage" "~> 5.0"
Previous versions
If you are upgrading from a version older than 8.0.0, please refer to the iOS Integration Guide.