Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/core/application/application.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export class iOSApplication extends ApplicationCommon implements IiOSApplication
private _window: UIWindow;
private _notificationObservers: NotificationObserver[] = [];
private _rootView: View;
private launchEventCalled = false;

displayedOnce = false;
displayedLinkTarget: CADisplayLinkTarget;
Expand Down Expand Up @@ -314,6 +315,7 @@ export class iOSApplication extends ApplicationCommon implements IiOSApplication
}

private notifyAppStarted(notification?: NSNotification) {
this.launchEventCalled = true;
const root = this.notifyLaunch({
ios: notification?.userInfo?.objectForKey('UIApplicationLaunchOptionsLocalNotificationKey') ?? null,
});
Expand Down Expand Up @@ -369,11 +371,14 @@ export class iOSApplication extends ApplicationCommon implements IiOSApplication
// TODO: Expose Window module so that it can we styled from XML & CSS
this._window.backgroundColor = Utils.ios.MajorVersion <= 12 || !UIColor.systemBackgroundColor ? UIColor.whiteColor : UIColor.systemBackgroundColor;

this.notifyAppStarted(notification);
this.launchEventCalled = false;
}

@profile
private didBecomeActive(notification: NSNotification) {
if (!this.launchEventCalled) {
this.notifyAppStarted(notification);
}
const additionalData = {
ios: UIApplication.sharedApplication,
};
Expand Down