expo-constants 15.4.2 → 15.4.3

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,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 15.4.3 — 2024-01-10
14
+
15
+ ### 🎉 New features
16
+
17
+ - Added support for macOS platform. ([#26233](https://github.com/expo/expo/pull/26233) by [@tsapeta](https://github.com/tsapeta))
18
+
13
19
  ## 15.4.2 — 2023-12-19
14
20
 
15
21
  _This version does not introduce any user-facing changes._
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '15.4.2'
6
+ version = '15.4.3'
7
7
 
8
8
  apply from: "../scripts/get-app-config-android.gradle"
9
9
 
@@ -96,7 +96,7 @@ android {
96
96
  namespace "expo.modules.constants"
97
97
  defaultConfig {
98
98
  versionCode 33
99
- versionName "15.4.2"
99
+ versionName "15.4.3"
100
100
  }
101
101
  }
102
102
 
@@ -20,12 +20,13 @@ export declare enum ExecutionEnvironment {
20
20
  StoreClient = "storeClient"
21
21
  }
22
22
  /**
23
- * Current supported values are `handset`, `tablet`, and `tv`. CarPlay will show up
23
+ * Current supported values are `handset`, `tablet`, `desktop` and `tv`. CarPlay will show up
24
24
  * as `unsupported`.
25
25
  */
26
26
  export declare enum UserInterfaceIdiom {
27
27
  Handset = "handset",
28
28
  Tablet = "tablet",
29
+ Desktop = "desktop",
29
30
  TV = "tv",
30
31
  Unsupported = "unsupported"
31
32
  }
@@ -50,7 +51,7 @@ export interface IOSManifest {
50
51
  */
51
52
  model: string | null;
52
53
  /**
53
- * The user interface idiom of this device, i.e. whether the app is running on an iPhone, iPad, or Apple TV.
54
+ * The user interface idiom of this device, i.e. whether the app is running on an iPhone, iPad, Mac or Apple TV.
54
55
  * @deprecated Use `expo-device`'s [`Device.getDeviceTypeAsync()`](./device/#devicegetdevicetypeasync).
55
56
  */
56
57
  userInterfaceIdiom: UserInterfaceIdiom;
@@ -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;AAChD,OAAO,KAAK,EACV,SAAS,IAAI,kBAAkB,EAC/B,YAAY,IAAI,qBAAqB,EACrC,WAAW,EACX,YAAY,EACZ,aAAa,IAAI,wBAAwB,EACzC,aAAa,IAAI,wBAAwB,EACzC,mBAAmB,IAAI,8BAA8B,EACrD,kBAAkB,IAAI,6BAA6B,EAEpD,MAAM,gBAAgB,CAAC;AAGxB,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,EAAE,OAAO;IACT,WAAW,gBAAgB;CAC5B;AAGD,MAAM,WAAW,WAAW;IAC1B;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;;OAGG;IACH,kBAAkB,EAAE,kBAAkB,CAAC;IACvC;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAGD,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IA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ironment;
23
23
  })(ExecutionEnvironment || (ExecutionEnvironment = {}));
24
24
  // @needsAudit
25
25
  /**
26
- * Current supported values are `handset`, `tablet`, and `tv`. CarPlay will show up
26
+ * Current supported values are `handset`, `tablet`, `desktop` and `tv`. CarPlay will show up
27
27
  * as `unsupported`.
28
28
  */
29
29
  export var UserInterfaceIdiom;
30
30
  (function (UserInterfaceIdiom) {
31
31
  UserInterfaceIdiom["Handset"] = "handset";
32
32
  UserInterfaceIdiom["Tablet"] = "tablet";
33
+ UserInterfaceIdiom["Desktop"] = "desktop";
33
34
  UserInterfaceIdiom["TV"] = "tv";
34
35
  UserInterfaceIdiom["Unsupported"] = "unsupported";
35
36
  })(UserInterfaceIdiom || (UserInterfaceIdiom = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.types.js","sourceRoot":"","sources":["../src/Constants.types.ts"],"names":[],"mappings":"AAaA,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,kBAKX;AALD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,uCAAiB,CAAA;IACjB,+BAAS,CAAA;IACT,iDAA2B,CAAA;AAC7B,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport type {\n EASConfig as ManifestsEASConfig,\n ExpoGoConfig as ManifestsExpoGoConfig,\n NewManifest,\n BareManifest,\n ManifestAsset as ManifestAssetForReExport,\n ManifestExtra as ManifestExtraForReExport,\n ClientScopingConfig as ClientScopingConfigForReExport,\n ExpoGoPackagerOpts as ExpoGoPackagerOptsForReExport,\n // @ts-ignore -- optional interface, will gracefully degrade to `any` not installed\n} from 'expo-manifests';\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`, `tablet`, and `tv`. CarPlay will show up\n * as `unsupported`.\n */\nexport enum UserInterfaceIdiom {\n Handset = 'handset',\n Tablet = 'tablet',\n TV = 'tv',\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.expoConfig.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, iPad, or Apple TV.\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// type re-exports to prevent breaking change\n\nexport type ManifestAsset = ManifestAssetForReExport;\nexport type Manifest = NewManifest;\nexport type ManifestExtra = ManifestExtraForReExport;\nexport type EASConfig = ManifestsEASConfig;\nexport type ClientScopingConfig = ClientScopingConfigForReExport;\nexport type ExpoGoConfig = ManifestsExpoGoConfig;\nexport type ExpoGoPackagerOpts = ExpoGoPackagerOptsForReExport;\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 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 * @deprecated Use `Constants.expoConfig` instead, which behaves more consistently across EAS Build\n * and EAS Update.\n */\n manifest: BareManifest | 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 * `Constants.expoConfig` should be used for accessing the Expo config object.\n */\n manifest2: NewManifest | 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:\n | (ExpoConfig & {\n /**\n * Only present during development using @expo/cli.\n */\n hostUri?: string;\n })\n | null;\n /**\n * The standard Expo Go config object populated when running in Expo Go.\n */\n expoGoConfig: ManifestsExpoGoConfig | null;\n /**\n * The standard EAS config object populated when using EAS.\n */\n easConfig: ManifestsEASConfig | 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?: BareManifest;\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?: NewManifest;\n}\n"]}
1
+ {"version":3,"file":"Constants.types.js","sourceRoot":"","sources":["../src/Constants.types.ts"],"names":[],"mappings":"AAaA,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,kBAMX;AAND,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;IACnB,+BAAS,CAAA;IACT,iDAA2B,CAAA;AAC7B,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport type {\n EASConfig as ManifestsEASConfig,\n ExpoGoConfig as ManifestsExpoGoConfig,\n NewManifest,\n BareManifest,\n ManifestAsset as ManifestAssetForReExport,\n ManifestExtra as ManifestExtraForReExport,\n ClientScopingConfig as ClientScopingConfigForReExport,\n ExpoGoPackagerOpts as ExpoGoPackagerOptsForReExport,\n // @ts-ignore -- optional interface, will gracefully degrade to `any` not installed\n} from 'expo-manifests';\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`, `tablet`, `desktop` and `tv`. CarPlay will show up\n * as `unsupported`.\n */\nexport enum UserInterfaceIdiom {\n Handset = 'handset',\n Tablet = 'tablet',\n Desktop = 'desktop',\n TV = 'tv',\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.expoConfig.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, iPad, Mac or Apple TV.\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// type re-exports to prevent breaking change\n\nexport type ManifestAsset = ManifestAssetForReExport;\nexport type Manifest = NewManifest;\nexport type ManifestExtra = ManifestExtraForReExport;\nexport type EASConfig = ManifestsEASConfig;\nexport type ClientScopingConfig = ClientScopingConfigForReExport;\nexport type ExpoGoConfig = ManifestsExpoGoConfig;\nexport type ExpoGoPackagerOpts = ExpoGoPackagerOptsForReExport;\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 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 * @deprecated Use `Constants.expoConfig` instead, which behaves more consistently across EAS Build\n * and EAS Update.\n */\n manifest: BareManifest | 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 * `Constants.expoConfig` should be used for accessing the Expo config object.\n */\n manifest2: NewManifest | 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:\n | (ExpoConfig & {\n /**\n * Only present during development using @expo/cli.\n */\n hostUri?: string;\n })\n | null;\n /**\n * The standard Expo Go config object populated when running in Expo Go.\n */\n expoGoConfig: ManifestsExpoGoConfig | null;\n /**\n * The standard EAS config object populated when using EAS.\n */\n easConfig: ManifestsEASConfig | 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?: BareManifest;\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?: NewManifest;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-constants",
3
- "platforms": ["ios", "android", "web"],
3
+ "platforms": ["ios", "android", "web", "macos", "tvos"],
4
4
  "ios": {
5
5
  "modules": ["ConstantsModule"]
6
6
  },
@@ -10,7 +10,11 @@ Pod::Spec.new do |s|
10
10
  s.license = package['license']
11
11
  s.author = package['author']
12
12
  s.homepage = package['homepage']
13
- s.platforms = { :ios => '13.4', :tvos => '13.4'}
13
+ s.platforms = {
14
+ :ios => '13.4',
15
+ :osx => '10.15',
16
+ :tvos => '13.4'
17
+ }
14
18
  s.swift_version = '5.4'
15
19
  s.source = { git: 'https://github.com/expo/expo.git' }
16
20
  s.static_framework = true
@@ -9,6 +9,7 @@ static NSString * const kEXDeviceInstallationUUIDLegacyKey = @"EXDeviceInstallUU
9
9
 
10
10
  - (NSString *)getOrCreateInstallationId
11
11
  {
12
+ #if TARGET_OS_IOS || TARGET_OS_TV
12
13
  NSString *installationId = [self getInstallationId];
13
14
  if (installationId) {
14
15
  return installationId;
@@ -17,6 +18,9 @@ static NSString * const kEXDeviceInstallationUUIDLegacyKey = @"EXDeviceInstallUU
17
18
  installationId = [[NSUUID UUID] UUIDString];
18
19
  [self setInstallationId:installationId error:NULL];
19
20
  return installationId;
21
+ #elif TARGET_OS_OSX
22
+ return nil;
23
+ #endif
20
24
  }
21
25
 
22
26
  - (nullable NSString *)getInstallationId
@@ -61,15 +61,15 @@ EX_REGISTER_MODULE();
61
61
  @"debugMode": @(isDebugXCodeScheme),
62
62
  @"isHeadless": @(NO),
63
63
  @"nativeAppVersion": [self appVersion],
64
- @"nativeBuildVersion": [self buildVersion],
65
- @"installationId": [_installationIdProvider getOrCreateInstallationId],
64
+ @"nativeBuildVersion": EXNullIfNil([self buildVersion]),
65
+ @"installationId": EXNullIfNil([_installationIdProvider getOrCreateInstallationId]),
66
66
  @"manifest": EXNullIfNil([[self class] appConfig]),
67
67
  @"platform": @{
68
68
  @"ios": @{
69
- @"buildNumber": [self buildVersion],
69
+ @"buildNumber": EXNullIfNil([self buildVersion]),
70
70
  @"platform": [[self class] devicePlatform],
71
71
  @"userInterfaceIdiom": [self userInterfaceIdiom],
72
- @"systemVersion": [self iosVersion],
72
+ @"systemVersion": EXNullIfNil([self iosVersion]),
73
73
  },
74
74
  },
75
75
  };
@@ -87,24 +87,29 @@ EX_REGISTER_MODULE();
87
87
 
88
88
  - (CGFloat)statusBarHeight
89
89
  {
90
- #if TARGET_OS_TV
91
- return 0;
92
- #else
90
+ #if TARGET_OS_IOS
93
91
  __block CGSize statusBarSize;
94
92
  [EXUtilities performSynchronouslyOnMainThread:^{
95
93
  statusBarSize = [UIApplication sharedApplication].statusBarFrame.size;
96
94
  }];
97
95
  return MIN(statusBarSize.width, statusBarSize.height);
96
+ #elif TARGET_OS_OSX || TARGET_OS_TV
97
+ return 0;
98
98
  #endif
99
99
  }
100
100
 
101
101
  - (NSString *)iosVersion
102
102
  {
103
+ #if TARGET_OS_IOS || TARGET_OS_TV
103
104
  return [UIDevice currentDevice].systemVersion;
105
+ #else
106
+ return nil;
107
+ #endif
104
108
  }
105
109
 
106
110
  - (NSString *)userInterfaceIdiom
107
111
  {
112
+ #if TARGET_OS_IOS || TARGET_OS_TV
108
113
  UIUserInterfaceIdiom idiom = UI_USER_INTERFACE_IDIOM();
109
114
 
110
115
  switch (idiom) {
@@ -117,6 +122,9 @@ EX_REGISTER_MODULE();
117
122
  default:
118
123
  return @"unsupported";
119
124
  }
125
+ #elif TARGET_OS_OSX
126
+ return @"desktop";
127
+ #endif
120
128
  }
121
129
 
122
130
  - (BOOL)isDevice
@@ -129,6 +137,7 @@ EX_REGISTER_MODULE();
129
137
 
130
138
  - (NSArray<NSString *> *)systemFontNames
131
139
  {
140
+ #if TARGET_OS_IOS || TARGET_OS_TV
132
141
  NSArray<NSString *> *familyNames = [UIFont familyNames];
133
142
  NSMutableArray<NSString *> *fontNames = [NSMutableArray array];
134
143
  for (NSString *familyName in familyNames) {
@@ -144,8 +153,11 @@ EX_REGISTER_MODULE();
144
153
  }
145
154
  }
146
155
 
147
- // Remove duplciates and sort alphabetically
156
+ // Remove duplicates and sort alphabetically
148
157
  return [[[NSSet setWithArray:fontNames] allObjects] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
158
+ #elif TARGET_OS_OSX
159
+ return [[NSFontManager sharedFontManager] availableFontFamilies];
160
+ #endif
149
161
  }
150
162
 
151
163
  # pragma mark - device info
@@ -165,7 +177,11 @@ EX_REGISTER_MODULE();
165
177
 
166
178
  + (NSString *)deviceName
167
179
  {
180
+ #if TARGET_OS_IOS || TARGET_OS_TV
168
181
  return [UIDevice currentDevice].name;
182
+ #elif TARGET_OS_OSX
183
+ return [NSHost currentHost].localizedName;
184
+ #endif
169
185
  }
170
186
 
171
187
  + (NSDictionary *)appConfig
@@ -189,5 +205,4 @@ EX_REGISTER_MODULE();
189
205
  return nil;
190
206
  }
191
207
 
192
-
193
208
  @end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-constants",
3
- "version": "15.4.2",
3
+ "version": "15.4.3",
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",
@@ -42,5 +42,5 @@
42
42
  "peerDependencies": {
43
43
  "expo": "*"
44
44
  },
45
- "gitHead": "43f1b4f8a5a9bca649e4e7ca6e4155482a162431"
45
+ "gitHead": "ca014bf2516c7644ef303f4c21fdd68de4d99f76"
46
46
  }
@@ -36,12 +36,13 @@ export enum ExecutionEnvironment {
36
36
 
37
37
  // @needsAudit
38
38
  /**
39
- * Current supported values are `handset`, `tablet`, and `tv`. CarPlay will show up
39
+ * Current supported values are `handset`, `tablet`, `desktop` and `tv`. CarPlay will show up
40
40
  * as `unsupported`.
41
41
  */
42
42
  export enum UserInterfaceIdiom {
43
43
  Handset = 'handset',
44
44
  Tablet = 'tablet',
45
+ Desktop = 'desktop',
45
46
  TV = 'tv',
46
47
  Unsupported = 'unsupported',
47
48
  }
@@ -68,7 +69,7 @@ export interface IOSManifest {
68
69
  */
69
70
  model: string | null;
70
71
  /**
71
- * The user interface idiom of this device, i.e. whether the app is running on an iPhone, iPad, or Apple TV.
72
+ * The user interface idiom of this device, i.e. whether the app is running on an iPhone, iPad, Mac or Apple TV.
72
73
  * @deprecated Use `expo-device`'s [`Device.getDeviceTypeAsync()`](./device/#devicegetdevicetypeasync).
73
74
  */
74
75
  userInterfaceIdiom: UserInterfaceIdiom;