Bug 25141 - Adding Entitlements.plist Not Updating iOS Project File Correctly In Visual Studio
Summary: Adding Entitlements.plist Not Updating iOS Project File Correctly In Visual S...
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.8
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-12-07 21:46 UTC by Andrew
Modified: 2016-12-22 17:43 UTC (History)
5 users (show)

Tags:
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 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:
Status:
RESOLVED FIXED

Description Andrew 2014-12-07 21:46:51 UTC
In Xamarin Studio on Mac OS X, when you right click on an iOS Project and choose Add -> New File and add the Entitlements.plist file to the project, Xamarin Studio correctly modifies the iOS Project file to add <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> to each of the configurations in the Project file and also correctly sets the build action of the Entitlements.plist file to None.

In Visual Studio 2013 on Windows 8.1, when you click click on an iOS Project and choose Add -> New Item and add the Entitlements.plist file to the project, Visual Studio doesn't correctly modify the iOS Project file. It doesn't add <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> to any of the configurations in the Project file and it also sets the build action of the Entitlements.plist file to Content instead of None to match what Xamarin Studio on the Mac does.

This is a problem because to use the new TestFlight beta testing provided through iTunes Connect, you need to add
  <key>beta-reports-active</key>
  <true/>
to the Entitlements.plist file or else it won't allow you to use the TestFlight beta testing. This bug means that iOS projects that are built using Visual Studio on Windows aren't correctly configured for TestFlight testing when using it through iTunes Connect.
Comment 1 Arpit Jha 2014-12-15 05:00:58 UTC
I have checked this issue and able to reproduce with the help of bug description.

I have followed the following steps to reproduce it

1.Create a xamarin ios  classic->iphone -> single view application.
2.Added Entitlements.plist.
3.Checked Entitlements.plist in .csproj file.
4.Observed that <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> not found in .csproj file.
5.Checked Build Action of Entitlements.plist from right click of Entitlements.plist->properties->Build Action.

6.Observed that Entitlements.plist Build Action is set to Content.


Screencast: http://www.screencast.com/t/OMXyGuJ3

Supplement Info:
Ide logs:  https://gist.github.com/Arpit360/7e4dcff5e66fef7653b1
mtbserver logs : https://gist.github.com/Arpit360/9bd300753ad2a301b356

Environment Info:
Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.53344

Installed Version: Professional

Xamarin   3.8.150.0 (10cfd178d55287f09c85f5a1e604dfe20889a40f)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.20.0.28 (ba9bbbdd44cfdc4bf485e8885bd2ad24fba525f7)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.4.0.0 (840a925103a0bf4a856507f13d5eaee3c1579c2f)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified

XI -> 8.4.0.43
Build host: 3.8.0.145
Comment 2 mag@xamarin.com 2016-12-22 17:43:48 UTC
This issue is already fixed. Please verify it by downloading latest Xamarin for Visual Studio versions.