1 // Copyright 2015-present 650 Industries. All rights reserved. 2 3 #import <Foundation/Foundation.h> 4 #import "EXKernelAppLoader.h" 5 6 NS_ASSUME_NONNULL_BEGIN 7 8 FOUNDATION_EXPORT NSString *kEXKernelBridgeDidForegroundNotification; 9 FOUNDATION_EXPORT NSString *kEXKernelBridgeDidBackgroundNotification; 10 11 @class EXFrameReactAppManager; 12 13 typedef enum EXKernelAppRecordStatus { 14 EXKernelAppRecordStatusNew, // record just created, has no manifest 15 EXKernelAppRecordStatusHasManifest, // has remote manifest, but does not have bundle yet 16 EXKernelAppRecordStatusHasManifestAndBundle, // has downloaded manifest and bundle, but we have not heard from bridge yet 17 EXKernelAppRecordStatusRunning // has loaded everything and successfully sent bundle to bridge 18 } EXKernelAppRecordStatus; 19 20 @interface EXKernelAppRecord : NSObject 21 22 + (instancetype)recordWithManifestUrl:(NSURL *)manifestUrl; 23 - (instancetype)initWithManifestUrl:(NSURL *)manifestUrl; 24 25 @property (nonatomic, readonly, assign) EXKernelAppRecordStatus status; 26 @property (nonatomic, readonly, strong) NSURL *manifestUrl; 27 @property (nonatomic, readonly, strong) NSString * _Nullable experienceId; 28 @property (nonatomic, readonly, strong) NSDate *timeCreated; 29 @property (nonatomic, weak) EXFrameReactAppManager * _Nullable appManager; 30 @property (nonatomic, readonly, strong) EXKernelAppLoader *appLoader; 31 @property (nonatomic, assign) BOOL experienceFinishedLoading; 32 33 /** 34 * See EXKernelAppRegistry::setError:forAppRecord: 35 */ 36 @property (nonatomic, strong) NSError * _Nullable error; 37 38 @end 39 40 NS_ASSUME_NONNULL_END 41