问题
当我在模拟器中运行react-native时,它工作正常。我现在尝试在直接连接到 MacBook 的 iPhone 上运行它,但出现了问题。有几个警告说Deployment Target is set to 7.0
.
这个具体是在哪里设置的呢?它是在我正在使用的库中设置的吗?我该如何解决这个问题?
我发现似乎与此问题不重复的类似信息包括:
- 对模拟有问题的人(刺激器对我来说工作正常)
- 建议人们在 XCode 中使用 Legacy Build 系统(其他人认为这不是一个好主意)。
那么,到底是什么导致了这个问题?我该如何解决它,以便我可以在我的物理 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。
遗留构建?
我看到的一些问题表明我可以使用旧版本来代替。但是,我想知道这是否会导致任何其他问题。
我认为问题在于开发团队:
构建系统信息
错误:签署“TestAppApp07Tests”需要开发团队。在项目编辑器中选择一个开发团队。 (在目标“TestAppApp07Tests”中)
构建系统信息错误:签署“TestAppApp07”需要
开发团队。在项目编辑器中选择一个开发团队。 (在
目标“TestAppApp07”)
只需组建一个有效的开发团队即可。如果您没有,请创建它。设置正确的开发团队后,它应该可以工作。
确保为这两个目标设置团队:TestAppApp07
and TestAppApp07Tests
https://www.twilio.com/blog/2018/07/how-to-test-your-ios-application-on-a-real-device.html https://www.twilio.com/blog/2018/07/how-to-test-your-ios-application-on-a-real-device.html
https://developer.apple.com/support/teams/ https://developer.apple.com/support/teams/
关于部署目标:
如果与部署目标相关的问题与一些旧的依赖项有关,我认为您可以使用旧版构建系统。
据我所知,Xcode 8 或更高版本不支持部署目标 iOS 7.0。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)