Bug 46298 - Xamarin seems to replace asterisk with bundle id in Entitlements.plist file
Summary: Xamarin seems to replace asterisk with bundle id in Entitlements.plist file
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 10.2 (iOS 10.1)
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Future Cycle (TBD)
Assignee: Jeffrey Stedfast
Depends on:
Reported: 2016-11-02 15:59 UTC by Jonathan Moosekian
Modified: 2017-01-13 21:21 UTC (History)
7 users (show)

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

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 Jonathan Moosekian 2016-11-02 15:59:13 UTC
In our iOS app, we can universally link into our app if we have the following in our Entitlements.plist file:


However, if we want to ensure subdomains are also handled by our app, Apple suggests adding the following as well:


So, the Entitlements.plist file now has this in it:


When we build our app and deploy to a device, our app will open if we tap a link like https://ourdomain.com/, but if we try https://www.ourdomain.com/ it just goes to the website via Safari.

When we looked at what the entitlements plist was in the app bundle using this command:

codesign -d --ent :- /Users/user/Projects/myproject/bin/Debug/build-iphone9.3-10.1/MyApp.app

It shows:


If we do the same things using Xcode, the end results show that the wildcard is NOT replaced as we would expect:

Comment 1 Jonathan Moosekian 2016-11-02 16:00:13 UTC
Here's my current bits:

=== Xamarin Studio Professional ===

Version 6.1.1 (build 17)
Installation UUID: e6b7c7a2-f9c2-4f5f-b1d4-a7cad7d4d849
	Mono 4.6.1 (mono-4.6.0-branch-c8sr0/ef43c15) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406010005

=== NuGet ===


=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 8.1 (11544)
Build 8B62

=== Xamarin.iOS ===

Version: (Visual Studio Professional)
Hash: b638977
Branch: xcode8.1
Build date: 2016-10-25 14:38:48-0400

=== Xamarin.Android ===

Version: (Visual Studio Professional)
Android SDK: /Users/jonathanmoosekian/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)
		7.0   (API level 24)

SDK Tools Version: 25.2.2
SDK Platform Tools Version: 24.0.3
SDK Build Tools Version: 24.0.2

Java SDK: /usr
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

Android Designer EPL code available here:

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: (Visual Studio Professional)

=== Build Information ===

Release ID: 601010017
Git revision: 44d481a9be9cf2bf7c01bfb99c59b77dfa08e712
Build date: 2016-10-25 14:27:24-04
Xamarin addins: 19cdb28081bf28d9688698030abb96e04e391f69
Build lane: monodevelop-lion-cycle8-sr0

=== Operating System ===

Mac OS X 10.12.1
Darwin Jonathans-MacBook-Pro.local 16.1.0 Darwin Kernel Version 16.1.0
    Thu Oct 13 21:26:57 PDT 2016
    root:xnu-3789.21.3~60/RELEASE_X86_64 x86_64
Comment 2 Sebastien Pouliot 2016-11-03 01:59:38 UTC
I think that it's part of the iOS Addin (XS) but Jeff or Vincent will be able to confirm (and fix it) in both cases.
Comment 3 Vincent Dondain [MSFT] 2016-11-09 15:24:52 UTC
Hi, I can confirm a couple of things. Indeed Xcode will leave the asterisk as is and I can reproduce the issue with XS/XI.

Here's the guilty code in our MSBuild tasks: https://github.com/VincentDondain/xamarin-macios/blob/master/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CompileEntitlementsTaskBase.cs#L100-L117
Comment 4 Vincent Dondain [MSFT] 2016-11-09 15:25:37 UTC
Fixed in master with PR https://github.com/xamarin/xamarin-macios/pull/1147
Comment 5 Chris Riesgo 2017-01-11 14:18:03 UTC
Has this fix gone out in a Cycle yet? I didn't see the bug number listed on any of the release notes. If it hasn't gone out, is there a target?
Comment 6 Vincent Dondain [MSFT] 2017-01-12 15:50:56 UTC

This was originally slotted for Cycle 10 but I just back-ported it so it's included in our Cycle 9 release: https://github.com/xamarin/xamarin-macios/pull/1484

I apologize for the fact it hasn't been done before.

After this is merged, the next refresh of our Xamarin.iOS 10.4 build (currently in alpha and beta channels) will include the fix.
You can still monitor the release notes to know when that happens.