Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to target older iOS versions when using Xcode 4.2 and iOS 5 SDK?

Tags:

xcode

iphone

ios5

I just recently downloaded the Xcode 4.2 with iOS 5 SDK package and I immediately noticed that I am unable to use my iPhone 3Gs with iOS 4.2.1 for debugging. I am only able to debug and test on my iphone 4 with iOS 5 installed.

For any of my devices running any iOS less than 5.0 Xcode just says "Finished running for iPhone3GS" and doesn't run it. I have my deployment target set to 3.0 because I am not using any features in my app above 3.0 and I want to be able to target all versions 3.0 or higher. I have all my provisioning profiles installed and up to date.

I have quit and restarted xcode, I have cleaned the build multiple times. I have tried adding armv6 in the archtecture build settings, but nothing will allow me to build and run my app on my old phone with ios 4.2.1.

My question is, is it possible to still make apps with the new SDK work for iOS versions lower than 5? How can I be sure that my app will still run on lower iOS versions if I am unable to install them on my old phone?

Edit: OK it looks like iOS SDK 5 dropped support for armv6 by default. What you have to do is add armv6 in the Architectures field under Build Settings for both your Target and your Project. Then your app will be able to run on iPhone 3G devices. Answer can be found here How to build for armv6 and armv7 architectures with iOS 5

like image 417
Greg Ellis Avatar asked Oct 13 '11 22:10

Greg Ellis


People also ask

What is iOS deployment target in Xcode?

In short, every application that runs on one of Apple's platforms has a deployment target. A deployment target is nothing more than the minimum version of the operating system the application can run on. Fire up Xcode and create a new project by choosing the App template from the iOS > Application section.

Which SDK is used for iOS?

The central component of the iOS SDK is Xcode, Apple's interactive development environment (IDE). Xcode facilitates building apps for OS X, iOS and WatchOS. Xcode includes the interface, the LLVM compiler, instruments and iOS simulator tools that make development and testing possible without an Apple device.

How do I find my iOS SDK version?

If you care about the build number (like "10B61"), especially during betas, the best place to check which version of Xcode and related SDKs you have installed is to use "System Information". Once there, you'll see version and build numbers for all of the major components of the Developer Tools.


1 Answers

I was having the same issue trying to get a newly created Xcode 4.2 project running on an iPhone 3G 4.2.1. Here is how I was able to get it to run.

1) Change the Target's "Build Settings" ==> "Architecture" from "Standard (armv7)" to "other". Add armv6 and armv7.

2) Change the Target's "Build Settings" ==> "Valid Architecture" to armv6 and armv7.

3) Change the Target's "Build Settings" ==> "iOS Deployment Target" to iOS 4.2.

enter image description here

4) Open the projects *-Info.plist, remove the setting "Required device capabilities" (note it required armv7) enter image description here

btw I figured this out when I tried to manually add the app via the organizer and it reported:

Can't install application

The Info.plist for application at /Users/.../TestsDebug.app specifies device capability requirements, which are not met by Dev iPhone 3G

All should work after that. Talk about a PITA.

like image 77
mmorris Avatar answered Sep 20 '22 15:09

mmorris