【发布时间】:2015-04-09 20:17:00
【问题描述】:
我正在使用 Apple 的 TestFlight Beta 测试服务来测试我的应用。我有一个 Xcode 版本,可以在我的 iPhone 6 和其他旧设备上正常运行。
当我将我的构建上传到 iTunes Connect 并打开 beta 测试时,最初一切都很好。用户可以启动应用程序并执行大多数操作而不会导致应用程序崩溃。但是,当用户单击“玩游戏”按钮时,应用程序莫名其妙地崩溃了!
因为可以毫无问题地打开应用程序,所以我假设它与配置文件无关。在完全相同的设备上,Xcode 构建工作正常,但 TestFlight 版本在按下“玩游戏”时崩溃。
我还假设这不是内存问题,因为当在设备上运行应用程序时,Xcode 中显示的内存在单击玩游戏时显示低于 10 mb。
我我在调试控制台中遇到了一些 AutoLayout 问题,这可能是问题所在吗?
2015-02-09 17:35:15.611 CYM SA[13111:2396370] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x1700919e0 H:|-(0)-[UIButton:0x14fe24470'Go To: 1'] (Names: '|':UIView:0x170193180 )>",
"<NSLayoutConstraint:0x170091a30 H:[UITextView:0x150856a00'hello, I'm 0 wow A paragr...']-(8)-| (Names: '|':UIView:0x170193180 )>",
"<NSLayoutConstraint:0x170091ad0 H:|-(8)-[UITextView:0x150856a00'hello, I'm 0 wow A paragr...'] (Names: '|':UIView:0x170193180 )>",
"<NSLayoutConstraint:0x170091b70 H:[UIButton:0x14fe24650'Go To: 2']-(0)-| (Names: '|':UIView:0x170193180 )>",
"<NSLayoutConstraint:0x170091c10 UIButton:0x14fe24650'Go To: 2'.width == UIButton:0x14fe24470'Go To: 1'.width>",
"<NSLayoutConstraint:0x170091c60 H:[UIButton:0x14fe24470'Go To: 1']-(0)-[UIButton:0x14fe24650'Go To: 2']>",
"<NSAutoresizingMaskLayoutConstraint:0x1700938d0 h=--& v=--& UIButton:0x14fe24470'Go To: 1'.midX == - 1850>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x170091c60 H:[UIButton:0x14fe24470'Go To: 1']-(0)-[UIButton:0x14fe24650'Go To: 2']>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
【问题讨论】:
-
我强烈建议在您制作的任何应用中添加崩溃跟踪 SDK,例如 Crashlytics。它不仅会跟踪崩溃,还会为您提供一堆有价值的信息,例如堆栈跟踪。它使调试这样的事情变得更加容易。
-
请注意,今年晚些时候将通过 TestFlight 提供崩溃报告*,以防您不想使用第 3 方 SDK。
-
@AdamPro13 谢谢。我会调查一下。
标签: ios xcode cocoa-touch xcode6 testflight