Bug 56759 - ERROR ITMS-90046: Invalid Code Signing Entitlements. (iTunes Upload)
Summary: ERROR ITMS-90046: Invalid Code Signing Entitlements. (iTunes Upload)
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 10.10 (d15-2)
Hardware: PC Windows
: --- normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
Depends on:
Reported: 2017-05-23 13:55 UTC by p.k
Modified: 2017-07-03 18:33 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Build Log (3.89 KB, text/plain)
2017-05-23 13:55 UTC, p.k
Diagnostic Build Log VS2017 (6.62 MB, text/plain)
2017-05-24 05:58 UTC, p.k

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description p.k 2017-05-23 13:55:13 UTC
Created attachment 22391 [details]
Build Log

As of the latest stable I have not been able to build an App I can submit to the app store. I have checked our certificates (and re-checked them again), but I am always getting the error

> ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature 
> contains code signing entitlements that are not supported on iOS. Specifically, value 
> 'XXXXXXXX.de.bachmann-immobilien.*' for key 'application-identifier' in 
> 'Payload/BachmanniOS.app/BachmanniOS' is not supported. This value should be a string 
> starting with your TEAMID, followed by a dot '.', followed by the bundle identifier."

(I've masked the Team ID, since I do not know, how sensitive this information is). I have been able to build an AppStore build. But for a few days now, there is no Folder with the date created containing the IPA anymore in bin/iPhone/AppStore. I tried to use the IPA file that's directly in the AppStore folder, but this only gives me the error message. I have attached the build log, but since this is a project for a customer I cannot attach the source code. If there is any further information I can provide I will happily do so.
Comment 1 Alex Soto [MSFT] 2017-05-23 14:57:53 UTC

I see you are using Visual Studio from Windows in your logs, can you test this from Visual Studio from Mac and see if you get the same results?

Thanks in advance!
Comment 2 p.k 2017-05-23 20:56:32 UTC
Dear Alex,

Unfortunately it's the same when building with VS for Mac.

Kind regards,
Comment 3 p.k 2017-05-23 20:57:44 UTC
I will try to supply VS for Mac logs tomorrow.
Comment 4 Alex Soto [MSFT] 2017-05-23 21:29:38 UTC
@Jeff/@Vincent Any ideas what could be happening here?

@p.k Please include your full build logs and all version information.

To get full build logs just set the log verbosity to diagnostic at the following locations:
 - On Visual Studio for Mac: Preferences > Projects > Build
 - On Visual Studio for Windows: Tools > Options > Projects and Solutions > Build and Run

On Visual Studio Windows you also want to add `-v -v -v -v` to the mtouch additional arguments by right-clicking the project in the solution explorer and selecting `Properties`.
Note: this is done automatically on Visual Studio for Mac when the log verbosity is set to diagnostic.

The easiest way to get exact version information is to use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version information (you can use the "Copy Information" button).
Comment 5 p.k 2017-05-24 05:54:10 UTC
Obviously the Diagnostic Build files are too large for Bugzilla (at least in the present configuration).

Anyway, it seems as if I have been able to resolve the issue on my own. Obviously there has been a change in the workflow (or anything) in the new version. On macOS I have chosen "Archive for Publishing" (or the like) from menu, which yielded in an IPA I have successfully been able to upload. Is this meant to work like this? Before I have always gotten a folder called something like MyAppName-2017-05-23 (or anything like this, can't remember exactly), which contained an IPA that I've been able to use. Anyway, it seems as if a correctly signed IPA is not created anymore.
Comment 6 p.k 2017-05-24 05:58:25 UTC
Created attachment 22404 [details]
Diagnostic Build Log VS2017

I have stripped about the first third, since the file has been too large to upload, I hope that this would still help
Comment 7 Vincent Dondain [MSFT] 2017-05-24 11:59:41 UTC

My understanding is that you were generating an IPA as part of the build (using the iOS IPA Options (VSMac) or its equivalent on windows) and submitting this to the Application Loader gave you the ERROR ITMS-90046.

However your workaround was to use "Archive for Publishing" (to answer your question, yes that's the recommended workflow) and submitting the build like this worked.

Is that a good summary?
Comment 8 p.k 2017-05-24 12:15:06 UTC
Yes, the summary pretty much pins down what I've been doing. The project is - kind of - oldish and contains an AppStore build target, that used to build working IPAs. Correct me if I'm wrong, but it seems to me that with newer templates the AppStore target has ceased to exist.
Comment 9 Vincent Dondain [MSFT] 2017-05-24 12:27:56 UTC
That's right the App Store build configuration doesn't exist anymore for new projects, we now only have Debug and Release.

We discovered that having too many configurations is tricky to maintain, people might not have them all in sync and you could have big differences between them. It didn't make much sense to have Release and App Store (and AdHoc) so we reduced it to just 2 configurations.
Comment 10 Jeffrey Stedfast 2017-05-24 12:31:58 UTC
The date-stamped directory changed about 6-8 months or so ago as it broke the Clean target.

The IPA should, as you've discovered, end up next to the .app directory now by default (you can override this by setting some MSBuild properties).

That said, the generated IPA should still work assuming you've selected proper codesigning keys and provisioning profiles.

You can also use the Archive for Publishing workflow if you prefer (and we recommend that way of doing things).

It looks like something isn't properly expanding the application-identifier wildcard when generating the Entitlements used for codesigning.
Comment 11 Jeffrey Stedfast 2017-06-01 17:22:10 UTC
I can't reproduce this. Do you have a bundle identifier set in your Info.plist? (CFBundleIdentifier) and if so, does it contain a *?
Comment 12 Timothy Risi 2017-07-03 18:33:41 UTC
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!