File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,17 +34,18 @@ - (void)setBridge:(RCTBridge *)bridge
3434- (NSDictionary <NSString *, id> *)constantsToExport
3535{
3636 NSURL *initialURL;
37-
37+
3838 if (_bridge.launchOptions [UIApplicationLaunchOptionsURLKey]) {
3939 initialURL = _bridge.launchOptions [UIApplicationLaunchOptionsURLKey];
40- } else if (_bridge.launchOptions [UIApplicationLaunchOptionsUserActivityDictionaryKey]) {
40+ } else if (&UIApplicationLaunchOptionsUserActivityDictionaryKey &&
41+ _bridge.launchOptions [UIApplicationLaunchOptionsUserActivityDictionaryKey]) {
4142 NSDictionary *userActivityDictionary = _bridge.launchOptions [UIApplicationLaunchOptionsUserActivityDictionaryKey];
4243
4344 if ([userActivityDictionary[UIApplicationLaunchOptionsUserActivityTypeKey] isEqual: NSUserActivityTypeBrowsingWeb ]) {
4445 initialURL = ((NSUserActivity *)userActivityDictionary[@" UIApplicationLaunchOptionsUserActivityKey" ]).webpageURL ;
4546 }
4647 }
47-
48+
4849 return @{@" initialURL" : RCTNullIfNil (initialURL.absoluteString )};
4950}
5051
You can’t perform that action at this time.
0 commit comments