- 1 Minute to read
- Print
- DarkLight
Migrate from iOS SDK version 4
- 1 Minute to read
- Print
- DarkLight
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
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:
Visits Tracking Behavior:
In SDK version 4, the
fns
parameter (force new session) was timer-based, restarting sessions every 30 seconds by default. However, you could adjust this interval as needed.SDK version 5 enforces stricter session rules: sessions restart only upon app restarts after being killed or after 30 minutes of inactivity enforced during post-processing.
The default request interval is 15 minutes (analog 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 enabling batch support and using the client timestamp for page duration calculation in your account. Please contact your account manager to enable client timestamps 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 mentioned below:
Implement iOS SDKv5 as described in this documentation.
Ensure to enable the shouldMigrate option.
Delete the dependency and any implementation of iOS SDK version 4.
Ensure that the application's Bundle Identifier does not change in the process.
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
}
}
[[MappIntelligence shared] initWithConfiguration: @[@111111111111111, @222222222222222] onTrackdomain:@"https://your-trackdomain.net"];
[[MappIntelligence shared] setShouldMigrate:YES];