PDA

View Full Version : Code signing woes




pinsrw
Aug 16, 2010, 01:32 PM
.



robbieduncan
Aug 16, 2010, 01:41 PM
1) Why? Where in Apple's documentation does it say to do this?

Luke Redpath
Aug 16, 2010, 05:53 PM
1) Why? Where in Apple's documentation does it say to do this?

Or indeed, where does it say to do *anything* in the post?

To the OP: have you tried following the guides in the Developer Provisioning Portal?

pinsrw
Aug 16, 2010, 08:18 PM
.

chown33
Aug 16, 2010, 08:35 PM
What kind of program do you want to submit for approval?

The Apple reference says that the sectcreate magic is for a single-file tool. Is that what you're trying to create?

Luke Redpath
Aug 16, 2010, 08:46 PM
Here's one place, but this is also featured in non-Apple-created Youtube videos:

http://developer.apple.com/mac/library/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-SW2

Keychain Access is used to create a CSR but that link has nothing to do with code signing for iOS applications.

Read the documentation in the provisioning portal. You need to be a paid developer to access it.

pinsrw
Aug 16, 2010, 08:55 PM
Keychain Access is used to create a CSR but that link has nothing to do with code signing for iOS applications.
Read the documentation in the provisioning portal. You need to be a paid developer to access it.

This is for distributing an iOS application via iTunes Store and I've signed up as an iOS developer.

What I've done so far after going into the provisioning portal is:
1. Generated the iPhone development certificate. Installed that.
2. Exported by private developer key (the .p12 file) and installed that.
3. Generated the iPhone distribution certificate. Installed that.
4. Asked Xcode to automatically use the iPhone distribution certificate.

It still gives an error:
Code Sign error: a valid provisioning profile matching the application's Identifier '' could not be found

chown33
Aug 16, 2010, 10:59 PM
... the application's Identifier '' could not be found ...

I'm pretty sure this is telling you the application identifier is empty, since there's nothing between the quotes.

robbieduncan
Aug 17, 2010, 02:09 AM
Here's one place, but this is also featured in non-Apple-created Youtube videos:

http://developer.apple.com/mac/library/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-SW2

That's in the Mac Developer Centre. You are writing an iPhone app. You need to follow the iPhone instructions. Which means no self-created certificates for a start.

pinsrw
Aug 17, 2010, 08:10 AM
I'm pretty sure this is telling you the application identifier is empty, since there's nothing between the quotes.

This is an error caused by the CFBundleIdentifier field of the plist.
When I put the default, which is in the form com.company.AppName, in there, it still gives an error:

Code Sign error: a valid provisioning profile matching the application's Identifier 'com.companyname.Appname' could not be found

It's unclear why the default value isn't being accepted.

And it's unclear why, even though I've installed all of the certificates using Keychain Access, in Xcode my certificates still don't appear in Edit Project Settings.

robbieduncan
Aug 17, 2010, 08:27 AM
The default value will only be accepted if you put the same value (or at least a partial) that matches that on the developer portal when you created your certificates. Of course you should be using the correct value, not the default. I would not be surprised if Apple rejected an app with a non-realistic identifier value.

pinsrw
Aug 17, 2010, 01:39 PM
The default value will only be accepted if you put the same value (or at least a partial) that matches that on the developer portal when you created your certificates. Of course you should be using the correct value, not the default. I would not be surprised if Apple rejected an app with a non-realistic identifier value.

In the App ID area of the website, Apple has accepted my App ID and provided me with the developer certificate and distribution certificate, both of which I installed using Keychain Access. Xcode is acting like it's not even checking for these. It tell it to build and it immediately stops with the same error.

Code Sign error: The identity '...' doesn't match any valid certificate/private key pair in the default keychain

In Keychain Access I see 5 certificates:

Apple Push Development
Apple Push Distribution
AWWDS
iPhone Development
iPhone Distribution

... And now I'm seeing something even more bizarre.
When I try to run my program on the simulator it comes up with a black screen!

firewood
Aug 17, 2010, 02:55 PM
Did you get a provisioning profile with an appropriate appID, and drop it on Xcode?

I find quitting and restarting Xcode sometimes helps... or even rebooting my Mac.

Code signing is one of Apple's secret IQ qualifying tests for iOS developers. There are around 100 steps hidden in the documentation. If you miss one step you fail, and aren't qualified to do apps. If you actually read all the documentation needed and get all the steps right, you win this level of the game, and get to play the next level: app approval lottery.

pinsrw
Aug 17, 2010, 03:30 PM
Did you get a provisioning profile with an appropriate appID, and drop it on Xcode?

No, because that seems to require that I have a device, which I don't have. At this point it's an issue of trust and accountability: Is Apple accountable when bizarre problems crop up? Do I trust that if I buy an iPad the black screen issue, which is due to their code, will be resolved somehow?

Rebooting the Mac and even updating the system software had no effect on the black screen issue.

Code signing is one of Apple's secret IQ qualifying tests for iOS developers.

I agree, it is an IQ test, wherein the intelligent thing would be to not code for iOS in the first place. And it's also a reverse IQ test, in which Apple's being tested for its intelligence in dealing with the coders on which it relies, but is failing.

Soon they'll be selling Kopi Luwak coffee beans as another "IQ test", where the "smartest" consumers will pay extra for fecal-covered beans.

