I have an app which I have been developing for ios 6.1 and I finally got it to work as I wanted to.
Then just to test how it works on the older iPhones, I set the deployment target to 5.1 and when I ran it, the ui started looking messed up.
Would anyone know why this happens? And should I keep the deployment target to 6.1? And if so, how do I make sure that the app looks ok on the older versions of the iPhones?
ps - here is the crash when I check the auto layout option
*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
*** First throw call stack:
Autolayouts were introduced in iOS6.0
If you want your app to run on iOS5.x or 4.x you must disable or not use autolayouts, or version gate the use of autolayouts based on which iOS the device is running (which, is a pain).
The Deployment Target is the oldest iOS version you want your app to run on. if its iOS5.0, then it'll run on all devices having iOS5.0 or later
Here's a better answer
Related
I am using the ClippingBezier framework. I compiled the framework using the steps provided here and added it to my project. When the project is run on actual devices, namely iPhones and iPads, it works perfectly. However, in the simulator, the app crashed with the error NSInvalidArgumentException', reason: '-[UIBezierPath findIntersectionsWithClosedPath:andBeginsInside:]: unrecognized selector sent to instance where the method mentioned in the error is found in the framework.
Any help to resolve this?
Thinks you are building the framework without simulator architecture, you should choose simulator when build the framework, and navigate to Release/iphonesimulator and use that framework if you want to test your framework in simulator, the file in release/iphoneos is only for use in device target.
Create aggregate target with run script can help create fat framework (include both device and simulator archs) but app with this framework wont make it to AppStore. Sample script can be found in here.
To create framework for simulator, compile the framework while targeting any simulator in device target.
Common UIView manipulation methods are not working when testing on iOS 9.3 simulators in Xcode 9.0.1 as well as Xcode 9.1 beta 2.
So far, the methods that have caused crashes due to EXC_BAD_ACCESS at runtime are insertSubview and layoutIfNeeded.
Our app supports a minimum version of iOS 9 so it is important to us that we be able to properly test on this version in addition to the later versions.
Does anyone else run into this issue in their testing?
I'm not able to test in a previous version of Xcode because our .xib files have been formatted to make use of the Safe Area which Apple stated is backwards compatible. Regardless, these issues are all occurring due to programmatic view manipulation - not due to .xib file definitions.
Figured it out - I had recently duplicated the corresponding .xib file. The duplicated file switched it's "Builds for" option from our deployment target (iOS 9.0) to iOS 11.
Switching the "Builds for" option back to the deployment target seems to have fixed my issue.
We have a company salesapp that runs on a lot iPads. One device keeps crashing every now and then. The crashlog shows:
Model: iPad5,4
iOS: 9.1
Exeption:
[__NSArrayM removeObjectsInArray:]: unrecognized selector sent to
instance 0x157d022a0
First of we don't use this method in our code. Testing with the 9.1 iOS Simulator shows that the method gets called by the os during touch events. It is also not an immutable object btw.
This didn't happen in previous versions and the codebase didn't change since the last update was content only.
However the only new component is XCode 8. The previous version was made with XCode 7.
Granted the user needs to update his iPad.(If IT will allow)
But that doesn't explain what is happening here.
No crashes before XCode 8 - wich sound troubling if XCode is the culprit.
Our logs shows that all other iPads run 8.3, 9.3.5 or 10.x.
Are there any issues known with iOS 9.1 that could explain this?
Our client requires an iPad/iPhone app that covers iOS 5.0 - iOS 7.0.
I created a new project in Xcode 5
In build settings I changed the architecture to standard Standard armv7, armv7s
I clicked on the Main.storyboard and made sure that the interface builder settings were:
Opens in: Default (5.0)
Builds for: iOS 5 and Later
View as: iOS 6.1 and Earlier
In Deployment Info I changed the Deployment Target to 5.0
I can see my old simulators now, but running an empty single application project in iOS 5.0 simulator gives me this missing storyboard errors that many have reported:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'Main' in bundle NSBundle
I can see a red "missing" storyboard in "Copy Bundle Resources" - no solutions on here work, i.e. deleting/re-adding/clean/compile. I noticed that clicking "Localization-English" box on Interface Builder make the red file look normal, but I still get this missing error when I run the simulator.
I'm thinking that the only way is to create a project in Xcode 4 build with iOS 5 compatible code and just test and make amendments to it later with iOS 7.0
Any thoughts?
Select Main.storyboard and make the following changes to Localization section in File Inspector.
I'm having some trouble supporting older versions of iOS. I first noticed this when a buddy of mine was using my app and it crashed. He's running iOS 5 and I'm running iOS 6. I'm building with base SDK 6.0 and I've tried changing the deployment target, the architectures, and pretty much everything I could find and think of. Nothing works and when building on iOS 5 simulator, the app crashes at launch.
I need to fix this so my older version users who download my app aren't experiencing crashes.
Are you using autolayout on any of your xib files? By default you would be. If you still are, switch it off.