Skip to main content
Version: 1.53.x

Migration to 1.53.39

Step 1

Because the SDK uses UIWindowSceneDelegate, you must add the UIApplicationSceneManifest key to your Info.plist configuration file:

   <key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>

Step 2

To ensure proper SDK functionality, it is necessary to conform to the UIApplicationDelegate and UIWindowSceneDelegate protocols and implement the required methods:

// AppDelegate.h
@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@end


@interface SceneDelegate : UIResponder <UIWindowSceneDelegate>

@property (strong, nonatomic) UIWindow *window;

@end

// AppDelegate.m
@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
return [P101XPSDK didFinishLaunchingWithOptions:application options:launchOptions];
}

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler {
[P101XPSDK didReceiveRemoteNotification: userInfo completionHandler:completionHandler];
}

- (void)applicationWillTerminate:(UIApplication *)application {
[P101XPSDK sceneWillTerminate];
}

- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
return [P101XPSDK supportedInterfaceOrientationsWithWindow:window];
}

@end


@implementation SceneDelegate

- (void)scene:(UIScene *)scene openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts {
[P101XPSDK sceneOpenUrl: URLContexts];
}

- (void) scene:(UIScene *) scene continueUserActivity:(NSUserActivity *) userActivity {
[P101XPSDK sceneUserActivity:userActivity];
}

- (void)sceneDidEnterBackground:(UIScene *)scene {
[P101XPSDK sceneDidEnterBackground];
}

- (void)sceneDidBecomeActive:(UIScene *)scene {
[P101XPSDK sceneDidBecomeActive];
}

- (void)sceneWillEnterForeground:(UIScene *)scene {
[P101XPSDK sceneWillEnterForeground];
}

@end