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 - (void)unregisterAppWithRecord:(nullable EXKernelAppRecord *)appRecord;
26 
27 @property (nonatomic, weak) id<EXKernelAppRegistryDelegate> delegate;
28 
29 /**
30  *  If Expo Home is available, return the record representing the Home app.
31  */
32 @property (nonatomic, readonly, nullable) EXKernelAppRecord *homeAppRecord;
33 
34 /**
35  *  If we are running a standalone app, return the record for the standalone app.
36  */
37 @property (nonatomic, readonly, nullable) EXKernelAppRecord *standaloneAppRecord;
38 
39 - (EXKernelAppRecord *)recordForId:(NSString *)recordId;
40 - (EXKernelAppRecord * _Nullable)newestRecordWithScopeKey:(NSString *)scopeKey;
41 - (NSEnumerator<id> *)appEnumerator; // does not include home
42 - (BOOL)isScopeKeyUnique:(NSString *)scopeKey;
43 
44 @end
45 
46 NS_ASSUME_NONNULL_END
47