expo-constants 常量
import Constants from "expo-constants";
const Constants = {
"__expo_module_name__": "ExponentConstants", // 内部属性开发无用
"addListener": [Function addListener], // 用于添加和移除事件监听器,以响应某些运行时事件的变化
"appOwnership": "expo", // 在 Expo Go 中运行时返回expo ,否则返回null 。区分独立应用(已从 Expo 分离)和 Expo 托管应用很有用
"deviceName": "M2007J3SC", // 提供当前设备的名称。用于调试或记录目的,以识别正在运行应用的设备
"easConfig": {}, // 标准 EAS 配置对象
"emit": [Function emit],
"executionEnvironment": "storeClient", // 执行环境
"experienceUrl": "exp://10.0.0.6:8083", // 体验网址
"expoConfig": { // expo 配置信息
"_internal": {
"dynamicConfigPath": null,
"isDebug": false,
"packageJsonPath": "/Users/paul/code/project/react-native/react-native-expo-examples/package.json",
"projectRoot": "/Users/paul/code/project/react-native/react-native-expo-examples",
"staticConfigPath": "/Users/paul/code/project/react-native/react-native-expo-examples/app.json"
},
"android": { "adaptiveIcon": [Object] },
"hostUri": "10.0.0.6:8083",
"icon": "./assets/icon.png",
"iconUrl": "http://10.0.0.6:8083/assets/./assets/icon.png",
"ios": { "supportsTablet": true },
"name": "react-native-expo-examples",
"orientation": "portrait",
"platforms": ["ios", "android", "web"],
"sdkVersion": "51.0.0",
"slug": "react-native-expo-examples",
"splash": {
"backgroundColor": "#ffffff",
"image": "./assets/splash.png",
"imageUrl": "http://10.0.0.6:8083/assets/./assets/splash.png",
"resizeMode": "contain"
},
"userInterfaceStyle": "light",
"version": "1.0.0",
"web": { "favicon": "./assets/favicon.png" }
},
"expoGoConfig": { // expogo 设置
"__flipperHack": "React Native packager is running", "debuggerHost": "10.0.0.6:8083",
"developer": { "projectRoot": "/Users/paul/code/project/react-native/react-native-expo-examples", "tool": "expo-cli" },
"mainModuleName": "node_modules/expo/AppEntry", "packagerOpts": { "dev": true }
},
"expoVersion": "2.31.1", // expogo 版本
"getWebViewUserAgentAsync": [Function getWebViewUserAgentAsync], // 获取用户代理字符串
"intentUri": "exp://10.0.0.6:8083",
"isDetached": false,
"isHeadless": false,
"linkingUri": "exp://10.0.0.6:8083",
"listenerCount": [Function listenerCount],
"manifest": null,
"manifest2": { // Expo 服务生成的,包含了更多关于应用的信息,如资产、创建时间等。
"assets": [],
"createdAt": "2024-10-19T14:28:41.878Z",
"extra": {
"eas": [Object],
"expoClient": [Object],
"expoGo": [Object],
"scopeKey": "@anonymous/react-native-expo-examples-7b47b5b5-95f1-48a7-9c1e-7b1a2807e244"
},
"id": "79b45ea1-82af-43bd-924e-ff51199b8f0e",
"isVerified": true,
"launchAsset": { "contentType": "application/javascript", "key": "bundle", "url": "http://10.0.0.6:8083/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&lazy=true&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=app" },
"metadata": {},
"runtimeVersion": "exposdk:51.0.0"
},
"nativeAppVersion": "2.31.1", // expogo 版本
"nativeBuildVersion": 248,
"platform": { // 已弃用。使用expo-device的Device.modelId 。
"android": { "versionCode": null }
},
"removeAllListeners": [Function removeAllListeners],
"removeListener": [Function removeListener],
"removeSubscription": [Function removeSubscription],
"sessionId": "145125b9-2bd6-4790-8b95-e7fd31187570",
"statusBarHeight": 32, // 设备的默认状态栏高度。不考虑使用位置跟踪或通话时的变化。
"supportedExpoSdks": ["51.0.0"],
"systemFonts": [ // 系统字体
"normal",
"notoserif",
"sans-serif",
"sans-serif-light",
"sans-serif-thin",
"sans-serif-condensed",
"sans-serif-medium",
"serif",
"Roboto",
"monospace"],
"systemVersion": "12" // 已弃用。使用expo-device的Device.osVersion 。
}
洗尽铅华始见金,褪去浮华归本真