iOS SDK 4.0 for Xcode 4.1 (Lion)? - ios

I recently downloaded Xcode 4.1 for Lion with iOS SDK 4.3. Now, whenever I change my Deployment Target to anything older than 4.3, I get hundreds of errors when I try to build my project. This happens even if I'm trying to run it on the 4.3 iOS Simulator, so I don't even need to be actually running it on an older device, I just have to set the older Deployment Target.
Do I need to download a separate SDK in order to allow for older devices? If so, where could I find it?
Thanks for your help!

I tried copying the SDKs from Xcode 4, but it doesn't work.
Other answers suggest that it's not possible.
I'm now using a virtual machine with Snow Leopard to test on older devices. (Or real older devices, if you have one)

Related

Swift Code in XCode 7.3.1 not working in iOS 10

I am building an iOS app using Swift 2.2, XCode 7.3.1, which is going to go live very soon. I upgraded my iPhone to iOS 10.0 and now when I try to run my code in my iPhone, I am getting the error -
At this stage of my project I don't want to upgrade to XCode 8.0 and use Swift 3.0. Is there any way I can make my code written in XCode 7.3.1 work in iOS 10. My code is working well for iPhones having iOS versions 9.3.2
Thanks
No, Xcode 7.3.1 does not support iOS 10. You cannot. You will have to upgrade to Xcode 8.
And, you should upgrade because it also provides you Swift 2.3 which will help you run latest SDK for iOS 10 etc and the transformation is automatic.
Read here: https://developer.apple.com/swift/blog/
To detect device in XCode you must install software with appropriate version or system will show you the message you have mentioned in the question.
A workaround as per your wish is that every time you make an IPA of your release and install it in the device you want to run with it (that could be a hard time if you deploy several times a day). Remember there is an upward compatibility but no downward compatibility that is if your deployment target is 8 or above you can run the IPA on device having iOS 8 or above but not in iOS 7.
Perhaps you may get some issues on running it on new iOS because of the some obsolete or new features, and to fix that you must upgrade XCode and compile your code on it.
Hope that helps!
Copy the folder 10.0 (14A345) in DeviceSupport folder of Xcode8 to
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
It works for me :)

Using IOS 7.0 Simulator on Xcode 7.2.1

I would like to make my app compatible with IOS 7.0 but in the preferences --> downloads section, the lowest available version is IOS 8.1 simulator. I'm currently using OSX Yoesmite 10.10.5 wih xcode 7.2.1 running version 9.2.
Does that mean there's no way to test for app compatibility for any versions lower than IOS 8.1?
Edit: I realize it's possible to install older versions of xcode. I want to know if it's possible to download only the simulators on my current xcode, not have an entirely new and different xcode.
The answer should be NO.
It's not just about the simulator, but the SDK you use to compile the app to run within the simulator. When you use newer SDK to compile, the binary could contain unknown load commands to the binary header, or unknown APIs calls to an older system. That's the main reason you can't run an app built with newer SDK/system on an older OS. Even if it worked, it might still crashed at some point when the needed symbols can't be resolved.
So in order to run/build app for an older version of simulator, you need:
An older version of Xcode (which has older version of SDK)
Or, find out a way to setup your current version of Xcode to compile
with the older SDK extracted from an older version of Xcode. (This
may and may not work due to the change made to Xcode.)
For the second option, you can google it for how-to.

Backward compatibility for iOS build SDKs

I would like to run old application which has a support of iOS 5.0 and less. It has a deployment target 5.0. The thing is that:
I have upgraded system to Yosemite OS 10.10 and lowest Xcode version I have 5.0. Now when I look on base SDK and I see below picture.
As you see the least build SDK shown s iOS 7.0. No other lower version is there.
I heard or I read some where that you can also use lower version SDK here. By copying SDKs to some where or any other means. I would like to know a better approach here.
Edit:
I have a requirement of one application which was developed in Xcode 4.6 for iOS 5.0. So that just to check that application flow I need to download Xcode 4.6. Is it so? Can we don't include older SDKs in newer version of Xcode?
You should not attempt to build your application with an old version of Xcode. The only version of Xcode supported on Yosemite is Xcode 6.1, which only ships with the iOS 8 SDK. You should build for the latest SDK, and set the Deployment Target to iOS 5 if you want your code to run there (by degrading gracefully using NSClassFromString and respondsToSelector: checks)

Do I have to upgrade xcode to 4.3.2 with sdk 5.1 to distribute apps on ios 5.1?

My xcode is 4.2.5. I don't want to upgrade xcode now, because I read that xcode 4.3.2 has some problems.
I know it is necessary to upgrade xcode to test on 5.1 devices, but I am just wondering whether a release version compiled by sdk 5.0 can run on 5.1 devices.
You will not be able to build to a device running 5.1 without upgrading to the latest version of XCode (which also requires OSX Lion).
If you were to submit your app to the app store, however, users running 5.1 would still be able to download it. It very well might crash if you have 5.1-specific errors in the code, but users could install it.
No, it cannot. You must compile with at least the same version number as your target.
EDIT Wait, I should say that it will run but you won't be able to debug it. So I guess the answer is actually yes now that I read the question again.

Test iOS app with device of iOS 5.0.1 beta version

Now, I use Xcode 4.2 supporting iOS 5.0. Apple has just released iOS 5.0.1 beta 2. I can install it on my iPhone.
I want to test with this beta version, i.e build code from Xcode.
How do I build code from Xcode 4.2 for device of iOS 5.0.1 beta?
Please help
In exactly the same way that you would do so for iOS 5.0. We can't talk about beta versions of the software, but we can talk about what happens when newer versions of iOS are released. When you connect a device with a newer version of iOS installed, the Xcode Organizer will give you a message like:
Xcode does not have debugging information for the version of iOS on the device named “Dev iPhone”. Xcode can collect debugging data from the device to enable development with this version of iOS. This process only needs to be done once per iOS version, and will take several minutes.
You simply click OK or similar, and Xcode downloads the necessary debugging data. You can then build to the device from Xcode and use all the debugging tools as usual. This process works for point releases. It is highly unlikely this would work for major updates (e.g. if iOS 6 was released) and it may or may not work for iOS 5.1, depending on the changes included. But when Apple have not released a new version of Xcode to developers, you can be sure it is because one is not required.
It is important to understand the distinction between an updated version of iOS (for the device) and the iOS SDK (for Xcode). A point release of iOS does not necessarily require any change to the iOS SDK, and therefore with Xcode's ability now to download the debugging information on demand (a feature that has been around for a while), you don't necessarily need an updated version of Xcode. Likewise, with Xcode 4.2 you still set the iOS 5.0 as your base SDK even if you are setting an earlier version (e.g. iOS 4.2) as your deployment target. You don't need the iOS SDK v4.2 to target iOS 4.2 for deployment. (Just make sure you add back "armv6" to targeted architectures in your build settings, if you still want to support the iPhone 3G and equivalent iPods, as in Xcode 4.2 this is not included by default.)

Resources