iOS应用在发行中崩溃,但在开发中没有崩溃,并且Swift符号未解决 [英] iOS app crashing in release but not in development and Swift symbols are not resolved

查看:54
本文介绍了iOS应用在发行中崩溃,但在开发中没有崩溃,并且Swift符号未解决的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序在开发中运行良好,但是切换到生产/AdHoc版本时,它在过渡到我的应用程序流的第三个UIViewController时崩溃.

My app is working perfectly fine in development but switching to production / AdHoc release it crashes on the transition to the third UIViewController of my application flow.

在版本之间应该没有任何区别.我已经从设备"窗口中检索了日志:

Between the build there shouldn't be any difference. I have retrieved the log from the Devices window:

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000d49ac
Triggered by Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   MYAPP                           0x00000001000d49ac 0x100010000 + 805292
1   UIKit                           0x00000001868a8954 -[UIViewController loadViewIfRequired] + 688
2   UIKit                           0x00000001868a8664 -[UIViewController view] + 28
3   UIKit                           0x0000000186f9c1cc -[_UIFullscreenPresentationController _setPresentedViewController:] + 72
4   UIKit                           0x0000000186ba378c -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 116
5   UIKit                           0x0000000186bbeb4c -[UIViewController _presentViewController:withAnimationController:completion:] + 1968
6   UIKit                           0x0000000186bc0f64 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 116
7   UIKit                           0x0000000186995c48 -[UIViewController presentViewController:animated:completion:] + 212
8   MYAPP                           0x0000000100090dcc 0x100010000 + 527820
9   MYAPP                           0x0000000100090bd0 0x100010000 + 527312
10  PromiseKit                      0x000000010032a9f4 0x1002e8000 + 272884
11  PromiseKit                      0x00000001002ee820 0x1002e8000 + 26656
12  libdispatch.dylib               0x00000001936c1990 _dispatch_call_block_and_release + 20
13  libdispatch.dylib               0x00000001936c1950 _dispatch_client_callout + 12
14  libdispatch.dylib               0x00000001936c6208 _dispatch_main_queue_callback_4CF + 1604
15  CoreFoundation                  0x00000001820522e8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
16  CoreFoundation                  0x0000000182050390 __CFRunLoopRun + 1488
17  CoreFoundation                  0x0000000181f7d1f0 CFRunLoopRunSpecific + 392
18  GraphicsServices                0x000000018b39f6f8 GSEventRunModal + 164
19  UIKit                           0x000000018690e108 UIApplicationMain + 1484
20  MYAPP                           0x00000001000be820 0x100010000 + 714784
21  libdyld.dylib                   0x00000001936eea04 start + 0

困扰我的是什么

  1. 我正在工作的环境之间显然存在矛盾.
  2. MYAPP的调用似乎未链接到任何组件/方法调用.我正在使用Swift,也许确实会导致解析符号的问题.这可能是有道理的,因为PromiseKit调用也未解决.
  3. 我不知道如何调试它,甚至也不知道如何将日志放到任何地方(因为我不知道如何获取它们).

欢迎任何帮助!

推荐答案

Build settings 中,尝试更改 Swift编译器-> 优化级别-> 释放 None .仍然存在一个错误,即当启用优化时,有时编译器会弄乱闭包.也许这就是你正在发生的事情.

In Build settings, try changing Swift compiler -> Optimization Level -> Release to None. There's still a bug where sometimes the compiler messes up closures when optimizations are on. Maybe that's what's happening to you.

这篇关于iOS应用在发行中崩溃,但在开发中没有崩溃,并且Swift符号未解决的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