iPhone App Upload - CodeSign Missing? - iphone

For a long time now I have been searching through the forum whilst teaching myself the delights of iPhone programming, and I thank you all for the massive number of questions you have unknowingly helped me with!
I seem to have come up against a brick wall regarding the upload of my finished application to Apple and would appreciate any help/advice that you may be willing to give.
This is my first upload to apple so apologies if this is all a little sketchy!
After some tweaking I have successfully managed to follow Apples guidelines on creating a new Distribution profile for my project, applied my new Distribution certificates in the Target info and got the project to successfully build. Sounds good! Problem is when I upload this to apple i get their generic "App is not Signed" error.
After one hell of a late night and some research I realised that in the detailed Build Log of my application there is no line that includes the word "CodeSign" as apple suggest. It appears that XCode when compiling isn’t even attempting to CodeSign .app.
What I have tried:
Creating new AppIDs, Certificates and Distriution profiles (a number of times).
Trying to package an Apple example (untampered).
After a 7.5 hour download i have reinstalled XCode to no avail.
Is there something simple I am missing? Has anyone else experienced this where XCode doesn’t add a CodeSign row to the Detailed build log?
Any help would be very much appreciated.
Regards,
Ralph
Solved
I think the fact I wasn’t building under device played quite a big part in this. After much (more) tweaking I managed to get it to CodeSign by:
Re-installing XCode
Running the Clean All targets function a huge number of times in-between everything I did.
Deleted all certs on my Keychain and downloaded all new ones.
Making sure I was using device and my Distribution profile on both Target and Project settings.
And a lot of sweat and tears..!
Thanks for your help!

That's weird. You're definitely building for the device and not the simulator?
Double check your Code Signing Identity in your Release/Appstore configuration settings.
It should be Any iPhone Device: iPhone Distribution: Your company name

Related

iTunes Connect Vague App Rejection - Pulling My Hair Out

So, I recently uploaded about 9 apps that were mutations of an original one, just with different content and the same framework...
So, today all 9 of the apps went into review at the exact same time although they were each uploaded a day apart, which I thought was really odd. 5 hours later I get 9 rejection emails and the same rejection as follows:
2.2
We found that your app failed to launch on iPhone 5 running iOS 6, on both Wi-Fi and cellular networks.
We encountered the issue when selecting the application on the Home screen - the app displayed a launch image then quit unexpectedly.
This may be because iOS 6 uses a watchdog timer for applications; if
an application takes too long to complete its initial startup, the
operating system terminates the application.
For information about the watchdog timer, please see Technical Q&A: Application does not crash when launched from debugger but
crashes when launched by user..
Another possibility could be a missing entitlement. For more information, please see the Technical Note: Resolving "0x800003A",
applications not launching and "missing entitlement". For discrete
code-level questions, you may wish to consult with Apple Developer
Technical Support. Please be sure to:
include the complete details of your rejection issues
prepare any symbolicated crash logs, screenshots, and steps to reproduce the issues for when the DTS engineer follows up.
For information on how to symbolicate and read a crash log, please see Tech Note TN2151 Understanding and Analyzing iPhone OS
Application Crash Reports.
If you have difficulty reproducing this issue, please try testing the workflow as described in
https://developer.apple.com/library/ios/qa/qa1764/Testing Workflow
with Xcode's Archive feature".
I've uploaded a number of apps before and have never received this sort of issue.. So, I followed their suggestions and it's not the dogwatch timer, as the app runs absolutely flawless when ran from xcode on my iPhone 4s with iOS6, and also runs without any issues when I distribute it as ad-hoc enterprise, and sync the app through a .ipa file onto my iphone...
Although, before testing any of this I went through and revoked my development and distribution certificates, went through my keychain and deleted all instances of any certificates related to apps, and keys. Then refreshed everything. All my code signing / provisioning profiles are valid, I re-added my device to the provisioning portal as well.
Does anyone else have any ideas? I'd like to be positive I fixed the problem before uploading my apps again, waiting a week just to be rejected once again and have to start all over. Any help or leads would be greatly appreciated!
I have also double checked all of my info.plist bundle identifiers and they all match the dist and development profiles associated with each app.
I finally got around to finding a friend with an iPhone 5. The crashing WAS due to armv7s architecture being used. So I stripped out all architectures and used only armv7. Worked like a charm and the app ran as smoothly on my 4s as it did on my friend's iphone 5.
Did you try compiling in armv7 only? (forget the armv7s support). By the way, yeah, it's impossible to test it without any iphone5 hardware, and the simulator actually don't simulate anything. With only armv7 feature it should (i really say "should") behave like in iPhone 3G/4/4s on ios6.
Or did you have some runtime behavior depending on the device? What are you actually set on startup?
Look at this post:
http://wanderingcoder.net/original-armv7s-psa/
Even if it talk about linker error, here is the philosophy: Don't publish something you haven't, can't test. Use armv7s only when you will get rich an have an iPhone 5

Please help me to create .ipa of my app

