xcode iOS App 在模拟器上运行而不在设备上运行?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8192108/
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
iOS App runs on simulator but not device?
提问by user990769
My application has no errors, warnings or memory leaks, runs flawlessly on the simulator, but black screens on my iPhone 4 running with iOS 5. The SIGABRT
's happens in main on this line:
我的应用程序没有错误,警告或内存泄漏,完美运行在模拟器上,但在我的iPhone 4黑屏与iOS 5上运行SIGABRT
的主发生在这一行:
int retVal = UIApplicationMain(argc, argv, nil, nil);
Since my code seems ok, does anyone know what kind of things in general can cause this kind of behavior?
由于我的代码看起来没问题,有没有人知道一般什么样的事情会导致这种行为?
Where else can I look for possible errors? All the references to this SIGABRT
I'm getting are in assembly... 0.o
我还能在哪里查找可能的错误?SIGABRT
我得到的所有对此的引用都在汇编中...... 0.o
EDIT:Output from the debugger:
编辑:调试器的输出:
This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys000
sharedlibrary apply-load-rules all
target remote-mobile /tmp/.XcodeGDBRemote-4281-83
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
[Switching to process 7171 thread 0x1c03]
[Switching to process 7171 thread 0x1c03]
Couldn't register BearNun.Stack-Meet-App with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.(gdb)
Not sure where another process would be running...I deleted the app from the iPhone, cleaned my project, and then ran it again (once the stop button was greyed out, I thought that meant that no processes in the program were running).
不确定另一个进程会在哪里运行......我从 iPhone 中删除了应用程序,清理了我的项目,然后再次运行它(一旦停止按钮变灰,我认为这意味着程序中没有进程正在运行) .
回答by Hamed Rajabi
I think you have problem with case-sensitive. The iOS simulator isn't case-sensitive while the device is! I suggest if you work with some files or something like that, check your address and try again.
我认为你有区分大小写的问题。iOS 模拟器不区分大小写,而设备则区分大小写!我建议如果您使用某些文件或类似的东西,请检查您的地址并重试。
I hope it be useful for you!
我希望它对你有用!
回答by jamihash
I ran into the same problem. I had to completely power down my device and restart it and then it started working fine. Also had restarted Xcode.
我遇到了同样的问题。我不得不完全关闭我的设备并重新启动它,然后它开始正常工作。还重新启动了Xcode。