Build for armv6 architecture (target iOS 3.1.3) with iOS 6 SDK and Xcode 4.5?
Asked Answered
T

2

14

is there a chance to use the iOS 6 SDK to develop applications that target iOS 3.1.3? If I open my project with the old deployment target, the compiler warns me:

iOS deployment targets lower than 4.3 are not supported

This is probably due to the fact that apparently only armv7 and armv7s binaries can be built. If I add armv6 (working in devices until the iPhone 3G) manually, there are several warnings as well:

warning: no rule to process file '$(PROJECT_DIR)/main.m' of type sourcecode.c.objc for architecture armv6
...
...
warning: architecture armv6 is not supported (current ARCHS = "armv6 armv7 armv7s").

So how do I deal with this? Is there a way to support iOS 3.1.3 while developing with the iOS 6 SDK? If not, I will eventually have to move to the lowest target to be iOS 4.3. Is it even possible to submit a new version that supports only versions >= 4.3? What happens to my users on earlier versions? Are they simply not being informed about the incompatible update and hence going to continue to use the older version of my app? If not, can this be achieved?

Toback answered 21/9, 2012 at 15:28 Comment(0)
D
10

With Xcode 4.5 (ie iOS 6 SDK) the lowest version you can build for is iOS 4.3. I guess it is time for your 3.1.3 customers to upgrade.

Diphase answered 21/9, 2012 at 18:17 Comment(1)
Sadly I have some customers that have old iPod touches for their internal applications that aren't able to upgrade past 4.2.1. I wish I could just tell them to upgrade :( but for now just going to try MattyG's solution.Paralyze
M
21

oonoweb's answer is correct regarding iOS SDK 6.0. It's not possible to support below iOS 4.3 while building against iOS 6 SDK, but it is possible to use Xcode 4.5 to continue to build for armv6 and target iOS 4.2.1 and below.

The trick is to build against iOS 5.1 SDK instead of 6.0. Note: you won't be able to use any of the new iOS 6 specific features if you do this:

chpwn's blog lays out the steps, which I've re-written:

  • Download Xcode 4.4.1 from Apple Developer Downloads (you don't need to instal it)
  • Open the .dmg, right click on Xcode.app, 'Show Package Contents'
  • Find the iOS 5.1 SDK within that package at: Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/
  • Copy this SDK
  • Open the package contents of Xcode.app (4.5), and paste the 5.1 SDK in the location: Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
  • Open your project in Xcode 4.5. Go to your Target > Build Settings tab > Base SDK, and choose iOS 5.1 from the dropdown
  • Again in Build Settings tab > Valid Architectures - remove armv7s if it's there, and add armv6 if it's not there already.
  • Go to the Info tab > Deployment Target, and type 3.1.3 (or whatever you're supporting down to) into the dropdown (the option won't be there, but you can type it in).
  • You can now delete Xcode 4.4.1 .dmg if you don't want to install it.

You'll get warnings about talking about no rule to process files for armv6. Nate has recently posted this answer to deal with those.

If you're creating a new project (instead of maintaining old ones) you may also need to view the ***-Info.plist file, and remove armv7 from the 'Required Device Capabilities' if it's there.

Mead answered 25/9, 2012 at 9:54 Comment(4)
I've followed all steps from chpwn's blog, but now Xcode gives me lots of warnings: "Warning: no rule to process file '$(PROJECT_DIR)/Classes/aSUBDIRECTORY/fileXYZ.m' of type sourcecode.c.objc for architecture armv6Respondence
It's important to note here that this approach will NOT work if you're relying on any 3rd party libraries that have built against iOS6 (Facebook, Flurry, etc.) The pre-compiled libraries will not have the appropriate byte-code for the firmware installed on armv6 devices, and thus if it manages to actually compile, it will still fail to execute (i.e. crash)Dorty
@Tafkadasoh, there's a way to fix this problem that's not described in chpwn's blog, that this answer is derived from. See my answer to this related question. Basically, you need to define a new Build Rule yourself. It worked for me.Justiciable
Doen't the 'iOS Deployment Target' need no be changed from Targets->Bulid Settings? I tried this, but NSLog(@"%i", __IPHONE_OS_VERSION_MIN_REQUIRED); returns 40300 which i guess is not 3.1.3 Also, changing the Deployment Target from Info tab is this from Project or Targets? Targets Info Tab hasn't Deployment Target key. I have change this from Project Info tab but i have the same result.Barcot
D
10

With Xcode 4.5 (ie iOS 6 SDK) the lowest version you can build for is iOS 4.3. I guess it is time for your 3.1.3 customers to upgrade.

Diphase answered 21/9, 2012 at 18:17 Comment(1)
Sadly I have some customers that have old iPod touches for their internal applications that aren't able to upgrade past 4.2.1. I wish I could just tell them to upgrade :( but for now just going to try MattyG's solution.Paralyze

© 2022 - 2024 — McMap. All rights reserved.