7

How is it possible to use your pre-iOS 7 look and feel for your app? I just upgraded to iOS 7 and I have some apps on the phone that are still using the pre-iOS 7 look and feel. For instance one app is using the old UIPickerView look but it's running on iOS 7.

When I tested running the app that I am developing on the iOS 7 simulator it's using the new UIPickerView "automatically" without me doing any changes.

So I'd rather that my app uses the pre-iOS 7 look and feel until I have upgraded my app for iOS 7.

Here's an image of running Checkmark on iOS 7, you can clearly see it's using the pre iOS 7 keyboard:

enter image description here

Peter Warbo
  • 11,136
  • 14
  • 98
  • 193

4 Answers4

10

That's rather simple: You have to build your app using the iOS6 SDK. iOS 7 detects older apps by checking the SDK against which the app was linked.

You can switch "Base SDKs" in Xcode by selecting the target, switch to the build settings tab, and find the "Base SDK" build setting under "Architecture".

If you don't have an older SDK you may need to use an older version of Xcode (4.6). Rob Napier describes here how to point a newer Xcode to older SDKs.

Note that while many UI elements retain their iOS 6 look, some don't (UIAlertView, UIActionSheet).

Community
  • 1
  • 1
Nikolai Ruhe
  • 81,520
  • 17
  • 180
  • 200
  • Aha, so that means I need to have both Xcode 4.6 and Xcode 5.0 installed? Because when I upgraded I just dragged Xcode to my applications folder (which was suggested) and it overwrote my old Xcode 4.6. – Peter Warbo Sep 11 '13 at 11:27
  • @PeterWarbo Yes, exactly. It's not a problem to have multiple versions of Xcode installed (you can even run them at the same time). I just renamed my old version to Xcode 4.6. – Nikolai Ruhe Sep 11 '13 at 11:30
  • `UIKit` and other Apple frameworks are *dynamically* linked. To my understanding, you don't get a choice in which `UIKit` components you use... that is, if you're running iOS 7, it's going to use iOS 7 components. Correct me if I'm confusing what you mean here? – JRG-Developer Sep 11 '13 at 11:31
  • @JRG-Developer Correct. Yet, Apple built iOS7's UIKit.framework so that it detects the version an app was linked against and if that version is not iOS7 it simulates the old look and behavior. – Nikolai Ruhe Sep 11 '13 at 11:35
  • I don't believe this is the case, and I don't think our apps are behaving this way either... can you reference the docs somewhere that says otherwise? – JRG-Developer Sep 11 '13 at 11:36
  • @JRG-Developer ... otherwise there would be no way how older apps that have not yet been updated to iOS7 could still work correctly on a device running iOS 7. – Nikolai Ruhe Sep 11 '13 at 11:36
  • Yes, we anticipate that iOS 7 will indeed break the "look and feel" of many apps that aren't updated... it happened when iOS 6 was released somewhat and definitely with iOS 5. However, Apple has been giving strong recommendations to "update your apps now." – JRG-Developer Sep 11 '13 at 11:38
  • @NikolaiRuhe so I suppose I build against iOS 6 SDK in Xcode 4.6, (but Xcode 4.6 will not be able to recognize my iOS 7 device) so how can I test it on my iOS 7 device? – Peter Warbo Sep 11 '13 at 11:40
  • @JRG-Developer Have you tried the beta? All (older) apps just work and look as they did before. – Nikolai Ruhe Sep 11 '13 at 11:40
  • @PeterWarbo Well my Xcode 4.6.3 did work perfectly with the iOS 7 beta and still does with the GM. – Nikolai Ruhe Sep 11 '13 at 11:43
  • @JRG-Developer It's not uncommon that Apple uses this technology: Detecting the linked version of a library at runtime and behave differently for older versions. Core Foundation even contains a private function for this purpose: `_CFExecutableLinkedOnOrAfter`. – Nikolai Ruhe Sep 11 '13 at 11:51
  • @NikolaiRuhe Aha, well for me in the organizer of Xcode 4.6 it says this about my iOS 7 Device: `The version of iOS on “iPhone 4S” is not supported by this installation of the iOS SDK. Please restore the device to a version of the OS listed below, or update to the latest version of the iOS SDK; which is available here. OS Installed on iPhone 4S 7.0 (11A465) ` – Peter Warbo Sep 11 '13 at 12:35
  • @PeterWarbo Have you tried pointing Xcode 5 to an older iOS SDK version? See the link in Nikolai's answer. This way you can still test on your devices running iOS 7, but built with the iOS 6.x SDK to retain the pre-iOS 7 look and feel. I've used this technique successfully, just not with Xcode 5 yet. – MattyG Sep 21 '13 at 06:34
  • I don't think your app would show up for iOS7 users in the App Store if you set the base sdk to be iOS6, would it? – Myxtic Nov 11 '13 at 17:35
  • @Myxtic Of course it would. It's the "deployment target" that limits the compatibility to newer iOS versions, not the base SDK. If an older base SDK would keep an app from installing on iOS 7 all older apps would not be compatible and would be missing from the store. They were all built with base SDKs before iOS 7, after all. – Nikolai Ruhe Nov 11 '13 at 19:04
