[Xcode 27] Mandatory SceneDelegate Migration and Additional Airbridge Deep Link Settings
[Xcode 27] Mandatory SceneDelegate Migration and Additional Airbridge Deep Link Settings
NoticeThis document is a troubleshooting guide for customers who need to migrate an existing AppDelegate-based app to UIScene (SceneDelegate).
Problem
- When you run an app built with Xcode 27, the screen appears blank (white) or the app does not render properly.
- Airbridge deep link events are not collected even when the app is opened through a scheme deep link or Universal Link.
- The app does not work even though the code was added to
AppDelegateas shown in the Project Setup (iOS) and Deep Link Setup > Project Setup (iOS) developer guide examples.
Cause
Apple is moving the app lifecycle from theUIApplicationDelegate-only AppDelegate model to the UIScene-based SceneDelegate model, and adopting the Scene lifecycle has effectively become required in the latest Xcode and iOS environments.When an app adopts the Scene lifecycle through UIApplicationSceneManifest, the following AppDelegate deep link callbacks are no longer called.Solution
1. Add Scene Manifest to Info.plist
Add the followingUIApplicationSceneManifest to Info.plist.Set the UISceneDelegateClassName value to match the language/module you use.- Objective-C:
SceneDelegate - Swift:
$(PRODUCT_MODULE_NAME).SceneDelegate
2. Create SceneDelegate and move the deep link collection code to SceneDelegate
- Swift
- Objective-C
3. Clean up AppDelegate
- Leave the SDK initialization code (Objective-C:
[AirbridgeRN getInstance:appName:withLaunchOptions:], Swift:AirbridgeRN.getInstance(_:appName:withLaunchOptions:)) inapplication:didFinishLaunchingWithOptions:as is. - The
application:openURL:options:andapplication:continueUserActivity:restorationHandler:methods you wrote to collect deep links are not called in the Scene lifecycle, so after moving them toSceneDelegate, delete them fromAppDelegate.
Update 1.X.X → 2.X.X
Update 1.X.X → 2.X.X
The event API has been replaced to the below.Refer to the React native 2.X.X migration guide for details.
Bitcode Compile Error
Bitcode Compile Error
An error like below may occur when creating iOS builds with React Native SDK v1.5.0+.Since React Native SDK v1.5.0+ uses Airbridge iOS SDK v1.28.0+, Bitcode is no longer supported. Please refer to the Bitcode compile error guide for more details.
Resolve Airbridge SDK backup rules merge conflict issue
Resolve Airbridge SDK backup rules merge conflict issue
- Reference : Android SDK Auto Backup
backup_rules.xml setup
backup_rules.xml setup
- Create a
android/app/src/main/res/xmlfolder. - Within the created xml folder, create a file (e.g.
custom_backup_rules.xml). - Add the data backup rules defined in the Airbridge SDK as follows.
AndroidManifest.xml setup
AndroidManifest.xml setup