Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-18-2008, 12:02 PM   #1 (permalink)
New Member
 
Join Date: Apr 2008
Posts: 420
Send a message via AIM to jeff_lamarche Send a message via Yahoo to jeff_lamarche
Default Distribution & Code Signing

To put it simply, it sucks.

I'm not talking about philosophical aspects here, I mean the implementation. Apple did a shitty job on this stuff. Anytime I want to build an app for distribution, I lose a day trying to get the damn thing to build right. And it's not that I don't know what I'm doing... I follow the directions exactly, try every logical (and some illogical) permutations of those instructions, and it always takes me many tries to get it to work.

For me, Xcode is prone to not recognizing provisioning profiles, or finding the wrong ones, and the build instructions often simply don't work. When I build for distribution, for example, I cannot use "iPhone Distribution: Jeff LaMarche" for my identity as the instructions say, I have to use just my name in order to be able to select a provisioning profile. And then, I have to delete my developer cert because using just my name is ambiguous and it can't figure out which of the two certs to use, and there's no way to select which one it should use.

Now I'm going through this damn hassle to do an ad hoc distribution to try and send a a work-in-progress app to a client, and even when I do finally get it to build using the right provisioning and cert, it won't install (through either iTunes or Xcode), saying the app couldn't be verified.

I'm about ready to throw something across the god damned room.
__________________
Check out my iPhone Dev Blog
You can send me e-mail at my forum username at mac dot com.
jeff_lamarche is offline   Reply With Quote
Old 09-18-2008, 03:24 PM   #2 (permalink)
Registered Member
iPhone Dev SDK Supporter
 
moopf's Avatar
 
Join Date: Jun 2008
Location: United Kingdom
Age: 36
Posts: 151
Default

It is really frustrating. I've found that changing profiles or any settings in a profile, if I quit XCode, restart and then build I tend to have more success.

Ad-hoc is a pain, completely. I updated the list of devices for my ad-hoc provisioning file the other day, downloaded it, replaced the existing one and when I went into the project settings I could choose a random couple of device IDs as well as the ad-hoc provisioning file, where only the provisioning file should be. Every time I went back into project settings, it would show me a different couple of device IDs. Bizarre. In the end I just set it how I wanted it, closed XCode, restarted it, cleaned the target and built. And that worked.

But yeah, it's a dark art at times.
__________________
Hiqup - Puzzler/logic game now available on the app store. Or try the free version, Hiqup Lite!
moopf is offline   Reply With Quote
Old 09-18-2008, 03:28 PM   #3 (permalink)
New Member
 
Join Date: Apr 2008
Posts: 420
Send a message via AIM to jeff_lamarche Send a message via Yahoo to jeff_lamarche
Default

Yeah, I finally got it working, but took way longer than it should have. Very frustrating. I had to log out and log back into my computer to get it to recognize the right profile.. grr...
__________________
Check out my iPhone Dev Blog
You can send me e-mail at my forum username at mac dot com.
jeff_lamarche is offline   Reply With Quote
Old 10-25-2008, 02:41 PM   #4 (permalink)
New Member
 
Join Date: Oct 2008
Posts: 2
Default

I have finished my first iPhone app... I have spent the last four hours trying to get it ready for distribution... I've followed the instructions..and it didn't work. I deleted everything ( certs, etc ) and redid it all .. still no luck.

It compiles.. but then I can see in the build results that it isn't using my mobile provisioning file ...

I skipped the development cert and debugging, as I was trying to go straight to distribution .. does anyone know if this will cause issues?

This is definitely the most annoying process I've ever gone through ...
czieler is offline   Reply With Quote
Old 10-25-2008, 04:20 PM   #5 (permalink)
Registered Member
 
Join Date: Oct 2008
Posts: 89
Default

Agreed. I absolutely dread when the time comes to build for distribution. It never goes smoothly. Sometimes I get it working in just a few tries, sometimes it takes a couple of hours.

I just went through this last night. Here is a tip to try that is straight from Apples docs that got things working finally. First, make sure all your setting are correct (distribution checked, bundle id, etc). Clean All Targets, close XCode, then manually delete the build folder (not sure what clean is doing for me if I delete the build folder). Then open XCode back up, check all your settings again and build. It worked for me last night.
shan is offline   Reply With Quote
Old 10-25-2008, 05:19 PM   #6 (permalink)
New Member
 
Join Date: Oct 2008
Posts: 2
Default

I got it to use my provisioning profile.. but when I tried to upload it through the app uploader.. I'm was getting this error:

Application failed codesign verification


I nuked my build folder and did it again.. and got the same error. I repeated this process 6 times.. doing everything exactly the same.. and on the 6th time ... it worked.

I'm scratching my head... this process is definitely screwed up.
czieler is offline   Reply With Quote
Old 10-25-2008, 05:50 PM   #7 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 91
Default

