iTunes Connect rejects my binary because I used a pre-release version of the SDK, what should I do? - iphone

I downloaded a pre-release version of the iPhone SDK and tried to update one of my existing apps using a binary I built with it. Obviously you are not supposed to do this but I had forgotten about the warning when I installed the pre-release SDK. Anyway - I have two questions:
Can I simply set the base SDK to an earlier version in the build settings and get around this problem?
If not, then what should I do?

You need to download the release version of Xcode with the release iPhone SDK. You can't use the SDK downloaded from the iPad beta version for any release products.
Just go to http://developer.apple.com/iphone/index.action and click on iPhone SDK 3.1 and download it. Then build your app bundle with that and submit it to Apple.

Before you download a pre-release version of the SDK from developer.apple.com, there are several prominent warnings, one of which clearly states that pre-release versions of Xcode / iPhone SDK can NOT be used to build production binaries. So the answer to 1. is an emphatic no.
As far as I can tell, the only option to be able to build production binaries that iTunes Connect will accept is to delete the pre-release version of Xcode / iPhone SDK and re-install the older stable version.

If you upgraded using the beta download (as opposed to installing on a fresh box that has never seen SDK or Xcode), set the base SDK to a released version of the OS. Compile a Distribution build, submit to the app store. The old SDK is still there, so that will get used. All of the prominent warnings I have seen state the the SDK cannot be used, without mention of Xcode.
Before anyone scoffs, note that I submitted an app on March 13 using the version of Xcode (3.2.2) included in Beta 4, setting Base SDK to 3.1. It was approved on the 15th. I've also done this during the 3.0 beta for 2.x apps.
EDIT: on the other hand, acceptance apparently isn't always guaranteed (note that this person had also submitted an app that did get accepted): The binary you uploaded was invalid. A pre-release beta version of the SDK was used to build the application

Related

iPhone app submission software requirements

