热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Xcode无法启动应用程序(无法附加)-Xcodecouldnotlaunchapp(unabletoattach)

IamnewiniOS.IupdateXCodetoversion7.2.AndeverytimeIeditsomecodethenruntheapplica

I am new in iOS. I update XCode to version 7.2. And every time I edit some code then run the application the XCode will display.

我是iOS新手。我将XCode更新到7.2版。每次我编辑一些代码然后运行XCode将显示的应用程序。

Could not launch my app (unable to attach).

无法启动我的应用程序(无法附加)。

However, when I run the app again, it will run successful.
Indeed, I can run the application but I feel uncomfortable when I face this problem every time

但是,当我再次运行应用程序时,它将成功运行。实际上,我可以运行应用程序,但每次遇到这个问题时我都会感到不舒服

enter image description here

Did I make something wrong? Any help would be appreciated

我做错了吗?任何帮助,将不胜感激

6 个解决方案

#1


12  

You are not doing anything wrong; it happens from time to time. There is no need to clear data and restart the Mac. Just try the following:

你没有做错任何事;它经常发生。无需清除数据并重新启动Mac。试试以下内容:

  • Unplug and plug the device back in.

    拔下并重新插入设备。

  • If still happens, restart Xcode.

    如果仍然发生,请重新启动Xcode。

#2


4  

Simply change your device setting go to Settings -> General -> Device Management-> Developer App -> your_provisional_profile -> and click on Trust this developer. Run the project again.You are done

只需更改您的设备设置,请转到设置 - >常规 - >设备管理 - >开发人员应用程序 - > your_provisional_profile - >,然后单击信任此开发人员。再次运行项目。你完成了

#3


2  

This happened to me. I'm using Xcode 7.2. Sometimes building app on device/simulator fails and it prompts this error message.

这发生在我身上。我正在使用Xcode 7.2。有时在设备/模拟器上构建应用程序失败,并提示此错误消息。

Screenshot indicating error

Simply, re-run your project and it will work correctly.

简单地说,重新运行您的项目,它将正常工作。

If not the quit Xcode then open app and run again.

如果不是退出Xcode然后打开应用程序并再次运行。

#4


1  

This was completely screwed up in xcode 8.1, at least for extensions.

这完全搞砸了xcode 8.1,至少对于扩展。

I've filed 29064806 with Apple.

我已经向Apple提交了29064806。

The only recorse is to fallback to a version of xcode that works.

唯一的悔意是回退到有效的xcode版本。

In my case that's 8.0 (where you get this not nearly as frequently)

在我的情况下是8.0(你得到的不是那么频繁)

#5


0  

I had try this and it solve problem

我试过这个,它解决了问题

  • Un plug connected device
  • 拔掉连接的设备

  • Restart device

it works for me

这个对我有用

#6


0  

I was having this problem while using Xcode 9.2 and iOS 11.2. After much googling, the only thing that solved all of my issues was turning off "Debug executable" in my scheme. This can be found under Product > Scheme > Edit Scheme > Run (on the left menu).

我在使用Xcode 9.2和iOS 11.2时遇到了这个问题。经过大量的谷歌搜索,解决我所有问题的唯一办法是关闭我的方案中的“调试可执行文件”。这可以在产品>方案>编辑方案>运行(在左侧菜单中)下找到。

Prior to this, I tried a lot of different solutions including deleting my derived data, restarting my computer, and switching the launch in my scheme to "Wait for executable to be launched" instead of "Automatically". Switching the launch setting in my scheme allowed the app to launch on my phone, but the Xcode debugger and safari debugger still would not connect to my app.

在此之前,我尝试了很多不同的解决方案,包括删除我的派生数据,重新启动计算机,以及将我的方案中的启动切换为“等待可执行文件启动”而不是“自动”。在我的方案中切换启动设置允许应用程序在我的手机上启动,但Xcode调试器和safari调试器仍然无法连接到我的应用程序。

This is the article where I found the solution: https://exceptionshub.com/xcode-beta-error-iphone-has-denied-the-launch-request.html

这是我找到解决方案的文章:https://exceptionshub.com/xcode-beta-error-iphone-has-denied-the-launch-request.html


