简体   繁体   English

如果不是64位版本,IOS7应用会在模拟器中崩溃,并且在iPhone4和5s上可以正常运行

[英]IOS7 app crashes in simulator when not in 64 bits, runs fine on iPhone4 and 5s

I am new here and new to iOS programming so bear with me! 我是这里的新手,也是iOS编程的新手,请多多包涵!

I ran into this strange issue. 我遇到了这个奇怪的问题。 I created an iPhone app which runs fine on my iPhone 5s and iPhone 4. However, when I run it on the iOS Simulator, Version 7.1 (463.9.41), it only runs in 64 bit mode and crashes for all the other modes. 我创建了一个可以在iPhone 5s和iPhone 4上正常运行的iPhone应用程序。但是,当我在iOS模拟器7.1版(463.9.41)上运行该应用程序时,该应用程序仅在64位模式下运行,并且在所有其他模式下均崩溃。

Information based on your suggestions: 根据您的建议提供的信息:

  1. I renamed the property 'Description', with no changes and exactly the same error message including the word 'Description'. 我重命名了属性“ Description”,没有任何更改,并且完全相同的错误消息包括单词“ Description”。 However, the word 'Description' is nowhere in my code anymore. 但是,“ Description”一词在我的代码中已不复存在。
  2. I cleared all contents in the ViewController and it still cranes. 我清除了ViewController中的所有内容,但仍然可以正常运行。
  3. All outlets and connections checked and OK. 检查所有插座和连接,然后单击确定。

Any idea what could be the cause? 知道可能是什么原因吗?


* Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Description.' *由于未捕获的异常'NSUnknownKeyException'而终止应用程序,原因:'[setValue:forUndefinedKey:]:此类不符合键说明的键值编码。 * First throw call stack: *首先抛出调用堆栈:

0   CoreFoundation                      0x018021e4 __exceptionPreprocess + 180
1   libobjc.A.dylib                     0x015818e5 objc_exception_throw + 44
2   CoreFoundation                      0x01891fe1 -[NSException raise] + 17
3   Foundation                          0x01241d9e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4   Foundation                          0x011ae1d7 _NSSetUsingKeyValueSetter + 88
5   Foundation                          0x011ad731 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267

6   Foundation                          0x0120fb0a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7   UIKit                               0x004f81f4 -[UIRuntimeOutletConnection connect] + 106
8   libobjc.A.dylib                     0x015937de -[NSObject performSelector:] + 62
9   CoreFoundation                      0x017fd76a -[NSArray makeObjectsPerformSelector:] + 314
10  UIKit                               0x004f6d4d -[UINib instantiateWithOwner:options:] + 1417
11  UIKit                               0x0035f6f5 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
12  UIKit                               0x0035fe9d -[UIViewController loadView] + 302
13  UIKit                               0x003600d3 -[UIViewController loadViewIfRequired] + 78
14  UIKit                               0x003605d9 -[UIViewController view] + 35
15  UIKit                               0x00280267 -[UIWindow addRootViewControllerViewIfPossible] + 66
16  UIKit                               0x002805ef -[UIWindow _setHidden:forced:] + 312
17  UIKit                               0x0028086b -[UIWindow _orderFrontWithoutMakingKey] + 49
18  UIKit                               0x0028b3c8 -[UIWindow makeKeyAndVisible] + 65
19  UIKit                               0x0023bbc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
20  UIKit                               0x00240667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
21  UIKit                               0x00254f92 -[UIApplication handleEvent:withNewEvent:] + 3517
22  UIKit                               0x00255555 -[UIApplication sendEvent:] + 85
23  UIKit                               0x00242250 _UIApplicationHandleEvent + 683
24  GraphicsServices                    0x037f7f02 _PurpleEventCallback + 776
25  GraphicsServices                    0x037f7a0d PurpleEventCallback + 46
26  CoreFoundation                      0x0177dca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
27  CoreFoundation                      0x0177d9db __CFRunLoopDoSource1 + 523
28  CoreFoundation                      0x017a868c __CFRunLoopRun + 2156
29  CoreFoundation                      0x017a79d3 CFRunLoopRunSpecific + 467
30  CoreFoundation                      0x017a77eb CFRunLoopRunInMode + 123
31  UIKit                               0x0023fd9c -[UIApplication _run] + 840
32  UIKit                               0x00241f9b UIApplicationMain + 1225
33  Cards                               0x0000c24d main + 141
34  libdyld.dylib                       0x01e49701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Try to rename property Description to something else. 尝试将属性Description重命名为其他名称。 description is read only property of NSObject and some other objects and maybe it collides with your property. description是NSObject和其他一些对象的只读属性,可能与您的属性冲突。

Check your outlets for the Xibs or Storyboards, if one of them is not connected you will get this error. 检查Xibs或Storyboard的插座,如果其中一个未连接,则会出现此错误。 If you are using Key Value Coding then there is a wrong key name (check spelling). 如果您使用的是“键值编码”,则键名不正确(请检查拼写)。

I found the answer. 我找到了答案。

It happened after I changed the name of my project (top left in the xcode window). 更改项目名称后(在xcode窗口的左上方),发生了这种情况。 When you do this, Xcode asks if it also has to rename a couple of system files to which I answered "yes". 当您这样做时,Xcode询问是否还必须重命名我回答“是”的几个系统文件。 After that, the name of my app is changed correctly, but crashes on the simulator unless it runs in 64 bit mode. 此后,我的应用程序名称已正确更改,但除非在64位模式下运行,否则在模拟器上会崩溃。 On the iPhone it works fine in all cases. 在iPhone上,在任何情况下都可以正常工作。

Even when I leave all the all the item names unchanged except for the name of the app, the same things happens. 即使我保留所有项目名称(应用程序名称除外)不变,也会发生相同的情况。 When I change the name of the app back, all is OK. 当我改回应用程序名称时,一切正常。

I say it's a bug in Xcode. 我说这是Xcode中的错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 iOS应用程序在iPhone5s上以iPhone4分辨率运行吗? - iOS app runs at iPhone4 resolution on my iPhone5s? 在iPhone 5s或64位模拟器上测试32位iOS应用 - Testing 32 bit iOS app on iPhone 5s or 64 bit simulator 如何配置必须在iOS 5.1.1上运行的通用应用程序,以便它也可以在iPhone 5S上以64位运行? - How to configure a universal app which must run on iOS 5.1.1 such that it also runs with 64 bit on iPhone 5S? (iOS)App在iPhone上运行正常,但立即在模拟器中崩溃,未显示任何诊断消息 - (iOS) App runs fine on iPhone but immediately crashes in simulator, no diagnostic messages shown iOS应用程序在Xcode模拟器中运行良好,但速度很慢并且在设备上崩溃 - iOS app runs fine in Xcode simulator, but is slow and crashes on a device 我的应用程序在模拟器上正常运行,但在我的 ios 13.2 iPhone 上崩溃 - My app runs properly on the simulator, but crashes on my ios 13.2 iPhone Flutter Firebase 应用程序在模拟器中运行良好,但在 testflight 中测试时崩溃 - Flutter Firebase app runs fine in simulator but crashes when tested in testflight 在手机上运行时应用程序崩溃,在模拟器上运行正常 - App crashes when running on phone, runs fine on simulator 即使在模拟器上运行,iOS应用程序也会在iPhone上崩溃 - iOS app crashes on an iPhone even though it runs on simulator Xcode不将Phonegap应用程序部署到64位模拟器或Iphone 5s - Xcode Not Deploying Phonegap App To 64bit Simulator Or Iphone 5s
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM