iOS 5 and Xcode 5 NSInvalidUnarchiveOperationException
by redbarndan · in Torque 2D Professional · 05/07/2014 (12:58 pm) · 6 replies
After upgrading to Xcode 5 I'm getting the following error when trying to build an app for a device with iOS 5.
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '* -[NSKeyedUnarchiver decodeInt32ForKey:]: value for key (GLKViewControllerPauseOnWillResignActiveCoderKey) is not an integer number'
The app runs fine on iOS 6 and 7 devices but crashes on iOS 5 with the above error. This was built with the Torque 2D 3.0 master branch.
Anyone know what's causing it or more importantly how to fix? I've searched the web for hours, nothing I can find seems to help.
Thanks
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '* -[NSKeyedUnarchiver decodeInt32ForKey:]: value for key (GLKViewControllerPauseOnWillResignActiveCoderKey) is not an integer number'
The app runs fine on iOS 6 and 7 devices but crashes on iOS 5 with the above error. This was built with the Torque 2D 3.0 master branch.
Anyone know what's causing it or more importantly how to fix? I've searched the web for hours, nothing I can find seems to help.
Thanks
About the author
Red Barn Games is a small independent studio looking to make a variety of great games using Torque engine technology.
#2
Link 1
Link 2
Usually native iOS errors like you posted will show up in Google searches, typically leading you straight to Stack Overflow posts. Check to see if any of their solutions work for you. If so, kindly create a GitHub issue for the T2D repo, linking to this bug report and the potential fix. Much thanks.
05/07/2014 (3:44 pm)
Found these links:Link 1
Link 2
Usually native iOS errors like you posted will show up in Google searches, typically leading you straight to Stack Overflow posts. Check to see if any of their solutions work for you. If so, kindly create a GitHub issue for the T2D repo, linking to this bug report and the potential fix. Much thanks.
#3
I've spent hours looking up links and following different suggestions, mostly from Stack Overflow. None of them have solved my problem yet. I was hesitant to go the no storyboard route as I'm not too sure what that entails but I guess I'll try that next.
05/07/2014 (4:22 pm)
Unfortunately it looks like iOS 5 simulators are no longer supported in Xcode 5.I've spent hours looking up links and following different suggestions, mostly from Stack Overflow. None of them have solved my problem yet. I was hesitant to go the no storyboard route as I'm not too sure what that entails but I guess I'll try that next.
#4
05/07/2014 (6:05 pm)
Color me frustrated then, because I want to debug this but I can't drop down to iOS 5 on my devices. Is there a way for me to simulate this? Would switching my deployment target still trigger this?
#5
Are you running Mavericks or an earlier OS? Apparently the iOS 5 simulators can be installed via Preferences->Downloads->Components in Xcode 5 on Mountain Lion.
I'm still working on removing storyboards as per your first link.
It seems Apple really doesn't feel that supporting iOS 5 is still necessary and I'm wondering if all this is even worth it. Based on my usage statistics iOS 5 accounts for all of 2% of my users.
05/08/2014 (4:49 am)
It looks like my first problem was upgrading my OS to Mavericks. According to Apple the iOS 5 simulators are no longer supported due to significant changes in the underlying OS. Wish I would have read that before upgrading.Are you running Mavericks or an earlier OS? Apparently the iOS 5 simulators can be installed via Preferences->Downloads->Components in Xcode 5 on Mountain Lion.
I'm still working on removing storyboards as per your first link.
It seems Apple really doesn't feel that supporting iOS 5 is still necessary and I'm wondering if all this is even worth it. Based on my usage statistics iOS 5 accounts for all of 2% of my users.
#6
I found this information from this link (may need a developer account to view) devforums.apple.com/message/880186#880186
05/08/2014 (7:10 am)
I found another potential solution. This one involves removing the GLKViewController and GLKView from the storyboard and replacing them with ViewController and View and setting the custom class properties of each to T2DViewController and T2DView respectively. This works, but I'm not what other consequences it has.I found this information from this link (may need a developer account to view) devforums.apple.com/message/880186#880186
Employee Michael Perry
ZombieShortbus