XCode v4.2 and Default-568h#2x.png --> "Invalid Binary" Message When Submitting iOS App - iphone

I spent many hours trying to figure this issue out. Apple continuously accepted my uploaded binary when I was submitting my app through XCode4.2, yet only to declare the binary invalid minutes later. It turned out that it was because I had placed the "Default-568h#2x.png" in my resources folder in an attempt to support iPhone 5's splash screen and eliminate "letterbox mode" (black top and bottom bars)... I am using a 2006 MacBook Pro, and thus am unable to upgrade to Lion OS or Xcode4.5. Also, I am able to build AdHoc versions for my customer that runs just fine on the iPhone 5 (filling its entire screen).
Does anyone know of a workaround I can implement to get Apple to accept my binary while still being able to support iPhone 5's larger screen (no black top or bottom bars)? If I re-name "Default-568h#2x.png" I am able to get Apple to accept my binary, but will I lose compatibility with iPhone5?
I found the following link in my search, which seems to suggest the startup image has nothing to do with the iPhone 5's letterbox mode, and can be labeled any name. However, I must admit, I am rather lost when the writer begins discussing 'viewports' and 'media queries'...
http://www.mobilexweb.com/blog/iphone-5-ios-6-html5-developers
Thanks in advance for any help you can offer!

Apple has made a deliberate decision to only allow two types of apps:
Apps built with XCode 4.4 and earlier, built for iOS up to version 5, including support for armv6 (required for iPhone 3G) but without support for iOS 6 and without support for the larger screen of the iPhone 5.
Apps built with XCode 4.5, built for at least iOS 4.3, possibly supporting the larger screens (Default-568h#2x.png) but without support for iOS before 4.3 and without support for the armv6 architecture (required for iPhone 3G).
All others apps are now rejected if you upload them to the App Store. Your app is rejected because it's includes Default-568h#2x.png and one the following things: either armv6 support or support for iOS before 4.3.
Without XCode 4.5, it's impossible to create an app the support the larger iPhone 5 screen and is accepted by Apple.
Some people have managed to build and upload applications the support both iPhone 3G and iPhone 5. But this is very tricky and requires a parallel installation of at least XCode 4.5 and one earlier version.
Update:
If I'm not mistaken, the crucial points for supporting the larger screen are:
The launch image Default-568h#2x.png
The setting of Base SDK being iOS 6 (or later)
If you add the launch image without setting the Base SDK to iOS 6, iTunes Connect will reject you app:
"Invalid Launch Image - You app contains a launch image with a size modifier that is only supported for apps built with the iOS 6.0 SDK or later."
Without XCode 4.5, you cannot select iOS 6 as the Base SDK.

I was able to install iOS 6.0 SDK on my XCode v4.2 following these instructions:
Is it possible to get the iOS 5.1 SDK for Xcode 4.2 on Snow Leopard?
Afterwards, I could create a binary with the below attributes that Apple would accept.
The launch image Default-568h#2x.png
The setting of Base SDK being iOS 6 (or later)

I have have a Mac mini from 2006, running Snow Leopard, Xcode 4.2. I was having the exact same problem with my submissions last night (May 2, 2013). Organizer uploads the app, and says all is fine. Within a couple of minutes The email below comes through. I did what the email suggested. Then I double checked, triple checked all settings, recreated certificates/profiles....still invalid binary.
Early in development, I was able to crack a dmg to get iOS6 installed on my machine. I put Default-568h#2x.png in my app. I tested ad hoc installations on a 5th gen iPod Touch - everything worked fine, BUT Apple won't accept my app.
I was going to get a new mac this year anyway. I'm heading to the Apple store to get one tonight. Here's the email from Apple:
Dear developer,
We have discovered one or more issues with your recent delivery for "Gazoodle Colours". To process your delivery, the following issues must be corrected:
Invalid Signature - Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target.
Once these issues have been corrected, go to the Version Details page and click "Ready to Upload Binary." Continue through the submission process until the app status is "Waiting for Upload." You can then deliver the corrected binary.
Regards,
The App Store team
Update: Got a new macbook pro, built my app with the latest Xcode (4.6.2) and resubmitted the app. My app is finally in the Waiting for Review state. Wasn't sure buying a new computer would solve the problem, but it was a good excuse to upgrade the hardware, and it actually fixed the invalid binary issue!

Related

Can I still submit iOS 5.1 apps to the app store (Oct 2012 )?

I started building an iOS app with xCode 4.3.2 , using armv6 and armv7 instruction sets. My deployment target is iOS5.1 . Now that iPhone 5 is released, and xCode 4.5 drops support for armv6, and replaces it with armv7s , what is the correct approach to submitting apps to the app store?
I'm afraid that if I submit the app incorrectly, the app store review team would try to launch the app on iPhone 5, running armv7s , and the app would not run.
Should I update to xCode 4.5, and build my apps against iOS6 now, even though I do not have an iPhone 5 to test it on?
Thank you for any clarifications.
Should I update to xCode 4.5, and build my apps against iOS6 now, even though I do not have an iPhone 5 to test it on?
You can submit an app that does not exploit the iPhone specific features (namely, the taller screen). If your app works on iPhone 4, then it will work on iPhone 5, although in a special mode where the visual content of your app is centered on screen, with black bands both above and below it.
On the other hand, you can use the Xcode 4.5 simulator to ensure that your app works on iPhone 5, if you are worried about it. Then you could change your code base to make it run on iPhone 5 and still provide an official build for the App Store made with Xcode 4.3. This is good for all except performance tuning and fixing memory management issues; but you can work on those points on your current iPhone/iPad, whatever.
With Xcode 4.5, Apple decided to make a move towards discontinuing support for older devices: the original iPhone, iPhone 3G, and the first two versions of iPod Touch. So, if you want to support iPhone 5, you will be forced to discontinue support for those devices. I don't think it is a big issue, although I myself have got an old iPod Touch 2nd Gen and I cannot foresee a bright future for it.
If in doubts about supporting iOS5 vs. iOS6, you could also have a look at this other post.
Hope this helps.

How can I deploy app only for iPhone 3Gs,4,4S and skip iPhone5 support?

I want upload app to app store for review but it seems like I need also iPhone 5 screenshots but I don't have app prepared for iPhone 5. Please, how can I deploy app only for iphone 3gs,4,4s?
I find something in Targets/Build Settings/Architectures Standard armv7 and Base SDK is Latest iOS 6.0. Is that what I have to change?
Just for absolute clarity, Apple released an announcement on March 21st 2013 stating that starting May 1st 2013 new apps and app updates MUST be built for iOS devices with Retina display and iPhone apps must also support the 4-inch display on iPhone 5.
You can view the announcement here.
The best solution is to just properly prepare your app for the iPhone 5's display. And no. Changing the base SDK will not help here.
You can't, only apps submitted before iPhone5-release can run in "iPhone 4 mode" on the new iPhone. All updates to apps and newly submitted apps must support the new 4 inch screen.
You cannot exclude the iPhone5 in the target settings and if there were a way to do that, there is no way Apple would approve it. You can remove support for old devices, but never for new ones.
After all, Apple wants as many apps as possible to adapt the new format as soon as possible, and this is what you have to do... don't worry - if you are fairly used to developing to iOS you can do it in just a few hours...
Apple has stated that theY will still (currently) be accepting apps without specific iOS 6 and iPhone 5 support when developed with an Xcode version prior to 4.5, and thus with an SDK 5.1 or earlier. 568h support is specifically not allowed in apps built that way.
Apps built that way will run in letterbox on a 5, or the similar 1X/2X compatibility boxes that the iPad uses for legacy iPhone only apps.
I submitted an app following the release of the iPhone 5 with the latest version of XCode that runs letterboxed on the iPhone 5. Just remove armv7s from your supported architectures.

iPhone 5 support with base SDK iOS5.1

Is is possible to submit the app with base SDK iOS5.1 and with Default-568h#2x.png, so that application will not leave an extra black space?
Our normal application is working fine on iPhone5 leaving a black space from top and bottom, but if we just include "Default-568h#2x.png", will it work fine (the view displayed in complete area of iPhone5)?
There are lots of dependencies to support iOS6, so is it possible to submit the app with "Default-568h#2x.png" and base SDK iOS5.1?
It is impossible to submit the iPhone 5 full screen app which is built with Xcode 4.4.1 and iOS 5.1 SDK. I did the same thing to support both old devices of armv6/iOS 3.x and iPhone 5. But I got this reject message from itunesconnect. I think it is the new policy of App Store.
"Invalid Launch Image - You app contains a launch image with a size modifier that is only supported for apps built with the iOS 6.0 SDK or later."
just edit the size of Default-568h#2x.png with the same one of Default#x2.png splash screens, don't rename it, adjust only it size, it's how it worked for me, seems the binary does gets faked, my app it's waiting for the review don't know yet if will be approved.
I do not see any policy from Apple to forbid developers to submit apps based on SDK 5.1. My understanding is that if you develop on SDK 5.1 you should also test your app on iOS 6.
Having said that, iOS 6 SDK provides good features to help developers manage the layout, and Apple surely wants the developers to use the latest.
To avoid "Invalid Launch Image" problem on submitting app with iPhone 5 launch image using XCode 4.4.1, please following these steps:
Archive your App under XCode 4.5
Open Organizer, show your App folder in Finder, enter your App’s Products/Applications folder, copy Info.plist and archived-expanded-entitlements.xcent to your home folder.
Open your Info.plist (~/Info.plist) using XCode, and modify MinimumOSVersion from 4.3 to 4.0
Close XCode 4.5 and open XCode 4.4.1, open your App project and open your Target’s “Build Phrases” tab, add a Run Script, with shell “/bin/sh” and “cp -f ~/Info.plist ~/archived-expanded-entitlements.xcent “${TARGET_BUILD_DIR}/${EXECUTABLE_NAME}.app”
Re-archive your App, and it should pass App Store’s rule checker and in “Waiting for review” soon.
The app I submitted late October got online in early November. Someone said he used XCode 4.3.2 to submit app in the same way. It should be working for XCode 4.*
For more information, please also read this blog article.
I submitted by mid-feb my binary compiled on Xcode3.2.6 and only had the Default.png, my App got rejected due to a bug related to the 4" screens, some stupid sizing junk, fixed it and tested on Xcode4.6/SDK6.1 which requires that 568h#2x.png file, I added that image to my set , still compiled it on 3.2.6 and submitted my fix and it got automatically rejected with the same msg as here.
Then I just pulled that 568 file out and resubmitted hoping that since it went thru about 2 weeks ago it'd get past again, I triple checked my code on sdk6.1, recompiled/ressubmitted and got the same rejection so it seems like they are enforcing that min Xcode version NOW.
BUT .... guess what? I cleaned everything and twice and rebuilt & decided to give it a last shot, resubmitted and it passed!!! I'm on waiting 4 review now.
I've solved that issue the following way: I'm using iOS SDK 5.1 and Xcode 4.4.1.
Now I've added simply the Default-568h#2x.png to the upper folder of my App in Xcode but not with Xcode 4.5.1.
Then I've built the App through iPhone 5.1 Simulator and finally I've quit the Simulator.
Then go to ../users/myNameUser/Library/Application Support/iPhone Simulator/5.1/Applications/... search for your App and Copy the complete folder (e.g. F83221EA-1HB4-4947-9DH4-43D8QZ3FFEA3).
Then go to ../users/myNameUser/Library/Application Support/iPhone Simulator/6.0/Applications/ and paste in the copied folder from the 5.1 Simulator.
Finally open your Applications folder go to your Xcode App (4.5.1) then right click and show package content: Go to ../contents/applications/ and double click "iPhone Simulator.app".
Now you are running the new iPhone Simulator with your iOS SDK 5.1 App. Great job? Now you can change the hardware of the simulator to the new iPhone Retina-4-inch.
And you can see how your App will look like on the new iPhone 5.
I've sent my new App version by that way for review - well see if it'll get through.
(Sent with: Xcode 4.4.1 and iPhone 5 support like described on top)
By the way it could be interesting to run Apps from Xcode 4.4 on real iOS 6 Device?
How to do that: Use iOS 6 device for testing with Xcode 4.4 and iOS 5 SDK

Testing on iOS 3.1 simulator

iOS project. Base SDK 4.2, deployment target 3.0. A customer is complaining about an issue on iOS 3.1 (he has an old device).
I tried installing Xcode 3.2.3 - the oldest there is for download. It does not offer iOS 3.1 as a test target. Does anyone know how can I enable older versions of iOS on the simulator?
The box also has Xcode 4 (in a different folder). Could it be the case that they're sharing the iOS simulator, and the backwards-incompatible one from Xcode 4 is getting in the way?
There is no substitute for testing on a real device.
I've had a problem with my iPod touch (3rd gen, ios 5.0) crashing in one app. Every day. The dev won't buy, beg, borrow or steal a real iPod touch to test it on so he can fix it. As a user this is extremely frustrating.
EDIT:
The final versions of Xcode with the iPhone SDK, as it was called then, are not available from Apple's download page, but the direct links still work.
The direct links can be found at:
http://chris-fletcher.com/2010/08/28/howto-install-iphone-sdk-2-0-3-1-for-xcode-3-2/
If you use the latest Xcode, you can install device debugging support via the Downloads->Components section, a la: http://cl.ly/3U1V1G3W2p2E1G29342e
http://iphonesdkdev.blogspot.com/2010/04/old-versions-of-iphone-sdk.html
Some of the links are dead though. Apple is removing those old files little by little. Get them while supplies last.

Installing previous version of iOS on developer device (currently 5.0 -> want 4.3.5)

I'm a registered Apple dev, and I got a new phone. My old 3GS currently has 5.0 installed on it and I'd like to put 4.3.5 on it for testing apps under iOS 4. I've downloaded the 4.3.5 ipsw, and using Organizer in Xcode I can attempt to install it, but get the "The Device isn't eligible for the requested build" error. The phone restarts and goes to DFU mode.
Am I missing something?
There is no way to go from iOS 5.0 to lower than iOS 5.0 without going into DFU land, that i'm aware of this video. (video on DFU mode - many out there as well.)
From reading, i'm not sure if the user can't get into DFU mode here - if thats the case, that is a bit of a blocker for ya for sure. Maybe re-download fresh itunes and install everything 100% fresh, and try again.
Once it's detectable in itunes after the DFU (assuming DFU can be done),
Download the firmware you desire it to run - 4.3.5 apparently?
Now, make sure iPhone is plugged into iTunes and iTunes recognizes it.
To force new firmware of older version onto the phone – hold shift (PC) or option (MAC) and click restore. This will bring up a browse box where you can select the firmware you wish to push to the iPhone.
This will probably result in a data loss though for anything on the phone before the DFU and firmware push.
Hope this helps, even though this is a few months old now.
You can download older versions of Xcode by logging into Apple Developer Connection Downloads you will need to be a member of the developer program to login.
Here is the website.
Once on the site, from the Downloads section, choose Developer Tools – you will be shown with a list of all Xcode versions, back to 1.0 released in October of 2004.
A quick google for 'xcode iphone downgrade' turned up these instructions.
iTunes will not let you install unsupported iOS versions (i.e. old versions),
regardless if you reset your device or not.
iTunes (as well as older versions of Xcode, like 4.5.x)
will let you choose a specific iOS firmware image (ipsw),
but when you actually get to restore the firmware, you get the message:
"This device isn't eligible for the requested build"
which is confusing, especially if you read Apple's post about this error...
See this short article by chpwn that summarize it very good,
and also adds tips to try go around that:
"...with the iPhone 3GS ... as well as the iPod touch (third generation), the original iPad, and the iPhone 4,
each and every firmware change must be approved by Apple’s servers, at the time of the install.
And Apple will only agree to let you install the current latest release of iOS at that time,
which prevents downgrading — as well as any re-installs of the iOS release the device is running,
as long as that release is not the absolute latest version available."
- from: How to test your app on older iOS releases