Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ios): check if app is booted before sending notifications #10565

Merged
merged 4 commits into from Jan 7, 2019
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.m
Expand Up @@ -448,7 +448,11 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction

[launchOptions setObject:[options objectForKey:UIApplicationOpenURLOptionsSourceApplicationKey] ?: [NSNull null] forKey:@"source"];

[[NSNotificationCenter defaultCenter] postNotificationName:kTiApplicationLaunchedFromURL object:self userInfo:launchOptions];
if (appBooted) {
[[NSNotificationCenter defaultCenter] postNotificationName:kTiApplicationLaunchedFromURL object:self userInfo:launchOptions];
} else {
[[self queuedBootEvents] setObject:launchOptions forKey:kTiApplicationLaunchedFromURL];
}

return YES;
}
Expand All @@ -465,7 +469,11 @@ - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceAppl

[launchOptions setObject:sourceApplication ?: [NSNull null] forKey:@"source"];

[[NSNotificationCenter defaultCenter] postNotificationName:kTiApplicationLaunchedFromURL object:self userInfo:launchOptions];
if (appBooted) {
[[NSNotificationCenter defaultCenter] postNotificationName:kTiApplicationLaunchedFromURL object:self userInfo:launchOptions];
} else {
[[self queuedBootEvents] setObject:launchOptions forKey:kTiApplicationLaunchedFromURL];
}

return YES;
}
Expand Down