views:

945

answers:

3

Hi, how do I do an ad-hoc distribution profile?

Been reading many links but I think there is something that I'm still missing. Just can't figure out what.

Here are the steps that I took
1. a team member sent me his UDID
2. I add his phone to "devices" under the dev portal

Then this is what I did to create the ad-hoc profie
1. go to "provisioning" then "distribution" on my dev portal
2. add "new profile" and select "ad-hoc" for the Distribution Method radio button
3. select the "wildcard" App id
4. select all phones.
5. download the certificate on someone's machine and install it

So team member gave me the UDID and I gave him back a .mobileprovisioning file and the app binary. That doesn't work.

This is the error that I see on XCode - "A valid signing identity matching this profile could not be found in your keychain".

If I try to install anyway by dragging the app into XCode, I get "A valid provisioning profile for this executable was not found"

Please enlight,
Tee

+1  A: 

Are you actually creating a build that is signed with your distribution certificate? The docs on the developer program portal are very complete, I don't know that anyone here would be able to do a better job of explaining the process. Make sure to look at the Distribution > Prepare App

jessecurry
A: 

Make sure you see the following in the OS X Keychain Access application (in the login section):

  • A private key with your organization's name.
  • A certificate attached to the above private key named iPhone Developer: Organization Name

Make sure your provisioning profile is located in ~/Library/MobileDevice/Provisioning Profiles.

Jon-Eric
+1  A: 

A major step that a lot of developers forget to do is to add the code signing entitlements file to their project.

Inside XCode add a new file to the Resources group of your project. Choose the Code Signing Category in the template dialog. You will want to choose the Entitlements. Once this is added, highlight it in XCode and uncheck the "get-task-allow" value.

You will then want to go Get Info on your XCode project and under the Build tab, go to the Code Signing section. Under Code Signing Entitlements, put the name of the file you added. Make sure you have your Cert/Profile pair selected under the Code Signing Identity. Once you build with these settings, you can hand the .ipa or .app file along with the .mobileprovision file to your user and you should be all set.

bstahlhood
Hi bstahlhood, yes I did forget this part. Thx. Now that I changed that, there is this 1 dependency file that turns red (i.e not found).Basically I'm trying to compile the zxing opensource project and I'm getting 1000+ error when I changed that to the distribution profile. Saying many C++ files is not found. Any help you can offer? Tee
teepusink
Yeah, you probably have header/lib paths that were in the debug or release profile. Just copy those paths over to the distribution profile too. This should resolve the compilation errors you are seeing.
bstahlhood
Hi bstahlhood, where in XCode can I change the path? Basically in the debug mode, when I compile, it creates a file called "file.a". When I change that to ad-hoc mode, "file.a" doesn't get created and I see it as "red" on the navigator. Copying "file.a" to the build directory for the ad-hoc doesn't fix it either. Please enlight. Tee
teepusink
You right click (Control+Click) the project and do a "Get Info". Then under the Build tab, choose your proper configuration and go down to the "Search Paths" section. If you look at it in Debug first, you will see the values you need to copy. Just set those same values in the Ad Hoc configuration.
bstahlhood
Hi bstahlhood, thanks for you help. I finally figured out why my app won't compile. It's the C++ version. I had to make sure I use 4.0 and not 4.2. Thanks, Tee
teepusink