File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/core/application Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ export class iOSApplication extends ApplicationCommon implements IiOSApplication
7777 private _window : UIWindow ;
7878 private _notificationObservers : NotificationObserver [ ] = [ ] ;
7979 private _rootView : View ;
80+ private launchEventCalled = false ;
8081
8182 displayedOnce = false ;
8283 displayedLinkTarget : CADisplayLinkTarget ;
@@ -314,6 +315,7 @@ export class iOSApplication extends ApplicationCommon implements IiOSApplication
314315 }
315316
316317 private notifyAppStarted ( notification ?: NSNotification ) {
318+ this . launchEventCalled = true ;
317319 const root = this . notifyLaunch ( {
318320 ios : notification ?. userInfo ?. objectForKey ( 'UIApplicationLaunchOptionsLocalNotificationKey' ) ?? null ,
319321 } ) ;
@@ -369,11 +371,14 @@ export class iOSApplication extends ApplicationCommon implements IiOSApplication
369371 // TODO: Expose Window module so that it can we styled from XML & CSS
370372 this . _window . backgroundColor = Utils . ios . MajorVersion <= 12 || ! UIColor . systemBackgroundColor ? UIColor . whiteColor : UIColor . systemBackgroundColor ;
371373
372- this . notifyAppStarted ( notification ) ;
374+ this . launchEventCalled = false ;
373375 }
374376
375377 @profile
376378 private didBecomeActive ( notification : NSNotification ) {
379+ if ( ! this . launchEventCalled ) {
380+ this . notifyAppStarted ( notification ) ;
381+ }
377382 const additionalData = {
378383 ios : UIApplication . sharedApplication ,
379384 } ;
You can’t perform that action at this time.
0 commit comments