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

2024-04-28

问题

当我在模拟器中运行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(使用前将#替换为@)

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

随机推荐

  • 如何在Nuxt Js中使用Google Map API?

    下面是我在 Nuxt Js 中获取 API 的代码 我已经编写了用于调用 API 的代码 但没有得到结果 我也没有得到任何与此相关的资源 async created const config headers Accept applicati
  • Python 比 C++ 更快、更轻吗? [关闭]

    就目前情况而言 这个问题不太适合我们的问答形式 我们希望答案得到事实 参考资料或专业知识的支持 但这个问题可能会引发辩论 争论 民意调查或扩展讨论 如果您觉得这个问题可以改进并可能重新开放 访问帮助中心 help reopen questi
  • 可以将矩形设置为显示边框吗?

    以下应用 public class Temp extends Application Override public void start Stage primaryStage StackPane root new StackPane Re
  • 挂载卷时无法运行 mariadb

    使用以下 docker compose yml 文件 version 2 services wordpress image wordpress ports 8080 80 environment WORDPRESS DB NAME my d
  • 数据与线的日期和时间转换

    我使用 D3 V5 创建了此图表 另外 我已在小提琴上附加了示例数据 您可以点击此处查看 https plnkr co edit pINxcS9yt9AuJmSk02Fs p preview 我已经包括了tick函数代码块 它在向左滑动的路
  • 在 iPhone 6 和 6 plus 中设置背景图像和图标图像

    如何区分 iPhone 5 和 iPhone 6 和 6 Plus 不同分辨率下的背景图像和图标图像 您必须在图像目录中启用 iOS 8 尺寸 它们在现有项目中默认关闭
  • 按公司名称过滤用户

    我试图让 Azure Active Directory 中的所有用户按以下条件过滤companyName过滤 我使用的电话是 v1 0 users select id mail displayName department filter c
  • R - 小鼠 - 添加一列,对具有估算值的列进行求和

    我有一个缺少数据的数据库 我需要估算数据 我使用的是小鼠 然后根据原始列创建新列 使用估算数据 我需要用这些新列进行统计分析 具体来说 我的参与者使用 7 点李克特量表填写了几份调查问卷 有些人没有回答所有问题 然后我需要估算值 1 对列中
  • 如何获取eclipse中的工作空间路径? [关闭]

    Closed 这个问题需要细节或清晰度 help closed questions 目前不接受答案 我正在研究PDE Eclipse Plugin Project 我需要获取工作区路径 我的文本小部件 swt 应该设置为当前工作空间路径 如
  • 在可序列化 Java 类中使用记录器的正确方法是什么?

    我有以下 doctored 我正在开发的系统中的类以及Findbugs http findbugs sourceforge net 正在生成一个SE BAD FIELD http findbugs sourceforge net bugDe
  • 单击表格行后如何刷新部分视图

    我有与模型链接的表格 foreach var item in Model tr td Html DisplayFor x gt item Field1 td td Html DisplayFor x gt item Field2 td tr
  • 初始化组件不存在

    InitializeComponent 此代码行出现在我的所有 Xaml 页面的构造函数中的代码隐藏中 它抛出以下错误 初始化组件不存在 现在我无法调试项目中的任何页面 尽管我已经注释掉了这一行 我怎样才能解决这个问题 任何帮助将不胜感激
  • Android 布局 xml 文件中 TextView 的首字母大写

    我在布局 xml 文件中有一个 TextView 如下所示
  • JDBC多线程插入可以吗?

    我目前正在开发一个 Java 项目 我需要准备一个大的 对我来说 mysql 数据库 我必须使用 Jsoup 进行网页抓取并将结果存储到我的数据库中 据我估计 我将大约插入 1 500 000 到 2 000 000 条记录 在我的第一次试
  • 高级 SQLite 更新表查询

    我正在尝试更新数据库的表 B 如下所示 Table A id amount date b id 1 200 6 31 2012 1 2 300 6 31 2012 1 3 400 6 29 2012 2 4 200 6 31 2012 1
  • Spring MVC 中的多响应 http 状态

    有以下代码 RequestMapping value system login method RequestMethod GET public void login RequestBody Login login if login user
  • OS X Server 持续集成 ipa 发行版

    我们有一个配置了 SSL 证书并启用了 Xcode 的 osx 服务器 在将 OSX Server 更新到 3 2 1 和 Xcode 6 0 1 之前 一切正常 我们遇到的问题是 当集成完成后 我们单击设备上的安装按钮 它会尝试下载 但会
  • Android Camera2 API 预览有时会失真

    我正在使用 Camera2 API 构建自定义相机 到目前为止 除了预览有时会失真之外 相机工作得很好 假设我连续打开相机 7 次 所有尝试均成功 但第 8 次相机预览失真 看起来它使用宽度作为高度 反之亦然 我的代码基于camera2的G
  • 当我已经定义了变量时,为什么会收到一条错误消息,指示变量不存在?

    我收到一条错误消息 表明MyRandomArray在当前上下文中不存在 如何在 C WinForms 应用程序中跨类访问变量 public void Quiz Load object sender EventArgs e string My
  • 无法直接在iPhone上运行react-native应用程序(部署目标错误)

    问题 当我在模拟器中运行react native时 它工作正常 我现在尝试在直接连接到 MacBook 的 iPhone 上运行它 但出现了问题 有几个警告说Deployment Target is set to 7 0 这个具体是在哪里设