expo-constants 14.0.2 → 14.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,22 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 14.2.0 — 2023-02-03
14
+
15
+ ### 💡 Others
16
+
17
+ - On Android bump `compileSdkVersion` and `targetSdkVersion` to `33`. ([#20721](https://github.com/expo/expo/pull/20721) by [@lukmccall](https://github.com/lukmccall))
18
+
19
+ ## 14.1.0 — 2022-12-30
20
+
21
+ ### 🎉 New features
22
+
23
+ - Migrated Android implementation to Expo Modules API. ([#19974](https://github.com/expo/expo/pull/19974) by [@alanhughes](https://github.com/alanjhughes))
24
+
25
+ ### 🐛 Bug fixes
26
+
27
+ - Fix the list of platform keys in expo-module.config.json ([#20017](https://github.com/expo/expo/pull/20017) by [@alanjhughes](https://github.com/alanjhughes))
28
+
13
29
  ## 14.0.2 — 2022-10-30
14
30
 
15
31
  _This version does not introduce any user-facing changes._
@@ -26,7 +42,7 @@ _This version does not introduce any user-facing changes._
26
42
 
27
43
  ### 🐛 Bug fixes
28
44
 
29
- - Fixed *with-node.sh* doesn't keep quotes when passing arguments to Node.js and caused build errors when there are spaces in target name. ([#18741](https://github.com/expo/expo/pull/18741) by [@kudo](https://github.com/kudo))
45
+ - Fixed _with-node.sh_ doesn't keep quotes when passing arguments to Node.js and caused build errors when there are spaces in target name. ([#18741](https://github.com/expo/expo/pull/18741) by [@kudo](https://github.com/kudo))
30
46
 
31
47
  ### 💡 Others
32
48
 
package/README.md CHANGED
@@ -4,7 +4,7 @@ Provides system information that remains constant throughout the lifetime of you
4
4
 
5
5
  # API documentation
6
6
 
7
- - [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/constants.md)
7
+ - [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/constants.mdx)
8
8
  - [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/constants/)
9
9
 
10
10
  # Installation in managed Expo projects
@@ -24,8 +24,8 @@ expo install expo-constants
24
24
  #### Monorepo Support
25
25
 
26
26
  In a monorepo, the `expo-constants` package might be in a different folder than the native scripts are expecting. You can easily symlink the node module to your app's local `node_modules` folder by doing the following:
27
-
28
- - Follow the setup instructions for [`expo-yarn-workspaces`](https://github.com/expo/expo/tree/main/packages/expo-yarn-workspaces).
27
+
28
+ - Follow the setup instructions for [`expo-yarn-workspaces`](https://github.com/expo/expo/tree/main/packages/expo-yarn-workspaces).
29
29
  - Add the following configuration to your app's `package.json`:
30
30
 
31
31
  ```json
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '14.0.2'
6
+ version = '14.2.0'
7
7
 
8
8
  apply from: "../scripts/get-app-config-android.gradle"
9
9
 
@@ -61,7 +61,7 @@ afterEvaluate {
61
61
  }
62
62
 
63
63
  android {
64
- compileSdkVersion safeExtGet("compileSdkVersion", 31)
64
+ compileSdkVersion safeExtGet("compileSdkVersion", 33)
65
65
 
66
66
  compileOptions {
67
67
  sourceCompatibility JavaVersion.VERSION_11
@@ -74,9 +74,9 @@ android {
74
74
 
75
75
  defaultConfig {
76
76
  minSdkVersion safeExtGet("minSdkVersion", 21)
77
- targetSdkVersion safeExtGet("targetSdkVersion", 31)
77
+ targetSdkVersion safeExtGet("targetSdkVersion", 33)
78
78
  versionCode 33
79
- versionName "14.0.2"
79
+ versionName "14.2.0"
80
80
  }
81
81
  lintOptions {
82
82
  abortOnError false
@@ -1,35 +1,20 @@
1
1
  // Copyright 2015-present 650 Industries. All rights reserved.
2
2
  package expo.modules.constants
3
3
 
4
- import android.content.Context
4
+ import expo.modules.kotlin.modules.Module
5
+ import expo.modules.kotlin.modules.ModuleDefinition
5
6
 
6
- import expo.modules.core.ExportedModule
7
- import expo.modules.core.ModuleRegistry
8
- import expo.modules.core.ModuleRegistryDelegate
9
- import expo.modules.core.Promise
10
- import expo.modules.interfaces.constants.ConstantsInterface
11
- import expo.modules.core.interfaces.ExpoMethod
7
+ class ConstantsModule : Module() {
12
8
 
13
- class ConstantsModule(
14
- context: Context,
15
- private val moduleRegistryDelegate: ModuleRegistryDelegate = ModuleRegistryDelegate()
16
- ) : ExportedModule(context) {
9
+ override fun definition() = ModuleDefinition {
10
+ Name("ExponentConstants")
17
11
 
18
- private inline fun <reified T> moduleRegistry() = moduleRegistryDelegate.getFromModuleRegistry<T>()
12
+ Constants {
13
+ return@Constants appContext.constants?.constants ?: emptyMap()
14
+ }
19
15
 
20
- private val constantsService: ConstantsInterface by moduleRegistry()
21
-
22
- override fun getConstants(): Map<String, Any> = constantsService.constants
23
-
24
- override fun getName() = "ExponentConstants"
25
-
26
- override fun onCreate(moduleRegistry: ModuleRegistry) {
27
- moduleRegistryDelegate.onCreate(moduleRegistry)
28
- }
29
-
30
- @ExpoMethod
31
- fun getWebViewUserAgentAsync(promise: Promise) {
32
- val userAgent = System.getProperty("http.agent")
33
- promise.resolve(userAgent)
16
+ AsyncFunction("getWebViewUserAgentAsync") {
17
+ return@AsyncFunction System.getProperty("http.agent")
18
+ }
34
19
  }
35
20
  }
@@ -4,12 +4,8 @@ import android.content.Context
4
4
 
5
5
  import expo.modules.core.BasePackage
6
6
  import expo.modules.core.interfaces.InternalModule
7
- import expo.modules.core.ExportedModule
8
7
 
9
8
  class ConstantsPackage : BasePackage() {
10
9
  override fun createInternalModules(context: Context): List<InternalModule> =
11
10
  listOf(ConstantsService(context))
12
-
13
- override fun createExportedModules(context: Context): List<ExportedModule> =
14
- listOf(ConstantsModule(context))
15
11
  }
@@ -77,7 +77,7 @@ export interface ManifestAsset {
77
77
  /**
78
78
  * A modern manifest.
79
79
  */
80
- export declare type Manifest = {
80
+ export type Manifest = {
81
81
  id: string;
82
82
  createdAt: string;
83
83
  runtimeVersion: string;
@@ -86,7 +86,7 @@ export declare type Manifest = {
86
86
  metadata: object;
87
87
  extra?: ManifestExtra;
88
88
  };
89
- export declare type ManifestExtra = ClientScopingConfig & {
89
+ export type ManifestExtra = ClientScopingConfig & {
90
90
  expoClient?: ExpoConfig & {
91
91
  /**
92
92
  * Only present during development using @expo/cli.
@@ -96,21 +96,21 @@ export declare type ManifestExtra = ClientScopingConfig & {
96
96
  expoGo?: ExpoGoConfig;
97
97
  eas?: EASConfig;
98
98
  };
99
- export declare type EASConfig = {
99
+ export type EASConfig = {
100
100
  /**
101
101
  * The ID for this project if it's using EAS. UUID. This value will not change when a project is
102
102
  * transferred between accounts or renamed.
103
103
  */
104
104
  projectId?: string;
105
105
  };
106
- export declare type ClientScopingConfig = {
106
+ export type ClientScopingConfig = {
107
107
  /**
108
108
  * An opaque unique string for scoping client-side data to this project. This value
109
109
  * will not change when a project is transferred between accounts or renamed.
110
110
  */
111
111
  scopeKey?: string;
112
112
  };
113
- export declare type ExpoGoConfig = {
113
+ export type ExpoGoConfig = {
114
114
  mainModuleName?: string;
115
115
  debuggerHost?: string;
116
116
  logUrl?: string;
@@ -120,7 +120,7 @@ export declare type ExpoGoConfig = {
120
120
  };
121
121
  packagerOpts?: ExpoGoPackagerOpts;
122
122
  };
123
- export declare type ExpoGoPackagerOpts = {
123
+ export type ExpoGoPackagerOpts = {
124
124
  hostType?: string;
125
125
  dev?: boolean;
126
126
  strict?: boolean;
@@ -130,7 +130,7 @@ export declare type ExpoGoPackagerOpts = {
130
130
  lanType?: string;
131
131
  [key: string]: any;
132
132
  };
133
- export declare type ExpoClientConfig = ExpoConfig & {
133
+ export type ExpoClientConfig = ExpoConfig & {
134
134
  /**
135
135
  * Published apps only.
136
136
  */
@@ -162,7 +162,7 @@ export declare type ExpoClientConfig = ExpoConfig & {
162
162
  /**
163
163
  * Represents an intersection of all possible Config types.
164
164
  */
165
- export declare type AppManifest = ExpoClientConfig & ExpoGoConfig & EASConfig & ClientScopingConfig & Record<string, any>;
165
+ export type AppManifest = ExpoClientConfig & ExpoGoConfig & EASConfig & ClientScopingConfig & Record<string, any>;
166
166
  export interface PlatformManifest {
167
167
  ios?: IOSManifest;
168
168
  android?: AndroidManifest;
@@ -236,17 +236,22 @@ export interface NativeConstants {
236
236
  */
237
237
  nativeBuildVersion: string | null;
238
238
  /**
239
- * Classic manifest for Expo apps using classic updates.
239
+ * Classic manifest for Expo apps using classic updates and the updates embedded in builds.
240
240
  * Returns `null` in bare workflow and when `manifest2` is non-null.
241
+ * > Use `Constants.expoConfig` instead, which behaves more consistently across EAS Build
242
+ * and Update.
241
243
  */
242
244
  manifest: AppManifest | null;
243
245
  /**
244
- * New manifest for Expo apps using modern Expo Updates.
245
- * Returns `null` in bare workflow and when `manifest` is non-null.
246
+ * Manifest for Expo apps using modern Expo Updates from a remote source, such as apps that
247
+ * use EAS Update. Returns `null` in bare workflow and when `manifest` is non-null.
248
+ * > Use `Constants.expoConfig` instead, which behaves more consistently across EAS Build
249
+ * and Update.
246
250
  */
247
251
  manifest2: Manifest | null;
248
252
  /**
249
- * The standard Expo config object defined in `app.config.js` files. For both classic and new manifests.
253
+ * The standard Expo config object defined in `app.json` and `app.config.js` files. For both
254
+ * classic and modern manifests, whether they are embedded or remote.
250
255
  */
251
256
  expoConfig: ExpoConfig | null;
252
257
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.types.d.ts","sourceRoot":"","sources":["../src/Constants.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,oBAAY,YAAY;IACtB;;OAEG;IACH,UAAU,eAAe;IACzB;;OAEG;IACH,IAAI,SAAS;IACb;;OAEG;IACH,KAAK,UAAU;CAChB;AAGD,oBAAY,oBAAoB;IAC9B,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,WAAW,gBAAgB;CAC5B;AAGD;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,WAAW,gBAAgB;CAC5B;AAGD,M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B,yCAAmB,CAAA;IACnB,uCAAiB,CAAA;IACjB,iDAA2B,CAAA;AAC7B,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\n// @needsAudit\nexport enum AppOwnership {\n /**\n * It is a [standalone app](/classic/building-standalone-apps#building-standalone-apps).\n */\n Standalone = 'standalone',\n /**\n * The experience is running inside of the Expo Go app.\n */\n Expo = 'expo',\n /**\n * It has been opened through a link from a standalone app.\n */\n Guest = 'guest',\n}\n\n// @docsMissing\nexport enum ExecutionEnvironment {\n Bare = 'bare',\n Standalone = 'standalone',\n StoreClient = 'storeClient',\n}\n\n// @needsAudit\n/**\n * Current supported values are `handset` and `tablet`. Apple TV and CarPlay will show up\n * as `unsupported`.\n */\nexport enum UserInterfaceIdiom {\n Handset = 'handset',\n Tablet = 'tablet',\n Unsupported = 'unsupported',\n}\n\n// @needsAudit\nexport interface IOSManifest {\n /**\n * The build number specified in the embedded **Info.plist** value for `CFBundleVersion` in this app.\n * In a standalone app, you can set this with the `ios.buildNumber` value in **app.json**. This\n * may differ from the value in `Constants.manifest.ios.buildNumber` because the manifest\n * can be updated, whereas this value will never change for a given native binary.\n * The value is set to `null` in case you run your app in Expo Go.\n */\n buildNumber: string | null;\n /**\n * The Apple internal model identifier for this device, e.g. `iPhone1,1`.\n * @deprecated Use `expo-device`'s [`Device.modelId`](./device/#devicemodelid).\n */\n platform: string;\n /**\n * The human-readable model name of this device, e.g. `\"iPhone 7 Plus\"` if it can be determined,\n * otherwise will be `null`.\n * @deprecated Moved to `expo-device` as [`Device.modelName`](./device/#devicemodelname).\n */\n model: string | null;\n /**\n * The user interface idiom of this device, i.e. whether the app is running on an iPhone or an iPad.\n * @deprecated Use `expo-device`'s [`Device.getDeviceTypeAsync()`](./device/#devicegetdevicetypeasync).\n */\n userInterfaceIdiom: UserInterfaceIdiom;\n /**\n * The version of iOS running on this device, e.g. `10.3`.\n * @deprecated Use `expo-device`'s [`Device.osVersion`](./device/#deviceosversion).\n */\n systemVersion: string;\n [key: string]: any;\n}\n\n// @needsAudit\nexport interface AndroidManifest {\n /**\n * The version code set by `android.versionCode` in app.json.\n * The value is set to `null` in case you run your app in Expo Go.\n * @deprecated Use `expo-application`'s [`Application.nativeBuildVersion`](./application/#applicationnativebuildversion).\n */\n versionCode: number;\n [key: string]: any;\n}\n\nexport interface WebManifest {\n [key: string]: any;\n}\n\n// @docsMissing\nexport interface ManifestAsset {\n url: string;\n}\n\n// @needsAudit @docsMissing\n/**\n * A modern manifest.\n */\nexport type Manifest = {\n id: string;\n createdAt: string;\n runtimeVersion: string;\n launchAsset: ManifestAsset;\n assets: ManifestAsset[];\n metadata: object;\n extra?: ManifestExtra;\n};\n\n// @docsMissing\nexport type ManifestExtra = ClientScopingConfig & {\n expoClient?: ExpoConfig & {\n /**\n * Only present during development using @expo/cli.\n */\n hostUri?: string;\n };\n expoGo?: ExpoGoConfig;\n eas?: EASConfig;\n};\n\n// @needsAudit\nexport type EASConfig = {\n /**\n * The ID for this project if it's using EAS. UUID. This value will not change when a project is\n * transferred between accounts or renamed.\n */\n projectId?: string;\n};\n\n// @needsAudit\nexport type ClientScopingConfig = {\n /**\n * An opaque unique string for scoping client-side data to this project. This value\n * will not change when a project is transferred between accounts or renamed.\n */\n scopeKey?: string;\n};\n\n// @docsMissing\nexport type ExpoGoConfig = {\n mainModuleName?: string;\n debuggerHost?: string;\n logUrl?: string;\n developer?: {\n tool?: string;\n [key: string]: any;\n };\n packagerOpts?: ExpoGoPackagerOpts;\n};\n\n// @docsMissing\nexport type ExpoGoPackagerOpts = {\n hostType?: string;\n dev?: boolean;\n strict?: boolean;\n minify?: boolean;\n urlType?: string;\n urlRandomness?: string;\n lanType?: string;\n [key: string]: any;\n};\n\nexport type ExpoClientConfig = ExpoConfig & {\n /**\n * Published apps only.\n */\n releaseId?: string;\n revisionId?: string;\n releaseChannel?: string;\n bundleUrl: string;\n hostUri?: string;\n publishedTime?: string;\n /**\n * The Expo account name and slug for this project.\n * @deprecated Prefer `projectId` or `originalFullName` instead for identification and\n * `scopeKey` for scoping due to immutability.\n */\n id?: string;\n /**\n * The original Expo account name and slug for this project. Formatted like `@username/slug`.\n * When unauthenticated, the username is `@anonymous`. For published projects, this value\n * will not change when a project is transferred between accounts or renamed.\n */\n originalFullName?: string;\n /**\n * The Expo account name and slug used for display purposes. Formatted like `@username/slug`.\n * When unauthenticated, the username is `@anonymous`. For published projects, this value\n * may change when a project is transferred between accounts or renamed.\n */\n currentFullName?: string;\n};\n\n/**\n * Represents an intersection of all possible Config types.\n */\nexport type AppManifest = ExpoClientConfig &\n ExpoGoConfig &\n EASConfig &\n ClientScopingConfig &\n Record<string, any>;\n\n// @needsAudit @docsMissing\nexport interface PlatformManifest {\n ios?: IOSManifest;\n android?: AndroidManifest;\n web?: WebManifest;\n detach?: {\n scheme?: string;\n [key: string]: any;\n };\n logUrl?: string;\n scheme?: string;\n hostUri?: string;\n developer?: string;\n [key: string]: any;\n}\n\n// @needsAudit @docsMissing\nexport interface NativeConstants {\n /**\n * @hidden\n */\n name: 'ExponentConstants';\n /**\n * Returns `expo`, `standalone`, or `guest`. This property only applies to the managed workflow\n * and classic builds; for apps built with EAS Build and in bare workflow, the result is\n * always `null`.\n */\n appOwnership: AppOwnership | null;\n debugMode: boolean;\n /**\n * A human-readable name for the device type.\n */\n deviceName?: string;\n /**\n * The [device year class](https://github.com/facebook/device-year-class) of this device.\n * @deprecated Moved to `expo-device` as [`Device.deviceYearClass`](./device/#deviceyearclass).\n */\n deviceYearClass: number | null;\n executionEnvironment: ExecutionEnvironment;\n experienceUrl: string;\n // only nullable on web\n expoRuntimeVersion: string | null;\n /**\n * The version string of the Expo Go app currently running.\n * Returns `null` in bare workflow and web.\n */\n expoVersion: string | null;\n isDetached?: boolean;\n intentUri?: string;\n /**\n * An identifier that is unique to this particular device and whose lifetime is at least as long\n * as the installation of the app.\n * @deprecated `Constants.installationId` is deprecated in favor of generating your own ID and\n * storing it.\n */\n installationId: string;\n /**\n * `true` if the app is running on a device, `false` if running in a simulator or emulator.\n * @deprecated Use `expo-device`'s [`Device.isDevice`](./device/#deviceisdevice).\n */\n isDevice: boolean;\n isHeadless: boolean;\n linkingUri: string;\n /**\n * The **Info.plist** value for `CFBundleShortVersionString` on iOS and the version name set\n * by `version` in app.json on Android at the time the native app was built.\n * @deprecated Use `expo-application`'s [`Application.nativeApplicationVersion`](./application/#applicationnativeapplicationversion).\n */\n nativeAppVersion: string | null;\n /**\n * The **Info.plist** value for `CFBundleVersion` on iOS (set with `ios.buildNumber` value in\n * **app.json** in a standalone app) and the version code set by `android.versionCode` in\n * **app.json** on Android at the time the native app was built.\n * @deprecated Use `expo-application`'s [`Application.nativeBuildVersion`](./application/#applicationnativebuildversion).\n */\n nativeBuildVersion: string | null;\n /**\n * Classic manifest for Expo apps using classic updates.\n * Returns `null` in bare workflow and when `manifest2` is non-null.\n */\n manifest: AppManifest | null;\n /**\n * New manifest for Expo apps using modern Expo Updates.\n * Returns `null` in bare workflow and when `manifest` is non-null.\n */\n manifest2: Manifest | null;\n /**\n * The standard Expo config object defined in `app.config.js` files. For both classic and new manifests.\n */\n expoConfig: ExpoConfig | null;\n /**\n * A string that is unique to the current session of your app. It is different across apps and\n * across multiple launches of the same app.\n */\n sessionId: string;\n /**\n * The default status bar height for the device. Does not factor in changes when location tracking\n * is in use or a phone call is active.\n */\n statusBarHeight: number;\n /**\n * A list of the system font names available on the current device.\n */\n systemFonts: string[];\n systemVersion?: number;\n /**\n * @hidden\n */\n supportedExpoSdks?: string[];\n platform?: PlatformManifest;\n /**\n * Gets the user agent string which would be included in requests sent by a web view running on\n * this device. This is probably not the same user agent you might be providing in your JS `fetch`\n * requests.\n */\n getWebViewUserAgentAsync: () => Promise<string | null>;\n [key: string]: any;\n}\n\nexport interface Constants extends NativeConstants {\n /**\n * @hidden\n * @warning do not use this property. Use `manifest` by default.\n *\n * In certain cases accessing manifest via this property\n * suppresses important warning about missing manifest.\n */\n __unsafeNoWarnManifest?: AppManifest;\n /**\n * @hidden\n * @warning do not use this property. Use `manifest2` by default.\n *\n * In certain cases accessing manifest via this property\n * suppresses important warning about missing manifest.\n */\n __unsafeNoWarnManifest2?: Manifest;\n}\n"]}
1
+ {"version":3,"file":"Constants.types.js","sourceRoot":"","sources":["../src/Constants.types.ts"],"names":[],"mappings":"AAEA,cAAc;AACd,MAAM,CAAN,IAAY,YAaX;AAbD,WAAY,YAAY;IACtB;;OAEG;IACH,yCAAyB,CAAA;IACzB;;OAEG;IACH,6BAAa,CAAA;IACb;;OAEG;IACH,+BAAe,CAAA;AACjB,CAAC,EAbW,YAAY,KAAZ,YAAY,QAavB;AAED,eAAe;AACf,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,iDAAyB,CAAA;IACzB,mDAA2B,CAAA;AAC7B,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B;AAED,cAAc;AACd;;;GAGG;AACH,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,uCAAiB,CAAA;IACjB,iDAA2B,CAAA;AAC7B,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\n// @needsAudit\nexport enum AppOwnership {\n /**\n * It is a [standalone app](/classic/building-standalone-apps#building-standalone-apps).\n */\n Standalone = 'standalone',\n /**\n * The experience is running inside of the Expo Go app.\n */\n Expo = 'expo',\n /**\n * It has been opened through a link from a standalone app.\n */\n Guest = 'guest',\n}\n\n// @docsMissing\nexport enum ExecutionEnvironment {\n Bare = 'bare',\n Standalone = 'standalone',\n StoreClient = 'storeClient',\n}\n\n// @needsAudit\n/**\n * Current supported values are `handset` and `tablet`. Apple TV and CarPlay will show up\n * as `unsupported`.\n */\nexport enum UserInterfaceIdiom {\n Handset = 'handset',\n Tablet = 'tablet',\n Unsupported = 'unsupported',\n}\n\n// @needsAudit\nexport interface IOSManifest {\n /**\n * The build number specified in the embedded **Info.plist** value for `CFBundleVersion` in this app.\n * In a standalone app, you can set this with the `ios.buildNumber` value in **app.json**. This\n * may differ from the value in `Constants.manifest.ios.buildNumber` because the manifest\n * can be updated, whereas this value will never change for a given native binary.\n * The value is set to `null` in case you run your app in Expo Go.\n */\n buildNumber: string | null;\n /**\n * The Apple internal model identifier for this device, e.g. `iPhone1,1`.\n * @deprecated Use `expo-device`'s [`Device.modelId`](./device/#devicemodelid).\n */\n platform: string;\n /**\n * The human-readable model name of this device, e.g. `\"iPhone 7 Plus\"` if it can be determined,\n * otherwise will be `null`.\n * @deprecated Moved to `expo-device` as [`Device.modelName`](./device/#devicemodelname).\n */\n model: string | null;\n /**\n * The user interface idiom of this device, i.e. whether the app is running on an iPhone or an iPad.\n * @deprecated Use `expo-device`'s [`Device.getDeviceTypeAsync()`](./device/#devicegetdevicetypeasync).\n */\n userInterfaceIdiom: UserInterfaceIdiom;\n /**\n * The version of iOS running on this device, e.g. `10.3`.\n * @deprecated Use `expo-device`'s [`Device.osVersion`](./device/#deviceosversion).\n */\n systemVersion: string;\n [key: string]: any;\n}\n\n// @needsAudit\nexport interface AndroidManifest {\n /**\n * The version code set by `android.versionCode` in app.json.\n * The value is set to `null` in case you run your app in Expo Go.\n * @deprecated Use `expo-application`'s [`Application.nativeBuildVersion`](./application/#applicationnativebuildversion).\n */\n versionCode: number;\n [key: string]: any;\n}\n\nexport interface WebManifest {\n [key: string]: any;\n}\n\n// @docsMissing\nexport interface ManifestAsset {\n url: string;\n}\n\n// @needsAudit @docsMissing\n/**\n * A modern manifest.\n */\nexport type Manifest = {\n id: string;\n createdAt: string;\n runtimeVersion: string;\n launchAsset: ManifestAsset;\n assets: ManifestAsset[];\n metadata: object;\n extra?: ManifestExtra;\n};\n\n// @docsMissing\nexport type ManifestExtra = ClientScopingConfig & {\n expoClient?: ExpoConfig & {\n /**\n * Only present during development using @expo/cli.\n */\n hostUri?: string;\n };\n expoGo?: ExpoGoConfig;\n eas?: EASConfig;\n};\n\n// @needsAudit\nexport type EASConfig = {\n /**\n * The ID for this project if it's using EAS. UUID. This value will not change when a project is\n * transferred between accounts or renamed.\n */\n projectId?: string;\n};\n\n// @needsAudit\nexport type ClientScopingConfig = {\n /**\n * An opaque unique string for scoping client-side data to this project. This value\n * will not change when a project is transferred between accounts or renamed.\n */\n scopeKey?: string;\n};\n\n// @docsMissing\nexport type ExpoGoConfig = {\n mainModuleName?: string;\n debuggerHost?: string;\n logUrl?: string;\n developer?: {\n tool?: string;\n [key: string]: any;\n };\n packagerOpts?: ExpoGoPackagerOpts;\n};\n\n// @docsMissing\nexport type ExpoGoPackagerOpts = {\n hostType?: string;\n dev?: boolean;\n strict?: boolean;\n minify?: boolean;\n urlType?: string;\n urlRandomness?: string;\n lanType?: string;\n [key: string]: any;\n};\n\nexport type ExpoClientConfig = ExpoConfig & {\n /**\n * Published apps only.\n */\n releaseId?: string;\n revisionId?: string;\n releaseChannel?: string;\n bundleUrl: string;\n hostUri?: string;\n publishedTime?: string;\n /**\n * The Expo account name and slug for this project.\n * @deprecated Prefer `projectId` or `originalFullName` instead for identification and\n * `scopeKey` for scoping due to immutability.\n */\n id?: string;\n /**\n * The original Expo account name and slug for this project. Formatted like `@username/slug`.\n * When unauthenticated, the username is `@anonymous`. For published projects, this value\n * will not change when a project is transferred between accounts or renamed.\n */\n originalFullName?: string;\n /**\n * The Expo account name and slug used for display purposes. Formatted like `@username/slug`.\n * When unauthenticated, the username is `@anonymous`. For published projects, this value\n * may change when a project is transferred between accounts or renamed.\n */\n currentFullName?: string;\n};\n\n/**\n * Represents an intersection of all possible Config types.\n */\nexport type AppManifest = ExpoClientConfig &\n ExpoGoConfig &\n EASConfig &\n ClientScopingConfig &\n Record<string, any>;\n\n// @needsAudit @docsMissing\nexport interface PlatformManifest {\n ios?: IOSManifest;\n android?: AndroidManifest;\n web?: WebManifest;\n detach?: {\n scheme?: string;\n [key: string]: any;\n };\n logUrl?: string;\n scheme?: string;\n hostUri?: string;\n developer?: string;\n [key: string]: any;\n}\n\n// @needsAudit @docsMissing\nexport interface NativeConstants {\n /**\n * @hidden\n */\n name: 'ExponentConstants';\n /**\n * Returns `expo`, `standalone`, or `guest`. This property only applies to the managed workflow\n * and classic builds; for apps built with EAS Build and in bare workflow, the result is\n * always `null`.\n */\n appOwnership: AppOwnership | null;\n debugMode: boolean;\n /**\n * A human-readable name for the device type.\n */\n deviceName?: string;\n /**\n * The [device year class](https://github.com/facebook/device-year-class) of this device.\n * @deprecated Moved to `expo-device` as [`Device.deviceYearClass`](./device/#deviceyearclass).\n */\n deviceYearClass: number | null;\n executionEnvironment: ExecutionEnvironment;\n experienceUrl: string;\n // only nullable on web\n expoRuntimeVersion: string | null;\n /**\n * The version string of the Expo Go app currently running.\n * Returns `null` in bare workflow and web.\n */\n expoVersion: string | null;\n isDetached?: boolean;\n intentUri?: string;\n /**\n * An identifier that is unique to this particular device and whose lifetime is at least as long\n * as the installation of the app.\n * @deprecated `Constants.installationId` is deprecated in favor of generating your own ID and\n * storing it.\n */\n installationId: string;\n /**\n * `true` if the app is running on a device, `false` if running in a simulator or emulator.\n * @deprecated Use `expo-device`'s [`Device.isDevice`](./device/#deviceisdevice).\n */\n isDevice: boolean;\n isHeadless: boolean;\n linkingUri: string;\n /**\n * The **Info.plist** value for `CFBundleShortVersionString` on iOS and the version name set\n * by `version` in app.json on Android at the time the native app was built.\n * @deprecated Use `expo-application`'s [`Application.nativeApplicationVersion`](./application/#applicationnativeapplicationversion).\n */\n nativeAppVersion: string | null;\n /**\n * The **Info.plist** value for `CFBundleVersion` on iOS (set with `ios.buildNumber` value in\n * **app.json** in a standalone app) and the version code set by `android.versionCode` in\n * **app.json** on Android at the time the native app was built.\n * @deprecated Use `expo-application`'s [`Application.nativeBuildVersion`](./application/#applicationnativebuildversion).\n */\n nativeBuildVersion: string | null;\n /**\n * Classic manifest for Expo apps using classic updates and the updates embedded in builds.\n * Returns `null` in bare workflow and when `manifest2` is non-null.\n * > Use `Constants.expoConfig` instead, which behaves more consistently across EAS Build\n * and Update.\n */\n manifest: AppManifest | null;\n /**\n * Manifest for Expo apps using modern Expo Updates from a remote source, such as apps that\n * use EAS Update. Returns `null` in bare workflow and when `manifest` is non-null.\n * > Use `Constants.expoConfig` instead, which behaves more consistently across EAS Build\n * and Update.\n */\n manifest2: Manifest | null;\n /**\n * The standard Expo config object defined in `app.json` and `app.config.js` files. For both\n * classic and modern manifests, whether they are embedded or remote.\n */\n expoConfig: ExpoConfig | null;\n /**\n * A string that is unique to the current session of your app. It is different across apps and\n * across multiple launches of the same app.\n */\n sessionId: string;\n /**\n * The default status bar height for the device. Does not factor in changes when location tracking\n * is in use or a phone call is active.\n */\n statusBarHeight: number;\n /**\n * A list of the system font names available on the current device.\n */\n systemFonts: string[];\n systemVersion?: number;\n /**\n * @hidden\n */\n supportedExpoSdks?: string[];\n platform?: PlatformManifest;\n /**\n * Gets the user agent string which would be included in requests sent by a web view running on\n * this device. This is probably not the same user agent you might be providing in your JS `fetch`\n * requests.\n */\n getWebViewUserAgentAsync: () => Promise<string | null>;\n [key: string]: any;\n}\n\nexport interface Constants extends NativeConstants {\n /**\n * @hidden\n * @warning do not use this property. Use `manifest` by default.\n *\n * In certain cases accessing manifest via this property\n * suppresses important warning about missing manifest.\n */\n __unsafeNoWarnManifest?: AppManifest;\n /**\n * @hidden\n * @warning do not use this property. Use `manifest2` by default.\n *\n * In certain cases accessing manifest via this property\n * suppresses important warning about missing manifest.\n */\n __unsafeNoWarnManifest2?: Manifest;\n}\n"]}
@@ -1,3 +1,3 @@
1
- declare const _default: import("expo-modules-core").ProxyNativeModule;
2
- export default _default;
1
+ declare let ExponentConstants: any;
2
+ export default ExponentConstants;
3
3
  //# sourceMappingURL=ExponentConstants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExponentConstants.d.ts","sourceRoot":"","sources":["../src/ExponentConstants.ts"],"names":[],"mappings":";AACA,wBAAoD"}
1
+ {"version":3,"file":"ExponentConstants.d.ts","sourceRoot":"","sources":["../src/ExponentConstants.ts"],"names":[],"mappings":"AAEA,QAAA,IAAI,iBAAiB,KAAA,CAAC;AAItB,eAAe,iBAAiB,CAAC"}
@@ -1,3 +1,8 @@
1
- import { NativeModulesProxy } from 'expo-modules-core';
2
- export default NativeModulesProxy.ExponentConstants;
1
+ import { requireNativeModule } from 'expo-modules-core';
2
+ let ExponentConstants;
3
+ try {
4
+ ExponentConstants = requireNativeModule('ExponentConstants');
5
+ }
6
+ catch { }
7
+ export default ExponentConstants;
3
8
  //# sourceMappingURL=ExponentConstants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExponentConstants.js","sourceRoot":"","sources":["../src/ExponentConstants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,eAAe,kBAAkB,CAAC,iBAAiB,CAAC","sourcesContent":["import { NativeModulesProxy } from 'expo-modules-core';\nexport default NativeModulesProxy.ExponentConstants;\n"]}
1
+ {"version":3,"file":"ExponentConstants.js","sourceRoot":"","sources":["../src/ExponentConstants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,IAAI,iBAAiB,CAAC;AACtB,IAAI;IACF,iBAAiB,GAAG,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;CAC9D;AAAC,MAAM,GAAE;AACV,eAAe,iBAAiB,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nlet ExponentConstants;\ntry {\n ExponentConstants = requireNativeModule('ExponentConstants');\n} catch {}\nexport default ExponentConstants;\n"]}
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "expo-constants",
3
+ "platforms": ["ios", "android", "web"],
4
+ "ios": {
5
+ "modules": ["ConstantsModule"]
6
+ },
7
+ "android": {
8
+ "modules": ["expo.modules.constants.ConstantsModule"]
9
+ }
10
+ }
@@ -0,0 +1,19 @@
1
+ import ExpoModulesCore
2
+ import WebKit
3
+
4
+ public class ConstantsModule: Module {
5
+ private lazy var constants = appContext?.constants?.constants() as? [String: Any] ?? [:]
6
+
7
+ public func definition() -> ModuleDefinition {
8
+ Name("ExponentConstants")
9
+
10
+ Constants {
11
+ return constants
12
+ }
13
+
14
+ AsyncFunction("getWebViewUserAgentAsync") { () -> String? in
15
+ let webView = WKWebView()
16
+ return webView.value(forKey: "userAgent") as? String
17
+ }.runOnQueue(.main)
18
+ }
19
+ }
@@ -11,16 +11,23 @@ Pod::Spec.new do |s|
11
11
  s.author = package['author']
12
12
  s.homepage = package['homepage']
13
13
  s.platform = :ios, '13.0'
14
+ s.swift_version = '5.4'
14
15
  s.source = { git: 'https://github.com/expo/expo.git' }
15
16
  s.static_framework = true
16
17
 
17
18
  s.dependency 'ExpoModulesCore'
18
19
 
20
+ # Swift/Objective-C compatibility
21
+ s.pod_target_xcconfig = {
22
+ 'DEFINES_MODULE' => 'YES',
23
+ 'SWIFT_COMPILATION_MODE' => 'wholemodule'
24
+ }
25
+
19
26
  if !$ExpoUseSources&.include?(package['name']) && ENV['EXPO_USE_SOURCE'].to_i == 0 && File.exist?("#{s.name}.xcframework") && Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0')
20
- s.source_files = "#{s.name}/**/*.h"
27
+ s.source_files = "**/*.h"
21
28
  s.vendored_frameworks = "#{s.name}.xcframework"
22
29
  else
23
- s.source_files = "#{s.name}/**/*.{h,m}"
30
+ s.source_files = "**/*.{h,m,swift}"
24
31
  end
25
32
 
26
33
  s.script_phase = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-constants",
3
- "version": "14.0.2",
3
+ "version": "14.2.0",
4
4
  "description": "Provides system information that remains constant throughout the lifetime of your app.",
5
5
  "main": "build/Constants.js",
6
6
  "types": "build/Constants.d.ts",
@@ -34,7 +34,7 @@
34
34
  "preset": "expo-module-scripts"
35
35
  },
36
36
  "dependencies": {
37
- "@expo/config": "~7.0.2",
37
+ "@expo/config": "~8.0.0",
38
38
  "uuid": "^3.3.2"
39
39
  },
40
40
  "devDependencies": {
@@ -43,5 +43,5 @@
43
43
  "peerDependencies": {
44
44
  "expo": "*"
45
45
  },
46
- "gitHead": "b56ceb5bface07762c968c882575a041105b13b6"
46
+ "gitHead": "1815e2eaad8c753588c7b1eb74420174a28e01f4"
47
47
  }
@@ -272,17 +272,22 @@ export interface NativeConstants {
272
272
  */
273
273
  nativeBuildVersion: string | null;
274
274
  /**
275
- * Classic manifest for Expo apps using classic updates.
275
+ * Classic manifest for Expo apps using classic updates and the updates embedded in builds.
276
276
  * Returns `null` in bare workflow and when `manifest2` is non-null.
277
+ * > Use `Constants.expoConfig` instead, which behaves more consistently across EAS Build
278
+ * and Update.
277
279
  */
278
280
  manifest: AppManifest | null;
279
281
  /**
280
- * New manifest for Expo apps using modern Expo Updates.
281
- * Returns `null` in bare workflow and when `manifest` is non-null.
282
+ * Manifest for Expo apps using modern Expo Updates from a remote source, such as apps that
283
+ * use EAS Update. Returns `null` in bare workflow and when `manifest` is non-null.
284
+ * > Use `Constants.expoConfig` instead, which behaves more consistently across EAS Build
285
+ * and Update.
282
286
  */
283
287
  manifest2: Manifest | null;
284
288
  /**
285
- * The standard Expo config object defined in `app.config.js` files. For both classic and new manifests.
289
+ * The standard Expo config object defined in `app.json` and `app.config.js` files. For both
290
+ * classic and modern manifests, whether they are embedded or remote.
286
291
  */
287
292
  expoConfig: ExpoConfig | null;
288
293
  /**
@@ -1,2 +1,7 @@
1
- import { NativeModulesProxy } from 'expo-modules-core';
2
- export default NativeModulesProxy.ExponentConstants;
1
+ import { requireNativeModule } from 'expo-modules-core';
2
+
3
+ let ExponentConstants;
4
+ try {
5
+ ExponentConstants = requireNativeModule('ExponentConstants');
6
+ } catch {}
7
+ export default ExponentConstants;
@@ -1,8 +0,0 @@
1
- // Copyright 2015-present 650 Industries. All rights reserved.
2
-
3
- #import <ExpoModulesCore/EXExportedModule.h>
4
- #import <ExpoModulesCore/EXModuleRegistryConsumer.h>
5
-
6
- @interface EXConstants : EXExportedModule <EXModuleRegistryConsumer>
7
-
8
- @end
@@ -1,66 +0,0 @@
1
- // Copyright 2015-present 650 Industries. All rights reserved.
2
-
3
- #import <EXConstants/EXConstants.h>
4
- #import <ExpoModulesCore/EXConstantsInterface.h>
5
-
6
- #import <WebKit/WKWebView.h>
7
-
8
- @interface EXConstants () {
9
- WKWebView *webView;
10
- }
11
-
12
- @property (nonatomic, strong) NSString *webViewUserAgent;
13
- @property (nonatomic, weak) id<EXConstantsInterface> constantsService;
14
-
15
- @end
16
-
17
- @implementation EXConstants
18
-
19
- EX_REGISTER_MODULE();
20
-
21
- + (const NSString *)exportedModuleName
22
- {
23
- return @"ExponentConstants";
24
- }
25
-
26
- - (void)setModuleRegistry:(EXModuleRegistry *)moduleRegistry
27
- {
28
- _constantsService = [moduleRegistry getModuleImplementingProtocol:@protocol(EXConstantsInterface)];
29
- }
30
-
31
- - (NSDictionary *)constantsToExport
32
- {
33
- return [_constantsService constants];
34
- }
35
-
36
- EX_EXPORT_METHOD_AS(getWebViewUserAgentAsync,
37
- getWebViewUserAgentWithResolver:(EXPromiseResolveBlock)resolve
38
- rejecter:(EXPromiseRejectBlock)reject)
39
- {
40
- __weak EXConstants *weakSelf = self;
41
- dispatch_async(dispatch_get_main_queue(), ^{
42
- __strong EXConstants *strongSelf = weakSelf;
43
- if (strongSelf) {
44
- if (!strongSelf.webViewUserAgent) {
45
- // We need to retain the webview because it runs an async task.
46
- strongSelf->webView = [[WKWebView alloc] init];
47
-
48
- [strongSelf->webView evaluateJavaScript:@"window.navigator.userAgent;" completionHandler:^(id _Nullable result, NSError * _Nullable error) {
49
- if (error) {
50
- reject(@"ERR_CONSTANTS", error.localizedDescription, error);
51
- return;
52
- }
53
-
54
- strongSelf.webViewUserAgent = [NSString stringWithFormat:@"%@", result];
55
- resolve(EXNullIfNil(strongSelf.webViewUserAgent));
56
- // Destroy the webview now that it's task is complete.
57
- strongSelf->webView = nil;
58
- }];
59
- } else {
60
- resolve(EXNullIfNil(strongSelf.webViewUserAgent));
61
- }
62
- }
63
- });
64
- }
65
-
66
- @end
package/unimodule.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "name": "expo-constants",
3
- "platforms": ["ios", "android"]
4
- }