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 <EXLinkingManagerScopedModuleDelegate> 10 11 /** 12 * Either opens the url on an existing bridge, or sends it to the kernel 13 * for opening on a new bridge. 14 */ 15 - (void)openUrl:(NSString *)urlString isUniversalLink:(BOOL)isUniversalLink; 16 17 /** 18 * Returns the deep link prefix for a given experience uri. 19 */ 20 + (NSString *)linkingUriForExperienceUri:(NSURL *)uri useLegacy:(BOOL)useLegacy; 21 22 /** 23 * Normalize a uri and (if needed) subtitute 24 * standalone-app-specific deep link formatting. 25 */ 26 + (NSURL *)uriTransformedForLinking:(NSURL *)uri isUniversalLink:(BOOL)isUniversalLink; 27 28 /** 29 * Replace (if needed) initial uri with one from launch options, 30 * and transform for correct deep link formatting. 31 */ 32 + (NSURL *)initialUriWithManifestUrl:(NSURL *)manifestUrl; 33 34 + (NSString *)stringByRemovingDeepLink:(NSString *)path; 35 36 /** 37 * Determine if an url is hosted by expo 38 */ 39 + (BOOL)isExpoHostedUrl: (NSURL *)url; 40 41 /** 42 * Grab the release channel from the query parameters of a uri 43 */ 44 + (NSString *)releaseChannelWithUrlComponents:(NSURLComponents *)urlComponents; 45 46 # pragma mark - app-wide linking handlers 47 48 + (BOOL)application:(UIApplication *)application 49 openURL:(NSURL *)URL 50 sourceApplication:(NSString *)sourceApplication 51 annotation:(id)annotation; 52 53 + (BOOL)application:(UIApplication *)application 54 continueUserActivity:(NSUserActivity *)userActivity 55 restorationHandler:(void (^)(NSArray *))restorationHandler; 56 57 + (NSURL *)initialUrlFromLaunchOptions: (NSDictionary *)launchOptions; 58 59 @end 60