gpt4 book ai didi

ios - 无法直接在iPhone上运行react-native应用程序(部署目标错误)

转载 作者:行者123 更新时间:2023-12-02 01:21:30 25 4
gpt4 key购买 nike

问题

当我在模拟器中运行react-native时,它工作正常。我现在尝试在直接连接到 MacBook 的 iPhone 上运行它,但出现了问题。有多个警告指出部署目标设置为 7.0

这个具体是在哪里设置的?它是在我正在使用的库中设置的吗?我该如何解决这个问题?

我发现似乎与此问题不重复的类似信息包括:

  • 有人遇到模拟器问题(模拟器对我来说运行良好)
  • 建议人们在 XCode 中使用旧版构建系统(其他人认为这不是一个好主意)。

那么,到底是什么导致了这个问题,我该如何解决它,以便我可以在我的物理 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。

旧版本?

我看到的一些问题表明我可以使用旧版本来代替。但是,我想知道这是否会导致任何其他问题。

最佳答案

我认为问题在于开发团队:

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')

只需组建一个有效的开发团队即可。如果您没有,请创建它。设置正确的开发团队后,它应该可以工作。

确保为两个目标设置团队:TestAppApp07TestAppApp07Tests

https://www.twilio.com/blog/2018/07/how-to-test-your-ios-application-on-a-real-device.html

https://developer.apple.com/support/teams/

关于部署目标:

enter image description here

如果与部署目标相关的问题与一些旧的依赖项有关,我认为您可以使用旧版构建系统。

据我所知,Xcode 8 或更高版本不支持部署目标 iOS 7.0。

关于ios - 无法直接在iPhone上运行react-native应用程序(部署目标错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57505741/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com