Expo托管式工作流iOS生产构建时出现“No valid "aps-environment" string found”错误求助
Expo托管式工作流iOS生产构建时出现“No valid "aps-environment" string found”错误求助
大家好,我是来自韩国的开发者,最近在我的Expo托管式工作流项目中构建iOS生产包时遇到了一个棘手的问题:开发模式下构建完全正常,但切换到生产模式就会报错提示**“No valid "aps-environment" string found”**。
我把app.json里的相关配置贴在下面,希望有经验的朋友能帮我看看问题出在哪,非常感谢!
{ "expo": { "name": "MyApp", "slug": "my-app", "version": "1.0.0", "orientation": "portrait", "icon": "./assets/icon.png", "userInterfaceStyle": "light", "newArchEnabled": false, "splash": { "image": "./assets/splash-icon.png", "resizeMode": "contain", "backgroundColor": "#ffffff" }, "ios": { "supportsTablet": true, "bundleIdentifier": "com.example.myapp", "infoPlist": { "UIBackgroundModes": ["remote-notification"], "ITSAppUsesNonExemptEncryption": false }, "entitlements": { "aps-environment": "production" } }, "android": { "adaptiveIcon": { "foregroundImage": "./assets/adaptive-icon.png", "backgroundColor": "#ffffff" }, "edgeToEdgeEnabled": true, "package": "com.example.myapp", "permissions": ["NOTIFICATIONS"] }, "web": { "favicon": "./assets/favicon.png" }, "plugins": [ [ "expo-build-properties", { "ios": { "useFrameworks": "static" } } ], "expo-notifications" ], "extra": { "eas": { "projectId": "YOUR_PROJECT_ID" } } } }
我已经尝试过以下几种方法,但都没能解决问题:
- 在app.json的
ios.entitlements字段中添加了"aps-environment": "production" - 确认
expo-notifications已经安装并正确配置 - 确认使用的是EAS Build而非旧的expo build命令
- 运行
expo-doctor检查,没有发现任何schema错误 - 确保测试用的是真实设备,不是模拟器
我的环境信息:
- 构建命令:
eas build -p ios --profile production - 操作系统:Windows 11 Pro
- Expo SDK版本:53
如果有人知道怎么解决这个问题,麻烦指点一下,万分感谢!
内容来源于stack exchange
相关产品推荐
相关产品推荐

