简体   繁体   English

iOS模拟器未安装应用程序

[英]iOS Simulator Doesn't Install Application

Using Xcode 5.1 to debug an iOS 7.1 iPad application. 使用Xcode 5.1调试iOS 7.1 iPad应用程序。

When I build and run my project in the iOS Simulator, the simulator opens and my app icon pops up for a second. 当我在iOS模拟器中构建并运行项目时,模拟器会打开,并且我的应用程序图标会弹出一秒钟。 Then it looks like the app stops installing and the simulator goes to the home screen. 然后,该应用似乎停止安装,并且模拟器进入了主屏幕。 Xcode still thinks it's debugging and it doesn't show any errors in Xcode or the simulator. Xcode仍然认为它正在调试,并且在Xcode或模拟器中未显示任何错误。 I can go to my app in the simulator and click it again, but it just crashes. 我可以在模拟器中转到我的应用,然后再次单击它,但是它崩溃了。 I get the same behavior in iPad, iPad Retina, and iPad Retina (64 bit). 在iPad,iPad Retina和iPad Retina(64位)中,我得到相同的行为。 Any subsequent tries to run the app in the simulator doesn't even attempt to pop the app icon up until I quit the iOS Simulator and try again. 在我退出iOS模拟器并重试之前,任何随后在模拟器中运行该应用程序的尝试都不会尝试弹出该应用程序图标。 All the usual fixes haven't worked for me yet. 所有常规修补程序都不适用于我。

Fixes I've Tried: 我尝试过的修复:
1. iOS Simulator > Reset Content and Settings... 1. iOS模拟器>重置内容和设置...
2. Window(in Xcode) > Organizer > Delete Derived Data & Delete Snapshots 2.窗口(在Xcode中)>管理器>删除派生数据和删除快照
3. Delete Contents in ~/Library/Application Support/iPhone Simulator 3.删除〜/ Library / Application Support / iPhone Simulator中的内容
4. Uninstall Xcode and reinstall 4.卸载Xcode并重新安装
5. Clean project and rebuild 5.清理项目并重建
6. Restart machine 6.重新启动机器

I'm out of ideas. 我没主意了。 Is there something I've missed? 有什么我想念的吗?

Thanks all! 谢谢大家!

Create another app with the exact same template and look at the app delegates and make sure they are the same. 使用完全相同的模板创建另一个应用程序,然后查看应用程序委托,并确保它们相同。

Example: AppDelegate.h and AppDelegate.m 示例:AppDelegate.h和AppDelegate.m

You might've accidentally deleted an area that helps load the App. 您可能不小心删除了有助于加载应用程序的区域。

Alright I found the problem. 好吧,我发现了问题。 I was playing with how we load our frameworks because we were having other issues before and I left a bad value in our Linking settings. 我一直在研究如何加载框架,因为之前还有其他问题,并且在“链接”设置中留下了错误的值。

Here's how I fixed it: 这是我的解决方法:
Project > Build Settings > Linking > Mach-O Type set to "Executable" 项目>构建设置>链接> Mach-O类型设置为“可执行”

It was set to "Bundles" before which causes Xcode to package the app in a way that caused ours to break. 在将其设置为“捆绑包”之前,它会使Xcode以导致我们破坏的方式打包应用程序。

Helpful Post: In Xcode project target build settings, What is Mach-O Type? 有用的文章: 在Xcode项目目标构建设置中,什么是Mach-O类型?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM