[Xcode 27] SceneDelegate Migration Required — Additional Setup Needed for Airbridge Deep Links
[Xcode 27] SceneDelegate Migration Required — Additional Setup Needed for Airbridge Deep Links
This troubleshooting guide is for customers who need to migrate an existing AppDelegate-based app to the
SceneDelegate (UIScene lifecycle).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 using the
AppDelegateapproach shown in the Initialize SDK and Set up deep linking 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 callbacks are no longer called.Solution
- Swift
- Objective-C
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
- Keep the SDK initialization code (
Airbridge.initializeSDK(option:), Objective-C:[Airbridge initializeSDKWithOption:]) inapplication:didFinishLaunchingWithOptions:as is. - The
trackDeeplinkandhandleDeeplinkcalls added toapplication:open:options:(application:openURL:options:) andapplication:continue:restorationHandler:for deep link collection are not called in the Scene lifecycle. After moving them toSceneDelegate, remove them fromAppDelegate. - If you created the
windowand setrootViewControllerinapplication:didFinishLaunchingWithOptions:, move that code toscene:willConnectTo:options:inSceneDelegateas well. In the Scene lifecycle,SceneDelegateowns thewindow, so the screen will not appear if the code remains inAppDelegate.
Issue
When running an app built with the Airbridge iOS SDK in a Swift 6 environment, the app crashes when the closures passed to functions such ashandleDeeplink and handleDeferredDeeplink are invoked.Affected functionsAirbridge.handleDeeplinkAirbridge.handleDeferredDeeplinkAirbridge.createTrackingLinkAirbridge.clickAirbridge.impressionAirbridgeOptionBuilder.setOnAttributionReceived
Cause
In Swift 5.x and earlier, the compiler only issued warnings even when there was a risk of a data race caused by multiple threads accessing the same memory at the same time. In Swift 6, any data or closure that may move to and run on another thread or actor-isolated context must be proven safe to transfer across threads. Otherwise, the compiler may raise a compile-time error, or a runtime crash may occur when building with backward compatibility.Solution
When using Airbridge SDK functions that receive closures as parameters, explicitly add the@Sendable annotation before the closure parameter variable to tell the compiler that the data can be safely transferred across threads.Deep Link Install or Deep Link Open not occurring, resulting in standard Install or Open
Deep Link Install or Deep Link Open not occurring, resulting in standard Install or Open
Problem
To trigger a Deep Link Install or Deep Link Open, thetrackDeeplink method must be called before the didBecomeActive state in the iOS Lifecycle. If trackDeeplink is called after didBecomeActive, it will be recorded as an Organic Install or Open.Cause
TheDeep Link Install or Deep Link Open events are not generated; instead, standard Install or Open events occur.Solution
Please ensure thattrackDeeplink is called before didBecomeActive.By setting the setLogLevel to Debug in the AirbridgeOptionBuilder, you can verify the following logs in sequential order:CocoaPods cannot find version 4.7.0
CocoaPods cannot find version 4.7.0
During the deployment of version 4.7.1, an issue occurred where version 4.7.0 was accidentally removed. The 4.7.0 version has since been redistributed to CocoaPods.If CocoaPods is unable to find the version, or if you encounter a checksum error with the installed Pods, please follow the steps below.
The domain of saved passwords appears as airbridge.io or abr.ge
The domain of saved passwords appears as airbridge.io or abr.ge
Problem
Users may see the domain of passwords stored with the Password AutoFill feature asairbridge.io or abr.ge.Cause
After setting up deep links for the Airbridge SDK, if you utilize the Password AutoFill feature, the domain is saved as the applinks domain of the Airbridge deep link, which isairbridge.io or abr.ge.Solution
The problem can be solved by setting up the webcredentials domain used in the Password AutoFill.- Prepare the domain that will store the password.
- Host the JSON below at
https://YOUR_DOMAIN/.well-known/apple-app-site-associationwithContent-Type: application/json. Your prepared domain should be entered instead ofYOUR_DOMAIN.
- Navigate to [YOUR_PROJECT]>[Signing & Capabilities] in Xcode.
- Click + Capability to add Associated Domains. Enter
webcredentials:YOUR_DOMAINin Associated Domains.
Upload Symbol Failed on Xcode
Upload Symbol Failed on Xcode