File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/core/application Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ export class iOSApplication implements iOSApplicationDefinition {
136136 private _orientation : 'portrait' | 'landscape' | 'unknown' ;
137137 private _rootView : View ;
138138 private _systemAppearance : 'light' | 'dark' ;
139+ private launchEventCalled = false ;
139140
140141 constructor ( ) {
141142 this . _observers = new Array < NotificationObserver > ( ) ;
@@ -222,11 +223,11 @@ export class iOSApplication implements iOSApplicationDefinition {
222223 this . _window = UIWindow . alloc ( ) . initWithFrame ( UIScreen . mainScreen . bounds ) ;
223224 // TODO: Expose Window module so that it can we styled from XML & CSS
224225 this . _window . backgroundColor = this . _backgroundColor ;
225-
226- this . notifyAppStarted ( notification ) ;
226+ this . launchEventCalled = false ;
227227 }
228228
229229 public notifyAppStarted ( notification ?: NSNotification ) {
230+ this . launchEventCalled = true ;
230231 const args : LaunchEventData = {
231232 eventName : launchEvent ,
232233 object : this ,
@@ -252,6 +253,9 @@ export class iOSApplication implements iOSApplicationDefinition {
252253
253254 @profile
254255 private didBecomeActive ( notification : NSNotification ) {
256+ if ( ! this . launchEventCalled ) {
257+ this . notifyAppStarted ( notification ) ;
258+ }
255259 const ios = UIApplication . sharedApplication ;
256260 const object = this ;
257261 notify ( < ApplicationEventData > { eventName : resumeEvent , object, ios } ) ;
You can’t perform that action at this time.
0 commit comments