Migrating to the iOS SDK v5 from version 4 is possible without any data loss by using the migration option in the configuration.

To avoid the loss of historical tracking data and a break in tracking, enable the following option in the AppDelegate class:

MappIntelligence.shared()?.shouldMigrate = true
JAVA

Enhancements to iOS SDKv4

iOS SDKv5 offers the following enhancements:

  • Higher data quality because of the following improvements:
    • Requests are stored in a database instead of within an app file.
    • Requests can be sent in batches to ensure correct page navigation paths.
    • WebViews can be tracked entirely inside the app context.
    • Campaign tracking is improved and refactored.
  • Detailed logs and a reset function to simplify debugging.
  • Enhanced performance and battery usage.

Necessary Steps for Migration

Please note the following differences to iOS SDKv4:

  • The default request interval is 15 minutes (analogue to the Android SDKv5). You can change the interval via the configuration settings to a minimum of one minute and a maximum of sixty minute interval. Please note that reducing the interval causes higher battery usage. Instead, we recommend to enable batch support and use the client timestamp for page duration calculation in your account. Please contact your account manager to enable client timestamp in your account.
  • The iOS SDKv5 does not offer configuration and implementation via Tag Integration. Configuration must be done in the app.

Please follow the steps as mentioned below:

  1. Implement iOS SDKv5 as described in this documentation.
  2. Ensure to enable the shouldMigrate option.
  3. Delete the dependency and any implementation of iOS SDK version 4.
  4. Ensure that the Bundle Identifier of the application does not change in the process.
  5. Publish the application.


It is crucial to keep the same Bundle Identifier of the application during the entire process to avoid data loss.

Example

class AppDelegate: UIResponder, UIApplicationDelegate {
 
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
 
        // Override point for customization after application launch.
         
        MappIntelligence.shared()?.initWithConfiguration([123451234512345], onTrackdomain: "https://your-trackdomain.net")
        MappIntelligence.shared()?.shouldMigrate = true
        return true
    }
}
JAVA
[[MappIntelligence shared] initWithConfiguration: @[@111111111111111, @222222222222222] onTrackdomain:@"https://your-trackdomain.net"];
    [[MappIntelligence shared] setShouldMigrate:YES];
JAVA