Skip to content

Commit 603eb52

Browse files
committed
Remove check for app state. Always assume new link data means we need to handle it.
1 parent ea1a627 commit 603eb52

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

Sources/BranchSDK/Branch.m

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -837,21 +837,10 @@ + (BOOL)isBranchLink:(NSString *)urlString {
837837

838838
#pragma mark - Push Notification support
839839

840-
// TODO: is there any benefit to the extra checks in this method over directly calling handleDeeplink?
841840
- (void)handlePushNotification:(NSDictionary *)userInfo {
842841
NSString *urlStr = [userInfo objectForKey:BRANCH_PUSH_NOTIFICATION_PAYLOAD_KEY];
843842

844-
// Saves URL into global storage for `applicationDidBecomeActive`
845843
if (urlStr.length) {
846-
// reusing this field, so as not to create yet another url slot on prefshelper
847-
self.preferenceHelper.universalLinkUrl = urlStr;
848-
self.preferenceHelper.referringURL = urlStr;
849-
}
850-
851-
// If app is active, then close out the session and start a new one.
852-
// Else the URL will be handled by `applicationDidBecomeActive`.
853-
Class UIApplicationClass = NSClassFromString(@"UIApplication");
854-
if (urlStr && [[UIApplicationClass sharedApplication] applicationState] == UIApplicationStateActive) {
855844
NSURL *url = [NSURL URLWithString:urlStr];
856845
if (url) {
857846
[self handleDeepLink:url sceneIdentifier:nil];

0 commit comments

Comments
 (0)