我使用Apple的TestFlight beta测试服务来测试我的应用。我有一个Xcode版本,可以在我的iPhone 6和其他旧设备上正常工作。
当我将构建内容上传到iTunes Connect并打开beta测试时,一切都很有效。用户可以启动应用程序,并执行大多数操作,而不会导致应用程序崩溃。但是,当用户点击" Play Game"按下应用程序莫名其妙地崩溃!
因为应用程序可以毫无问题地打开,所以我假设它与配置文件无关。在完全相同的设备上,Xcode构建工作正常,但是当按下" Play Game"时,TestFlight版本崩溃。
我还假设这是不内存问题,因为当点击播放游戏时,在设备上运行应用程序时显示的内存不足10 mb时显示在Xcode中的内存。
我我得到调试控制台中出现的一些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.
答案 0 :(得分:0)
@AdamPro13添加Crashlytics让我找到了问题。无论出于何种原因, ONE 中的 ONE 初始化变量for循环都会引起所有这种骚动。这仍然非常奇怪,这并没有使从Xcode加载到我的设备的构建崩溃。当我试图从数组中获取自定义对象时出现问题,但异常中显示的数字是巨大的,如1844402943409882943843209824390或接近它的东西。
此:
for (int i; i<[self.elementsArray count]; i++) {
Element *tempElement = [[Element alloc] init];
tempElement = [self.elementsArray objectAtIndex:i];
}
应该是这样的:
for (int i = 0; i<[self.elementsArray count]; i++) {
Element *tempElement = [[Element alloc] init];
tempElement = [self.elementsArray objectAtIndex:i];
}