I tried last 1 day. refer all the question related my problem but can't find such a solution.
I had follow all the steps create certificates, appid, adding device id , create provision, set in the project. with this provision the app work fine in my iPhone4.
please help me
Thank you in advance
In xcode 4.2 there is a totally bug for when the creating the ipa and share that time best solution find me first of all find the share bundle and then following link for the solve that problem it's rally amazing
I solve that problem while creating the project
Reference link is here :-)
You need to go to Build Settings > Code Signing and set the code signing profile automatically for each setting. Don't just use 'Automatic'.
there maybe problem with Entitlements file as well.
You can find it in XCode 4.2 -> Targets -> bottom section 'Entitlements'
There you can "Enable Entitlements". Other fields may be empty if the app doesn't need it.
Other codesign problems issued many time here. So you can find one of lots tutorials and remake codesign profile.
There is currently a lot of chatter on the forums (especially the Apple dev forums) that something has broken or been modified in the creation of certificates in the dev portal. All Apple dev portals are currently down (displaying the "back soon" post-it message) so hopefully this means that Apple are providing a fix.

Problem in creating adHoc build

"The app "App Name" was not installed on iphone "iphone name" because it is not signed."
I m getting this error when I try to create an adhoc build. I founds some solutions and tried those but none of them are working for me.
I have created a distribution certificate again and .mobileprovison certificates for 'n' numebr of times, but still i m getting this error. I have added Entitlements.plsit and also creating build for distribution configuration(which is copy of release). In organizer also it shows a valid provision profile. I m cleaning up Targets all the time when I create the build.
Am I missing any steps to create adhoc build. Please some one help me out of this. I m working on this issue from so many days.
Sometimes Entitlements.plist need full path.
Looks like
~/iOSProject/myProject/Entitlements.plist
I hope so that is a little problem for quick solution.
There are a few steps missing in your description of your problem, so it's unclear whether the problems are with the signing and packing of the ipa files or whether it's related to your installation of the app.
The good folks over at TestFlightApp have provided an excellent step-by-step guide for Xcode 3 and Xcode 4 on how this should be done.
It's not entirely black magic to make it work, but it's close. Just make sure you follow the steps one by one exactly as they are described and it should work - at least it did for me.

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).

Error Installing iPhone App on Device

I set up all my certificates and keys today and am trying to run my project on my iPhone.
I'm encountering this strange error:
Your mobile device has encountered an unexpected error (0xE800003A) during the install phase: Verifying application
Poking around the Apple Developer forums, I've attempted to set new certificates and provisioning profiles as well as editing Info.plist, but no matter what I do I can't seem to run the app on my device.
The only think I can currently think of is that my project name in Xcode differs slightly from my development provisioning profile (it uses a question mark), but I've named it according to Apple's conventions: com.mycompany.myapp, so I'm unsure if that's the problem.
Any ideas?
Edit: I've hard restarted the phone, rebooted Xcode, cleaed my targets, set up a new wildcard App ID and respective provisioning profile and still nothing. Any other ideas?
It turned out that I had 2 certs in keychain that were simultaneously overwriting each other! I hope this helps people in the future.
You should create a wildcard app ID; com.mycompany.*. That may help.
I've encountered this on many occasions. What i do is clean all targets, shut down xcode, and hard reboot my phone.
This is a different error than the more common problem of getting the cert wrong...
Restore the phone (using the XCode Organizer to reload the latest OS), to be safe do not restore from backup when you sync with iTunes the first time (it'll still keep your number when you sync even if you don't use the backup). I've had to do this a very few times, the last one was when it was in the middle of deployment when I unhooked the phone from the cable (had to answer a call).
Try the reboot (of the phone) first, hooking it up with XCode off. But if that does not solve things, restore is the way.
The console tab in the XCode Organizer sometimes gives helpful hints as to what happens during the install phase. In one case my problem was my app already existing on the phone. I deleted my app and the install succeeded.
Regardless, it looks like a lot of error messages are bundled into this one cryptic message and to really diagnose what is going on, I found the Console tab very useful...
One other thing to try is reinstalling the iPhone SDK. I ran into an error like this when I first got my developer key and this was the only way around.
Just want to say to everyone, when you go to edit Targets-> be sure to set "configuration" in the top left corner to "All Configurations" or the correct config you are building for (Debug or Release). You might think you have things set correctly but it will be for the wrong configuration.
I've seen that error on a correctly provisioned device that has had success installing apps from XCode before, and I've had luck restarting the device and trying again. Maybe that will help.
Try running in Release mode instead of Debug. I have a working project with this problem. No idea what the issue was, but running it in Release mode works, but Debug mode produces the error code.
I have a support ticket open with Apple dev support for the same problem, and (FWIW) I'll post their recommendations if and when they can get my toolchain working.
Try this: (source: http://ephemera.lifewithalacrity.com/iphone_development/)
Even though this is supposedly only for Distribution builds, it helped me to be able to install my Debug version on my iPhone again, after it mysteriously broke yesterday.
"just triple check that all the code signing in your project properties are clear or default"
Note, this is the PROJECT properties as opposed to the TARGET properties. I set my Code Signing Provisioning Profile back to the default and removed the Code Signing Identity string.