iOS Archive released to iTunes does not work the same as the project - iphone

I have an issue that has me completely perplexed. I built a simple openGL game in iOS ( 4.2.1 xCode ) and tested it on my device and all was fine.
I then archived it and submitted it to Apple. They approved and released it.
When I download it ( onto the same device ) or anyone else does ( onto variety of the latest devices ) much of the game play is missing. Its as if the archive did not capture all the settings from the project.
I can only conclude that at the archive stage something happened to the build.
Does anyone know how i can test run the actual archive on my device ( without submitting it ) so that I can get to the bottom of what is different ?
Thank you very much anyone who reads this.

When you are about to release a game to appstore, you'd better make a distribution AD-HOC build and give the ipa to some friends of yours. Of course, don't forget to mark their devices when making distribution ad-hoc profile. So once you have this .ipa, delete your development build from device and install .ipa via itunes. Then you'll see it the way as it is downloaded for the appstore.
Furthermore, you say that some scenes/resources are missing: this could be for the reason that when you added the resources/files to your projects you did't enable "copy files to project directory" and "add to target" so the build was incomplete.
OKay, once you assured your ad-hoc ipa is working fine, make the same distribution profile, but only for apptore. Build the app and submit to appstore!
Hopefully this will help, bye!

In my experience, when this kind of thing happens it's because something that was included in early dev builds is no longer there, but is still in the binary on the device. (Dev builds are incremental, so some files deleted from or changed in a project can sometimes persist.) You could try the following:
Delete the app from your device
Delete the derived data folder in the organizer
Clean all build targets
This may reveal the problem. It's hard to say without more info about what "much of the gameplay is missing" means.

Related

How to thoroughly test a release build? [duplicate]

