iOS: Is there absolutely no way to build for armv6 in Xcode 4.5?
Asked Answered
U

4

10

Starting with Xcode 4.5 the possibility of building for armv6 devices is not given anymore (iPhone/iPod touch 1st and 2nd generation). This means no new versions of our app for iPhone 2G and 3G which is very unlucky. Does anyone know if there will be a workaround? I really don´t see any technical reasons for this.

Unflinching answered 18/9, 2012 at 10:12 Comment(0)
G
6

You can have multiple versions of xcode installed. In the past, that has been the fix needing to use an older xcode feature.

It is a workaround, and the project files may eventually evolve in a way that no longer supports the older tools, but for the time being, that will allow you to build for older targets.

If you have a single project that you want to work with in both versions of XCode, then you may end up having to manage separate project control files via source control tricks and/or file shuffling.

I would also recommend that project structure changes and binary file management (e.g. Core Data models) happen via the old version, as XCode 4.5 will be backward compatible, but forward compat is rarely assured.

Gadmon answered 19/9, 2012 at 18:45 Comment(4)
I had kept a XCode44.app copy in my application folder to do that and it was removed by the 10.8.2 upgrade -_-...!!! Any idea how to download it again?Docker
@Docker - Apple still has Xcode 4.4 listed in their developer downloads: developer.apple.com/downloads/index.action?name=Xcode#Ascot
You can also get older versions from the ios developer downloads at developer.apple.com/downloads/index.action. Requires a developer account, though.Gadmon
What I am looking for is a way to build a bundle with the iOS 6 SDK that runs on a 3G. Currently the iOS SDK 6 requires Xcode 4.5 that does not support armv6 anymore.Unflinching
L
1

There's another solution I found in chpwn blog: Building for armv6 in Xcode 4.5.
This allows you to work with Xcode 4.5 but compile using 5.1 SDK. The downside: you can’t use the iOS 6 SDK when using this trick, and you can’t build for armv7s.

Ladin answered 9/10, 2012 at 15:21 Comment(1)
Unfortunately, chpwn didn't mention an important step, that originally tripped me up. I had to define a custom Build Rule, too. Explanation detailed in my answer here. Also, armv7 executables will run on armv7s, just without the benefit of new armv7s improvements/optimizations.Vincents
V
1

Yes, there are workarounds. If you need to actually take advantage of new iOS 6 features, try either of the first couple answers to this related question. The first answer requires using both Xcode 4.4 and 4.5. If you never want to have to open Xcode 4.4, then use the second answer.

If you just want to be able to build an executable in Xcode 4.5 that works on armv6, armv7 and armv7s devices, without actually taking advantage of new iOS 6 SDK APIs, then you can see my answer to another question, which is much simpler ... but has the limitation that you can't take advantage of new iOS 6 features on iOS 6 devices.

Vincents answered 25/10, 2012 at 9:24 Comment(0)
B
-1

You can add the string "armv6 armv7" as architecture. Do not select a predefined setting.

Bureaucracy answered 21/9, 2012 at 18:53 Comment(3)
This doesn't work. You can type in armv6 armv7 as your Architectures, but (unless there's some other step that you didn't mention), this will not build an executable for armv6 in Xcode 4.5.Vincents
In XCode 4.1/4.2 they dropped the armv6 as a default setting but by readding it to the "Architectures" project property as @Bureaucracy says it would actually build the armv6 architecture as well. Now in XCode 4.5 this trick as well as adding it to the list of "Valid Architectures" still doesn't work and you will get a build warning warning: no rule to process file '$(PROJECT_DIR)/mypath/mysrcfile.c' of type sourcecode.c.c for architecture armv6. It would seem the XCode.app (v4.5) has turned off armv6 support and you will need an older edition of XCode to build this architecture slice.Ralleigh
@NeoZenith, I finally figured out how to do this, without keeping an older Xcode around. Solution posted hereVincents

© 2022 - 2024 — McMap. All rights reserved.