Profile data migration
import Batch
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Disable profile's migration
BatchSDK.setDisabledMigrations([
// Whether Batch should automatically identify logged-in user when running the SDK for the first time.
// This mean user with a custom_user_id will be automatically attached a to a Profile and could be targeted within a Project scope.
.customID,
// Whether Batch should automatically attach current installation's data (language/region/customDataAttributes...)
// to the User's Profile when running the SDK for the first time.
.customData
])
// Then start Batch SDK.
BatchSDK.start(withAPIKey: "YOUR_API_KEY")
}@import Batch;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Disable profile's migration
[BatchSDK setDisabledMigrations:
// Whether Batch should automatically identify logged-in user when running the SDK for the first time.
// This mean user with a custom_user_id will be automatically attached a to a Profile and could be targeted within a Project scope.
BatchMigrationCustomID |
// Whether Batch should automatically attach current installation's data (language/region/customDataAttributes...)
// to the User's Profile when running the SDK for the first time.
BatchMigrationCustomData
];
// Then start Batch SDK.
[BatchSDK startWithAPIKey:@"MY_API_KEY"];
return YES;
}Last updated