This question already has answers here:
How to debug a crashing release build? [duplicate]
(2 answers)
Closed 8 years ago.
I constantly encounter this problem:
1) I test my app thoroughly on many devices. Use Analyze and Instruments. No crashes. All fine.
2) Submit it to the App Store. App creashes all the time.
I realize the "release build" is something a little bit different than the "debug build". But how can I test a release build on my device that is built exactly the way it will appear on the App Store, technically?
I recommend you to use TestFlight (https://testflightapp.com/), I have been working with it recently and it is a great way to test your Apps before going public.
You would be using the final IPA file, so won't be any difference with the build you would submit to the AppStore... Also, you could invite other people and they could download and install your App over the air, and even more, you have remote logs about crashes...
Hope it helps you.
You can of course also archive your build (set the scheme to iOS Device, then choose Product -> Archive) to an IPA, sign it with your Ad-Hoc distribution profile, and install it on your device by dragging the IPA file onto your device in the Xcode Organizer.
When your Archive scheme is set to build in RELEASE mode, this is as close as you can get to test your final app without going to the App Store.
Testflight is doing the same thing, as you have to upload the same IPA to their website, so if you do not need to involve more people you can just do it local this way.
You can set your testing Scheme (under the Project menu) to build and run a release build. Or you can install an Ad Hoc build using iTunes if you want to test exactly the same install method as the reviewer.

How to deploy test app on iPhone?

I want to know how to deploy test app on iPhone 4.3.2. with XCode 4.3 but without buying a licence.
I have jailbreak on it and installed AppSync4.0+
The reason why I ask this is because I am porting an app from Qt and I want to see it how it behaves under iOS.
I have been using Qt4iOS and got everything build when using simulator.
Now I want to see it on my device.
When I try it I got some key chain error.
Provide me with some links or ideas.
... everything is possible. It's about the effort needed. And the effort for this can be very low. Especially because your device is are already jailbroken.
You'll need to change Xcode's code signing for building for an device. Instructions can be found here: http://iphonedevwiki.net/index.php/Xcode#Developing_without_Provisioning_Profile
(better save copies of the original files). Since Xcode 4.3 doesn't use the /Developer folder any more you'll have to edit the files inside the Xcode.app (./Xcode.app/Contents/Developer/...)
Build your app for the device. Make sure the target isn't a fat binary (instead just build an ARMv6 executable) or it won't work on your device if pseudo-signed with ldid.
Find the .app bundle for your app
Copy the .app bundle to /Applications/ (not /var/mobile/Applications!!!) (for example via ssh). Make sure the permissions of your executable are set to 755. Reboot or respring and if you did everything correctly you'll be able to launch and test your app.
Have fun!
I have had the same issue.
No matter how hard we try to apply any trick in order to test the app on real device without license, the bottom line is that you can't do it.
You must register with apple by paying $99 and thereafter you can set the device to your real device within XCode before running the app.
Note that it's quite a task to create *.api file even after you are registered with Apple.
Simple: Spend $99 for the iOS developer program.
I'm sure it is much more expensive to waste your time trying to find another way around.

iOS Question. Can I distribute the Xcode simulator versions of my app?

I would like to send someone the Xcode simulator version - not the device version - of my iPad app. I have located the .app file in the Finder. Do I just zip it up and send it off or is it more complicated than that?
Thanks,
Doug
UPDATE
Chrisbtoo got the answer on this one however he left of some critical bits for those of you trying this at home:
Path to Xcode simulator (the simulator can be run standalone.):
/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app
Path to app that appears in the home screen of the simulator:
/Users/turner/Library/Application Support/iPhone Simulator/3.2/Applications/{GUID}
It is instructive to watch what happens in the app simulator directory as you build for simulation, delete apps from the simulator desktop and generally use the simulator as an actual device.
Bottom line: This is a viable approach for sharing apps in a "simulated" ad hoc manner without the mind numbing, soul sucking process of true ad hoc app sharing.
Cheers,
Doug
Assuming the other person already has the simulator installed, you can just zip up the stuff under ~/Library/Application Support/iPhone Simulator/3.2/Applications/{GUID} (includes both the .app and any data directories needed) and send it to them - they'll need to unzip it under that same directory. What I've done in the past was to rename the {GUID} part to a more friendly name - the sim will still pick it up.
If they don't already have the simulator, they will need to sign up for a free iphone dev account and download Xcode, etc.
We just put up a little tool that will help you with this. It manages both what you need on the dev side and also the tester.
Here it is
http://blog.placeit.net/ios-app-packager/
It basically creates a little zip that you can pass to the tester and it'll install the app in the right directory and also open it up for the user with the right device selected.
I would think you want to send the entire project folder to the other person- presumably you are expecting them to open it in their XCode- and presumably they have the sdk for the app.
You have to distribute via AdHoc or App Store for beta testing.
Become a developer and then look into how to do this.
You need to have a provisioning profile, and then select the UDID's for the device you want to beta test to.
Go to the iPhone Provisioning Portal
and here is a document with more detail

IPhone Development Profile Expired

I really combed this site and others. I read and re-read the related links here and the Apple docs. I'm sorry, but either I am obviously missing something right under my nose, or this Apple profile/certificate stuff is a bit convoluted. Here it is:
I have a product in the App Store.
I have updated it several times and users like it.
My development profile recently expired just when I was improving the app for its next release.
I can run the app in the simulator.
I can compile and put the distribution build on my iPhone just fine.
I went to the Apple portal and renewed the development profile.
I downloaded it and installed it in Xcode.
I see it in the Organize window.
I see it on my iPhone.
I CANNOT put the debug build on my iPhone to debug or run with Instruments. The message is that either there is not a valid signed profile or it is untrusted.
I subsequently tried to download and install the certificate to my Mac's keychain.
Still no success.
I checked the code signing section of Project settings and also for the target and the root. All appears to indicate that it is using the expected development profile for debug.
Yes, I had deleted the old profile from my iPhone, from the Organizer. I cleaned the Xcode cache and all targets. I have done all of this several times and in varying sequences to try to cover every possibility.
I am ready to do anything to be able to debug with Instruments in order to check for leaks or high memory usage. Even though the distribution compile runs fine on my iPhone and plays well with other running processes, I will not release anything without a leaks/memory test.
Any ideas will be appreciated. If I missed something obvious, please forgive me - it was not due to just posting a question without searching for similar postings.
Thanks!
All problems solved! I am very happy this all happened because I learned so much about Xcode, keychains, certs and provisioning. Unfortunately, there is not a simple answer. Here are the highlights:
I needed to recreate the ad-hoc profile and install it on my device. (That was MY BIG oversight and the reason the dist build no longer ran on my device.)
Between the very first time I created my profiles and the date my development profile expired, I upgraded to the 3.1.3 Xcode SDK.
It seems that this now means you need 2 entitlements files; a debug version with the get-task-allow checked and a distribution version with get-task-allow unchecked. Each need to be set in the respective settings.
In Project settings, I needed to set both my working directory and intermediate directory to the build product directory.
BIGGIE - I had to double click on the target and reset the appropriate code signing profile. There was an old profile name still there for some reason! Now, I can debug, and drop my distribution on my device without a hitch.
So, in summary, I believe that my original problem (not being able to debug after renewing my dev profile) and the problem that resulted from all my efforts to fix the first were caused by:
the fact that I upgraded to 3.1.3 during my dev cycle
my own oversight (I apologize to Apple for my criticism)
an Xcode quirk (the old profile name hanging around in target settings).
I hope this helps others. The best advise I can give is to take a day off and then create a new empty project, going through the same process step by step.
Thank you all!!
Try re-creating your development mobileprovision file on Apple's site. Be sure to delete all old copies from Organizer (including those on the iPhone itself).

What files to keep under version control on iPhone projects?

I found this previous question about Cocoa projects, but I wanted to know if it's the same for iPhone projects.
As far as I know, the same responses there apply to iPhone development as well. In my projects, the only files I keep under SVN's control are the source files, any resources (images, .XIBs, audio, etc.), and the .xcodeproj file.
It may be a good idea to version control provisioning profiles. Especially for an ad-hoc beta test profile, you'll need to update it every time you add a new beta tester, and having a history of that seems like a good idea.
Actually there is something I would say you should version control that you would normally not - the final application bundle and dsym file, both under build. However, you only need to archive these when you release either an ad-hoc or distribution build for the store - so I'd leave build in the ignore file, but have somewhere you can copy these files to check them in for a distribution and tag them along with the source.
You'll probably want to compress the app bundle before placing it in this save directory
You need these two files in order to be able to symbolicate crash logs sent to you by either beta testers, or users of the app from the app store. A meaningful stack trace of a crash is priceless!
If you're planning on updating the app over time in addition to project sources and media you may also want to put the following under version control:
Signing certificates for app (and/or mobileprovision files).
The final version of the binary app (zipped) submitted to Appstore.
Binary.dSYM file for each revision (for post-release crash symbolicating).
Screenshots/icons/text file of description for app as submitted to Appstore.
Before beta releases you may also want to put mobileprovision files as well as a snapshot of the device list from the Developer portal for that version just so you can go back in time and figure out who got what release. If you're really hardcore you can also keep emails submitted by beta testers so you can keep it all in one place and go back and double-check against bug reports.
Yes. I use the exact same .gitignore file for iPhone OS projects as I do for Mac OS projects.