推荐阅读
  • 在Docker中,将主机目录挂载到容器中作为volume使用时,常常会遇到文件权限问题。这是因为容器内外的UID不同所导致的。本文介绍了解决这个问题的方法,包括使用gosu和suexec工具以及在Dockerfile中配置volume的权限。通过这些方法,可以避免在使用Docker时出现无写权限的情况。 ... [详细]
  • 本文主要解析了Open judge C16H问题中涉及到的Magical Balls的快速幂和逆元算法,并给出了问题的解析和解决方法。详细介绍了问题的背景和规则,并给出了相应的算法解析和实现步骤。通过本文的解析,读者可以更好地理解和解决Open judge C16H问题中的Magical Balls部分。 ... [详细]
  • ZSI.generate.Wsdl2PythonError: unsupported local simpleType restriction ... [详细]
  • IhaveconfiguredanactionforaremotenotificationwhenitarrivestomyiOsapp.Iwanttwodiff ... [详细]
  • Python正则表达式学习记录及常用方法
    本文记录了学习Python正则表达式的过程,介绍了re模块的常用方法re.search,并解释了rawstring的作用。正则表达式是一种方便检查字符串匹配模式的工具,通过本文的学习可以掌握Python中使用正则表达式的基本方法。 ... [详细]
  • Go Cobra命令行工具入门教程
    本文介绍了Go语言实现的命令行工具Cobra的基本概念、安装方法和入门实践。Cobra被广泛应用于各种项目中,如Kubernetes、Hugo和Github CLI等。通过使用Cobra,我们可以快速创建命令行工具,适用于写测试脚本和各种服务的Admin CLI。文章还通过一个简单的demo演示了Cobra的使用方法。 ... [详细]
  • 本文讨论了如何使用IF函数从基于有限输入列表的有限输出列表中获取输出,并提出了是否有更快/更有效的执行代码的方法。作者希望了解是否有办法缩短代码,并从自我开发的角度来看是否有更好的方法。提供的代码可以按原样工作,但作者想知道是否有更好的方法来执行这样的任务。 ... [详细]
  • 使用C++编写程序实现增加或删除桌面的右键列表项
    本文介绍了使用C++编写程序实现增加或删除桌面的右键列表项的方法。首先通过操作注册表来实现增加或删除右键列表项的目的,然后使用管理注册表的函数来编写程序。文章详细介绍了使用的五种函数:RegCreateKey、RegSetValueEx、RegOpenKeyEx、RegDeleteKey和RegCloseKey,并给出了增加一项的函数写法。通过本文的方法,可以方便地自定义桌面的右键列表项。 ... [详细]
  • MySQL多表数据库操作方法及子查询详解
    本文详细介绍了MySQL数据库的多表操作方法,包括增删改和单表查询,同时还解释了子查询的概念和用法。文章通过示例和步骤说明了如何进行数据的插入、删除和更新操作,以及如何执行单表查询和使用聚合函数进行统计。对于需要对MySQL数据库进行操作的读者来说,本文是一个非常实用的参考资料。 ... [详细]
  • Summarize function is doing alignment without timezone ?
    Hi.Imtryingtogetsummarizefrom00:00otfirstdayofthismonthametric, ... [详细]
  • 本文由编程笔记#小编为大家整理,主要介绍了markdown[软件代理设置]相关的知识,希望对你有一定的参考价值。 ... [详细]
  • 【技术分享】一个 ELF 蠕虫分析
    【技术分享】一个 ELF 蠕虫分析 ... [详细]
  • ihaveusedthedelphidatabindingwizardwithmyxmlfile,andeverythingcompilesandrunsfine. ... [详细]
  • 对Firefoxios源码的精简Firefox的依赖使用carthage来进行管理,国内的网络是在过于坑爹,相关的依赖包总是无法下载下来,花了两天时间,手动将Firefox所依赖的库导入 ... [详细]
  • maven配置阿里云仓库的实现方法(2022年)_java
    本文主要介绍了maven配置阿里云仓库的实现方法,文中通过示例代码介绍的非常详细,具有一定的参考价值,感兴趣的 ... [详细]
author-avatar
水平蓝精灵天堂_678
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有