[英]Unable to run app in Simulator Xcode 6
Yesterday i was testing my app in the iOS simulator and everything was working fine. 昨天我正在iOS模拟器中测试我的应用程序,并且一切正常。 I then decided to run the app on my iPhone and i got the error unable to install application, Unknown error occurred
this has happened before so I cleaned my build folder (as this has fixed this issue before) however, the same error occurred. 然后,我决定在iPhone上运行该应用程序,但出现了unable to install application, Unknown error occurred
之前曾发生过unable to install application, Unknown error occurred
,因此我清理了构建文件夹(因为之前已解决了此问题),但是,发生了相同的错误。 I then ran the app in the iOS simulator again and now i get the error Unable to run app in Simulator, An error was encountered while running (Domain = LaunchServicesError, Code = 0)
. 然后,我再次在iOS模拟器中运行该应用程序,现在出现错误Unable to run app in Simulator, An error was encountered while running (Domain = LaunchServicesError, Code = 0)
。 I find this very weird as i didn't change anything besides trying to run the app on my iPhone. 我觉得这很奇怪,因为除了尝试在iPhone上运行该应用程序外,我没有进行任何更改。 I have tried every solution given on this post and still no luck. 我已经尝试过此帖子中给出的所有解决方案,但仍然没有运气。
I'm sorry if my question doesn't contain much detail but as I said I didn't change anything and it was building and running fine a minute before plugging in my iPhone and trying to run it on there. 很抱歉,如果我的问题没有包含太多细节,但是正如我所说,我没有进行任何更改,因此它在插入并尝试在iPhone上运行之前的一分钟运行良好。
Any help would be much appreciated. 任何帮助将非常感激。
edit 编辑
I tried running other projects (with and without extensions) and they are working on both simulator and iPhone, therefore the problem must be within my project. 我尝试运行其他项目(带有和不带有扩展名),并且它们在模拟器和iPhone上都可以运行,因此问题一定在我的项目内。 (my project does have a today extension) (我的项目确实有今天的延期)
In that kind of cases I usually : 在这种情况下,我通常:
I had this problem. 我有这个问题。 In my case, it was caused by the Build value being blank. 在我的情况下,这是由于Build值为空白引起的。 After putting a value there, and resetting the simulator once more, the issue went away. 在此输入值并再次重置模拟器后,问题就消失了。
I had the same problem and checking the system log carefully helped me to identify a coliding library that was causing this error. 我遇到了同样的问题 ,仔细检查系统日志有助于我识别导致此错误的冲突库。 You can also check this answer if you are using extensions. 如果使用扩展名,也可以检查此答案 。
Generally it means there is a problem with the build, it may be due to old cache (solved by a clean build) or a project definition error (missing library, bad definition in info.plist, etc). 通常,这意味着构建存在问题,这可能是由于旧缓存(由干净的构建解决)或项目定义错误(缺少库,info.plist中的错误定义等)引起的。
In my case it happened only on iOS 8, turns out that my widget had the wrong bundle ID. 以我为例,它仅在iOS 8上发生,结果是我的小部件具有错误的包ID。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.