4

Whn I try to upload my app, I get this error in Application Uploader "Application failed codesign verification. The signature is invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate.".

If I open MonoDevelop, properties and select "iPhone bundle signing", then I see a "Provisioning profile", but if I click another topic (eg Crash report) and go back to "Provisioning profile", then it suddenly says "Unknown" and a guid.

How do I tell MonoDevelop to use the correct Provisioning profile?

I deleted some old profiles (in Organizer), but they still show in MonoDevelop.

MojoDK
  • 4,410
  • 10
  • 42
  • 80

4 Answers4

7

Unfortunately the "provisioning hell" created by the Apple signature system is made even worse in MonoDevelop.

There is no provisioning manager, no way to setup and associate all the provisioning profiles and the keys to a specific monotouch app. MonoDevelop lacks a wizard to automatically create or guide the user in the creation, download or backup of the right profiles, keys and appIDs.

The best way to know if a profile or a key is wrong, expired, incompatible with an appId, or rejected, is to check all of them manually in the XCode Organizer (you can find it in the XCode "Window" menu).

Once in Organizer, you need to go to click on the LIBRARY -> Provisioning Profiles section on the left, and then click on the Refresh button to synch your profiles with apple server (if you have those on file or you are on another dev computer and you have to install only selected profiles, click on the Import button and manually select the files).

Then you need to attach your ios device and when it appears in the DEVICE->your_iPhone_or_Ipad name.. you need to drag and drop the provisioning profiles that you need from the LIBRARY->Provisioning Profile to the DEVICE->your_iPhone_or_Ipad_name->Provisioning Profiles...

Many things can go wrong anyway, especially mixing old profiles with the new profiles supporting iCloud or some other advanced app features. There is no way to know if a bundle id is valid, if the entitlements are allowed, if a profile or an appID is enabled or not to use iCloud, Notifications, IAP, etc., or if it's registered for Developer, AdHoc or Distribution, and what product id strings it's compatible with. You need to go by trials and errors. Even the simple creation of an ad Hoc version of your app enabled for a trusted remote tester is a long and perilous road. There is no users and testers profiles manager in MonoDevelop, you need to remember what goes with who every time.

If you are on a different developer machine, you also need to install the registered developer keys in the local KeyChain (I suggest to do a backup of those keys somewhere: if you lose those keys, you will be unable to update your app in the future!!).

Let us hope that Xamarin will add a profiles and keys manager soon.

Emanuele Sabetta
  • 1,571
  • 12
  • 34
  • 2
    +1 for the 'provisioning hell'. I'm using MonoDevelop's successor '[Xamarin Studio](http://docs.xamarin.com/guides/cross-platform/getting_started/introducing_xamarin_studio)' (v4.0.1) that came out end of last year, but the changes are mainly a rename and some layout, no big GUI changes, and no profiles and keys manager yet.. – Bart Jun 04 '13 at 13:07
5

@Emanuale mentions alot, but he is going the long route on a lot of these.

There is a simpler way to go about everything. Here is the cut and dry approach:

  • Login to the provisioning portal on the web
  • Create an App ID for your company as "com.yourcompanyname.*"
  • Create a provisioning profile for this app ID for both development and distribution
  • (I would also recommend to delete any profiles you don't need)
  • Open XCode->My Organizer, and press the refresh button in the bottom right corner (you will see all your profiles from online appear)
  • Deploy your app to the device from MonoDevelop (make sure your bundle ID is com.yourcompanyname.yourappname)

This is the simplest way to go about this. No need to mess with provisioning profile settings in MonoDevelop, the defaults should work.

The only gotcha is if you need to support push notifications. The com.yourcompanyname.* profile won't work, you will have to make a profile specific to each app in this case.

jonathanpeppers
  • 26,115
  • 21
  • 99
  • 182
1

Great answer jonathanpeppers! Just a 2c, now XCode->My Oganizer is Preferences->Accounts

matrix3003
  • 386
  • 3
  • 9
0

If the accepted response doesn't help, you should also ensure that your Signing Identity matches the Provisioning Profile you're using, and that it has a private key. These can be switched up if you have multiple Signing Certificates installed, and you won't be able to tell the difference from Xamarin Studio. See

https://stackoverflow.com/a/37856762/660194

Community
  • 1
  • 1
Geir Smestad
  • 1,344
  • 2
  • 15
  • 25