Last modified November 22, 2014 by Gordon Glauser

iOS SDK Upgrade Guide

This guide provides information about how you can upgrade to the latest Swrve iOS SDK. For information about the changes that have been made in each iOS SDK release, see iOS SDK Release Notes.

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, 5.1.0.
  • Run the command pod repo update to ensure all references are up to date (for example, Locations SDK).

Version 5.1

If you are upgrading from a version prior to 5.0, see the iOS SDK 5.0 Upgrade Guide. Otherwise, there are no code changes required to upgrade to Swrve iOS SDK v5.1.


Version 5.0

This section provides information to enable you to upgrade to Swrve iOS SDK v5.0.

New SwrveSDK Class and Internal Refactors

All interaction with the Swrve SDK is now done through a new class called SwrveSDK and we have also completed other refactoring to ensure internal consistency. For information on upgrading to version 5.0, see the iOS SDK 5.0 Upgrade Guide.

Optional iOS Frameworks

We have changed the process for excluding optional iOS frameworks in your app code. With the exception of push notifications, they are now excluded by default, and you must add the related Preprocessor Macros if you want to include the framework. For more information, see How Do I Exclude Optional iOS Frameworks?


Version 4.11.4

This section provides information to enable you to upgrade to Swrve iOS SDK v4.11.4.

Rich Push Notification Buttons

Add a call to the Swrve SDK to handle button click actions and reporting for devices running iOS 9 or earlier:


Version 4.11.3

This section provides information to enable you to upgrade to Swrve iOS SDK v4.11.3.

Push Engagement Events and Remote Notification Handling

If you have the application:didReceiveRemoteNotification:fetchCompletionHandler: method in your app, update it to the following snippet and remove any calls to the now deprecated silentPushReceived method:

Rich Push Notifications

If you’re upgrading from an SDK version prior to v4.11, you must add a notification service extension to your app. For more information, see the Advanced Push Notifications section in the iOS Integration Guide.


Version 4.11.2

This section provides information to enable you to upgrade to Swrve iOS SDK v4.11.2.

Rich Push Notifications

If you’re upgrading from an SDK version prior to v4.11, you must add a notification service extension to your app. For more information, see the Advanced Push Notifications section in the iOS Integration Guide.


Version 4.11.1

This section provides information to enable you to upgrade to Swrve iOS SDK v4.11.1.

Rich Push Notifications

If you’re upgrading from an SDK version prior to v4.11, you must add a notification service extension to your app. For more information, see the Advanced Push Notifications section in the iOS Integration Guide.


Version 4.11

This section provides information to enable you to upgrade to Swrve iOS SDK v4.11.

Rich Push Notifications

To use rich push notifications in iOS, you must add a notification service extension to your app. For more information, see the Advanced Push Notifications section in the iOS Integration Guide.


Version 4.10.2

This section provides information to enable you to upgrade to Swrve iOS SDK v4.10.2.

UserNotifications Frameworks

If you’re not upgrading via CocoaPods, ensure the following frameworks are now included as optional in your Build Phases:

  • UserNotificationsUI.framework
  • UserNotifications.framework

Version 4.10.1

No code changes are required to upgrade to Swrve iOS SDK v4.10.1.


Version 4.10

This section provides information to enable you to upgrade to Swrve iOS SDK v4.10.

Silent Push Notifications

To enable silent push notifications, complete the steps outlined under Configuring Silent Notifications in the iOS Integration Guide.


Version 4.9.2

No code changes are required to upgrade to Swrve iOS SDK v4.9.2.


Version 4.9.1

No code changes are required to upgrade to Swrve iOS SDK v4.9.1.


Version 4.9

No code changes are required to upgrade to Swrve iOS SDK v4.9.


Version 4.8

No code changes are required to upgrade to Swrve iOS SDK v4.8.


Version 4.7.1

No code changes are required to upgrade to Swrve iOS SDK v4.7.1.


Version 4.7

No code changes are required to upgrade to Swrve iOS SDK v4.7.


Version 4.6.2

No code changes are required to upgrade to Swrve iOS SDK v4.6.2.


Version 4.6.1

This section provides information to enable you to upgrade to Swrve iOS SDK v4.6.1.

Camera Access

Due to Apple App Store changes in permissions, the SDK now includes a feature flag to remove the Photo Camera Access API for users who don’t use photo camera access. You can disable access by adding SWRVE_NO_PHOTO_CAMERA to your compiler flags. For more information see How Do I Exclude Optional iOS Frameworks?


Version 4.6

No code changes are required to upgrade to Swrve iOS SDK v4.6.


Version 4.5.2

Unless you’re using iOS 7 and Swift, no code changes are required to upgrade to Swrve iOS SDK v4.5.2.

iOS 7 and Swift

There is an issue in iOS 7 where the resulting Pod frameworks do not respect the minimum platform specified in the podspec, defaulting to iOS 8. This issue isn’t necessarily confined to Swift, but Swift with CocoaPods forces the use of frameworks. If your app is written in Swift, uses CocoaPods, and supports iOS 7, there are two actions you need to perform to ensure compatibility.

Step 1: Add the following post install script to your Podfile to cycle through the resulting Pod project targets and set their deployment targets to iOS 7:

Step 2: Add the SDKs image assets to your xcassets directory or resource folder.

Frameworks do not retain the same bundles as static libraries, so when using any resources like storyboards or images, you need to define the bundle. For storyboards, the ability to define the bundle has been available since iOS 6. However, for a UIImage, the ability to specify the bundle only became available with iOS 8. So for some Conversations that use image assets, you need to copy them to your own main project. Once again, this is only if you are supporting iOS 7.


Version 4.5.1

No code changes are required to upgrade to Swrve iOS SDK v4.5.1.


Version 4.5

No code changes are required to upgrade to Swrve iOS SDK v4.5.

In-App Message Background Property

The in-app messages configurable background property backgroundColor has been renamed to inAppMessageBackgroundColor. Please use the new property name.


Version 4.4.2

No code changes are required to upgrade to Swrve iOS SDK v4.4.2.


Version 4.4.1

No code changes are required to upgrade to Swrve iOS SDK v4.4.1.


Version 4.4

No code changes are required to upgrade to Swrve iOS SDK v4.4.


Version 4.3.1

No code changes are required to upgrade to Swrve iOS SDK v4.3.1.


Version 4.3

No code changes are required to upgrade to Swrve iOS SDK v4.3.


Version 4.2

No code changes are required to upgrade to Swrve iOS SDK v4.2.

appInbackground deprecated

If you’re using the internal method appInBackground, check the Application state through the sharedInstance method instead.


Previous Versions

If you are upgrading from a version older than 4.2, please refer to the iOS Integration Guide.