0

I have an application in the App Store, targeted for iOS 5, that runs correctly in iOS 6, and even iOS 7, but now, I wanted to add a new feature (just one new view with a controller).

The problem comes here: If I do compile the code with Xcode 5, it looks awkward, top status bar disappears, and even some views stop working.

I know this App needs a rewrite from Zero for iOS 7, but in the meantime, is there any way to make it work like it did before?

Can I somehow download a previous SDK, and in such case, will I be able to update the app to the App Store?

3
  • could added some image how to awkward the status bar Commented Nov 25, 2013 at 9:33
  • "I know this App needs a rewrite from Zero for iOS 7" are you just kidding, right? Commented Nov 25, 2013 at 9:46
  • not kidding... it is legacy code, very very bad coded ... Commented Nov 25, 2013 at 15:05

2 Answers 2

0

You need to copy the 6.1 SDK from an older version of Xcode into the Xcode.app you've got now, and then select the 6.1 SDK specifically in the build settings.

For the device this is /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk, and for the simulator it is /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk. The paths are the same.

Sign up to request clarification or add additional context in comments.

9 Comments

May be there is exist other folder for SDK's or there is option in Xcode where to look for SDKs? Because there is one problem in this solution: 6.1 sdk will disappear after Xcode update.
where can I get it if it isn't in my machine @Stefan ?
As far as I know there is not. You might however be able to symlink them into place, and then just recreate the symlinks after updates.
Xcode 4.6 is available for download from developer.apple.com/downloads/index.action.
Why was the answer downvoted? It works perfectly, I have shipped several releases using this method.
|
0

Just download Xcode 4.6 from the developer page and use it parallel with Xcode 5.

But you don't really need to rewrite anything... Just make a subclass for UIViewController with a following code and use that instead the default.

- (void) viewDidLoad{ #if __IPHONE_7_0 if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) { [self setEdgesForExtendedLayout:UIRectEdgeNone]; } #endif } 

Also don't forget that all UINavigationController is translucent in 7 and up and not translucent below.

4 Comments

This works when using (mostly) standard appearance for UI elements. If you added custom appearance for stuff like bar buttons, the app might very well look plain horrible when build with and running on iOS 7.
not to mention how Xcode messes up xibs and storyboards when trying to use multiple version of Xcode on the same project. jeeezus the number of times I've had to manually edit the files to set the editor version.
I use xibs "Opens in" Xcode 4.6 with "Builds for" iOS 4.3 and Later and Autolayout turned off. And i used plain elements for all supported versions and no "horrible" visuals appeared. For the editor version issue, we have a solution: stackoverflow.com/questions/17718715/…
yep, for plain elements everything works wonderfully well, when fancy appearance stuff has been done it's impossibly to know what it might look like.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.