1 // Copyright 2015-present 650 Industries. All rights reserved. 2 3 #import "EXKernelAppRecord.h" 4 5 @class RCTBridge; 6 @class EXReactAppManager; 7 @class EXKernelAppRegistry; 8 9 NS_ASSUME_NONNULL_BEGIN 10 11 @protocol EXKernelAppRegistryDelegate <NSObject> 12 13 - (void)appRegistry:(EXKernelAppRegistry *)registry didRegisterAppRecord:(EXKernelAppRecord *)appRecord; 14 - (void)appRegistry:(EXKernelAppRegistry *)registry willUnregisterAppRecord:(EXKernelAppRecord *)appRecord; 15 16 @end 17 18 @interface EXKernelAppRegistry : NSObject 19 20 - (void)registerHomeAppRecord:(EXKernelAppRecord *)homeRecord; 21 - (void)unregisterHomeAppRecord; 22 23 - (NSString *)registerAppWithManifestUrl:(NSURL *)manifestUrl initialProps:(NSDictionary *)initialProps; 24 - (void)unregisterAppWithRecordId:(NSString *)recordId; 25 26 @property (nonatomic, weak) id<EXKernelAppRegistryDelegate> delegate; 27 28 /** 29 * If Expo Home is available, return the record representing the Home app. 30 */ 31 @property (nonatomic, readonly, nullable) EXKernelAppRecord *homeAppRecord; 32 33 /** 34 * If we are running a standalone app, return the record for the standalone app. 35 */ 36 @property (nonatomic, readonly, nullable) EXKernelAppRecord *standaloneAppRecord; 37 38 - (EXKernelAppRecord *)recordForId:(NSString *)recordId; 39 - (EXKernelAppRecord * _Nullable)newestRecordWithExperienceId:(NSString *)experienceId; 40 - (NSEnumerator<id> *)appEnumerator; // does not include home 41 - (BOOL)isExperienceIdUnique:(NSString *)experienceId; 42 43 @end 44 45 NS_ASSUME_NONNULL_END 46