feat(ios): addDelegateHandler to add App Delegate handlers (#10371)

This commit is contained in:
Igor Randjelovic
2023-09-02 05:37:31 +02:00
committed by GitHub
parent 8d25d251cd
commit a959a797df
3 changed files with 54 additions and 0 deletions

View File

@@ -12,6 +12,13 @@ if (Application.ios) {
Application.ios.addNotificationObserver(UIApplicationDidFinishLaunchingNotification, (notification: NSNotification) => {
console.log('UIApplicationDidFinishLaunchingNotification:', notification);
});
// Make sure we can add multiple handlers for the same event.
for (let i = 0; i < 10; i++) {
Application.ios.addDelegateHandler('applicationDidBecomeActive', (application: UIApplication) => {
console.log('applicationDidBecomeActive', i, application);
});
}
}
// Common events for both Android and iOS.