1 // Copyright 2015-present 650 Industries. All rights reserved.
2 
3 #import <Foundation/Foundation.h>
4 #import "EXTest.h"
5 
6 NS_ASSUME_NONNULL_BEGIN
7 
8 FOUNDATION_EXPORT NSString * const kEXEmbeddedBundleResourceName;
9 FOUNDATION_EXPORT NSString * const kEXEmbeddedManifestResourceName;
10 
11 @interface EXEnvironment : NSObject
12 
13 + (instancetype)sharedEnvironment;
14 
15 /**
16  *  Whether the app is running as a detached/standalone app (true) or as a browser/Expo Client (false).
17  */
18 @property (nonatomic, readonly) BOOL isDetached;
19 
20 /**
21  *  Whether the app was built with a Debug configuration.
22  */
23 @property (nonatomic, readonly) BOOL isDebugXCodeScheme;
24 
25 /**
26  *  The manifest url of the standalone app (if isDetached == true).
27  */
28 @property (nonatomic, readonly, nullable) NSString *standaloneManifestUrl;
29 
30 /**
31  *  The custom url scheme for the standalone app (if isDetached == true).
32  */
33 @property (nonatomic, readonly, nullable) NSString *urlScheme;
34 
35 /**
36  *  The release channel from which to fetch the standalone app (if isDetached == true).
37  */
38 @property (nonatomic, readonly, nonnull) NSString *releaseChannel;
39 
40 /**
41  *  The `bundleUrl` given by the embedded manifest that shipped with this NSBundle, if any.
42  */
43 @property (nonatomic, readonly) NSString * _Nullable embeddedBundleUrl;
44 
45 /**
46  *  Contains `standaloneManifestUrl`, and may also contain a local development url for a detached project.
47  */
48 @property (nonatomic, readonly, nonnull) NSArray *allManifestUrls;
49 
50 /**
51  *  True by default in ExpoKit apps created with `exp detach`, because the owner of the app needs to
52  *  manually modify their App Id to enable keychain sharing.
53  */
54 @property (nonatomic, readonly) BOOL isManifestVerificationBypassed;
55 
56 /**
57  *  Whether remote updates are allowed at all for this standalone app.
58  */
59 @property (nonatomic, readonly) BOOL areRemoteUpdatesEnabled;
60 
61 /**
62  *  Whether the app is running in a test environment (local Xcode test target, CI, or not at all).
63  */
64 @property (nonatomic, assign) EXTestEnvironment testEnvironment;
65 
66 /**
67  *  True if the given string is not null and equals self.urlScheme
68  */
69 - (BOOL)isStandaloneUrlScheme:(NSString *)scheme;
70 
71 /**
72  *  True if urlScheme is nonnull.
73  */
74 - (BOOL)hasUrlScheme;
75 
76 @end
77 
78 NS_ASSUME_NONNULL_END
79