This behavior typically occurs when the Pushwoosh SDK determines that the application did not successfully handle the Universal Link, triggering a fallback mechanism that opens the URL in the browser (Safari) to ensure the content is delivered.
How it works (iOS SDK 7.0.15+)
To process Universal Links, the SDK follows this logic: 1. It attempts to call scene(_:continue:) (if using SceneDelegate on iOS 13+). 2. If not handled, it calls application(_:continue:restorationHandler:) in AppDelegate. 3. The SDK checks the boolean return value of these methods. 4. If the methods return false or are not implemented, the SDK assumes the link was not handled and opens it in Safari.
Double-opening happens if your app processes the link (opens the correct screen) but the SDK still receives a false signal (or fails to find the handler), causing it to execute the browser fallback.
Troubleshooting Steps
1. Check Info.plist Configuration If your app uses AppDelegate but your Info.plist file contains the UIApplicationSceneManifest key, the system (and SDK) might prioritize SceneDelegate logic. If SceneDelegate is not actually used, the SDK may fail to receive the confirmation from AppDelegate. * Solution: If you do not use Scenes, remove the UIApplicationSceneManifest entry from your Info.plist.
2. Verify Return Values Ensure that your implementation of application(_:continue:restorationHandler:) explicitly returns true when the Universal Link is successfully handled.
3. Check for Method Swizzling Conflicts Other SDKs (such as Firebase, Facebook, or Adjust) often "swizzle" (intercept) application delegate methods. This can sometimes interfere with the return value passed back to the Pushwoosh SDK. * Diagnosis: Temporarily disable other SDKs to verify if the double-opening persists. If it stops, there is a conflict in how the delegate methods are intercepted.
4. Update SDK Ensure you are using Pushwoosh iOS SDK 7.0.15 or later. Older versions or explicit calls to openURL for Universal Links will inherently open Safari due to iOS restrictions.
Comments
0 comments
Please sign in to leave a comment.