Has anyone used a tech support incident on these issues?
danzaph is offline   Reply With Quote
Old 06-14-2009, 10:05 PM   #8 (permalink)
New Member
 
Join Date: Feb 2009
Posts: 189
Default

How is it possible that this process is still such a HUGE pain? Every time I try to deploy an app to an actual device I lose 5-10 HOURS!

I've tried cleaning, shutting down Xcode, deleting the build folder, hula dancing. Still nothing. The error message this time is "ambiguous code signing identity".

Nice job Apple.
SteveY is offline   Reply With Quote
Old 06-14-2009, 11:33 PM   #9 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 91
Default

Quote:
Originally Posted by SteveY View Post
How is it possible that this process is still such a HUGE pain? Every time I try to deploy an app to an actual device I lose 5-10 HOURS!

I've tried cleaning, shutting down Xcode, deleting the build folder, hula dancing.
All security is a PITA--all.

1st, follow all the instructions in the deployment pdf, make every screenshot match--exactly.

That said the single thing I find people doing wrong is having code signing at the project level, delete it all with the remove command in the action drop-down menu (lower left of the window).

I just went through this with a friend who had spend a day or so trying to get AdHoc setup. He had a bunch of badly named profiles ad devices. I cleared all the profiles, chose a simple appID, renamed it to an easily understood name, created a new profile with an understandable name. I created a new project, deleted all code signing at the project level, set up the required signing at te target level. It compiled and worked the first time.

Finally Xcode 3.2 is better with signing.

In general signing now works "if you let it", that was not the case several months ago.
danzaph is offline   Reply With Quote
Old 06-15-2009, 12:22 AM   #10 (permalink)
Registered Member
 
tawpie's Avatar
 
Join Date: Jul 2008
Posts: 328
Default

Quote:
Originally Posted by SteveY View Post
[snip]
I've tried cleaning, shutting down Xcode, deleting the build folder, hula dancing. Still nothing. The error message this time is "ambiguous code signing identity".

Nice job Apple.
The problem is "hula dancing". It it true that Apple's instructions for hula dancing are paltry at best, but if you look carefully you'll find the proper steps. Google is your friend.

I've had pretty good success by not having excess provisioning profiles in either Xcode or my test devices, only the bare minimum. Then I have gotten reallllllllly retentive about making sure that both the project and target build settings are set for the RELEASE configuration -- the build configuration you see when you get-info often isn't what you have set in XCode so I've horsed around changing provisioning profiles for the wrong configuration and then wondering why release didn't work.

And my hula dance is only invoked after an upload failure... the steps are:
* delete provisioning profiles from Xcode
* get a new, fresh profile from Apple (I don't always do this on the first round)
* drag new profile to XCode
* reset the provisioning profiles for both the project and target
* clean all targets
* quit XCode
* shutdown
* before restart, kneel in front of computer and bow thrice saying "oh, mighty machine". Both hands must be raised in the air held shoulder width apart. <-- crucial step, do not omit, alter or otherwise modify
* restart, relaunch, build (not build and go!), verify mobile provisioning is in the package, compress, upload, and rejoice.
* cross fingers and hit CONTINUE.

in the rare instances where it fails again, I remember that this is software just like Windows is software... and I repeat the dance.
__________________
"Hardware will break. Software comes broken" Unknown
Calc-12E <-- ditch your old calculator.
CPR•Choking <-- Review your training, just in case. (Free)
All of Nature NW <-- scrolls in x and y, with pinch zoom AND scrollable text to boot. It can be done ('taint easy tho)
tawpie is offline   Reply With Quote
Old 06-15-2009, 12:59 AM   #11 (permalink)
New Member
 
Join Date: Feb 2009
Posts: 189
Default

Sure, I can go through the whole process every time and get it to work after many wasted hours (which I did again this time). The point is that I shouldn't have to do this every time. It's unbelievable to me that Apple fell so short on this stuff.

I make apps for myself and also for other companies, so I need to have different profiles and different devices. It is 99.999% impossible for Xcode to keep things straight. Going through the whole stupid process every single time I deploy a different app to a different device or profile is insane.
SteveY is offline   Reply With Quote
Old 06-15-2009, 02:12 AM   #12 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 91
Default

I disagree. The process described by tawpie is not necessary. Extra steps that do nothing do work but why do them? Security is a PIA, that is always true but understanding the process makes it work. In the early days there were real problems, today I no longer see them.

The major problem, I see Apple committing is that in the standard template they have code signing in the project even though the docs state otherwise.

Read the docs, they describe exactly what to look for in the build results. One can even look in the profiles and see if the correct device are present. Apple had _now_ described exactly what to do, it works. Yes, it needs to be followed exactly, that is how security is.
danzaph is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,367
Threads: 39,159
Posts: 171,660
Top Poster: smasher (2,577)
Welcome to our newest member, jurosik
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:17 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0