问题
当我在Simulator中运行react-native时,它可以正常工作。我现在正在尝试在直接连接到MacBook的iPhone上运行它,但是出现了问题。 Deployment Target is set to 7.0
有几条警告。
这是在哪里设置的?是在我正在使用的库中设置的吗?我该如何解决?
我发现与该问题似乎不重复的类似信息包括:
那么,到底是什么导致了此问题,我该如何解决该问题,以便可以在物理iPhone设备上运行该应用程序?
错误消息:
ThePrompt$ react-native run-ios --device "Fred’s iPhone"
warn The following packages use deprecated "rnpm" config that will stop working from next release:
- react-native-zip-archive: https://github.com/mockingbot/react-native-zip-archive
- rn-fetch-blob: https://npmjs.com/package/rn-fetch-blob Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide.
info Found Xcode workspace "TestAppApp07.xcworkspace"
info Building (using "xcodebuild -workspace TestAppApp07.xcworkspace -configuration Debug -scheme TestAppApp07 -destination id=1e8ce3b4030eadba1161bda6bc1109b1e215f1ca -derivedDataPath build/TestAppApp07")
.......................
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening TestAppApp07.xcworkspace. Run CLI with
--verbose flag for more details.
User defaults from command line:
IDEDerivedDataPathOverride = /opt/TestAppApp07/ios/build/TestAppApp07
note: Using new build system
note: Planning build
note: Constructing build description
Build system information
error: Signing for "TestAppApp07Tests" requires a development team. Select a development team in the project editor. (in target 'TestAppApp07Tests')
Build system information
error: Signing for "TestAppApp07" requires a development team. Select a development team in the project editor. (in target 'TestAppApp07')
Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNFS')
Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNGestureHandler')
Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNScreens')
Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNSound')
2019-08-15 00:01:44.888 xcodebuild[36925:1330679] DTDeviceKit: deviceType from 1e8ce3b4030eadba1161bda8ac1109b1e215f1us was NULL
2019-08-15 00:01:44.927 xcodebuild[36925:1330675] DTDeviceKit: deviceType from 1e8ce3b4030eadba1161bda8ac1109b1e215f1us was NULL
** BUILD FAILED **
问题?
React Native似乎仅支持7.0的部署目标。但是,较新版本的XCode不再将7.0作为目标选项。新版本XCode的最低目标是8.0。
旧版构建?
我看到的一些问题说我可以改用Legacy Build。但是,我想知道这是否会引起任何其他问题。
答案 0 :(得分:3)
我认为问题在于开发团队:
构建系统信息 错误:签署“ TestAppApp07Tests”需要开发团队。在项目编辑器中选择一个开发团队。 (在目标“ TestAppApp07Tests”中)
生成系统信息错误:签署“ TestAppApp07”需要输入 开发团队。在项目编辑器中选择一个开发团队。 (在 目标'TestAppApp07')
只需成立一个有效的开发团队。如果您没有,请创建它。设置了正确的开发团队后,它应该可以工作。
确保为两个目标设置了团队:TestAppApp07
和TestAppApp07Tests
https://www.twilio.com/blog/2018/07/how-to-test-your-ios-application-on-a-real-device.html
https://developer.apple.com/support/teams/
关于部署目标:
如果与部署目标有关的问题与一些旧的依赖关系有关,我认为您可以使用旧版构建系统。
据我所知,Xcode 8或更高版本不支持部署目标iOS 7.0。
答案 1 :(得分:0)
答案 2 :(得分:0)
尝试:
appc run -p ios -T设备
如果问题仍然存在,请尝试以下步骤
答案 3 :(得分:0)
Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNFS')
Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNGestureHandler')
Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNScreens')
Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNSound')
很明显,您的部署目标设置为7.0,但Xcode支持从8.0开始。 设置部署目标。
如果仍然发现错误,请检查您的第三方框架是否存在兼容性问题。
请尝试避免使用旧版系统,因为设备可能会附带其他一些问题。