robbieduncan
Aug 17, 2010, 03:32 PM
No, because that seems to require that I have a device, which I don't have.

Then why are you trying to build for release: the simulator performance is very different to the device. It is not unknown for code that runs in the simulator to fail on a real iPhone entirely.

pinsrw
Aug 17, 2010, 03:46 PM
Then why are you trying to build for release: the simulator performance is very different to the device.

It's a data-entry type of program, not OpenGL or anything that requires performance testing. It would run just as well on a 50 MHz device as on a 500 MHz device.

It is not unknown for code that runs in the simulator to fail on a real iPhone entirely.

That's a very vague statement. Can you cite an example situation?

Anne R. Kist
Aug 17, 2010, 03:56 PM
No, because that seems to require that I have a device, which I don't have.
Creating a distribution provisioning profile does not require any device ids.

pinsrw
Aug 17, 2010, 04:01 PM
Creating a distribution provisioning profile does not require any device ids.

It does here:
http://developer.apple.com/iphone/manage/provisioningprofiles/create.action?type=1

Anne R. Kist
Aug 17, 2010, 04:05 PM
Wirelessly posted (Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1_3 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7E18 Safari/528.16)

Creating a distribution provisioning profile does not require any device ids.

It does here:
http://developer.apple.com/iphone/manage/provisioningprofiles/create.action?type=1

Development != Distribution.

pinsrw
Aug 17, 2010, 04:08 PM
.

Anne R. Kist
Aug 17, 2010, 04:14 PM
So you were wrong then.
No, I wasn't.

If you want to create a development provisioning profile, you need to specify which devices. If you want to create a distribution provisioning profile, which is what is needed in order to submit an app to the App Store and the very thing I believe you created this thread for, then you don't need to specify any devices, since by it's very intention, it is meant to run on unknown devices.

pinsrw
Aug 17, 2010, 04:46 PM
.

robbieduncan
Aug 17, 2010, 04:51 PM
This is what you said:
Creating a distribution provisioning profile does not require any device ids.

And he was correct. A distribution profile, which is what you need to upload to the store, is not linked to any device ID. You on the other hand are, in my opinion, behaving in a manor that does not make me want to help you. You have removed the content of your posts in this thread which is exceptionally rude when people have responded to it and are now being antagonistic. I'll certainly not be bothering to attempt to help you any more.

Anne R. Kist
Aug 17, 2010, 05:05 PM
This is what you said:
Creating a distribution provisioning profile does not require any device ids.
Do you even understand the difference between a development provisioning profile and a distribution one?

firewood
Aug 17, 2010, 05:15 PM
I agree, it is an IQ test, wherein the intelligent thing would be to not code for iOS in the first place. And it's also a reverse IQ test, in which Apple's being tested for its intelligence in dealing with the coders on which it relies, but is failing.

They've already got over 48,000 active iOS devs with near 300K apps done. The numbers go up without any better "dealing". They don't need to rely on anyone who can't pass their bizarre imperfect test.

Diligence, intelligence, careful information (re)reading/searching skills, and politeness, all help.

Or you could try making money with Android/BB apps.

pinsrw
Aug 17, 2010, 06:59 PM
And he was correct. A distribution profile, which is what you need to upload to the store, is not linked to any device ID.

I'm sure you'll correct me if I'm wrong, but this page indicates the need for a provisioning profile, which in turn can't be obtained without entering a device ID.

https://developer.apple.com/iphone/manage/distribution/index.action

Now, it appears that Apple doesn't validate the device ID, so I now have two provisioning profiles (development and distribution) that I can hopefully use without owning or borrowing a device.

Luke Redpath
Aug 17, 2010, 07:10 PM
I'm sure you'll correct me if I'm wrong, but this page indicates the need for a provisioning profile, which in turn can't be obtained without entering a device ID.

https://developer.apple.com/iphone/manage/distribution/index.action

Now, it appears that Apple doesn't validate the device ID, so I now have two provisioning profiles (development and distribution) that I can hopefully use without owning or borrowing a device.

It clearly states in the diagram that a device ID is required for adhoc distribution only not app store distribution. If you entered a device ID when you created your provisioning profile you have probably generated an adhoc profile which cannot be used for app store distribution.

pinsrw
Aug 17, 2010, 07:13 PM
They've already got over 48,000 active iOS devs with near 300K apps done. The numbers go up without any better "dealing". ....

Or you could try making money with Android/BB apps.

Practically speaking, these tricky rules only inhibit people who are new to developing for the iPhone. Once learned, they don't stop anybody. Hence the 300 variants on the same baseball game.

And it's not like this is going to dissuade anyone from coding for Android etc. It's just a given that one has to code for multiple platforms these days.

pinsrw
Aug 17, 2010, 07:21 PM
It clearly states in the diagram that a device ID is required for adhoc distribution only not app store distribution.

You're right. But at least now build for the device, which is better than nothing even if it's ad hoc. But I don't see any way to generate a distribution provisioning profile for the App Store. Is there no such thing? If not, how do I build an executable for them?

Anne R. Kist
Aug 17, 2010, 07:23 PM
But I don't see any way to generate a distribution provisioning profile for the App Store. Is there no such thing?
Yeah, you're right. There's no such thing. That explains the over 300K of apps already distributed to the App Store. :rolleyes:

pinsrw
Aug 17, 2010, 07:28 PM
Yeah, you're right. There's no such thing.

Such a lovable lass.