iPhone Development - Tips, Tricks, and Information
As awesome as the Google Android platform has become, there is no denying that Apple's innovations that hit the market several years ago were truly groundbreaking. Yes they are more restrictive with "outsider" innovation, and yes they have a "closed" architecture, but for many end users and developers alike this is an advantage.
For example, from a users context, we can pick up any iPhone, iPod, or iPad, and no matter what apps are installed, we can get right down to business, or playing games, or whatever we want to do. Android on the other hand can be a nightmare from a usability perspective. Sure you can probably figure out how to get Angry Birds doing its thing, that is if the device is not using an "app locker" or some crazy "task killer" or who knows what might installed on the device! You are lucky that you can make a phone call on my Moto Atrix without something beeping, or buzzing, or SMS Sentinel telling you to slow down and stop texting while driving!
Well, enough of my rant - now on to a challenge! Similar to the Android "NoClassDefFoundError" that drove many Android Developers crazy, how about an error where Apple's XCode could not upload any apps to iTunes Connect! Again this came to us from some of our associates who noticed a number of developers hit a snag costing hundreds of hours (and for some thousands of dollars!) for a very simple issue related to the default version of some seemingly unrelated code. This resulted in an the obscure and dreaded XCode or Application Loader error message "The following issues were found during validation: ! An error occurred uploading to the iTunes Store."
Here is the basic scenario for a developer:
Everything is working perfectly, you just upgraded to the most recent XCode, and you decide to test the updates on a release app. After cleaning and then Analyzing, the issue navigator is empty except for possibly a couple of warnings about Semantic issues and undefined prototypes in some library code. So next you build for Archiving with ad-hoc certs, then with Organizer you validate against your developer account on iTunes and all is good.
Next, you create the ad-hoc distribution and drag+drop to iTunes and test the app - beautiful, no issues, push-notifications work, no memory leaks or issues show up in Instruments, and all is really good! Now that you have some confidence in the new dev tool setup, onward to the current app under development.
Fantastic you are thinking; the new XCode sure is sweet - fast too! So this app is finished and you are ready to distribute to iTunes and Archive with the App Store certs. All is good as described above, that is until you Sign, Package, and Distribute to the iTunes App Store - the app validates just fine, but during upload BAM!
So now what? First, let's say "Yippee" it is about time for something new and fun and we don't have to call Orkin for this!
Like always, you go down the road most travelled:
No, nothing is wrong with my app, nothing is wrong with the build settings (how may settings anyway, hundreds and hundreds! ... all of them are just fine!), and there is not a blasted error message or log file, or anything obvious. ...
Arcitectures Build Locations Build Options Code Signing Deployment
Kernal Module Linking Packaging Search Paths Versioning
Apple LLVM Compiler - Code Generation, Language, Preprocessing, Warnings ...
IB XIB Compiler Build Phases Build Rules ...
iTunes is setup, certs are good, push notifications working, and not one error message or warning other than
the blasted app fails to upload...
Searching the developer forums finally turns up one statment about a Java update "This update fixes an issue that could affect users of the Xcode or Application Loader tools." You might have sorted through 10,000 items with the terms "update" and "Xcode" and "Application Loader" - but why such a low key comment Apple!?! I mean there were hundreds if not thousands of searches going on for this issue!
So after all the frustrating troubleshooting and searching, simply update Java on your Mac and all it good - well, maybe not so for everyone. By the time we had looked into this to help get a stalled project on the fast track, another Java update came out, and for some of the devs the update did not help. There was some tweaking required.
Before continuing, here are the links to the knowledge base artilces:
Now if you are one of the "lucky" ones that actually got a message about a problem with Java, then you could have simply used the Apple Software Update on your Mac - the error might look like this: "Error: Java 1.5, 1.6, or 1.7 is required. Currently, java is the default java version. Please upgrade."
However, if for some reason you cannot apply the update, according to the dev forums (https://devforums.apple.com/thread/147231) if you MUST use an older Java framework, then this might work (be aware of the security issues - best to upgrade to latest JVM):
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
In summary, the solution for "The following issues were found during validation: ! An error occurred uploading to the iTunes Store.":
Apply the update from Apple using the Apple Software Update feature
Note: Professor Ed hears about many developer situations like this not to mention his own "challenges" with public and private mobile development projects. Although the "fix" is not always as simple as described in this article, many devs complain of spending countless hours recovering from an otherwise innocuous software update. If you have a scenario you would like to share with us, or if you are stuck and need help, feel free to drop Professor Ed a line! Touch or click here to view the Android App Tips, Tricks, and Information Page. Touch or click here to view the Wise Apps contact page.
If you are not an Apple Developer please join - you can then search Apple's public knowledge base - click or touch this link to visit the awesome Apple Developer web site.