English 中文(简体)
Signer not valid error
原标题:

I ve created an ad hoc build of my app and would like another person to install it. I have their device ID (two actually) in the provisioning profile. My certificate is the same for ad hoc and app store provisioning. The certificate is valid in keychain. I ve selected the ad hoc profile in Xcode for this build, which is linked to the distribution certificate.

I send the user the provisioning file and .app file. They drop both into iTunes and sync then get this error on both devices:

The application "myapp" was not installed on the iPhone "user s iPhone" because the signer is not valid.

I ve removed all profiles from my iPhone, dropped the above two files into iTunes, sync d and installed the app successfully. I can t get it to repro for me. I need to repro this problem locally to figure out the issue. Any ideas how that can be done?

最佳回答

Did you add Entitlements? Put the signing at the Target level, not the Project level? Select the Ad Hoc profile? DO a clean prior to the build? Select the Ad Hoc Device foe the build?

The best bet is to follow Apple s documentation exactly, get your build settings to exactly match Apple s.

问题回答

It s a good idea to check the imbedded.mobileprovision file that comes bundled in the .app file to make sure that the UID is in there. Just do the following:

  1. unzip ProblemApp.ipa
  2. cd Payload/ProblemApp.app
  3. pico imbedded.mobileprovision

Look for the UID of your device within this file. If it s not there then it s probably not added to the provisioning file within the portal.

From the docs:

Building an app for Ad Hoc distribution is similar to building an app for App Store distribution, with an exception of two additional steps. First, you need to create an Ad Hoc Distribution Provisioning profile and add the UDIDs of the iOS devices that you want to distribute to using the iPhone Developer Program Provisioning Portal. Second, you need to create a code-signing Entitlements file. For information about how to create an Entitlements file read the Managing Application Entitlements section of the iOS Development Guide.


Managing Application Entitlements

iOS provides access to special resources and capabilities—such as whether your application can be debugged—through properties called entitlements. To specify entitlement information in your application, you add an entitlement property-list file containing entitlement definitions (key/value pairs) to your project. When you build your application, Xcode copies the file to the generated application bundle.

To add an entitlements property-list file to your project:

In the Groups & Files list, select the Resources group. Choose File > New File. Choose the iOS > Code Signing > Entitlements template. Name the file Entitlements.plist. (You can use any name; just ensure it matches the value of the Code Signing Entitlements build setting, as explained later in this section.) Set the type of the property-list file to iPhone Entitlements. With the file selected in the text editor, choose View > Property List Type > iPhone Entitlements plist.

Add your entitlement entries to the file. For each entitlement property you need to define:

Click the Add Child or Add Sibling buttons to the right of the selected row. The Add Child button has three lines depicting a hierarchy, the Add Sibling button has a plus (+) sign on it. Choose the entitlement property from the pop-up menu that appears. If the entitlement you need to add doesn’t appear in the menu, choose View > Property List Type > Default for File Type. Then enter the entitlement-key name and type.

Enter the value for the property. Set the Code Signing Entitlements build setting for the target to the name of the newly added entitlements property-list file.


Once you have created your Entitlements file and added it to your Code Signing Entitlements build setting, open the Entitlements file and add or edit the get-task-allow key and set it to false.

In addition to compressing your .app bundle to distribute your Ad Hoc build to testers, etc. it is recommended that you also compress the provisioning profile before distributing because certain email clients and servers may corrupt the provisioning profile.

For information about Ad Hoc distribution please read the Publishing Applications for Testing section in the iOS Development Guide.

I ran into this problem recently with one tester on a recent build. It turned out that my tester had reset their iPod Touch and removed the provisioning profile in the process.

Just something to consider.

I got this error by doing something dumber than anyone else has posted. I added new devices to the profile, but forgot to download the updated version, add it to Xcode, and point the project to it. When I set it up properly, testers were able to install the app fine.

Here s another fun one.... if you have separate entitlement files for iphone and ipad, make sure you set the target for the file for each specific build...otherwise it won t show in the build and you ll get this error

I arrived here because I had the same problem as the OP. It indeed turned out that I didn t have the UDID in the entitlements file, even though I m sure I used refresh in the XCode organizer. Another refresh made no difference.

In the end I removed all provisioning profiles and then did a refresh. Things now work.

I have no idea whether this is a glitch in my setup, or an operator error. But just in case anyone else finds themselves in this situation: it may pay to remove your provisioning profiles and then do a refresh.

This wouldn t work for me with an iphone 3G running IOS 3.1.3. I verified that the distribution profile wasn t on the phone by looking at settings->general ( there was no profile option listed).

I then installed the iphone config utility:

http://support.apple.com/kb/DL851

Then:

  1. run iphone config
  2. drag and drop embedded.mobileprovision file to app
  3. click device on left side
  4. click "provisioning profiles" tab
  5. click on the profile and then click the "install" button

Then the app installed just fine.

I had the same problem as the OP too. Dumb mistake: I accidentally dropped the last two digits off the device I was attempting to ad hoc distribute to when I registered it as a device.

I got same problem two times ( xcode 4.2 ios 5)

1st,time i forgot to add armv6 in architecture

2nd, time i have created to many provisioning files with same developer id that i should delete others key-chain according to use of bundle identifier ...and i mistakenly deleted valid and used other kechain





相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...

热门标签