1 // Copyright 2015-present 650 Industries. All rights reserved. 2 3 #import <Foundation/Foundation.h> 4 5 NS_ASSUME_NONNULL_BEGIN 6 7 FOUNDATION_EXPORT NSString *kEXKernelBridgeDidForegroundNotification; 8 FOUNDATION_EXPORT NSString *kEXKernelBridgeDidBackgroundNotification; 9 10 @class EXAppViewController; 11 @class EXReactAppManager; 12 @class EXAbstractLoader; 13 14 typedef enum EXKernelAppRecordStatus { 15 kEXKernelAppRecordStatusNew, // record just created 16 kEXKernelAppRecordStatusDownloading, // resolving manifest or bundle 17 kEXKernelAppRecordStatusBridgeLoading, // bridge not loaded yet 18 kEXKernelAppRecordStatusRunning, // app is running 19 kEXKernelAppRecordStatusError, 20 } EXKernelAppRecordStatus; 21 22 @interface EXKernelAppRecord : NSObject 23 24 - (instancetype)initWithManifestUrl:(NSURL *)manifestUrl initialProps:(nullable NSDictionary *)initialProps; 25 - (instancetype)initWithAppLoader:(EXAbstractLoader *)customAppLoader 26 appManager:(EXReactAppManager *)customAppManager; 27 28 @property (nonatomic, readonly, assign) EXKernelAppRecordStatus status; 29 @property (nonatomic, readonly, strong) NSDate *timeCreated; 30 @property (nonatomic, readonly) NSString * _Nullable scopeKey; 31 @property (nonatomic, readonly) EXReactAppManager *appManager; 32 @property (nonatomic, readonly, strong) EXAbstractLoader *appLoader; 33 @property (nonatomic, readonly) EXAppViewController *viewController; 34 35 /** 36 * See EXKernelAppRegistry::setError:forAppRecord: 37 */ 38 @property (nonatomic, strong) NSError * _Nullable error; 39 40 @end 41 42 NS_ASSUME_NONNULL_END 43