although ios 6.1 as base sdk xcode 5 build ipa for ios 7 - ios7

i changed the base sdk for iOS 6.1 in xcode 5 .
When i simulate my project on a iOS 6.1 simulator or on a iOS 6.1 device
all works fine. But when i build a ipa and install it on a iOS 7 device
the device use the iOS 7 sdk and my hole app looks weird. I changed my base
sdk for iOS 6.1, so why use my device the iOS 7 sdk?
I read that iOS 7 use the iOS 6.1 sdk for old published apps.
What do i have to do that iOS 7 also do that for my app?
My only idea is to install xcode 4 again...

I have experienced the same problem - unfortunately only discovered AFTER submitting to the app store and the app being approved and released, causing all sorts of mayhem due to interface glitches.
The issue occurs due to a bug in XCode 5 (including in XCode 5.0.2 it seems) that is triggered when you install older SDKs.
When you have multiple SDKs installed, you will see that when you connect your device to XCode, there are multiple entries for your device, with no way to tell them apart. But it appears that the TOP entry is for the OLDEST SDK you have installed, the BOTTOM one for the NEWEST SDK.
I have found that if I first use "Test" project option to run the app on the device with the SDK I want to use (in my case the top entry, which is for iOS6.1 SDK), then that is the SDK that will subsequently be used when I archive the app.

You can have both xcode 5 and 4.6.3 installed.
Also a lot of post say that in the simulator it look iOS7 but on device it will look iOS6.1 if you set the base sdk to 6.1
see:
Is it possible to install iOS 6 SDK on Xcode 5?
Do apple allow custom iOS 5/6 style UI for iOS7?

Related

how can ipad with IOS 7.0.4 work on Xcode 4.6 - or restore from IOS 7 to IOS 6.1.3

I develop on ipad IOS 6.1.3 on XCode 4.6.
By mistake, ipad was updated to IOS 7.0.4.
So, How can I make iPad with IOS 7.0.4 works on Xcode 4.6 ?
Or, How can I restore iPad from IOS 7 to IOS 6.1.3 ?
My Mac os is 10.7.5
I can't complete my work..
Thank you
Very soon Apple will stop accepting apps that are built using Xcode 4.6, so you'll want to work on your app using Xcode 5, unless you don't plan on releasing your app.
As for downgrading your iPad, I don't think that's possible any longer. It used to be possible to downgrade from iOS 7 beta versions to iOS 6, but I think once iOS 7 was officially released that it is no longer possible.
My suggestion would be to upgrade your Mac OS version so you can install Xcode 5, and continue development. If you want users to use your app, they'll want it to be built with Xcode 5 so that it has the new iOS look anyway. After using iOS 7 for a while, apps that have the iOS 6 look still seem very dated.

How to install Xcode 5?

OK, as it turns out, I did not explain my question very well at all. here is a complete re-write.
I have Xcode 4/iOS SDK 6.1 installed. I want to install and use Xcode 5 but want to use iOS6.1 SDK. I know that I can download iOS6.1 SDK from Xcode 5. But, I want to avoid that since the iOS 6.1 is already in my hard drive. Is there any way I can avoid having to download iOS6.1 SDK again.
You download Xcode 5 from the Appstore.
In preferences / Download you can download the iOS 6.0 and 6.1 Simulator
In Project Info you set the iOS Development Target to 6.1 and in the Storyboard you can chose as which iOS (6.1 or 7.0) the Views should be displayed.
EDIT: Also, Xcode5 supports earlier iOS with the same files you already have. There is no need to separate iOS 7 from the earlier Versions.
No need. Xcode 5 supports iOS 6 integration. For more info about this, look at this post: Can one develop for iOS 6 using XCode 5 on Mavericks (OS X 10.9)?
EDIT
Here is how iOS 6 SDK can be installed in Xcode 5 (requires Xcode 4 to get the SDK)
In finder, go to Applications, and find Xcode (4)
Right Click into Show package Contents
Navigate to Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
Copy iPhoneOS6.1.sdk
Once you download/update-to Xcode 5, go into the same folder, where you should see iPhoneOS7.0.sdk
Paste the SDK in this folder
Fore more information on setting up Xcode 5 for iOS 6, look here: Is it possible to install iOS 6 SDK on Xcode 5?
Although this question isn't really meant for SO (More for Superuser),
Can I have multiple Xcode versions installed?
how to install two versions of xcode
This should answer your question. (The installer gives you the option of where to install it; you can simply choose a different directory)

XCode 5 and iOS 6 and 7

I'm working on an iOS app that I wrote with Xcode 4.6 and iOS 6.x. Now that XCode 5 has been released alongside with iOS 7, I wanted to support both iOS 6.x and iOS 7.x by using either XCode 4.6 or XCode 5. What is the best way to approach this?. Can I just toggle between iOS 6.x SDK and iOS 7.x SDK from within XCode 4.6 or do I have to upgrade to XCode 5 to accomplish this?.
Please advise.
XCode 4.6 will not support iOS 7 by any means. You will only be able to build iOS 6 apps that will run on iOS 7, but you will not be able to use new iOS 7 SDS features.
If you want to support iOS 7 features, you need to use Xcode 5. This might also cause some visual issues in your app.
My suggestion is to migrate to Xcode 5 and then check that everything is ok in your app, or do the required changes so that it works fine on iOS 7.
In any case, you can safely go back to Xcode 4 from Xcode 5, if you see that anything does not work out as expected.

iOS 4.2 with XCode 4.2 - Catch 22?

I want to keep Deployment Target to 4.2, to support iPhone 3G/S, as that device cannot upgrade it's iOS to any higher. I kept my XCode in version 4.2 and the Base SDK as iOS 5.0, as the newer versions do not support older iOS's.
My app gets rejected with the message:
iPhone 5 Optimization Requirement - Your binary is not optimized for
iPhone 5. New iPhone apps and app updates submitted targeting iOS 6
and above must support the 4-inch display on iPhone 5 and must include
a launch image with the -568h size modifier [...]
So I add the launch image Default-568h#2x.png. But then I get rejected with the following message instead:
Invalid Launch Image - Your app contains a launch image with a size
modifier that is only supported for apps built with the iOS 6.0 SDK or
later.
It seems like a catch 22. Do I have to change my SDK, and to what? Am I doing something wrong, or can I simply not deliver to iOS 4.2 any longer?

AdSupport Framework not found

I have been able to make xCode 4.3.2 work with iOS 6.0 using the technique described here Is it possible to get the iOS 5.1 SDK for Xcode 4.2 on Snow Leopard?
When I add AdSupport.framework or other iOS 6 specific frameworks, it builds fine against the iOS device scheme with no device connected. However, as soon as I connect an iOS device it gives erros 'framework not found AdSupport'. It does not even compile against iOS Simulator 5.1
I am using iOS 6.0 as base sdk and tried deployment target of 4.3 upto 5.1 but still same error.
AdSupport.framework is only available beginning on iOS6.
You should mark the framework as Optional (Weak Reference) and ensure that when running on iOS versions below 6, that the AdSupport code is not called.