i've installed Xcode 4.5 with iOS6 SDK and others old SDKs (from 4.3 to 6.0) for testing purpose.
Beautiful, but there is a BIG problem!
A new XIB file is generated for iOS6 compliant!
This is a problem, because my app need to run on older devices, not only 6.0+!
When i load the new view (ios6) in a 5.1 device, it silently crash with this error:
2012-09-24 22:00:17.090 App[14524:11f03] * Terminating app due
to uncaught exception 'NSInvalidUnarchiveOperationException', reason:
'Could not instantiate class named NSLayoutConstraint'
How can i remove extra lines in XIB to make (xib and app) compatible with older ios version?
thanks a lot.
Try changing this option of the xib:
Also make sure that Use Autolayout is off, because it's a iOS 6.0 feature.
Related
When I run my App on ios10 or later, the app works fine but the problem is that when I run the app on ios9 it crashes. I put deployment target 9.0 or later ,I could not find why it is not working on ios 9 and the warning shows like this :
Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '+[NSString
localizedUserNotificationStringForKey:arguments:]: unrecognized
selector sent to class 0x10d042b00'
The problem is with method: localizedUserNotificationStringForKey:arguments.
Please note that this method is only available from iOS 10+.
This method you are using comes in UserNotifications framework. This framework introduced in iOS 10. That's why it's not supporting iOS9 devices.
Please refer this document : Apple Doc on UserNotifications Framework
The method you are using localizedUserNotificationstringForKey is available for iOS 10 or later , it’s not for ios9
My app is crashing when I try to display another view controller. It does work correctly when the iOS SDK is set to 7.0 and I am targeting iOS 7.0. But I need the app to target iOS 6.0. UIKit is (obviously) declared in the imports. The UITableViewController I am trying to present works perfectly fine as far as I'm aware - I created it for another app, using XCode 4.6.3, targeting 6.0 and it compiled without error (as does this one) but it also displays without crashing.
I could provide code, code which does nothing more than present the table view controller using a modal transition, but I even went to the point of connecting a UIButton to the UITableViewController - it worked on iOS 7, but not 6. It's my belief that when I compile with the iOS 6.1 SDK, it should be using iOS 6.1 frameworks?
UIKeyCommand is only available in iOS 7 and later, according to this. That gives me reason to believe that it is using the iOS 7.0 frameworks even though the iOS 6.1 SDK has been specified.
I've tagged this with the xcode tag as I believe it could possibly be caused by xcode incorrectly searching for the specified SDK's frameworks.
I had the same problem as you and here is what i did to solve it:
I opened the Storyboard as Source Code and searched for the tag : keyCommands , I found a tag similar to
<keyCommands> <keyCommand/> </keyCommands>
and i deleted it.
After that i runned the app in iOS 6 & 7 and it worked with no problem.
Let me know if this works on your app too!
Cheers!
I'm developing an iOS App which targets iOS 5.1+. I'm using XCode 4.5 on Mac OS X 10.8 and I do own an iPhone 4 with iOS 5.1.1. The app needs OpenCV, which I have successfully built from sources according to a tutorial in the OpenCV-Documentation.
Here is what happens:
When I start up the application I get an exception:
dyld: Symbol not found: _objc_setProperty_nonatomic
The error does not occur with iOS 6, but with iOS 5.1 in both the simulator and on a real device.
What is that? Is it related to OpenCV? Does it have to do something with incompatibilities between iOS / the iPhone / XCode??
EDIT: My development target is set to 5.1. The Base SDK is 6.0. I copied an SDK für 4.3 (which is the lowest version that XCode 4.5 will support) from another Mac and set development target as well as the base SDK to 4.3. Did not work either (it did not even build then).
I did not an update, the project has been started from scratch using XCode 4.5 initially.
Meanwhile I also found a tip to use gnulibc++ instead of libc++, but that also resulted in that the project did not build at all.
I built a test project and found the same issue. OpenCV is being built with a deployment target of ios6, this is a known issue, and a fix is pending review, see https://github.com/Itseez/opencv/pull/70
I added Social.framework in my application in the same way i use to add the other frame works. I have downloaded xcode 4.5 and iOS 6 . but my application crashes with follwing error only on device. It works fine on simulator.
dyld: Library not loaded: /System/Library/Frameworks/Social.framework/Social
Referenced from: /var/mobile/Applications/FC88291D-2052-45D6-A7BB-65CE340F07BF/Uploading Image.app/Uploading Image
Reason: image not found
I was getting this exact error. My app currently has a deployment target of 5.1. I wanted to add Facebook sharing. I found this old post, Conditionally including a library for different iOS SDK versions?. All I did was set "Social.framework" to 'optional' and it did the trick, then my app would run on ios 5.1 and ios 6.0. Of course you need to do checks at runtime for what OS the device is running otherwise you could run into a crash if you try to access social.framework in ios 5.1 or earlier. Hope that helps!
In Xcode go to targets, Go to build phase and search for Social frame work you will find that under "Link Binary with Libraries" section. There select social frame work and see there is an option on right hand side required/optional in that just change required to optional. Now you are able to run on all ios devices without any crashes.
I had upgraded my OS into Snow Leopard, and I'm using Xcode 3.2 with iPhone SDK 3.0 for Snow Leopard.
I had cleaned up the existing Developer Tools, uninstall, and I deleted the /Developer directory, and I reinstall.
But, the problem is, Interface Builder is showing 3 pop up alerts with this message:
Assertion Message: Interface Builder encountered an error communicating with the iPhone Simulator. If you choose to file a crash report or radar for this issue, please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" and include their content in your crash report.
IBUIViewImageRequester failed to rasterize a UILabel, UIButton, UITextField, and UISegmentedControl.
Exception name: NSInvalidSendPortException
Exception reason: [NSMachPort sendBeforeDate:] destination port invalid
Exception backtrace:
(null)
Exception info:(null)
Some people had experienced this, and some people were able to resolve it by copying the right IBCocoaTouchPlugin.ibplugin from those not experiencing problems.
So if anybody could share it, that would be great.
I could click continue to proceed, but it's an annoying problem.
Update:
It's caused by IB that's linking to the wrong libstdc++ in /usr/local/lib. The IB should link to libstdc++ in /usr/lib/
Just delete or move the interfering libs.
It's caused by IB that's linking to the wrong libstdc++ in /usr/local/lib.
The IB should link to libstdc++ in /usr/lib/
Just delete or move the interfering libs.
I had the same problem. I moved the /usr/local to another place, and the problem was solved.
Update: I ran into a very similar problem today. The solution was to delete my old /Developer folder I used with Xcode prior to 4.0.