0

If you're using the standard UI components you're going to automatically get the new style on iOS 7, there's no way I've come across to force them to appear as they would in iOS 6. The only way you're going to be able to have them appear as iOS 6 elements is to build custom elements and style them yourself, however there's a risk in doing that that when you submit to Apple they'll reject on the basis of breaking the HIG.

Nicholas Smith
  • 11,642
  • 6
  • 37
  • 55
  • I'm actually running an app that looks "exactly" the way it did before iOS 7 (it's even using the pre-iOS 7 keyboard, which I believe is not possible styling). So there seems to be a way to run your old apps and the pre iOS 7 look and feel on them. – Peter Warbo Sep 11 '13 at 11:22
  • I didn't confirm this, but I thought at WWDC they said that you'd get the iOS 7 look for system things like alert views to matter which SDK you used. – Jason Hocker Sep 19 '13 at 19:43
0

On a device running iOS 7, all of the system UI—such as alerts and notifications—uses the iOS 7 appearance, even if your app is currently using an earlier appearance.

From Apple transition guide: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/TransitionGuide/SupportingEarlieriOS.html#//apple_ref/doc/uid/TP40013174-CH14-SW1

Elechtron
  • 179
  • 3
  • 6
-1

Not only do you need to build your app using iOS 6 SDK or earlier, you need to use Xcode 4.6 or earlier. I just went through all of this and targeting iOS 6 SDK from Xcode 5 is just not enough.

Luckily you can dual install both versions of Xcode. Just download Xcode 4.6 and drop it in your Applications Folder and rename is to something else

MobileMon
  • 8,341
  • 5
  • 56
  • 75
  • Really? I managed to install iOS 6 SDK in Xcode 5 and it compiles without any issues. – Peter Warbo Sep 24 '13 at 17:58
  • @PeterWarbo it compiles but expectations when running the app is a different story. UIButtons no longer have borders, tableviews are offset due to translucency, and their are some other styling issues – MobileMon Sep 24 '13 at 20:19
  • Make sure to use the iOS 6 Simulator when testing the app. – Peter Warbo Sep 25 '13 at 06:12
  • @PeterWarbo but nobody is on iOS 6 anymore is the point! I want the app compiled with iOS 6 and running on iOS 7 and looking the same as it did on iOS 6 as even though its now running on iOS 7 (which it does if you follow my technique) – MobileMon Sep 25 '13 at 12:29
  • @PeterWarbo No it doesn't go try. When building for iOS 6 in Xcode 5, GUI elements still appear under the new iOS 7 scheme when running on an iOS 7 device. You need Xcode 4.6 or earlier and iOS 6 SDK in order to get the old look and feel. Hence that is why I have 2 versions of Xcode installed. Please try this before commenting again – MobileMon Sep 25 '13 at 18:45
  • Hey mister. I did not down vote. And no I have not tried your suggestion because It's already working with Nikolai's solution. – Peter Warbo Sep 26 '13 at 19:59
  • 1
    It is at least flakey. I did install SDK6 in Xcode 5, did the same on two machines, and on one machine I see the simulating behavior, on the other one, I don't. So – while it may work – the failsafe way is to continue using Xcode 4. – DrMickeyLauer Oct 16 '13 at 13:48