Prerequisites
Bug summary
The MobileCore.initialize promise never gets resolved when called a second time.
await MobileCore.initialize(initOptions); // resolves
console.log('resolved');
await MobileCore.initialize(initOptions); // hangs
console.log('code never reaches here');
This is in theory not an issue, since you should only call this once, but it breaks hot reload during development. For instance, if your code depends on the promise resolving to hide the splash screen, but the promise never resolves when hot reloading the app, the splash screen never gets hidden. Only a cold boot fixes the issue.
await MobileCore.initialize(initOptions); // stuck here when hot reloading
await SplashScreen.hideAsync();
Environment
System:
OS: macOS 15.6
CPU: (12) arm64 Apple M3 Pro
Memory: 474.25 MB / 36.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.17.0
Managers:
CocoaPods:
version: 1.16.2
SDKs:
iOS SDK:
Platforms:
- iOS 18.5
IDEs:
Xcode:
version: 16.4/16F6
path: /usr/bin/xcodebuild
npmPackages:
@adobe/react-native-aepassurance: 7.0.0
@adobe/react-native-aepcore: 7.0.0
@adobe/react-native-aepedge: 7.0.0
@adobe/react-native-aepedgebridge: 7.0.1
@adobe/react-native-aepedgeconsent: 7.0.0
@adobe/react-native-aepedgeidentity: 7.0.0
@adobe/react-native-aepuserprofile: 7.0.0
iOS:
hermesEnabled: true
newArchEnabled: false
Steps to reproduce
No response
Current behavior
No response
Expected behavior
No response
Anything else?
No response
Prerequisites
Bug summary
The
MobileCore.initializepromise never gets resolved when called a second time.This is in theory not an issue, since you should only call this once, but it breaks hot reload during development. For instance, if your code depends on the promise resolving to hide the splash screen, but the promise never resolves when hot reloading the app, the splash screen never gets hidden. Only a cold boot fixes the issue.
Environment
Steps to reproduce
No response
Current behavior
No response
Expected behavior
No response
Anything else?
No response