热门标签 | 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


推荐阅读
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社区 版权所有