xcode 应用程序打开然后立即关闭 - iphone模拟器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10313337/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
App opens then immediately closes - iphone simulator
提问by Thomas Clayson
When I "run" my app from XCode the simulator comes up and the app attempts to run, it animates to a black screen for a second and then the app closes immediately.
当我从 XCode“运行”我的应用程序时,模拟器出现并且应用程序尝试运行,它动画显示为黑屏一秒钟,然后应用程序立即关闭。
The app was running fine before and now suddenly won't work.
该应用程序之前运行良好,现在突然无法运行。
There is no output on the console, no errors or anything and the app isn't crashing (as far as I can tell).
控制台上没有输出,没有错误或任何东西,应用程序也没有崩溃(据我所知)。
I have tried deleting all my user specific files in the xcodeproj package, but this hasn't changed anything.
我曾尝试删除 xcodeproj 包中的所有用户特定文件,但这并没有改变任何东西。
Is there any other reason why this would happen? How do I fix this?
是否有其他原因导致这种情况发生?我该如何解决?
Thank you.
谢谢你。
ADDITION: NSLog(@"something");
in the application:didFinishLaunchingWithOptions
method doesn't show up on the console.
ADDITION:NSLog(@"something");
在application:didFinishLaunchingWithOptions
方法中没有显示在控制台上。
采纳答案by Thomas Clayson
A reboot of my Mac seems to have fixed it. Thanks guys for your help. :)
重新启动我的 Mac 似乎已修复它。谢谢大家帮助。:)
回答by J S Rodrigues
if you are using a new Xcode(4+) and previously 3, there may be issue. Try setting the Architectures (Target -> Build Settings -> Architectures) to support armv6 too, presently it supports armv7(standard) only. If my memory is not deceiving me I guess I had such an issue.
如果您使用的是新的 Xcode(4+) 和之前的 3,则可能会出现问题。尝试将架构(目标 -> 构建设置 -> 架构)设置为也支持 armv6,目前它仅支持 armv7(标准)。如果我的记忆没有欺骗我,我想我有这样的问题。