I wanted to understand the things involved in iPhone app submission in terms of software requirements (not the steps to submit it on Apple iTunes Connect)
When we download the IOS SDK, is XCode included in that ? If yes, what are the latest versions and approx size of them?
When we develop the app and are ready to submit (say as of today), is it necassary to have a particluar (or rather the latest) version of IOS SDK or XCode installed on our system ?
Are there any specific OS X requirements (I mean if Snow Leopard and above is fine) ?
Everything is detailed on the iOS Dev Center (you may need to log in to have the details):
When you download Xcode (or more precisely the "Developer Tools" package), it includes Xcode and a lot of other tools (Instruments, gcc, gdb, llvm, lldb, the iOS Simulator, ...) and also the latest version of the MacOS and iOS SDKs too.
The version and size are mentionned on the download page too (version of Xcode, of the iOS SDK, of the Mac SDK,... everything). Right now (oct. '11) it is Xcode 4.2, iOS 5.0 SDK and OSX 10.7 SDK. Everything come in one package (1.65Go for the latest version as of today) except the documentation, which is downloaded automatically by Xcode itself (unless disabled) in the background.
For the requirements, it is also described in the iOS Dev Center: Xcode4 is available for both Snow Leopard (on the iOS Dev Center) and Lion (via the Mac AppStore) right now.
When you submit your app, you normally should always submit it using the latest SDK (1). [EDIT after #progrmr comment] except of course for beta versions of the SDK. Alsways submit with the latest "release"/public SDK version]
Note that using the latest SDK does not mean that you need to stop supporting and testing for previous iOS versions. You can use the iOS 5.0 SDK and publish an app that is running on iOS4.x for example (and of course it is better if it still works on iOS5.x too); ascendant compatibility is generally guaranteed, unless specified for specific methods (see the "SDK Compatibility Programming Guide" in the Apple Doc for more info).
(1) It is generally accepted if you submit with the SDK version just before the latest if it is not too old, Apple let you some time to migrate, but this is generally just a transition phase. It is advised and a good practice to migrate to the latest SDK when it is available -- or not too late after that.
XCode 4.2 is about 1.8gb, and that doesn't include documentation - when you first load XCode it tries to download something like 2-2.5gb of docs in the background. You have to both cancel the download and the auto update check to avoid that (but auto updating docs is cool).
I don't recall any requirement to use the latest and greatest, you can still download XCode 3 with iOS SDK 4.3 from the archives. But I can't say for sure, I always run the latest (I find upgrading to new XCode releases is generally a good idea).
XCode is available for Snow Leopard once you buy the $99/yr iOS developer subscription, the mac app store has it but only for Lion. The advantage of the MAS version is you can play with the SDK and making basic apps for free, just not run code on your iOS device.

Updating the iPhone iOS 4.0.1 to 4.0.2 SDK, Do I have to download the whole 2.5 Gigs?

As the the Question asks,
I currently sport xcode 3.2.3 with iOS 4.0.1 but I want to test on my iPhone which is stuck on 4.0.2
Thus I cannot do so until the SDK for 4.0.2 is accessible from xcode.
Where can I download a patch update from 4.0.1 to 4.0.2 because the iPhone members page seems to only link me to the package including xcode 3.2.3 with iOS4.0.2 SDK
I don't want to download the whole thing because it's > 2.5 gigs and my New Zealand internet Connection is shizenhouzen.
I can't restore to a previous version, because for some reason I only have a previous back up of the iPhone on my now defunct windows PC.
I'm afraid you have to download the entire SDK - Apple do not provide 'patches' (4.0.1 to 4.02, for example) AFAIK, and I'd be nervous about downloading anything that claims it is a patch.
It's a common grumble, twitter is a fun place when apple push these .1 SDK updates out :)
You do have to download the whole thing to upgrade. It really sucks. :-(
I wish I could remember to download the SDK before upgrading my devices.
You can still build adhoc releases of your app and install them using itunes if you're in a real bind - it's just the debugger, console viewing and automatic installation of builds that won't work at all.

App Store submission problem: A pre-release beta version of the SDK was used to build the application

I upload my app to app store, I already build my apps using device - 3.1 , which should be the a release version of app store. How can I avoid this warning? thz....
You can not use the Beta version of XCode to build, even when you build against an older SDK. You can install the Beta 3.2 and the official 3.1 in two different directories. This question was answered before btw.
You've answered your own question. You're using an SDK which is currently in beta, I'm assuming 3.2. Go to the Apple dev center and download the 3.1.3 SDK:
http://developer.apple.com/iphone
What version of Xcode and the iPhone SDK are you using? It sounds like you might be using an old (or very new) version of the build tools.

The binary you uploaded was invalid. A pre-release beta version of the SDK was used to build the application

I am having a problem submitting my new app to the appstore. ItunesConnect gives me the error:
The binary you uploaded was invalid. A pre-release beta version of the SDK was used to build the application.
I haven't changed anything, I can compile to a ad-hoc certificate and that works fine. I uploaded another app yesterday and that worked fine too. All the targets and project info is set to compile to the base SDK iPhone OS 3.0. I even upgraded to the latest SDK but same result. Any ideas?
I don't think they've worked out the kinks to compile previous versions of iPhone OS if you have the 3.2 beta SDK installed. Which is to say, 3.2 can't guarantee that it can compile 3.0 exactly like 3.0 did. I think you'll need to use a box that has 3.1.3 installed instead.

How do I create in Xcode an iPhone project specifying at project creation time the SDK version I want to use?

With the latest Xcode and SDK 3.0 beta when you create a new iPhone project, Xcode creates an SDK 3.0 project. If I want to revert to SDK 2.2.1 after the project has been created, I need to change something in the generated source code files since some of the APIs have changed. Is there a simple way to specify at project creation time the SDK I want to use explicitly?
Thank you in advance
I can't comment specifically on iPhone SDK 3.0 as it's covered under NDA; there's a forum for disclosed developers at devforums.apple.com. But Roger Nolan is half right and half wrong. He's half right in that when any SDK is updated, the examples and templates in that SDK are updated to exploit it. That is, the templates may specifically use the new APIs in that SDK, and the code might plain just not work with earlier SDKs.
That said, you can save project templates from earlier SDKs and install them in a local directory (like ~/Library/Application Support/Developer/Shared/Xcode/Project Templates) for use with later versions of Xcode. The project template format itself hasn't changed; templates should be forwards and backwards compatible, but the content of the templates is usually locked to the SDK version it ships with and later.
Mr. Nolan is half wrong about building against earlier OS versions with later SDKs. That's why the earlier SDK packages are provided with the later distributions (they're not there just to make the downloads take longer). You can deploy against older OS versions with a newer SDK by setting the Deployment Target build setting.
There is the minor detail in that you probably shouldn't deploy production applications produced by a pre-production toolchain. But once version N is officially released, you should be able to use its toolchain to build for N-1, N-2, etc.
Provided that you're not using any new features in the 3.0 API, you should be able to select the Active SDK from the dropdown menu on the upper left corner of your Xcode project window. Simply select "Device - 2.2.1" or "Simulator - 2.2.1"
Xcode defaults to the newest SDK installed, and I'm not aware of any method to change that behavior.
I made it a habit to set the base SDK to 2.0 in the project properties right after I create the project.
When using a Beta toolchain, you should install it alongside the latest released toolchain, not in place of it. Create your projects in the production toolchain, then open them with the beta toolchain to to do compatibility testing.
You will need the released toolchain anyway in order to do distribution builds. You should not build for distribution with a beta toolchain.
There is not according to Apple. Comments to my posting from Can Berk Güder say otherwise. I would not suggest following his example - it's a lottery hoping Apple can't see what you are doing or that you do not fall foul of a 3.0 defect.
You can use Xcode to build for earlier versions of the OS but if you need to build with multiple SDKs you should install them. Xcode supports multiple installations on a single machine and the install instructions document how to do it.
If you want to use the 3.0 SDK you can't built for OS 2.2.1 and submit that application to the app store - according to Apple's guidelines. They say that you must also install the 2.2.1 SDK and build with that. You can build 2.2 compatible apps but you are using beta tools which might introduce bugs.
It's one of those things that you can do as an intellectual exerxcise but, it's just not worth the risk for a real app.