1 // Copyright 2015-present 650 Industries. All rights reserved. 2 // 3 // Contains logic for figuring out how to take care of deep links. 4 5 #import "EXLinkingManager.h" 6 #import "EXReactAppManager.h" 7 #import "EXUtil.h" 8 9 @interface EXKernelLinkingManager : NSObject 10 <EXLinkingManagerScopedModuleDelegate, EXUtilScopedModuleDelegate> 11 12 /** 13 * Either opens the url on an existing bridge, or sends it to the kernel 14 * for opening on a new bridge. 15 */ 16 - (void)openUrl:(NSString *)urlString isUniversalLink:(BOOL)isUniversalLink; 17 18 /** 19 * Called by Util.reload() to rerequest the foreground tasks's manifest 20 * and reload the bundle url it contains. 21 */ 22 - (void)refreshForegroundTask; 23 24 /** 25 * Flagged when `refreshForegroundTask` is called. After the manifest round trip is complete, 26 * the kernel may need to disambiguate loading a new app from refreshing the existing app. 27 */ 28 - (BOOL)isRefreshExpectedForAppManager:(EXReactAppManager *)manager; 29 30 /** 31 * Returns the deep link prefix for a given experience uri. 32 */ 33 + (NSString *)linkingUriForExperienceUri:(NSURL *)uri; 34 35 /** 36 * Normalize a uri and (if needed) subtitute 37 * standalone-app-specific deep link formatting. 38 */ 39 + (NSURL *)uriTransformedForLinking:(NSURL *)uri isUniversalLink:(BOOL)isUniversalLink; 40 41 # pragma mark - app-wide linking handlers 42 43 + (BOOL)application:(UIApplication *)application 44 openURL:(NSURL *)URL 45 sourceApplication:(NSString *)sourceApplication 46 annotation:(id)annotation; 47 48 + (BOOL)application:(UIApplication *)application 49 continueUserActivity:(NSUserActivity *)userActivity 50 restorationHandler:(void (^)(NSArray *))restorationHandler; 51 52 + (NSURL *)initialUrlFromLaunchOptions: (NSDictionary *)launchOptions; 53 54 @end 55