Bug 15489 - Catching early problems with "Deploy to Device"
Summary: Catching early problems with "Deploy to Device"
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 8.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
: 17282 24633 ()
Depends on:
Blocks:
 
Reported: 2013-10-18 12:25 UTC by Miguel de Icaza [MSFT]
Modified: 2016-11-30 21:01 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 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:
Status:
RESOLVED FIXED

Description Miguel de Icaza [MSFT] 2013-10-18 12:25:27 UTC
I have two developer accounts, one has my new phone, the other does not.

And I have their associated provisioning profiles.

When I deploy, I get this error:

Installation failed: Your application failed code-signing checks.  Check your certificates, provisioning profiles, and bundle ids (error: 0xe8008015)
error MT1006: Could not install the application '/Users/miguel/Projects/d/d/bin/iPhone/Debug/d.app' on the device: Your application failed code-signing checks.  Check your certificates, provisioning profiles, and bundle ids (error: 0xe8008015).

Currently, automatic will just pick the first match:

Detecting signing identity...
Multiple provisioning profiles match the bundle identifier; using the first match.
  1. Provisioning Profile: "iOS Team Provisioning Profile: *" (92C2E158-5572-4FE6-9339-C0937AE25C44)
     Signing Identity: "iPhone Developer: Miguel de Icaza (QY8A78Y78J)"
  2. Provisioning Profile: "iOS Team Provisioning Profile: *" (2B4911C0-C67C-4F3E-B87F-D78318A654BD)
     Signing Identity: "iPhone Developer: Miguel de Icaza (QY8A78Y78J)"
  3. Provisioning Profile: "iOS Team Provisioning Profile: *" (344B54F7-F7E2-4E37-B9CA-1D2AD7AF5094)
     Signing Identity: "iPhone Developer: Miguel de Icaza (QY8A78Y78J)"
  4. Provisioning Profile: "iOS Team Provisioning Profile: *" (34C5E694-5DF7-4AC2-9F70-008DE530CE10)
     Signing Identity: "iPhone Developer: Miguel de Icaza (QY8A78Y78J)"
  5. Provisioning Profile: "iOS Team Provisioning Profile: *" (A6B112A3-B2B7-4CB6-93A4-F9DB857F33F3)
     Signing Identity: "iPhone Developer: Miguel de Icaza (TF98428RV4)"
  6. Provisioning Profile: "iOS Team Provisioning Profile: *" (6C5788FB-542D-4C0E-964D-072EB00828C9)
     Signing Identity: "iPhone Developer: Miguel de Icaza (QY8A78Y78J)"
Provisioning Profile: "iOS Team Provisioning Profile: *" (92C2E158-5572-4FE6-9339-C0937AE25C44)
Signing Identity: "iPhone Developer: Miguel de Icaza (QY8A78Y78J)"


The one that actually works is #5 above (TF98428RV4)

We could improve our matching in the "automatic" mode to look for the currently selected device in the mobileprovision file in Library/MobileDevice/Provisioning Profiles, the actual provisioning profile contains the list of devices it works with inside those files.

You can open those files with this command:

openssl smime -inform der -verify -noverify -in file.mobileprovision

The resulting plist, contains the section ProvisionedDevices, and on it, the device UUID.

Details about the encoding are here:

http://stackoverflow.com/questions/6398364/parsing-mobileprovision-files-in-bash

We probably should cache the contents of running those tools.
Comment 1 Jeffrey Stedfast 2014-01-28 17:05:57 UTC
*** Bug 17282 has been marked as a duplicate of this bug. ***
Comment 2 Jeffrey Stedfast 2014-01-28 17:22:58 UTC
I've been talking to mhutch and the solution we came up with for MSBuild was to have a DeviceUID property in the .csproj (that could be overriden in a .user file).

Then, in the autodetection logic, we could match the first provisioning profile that has a device uid matching the specified device uid.

The UI would invoke xbuild with the proper /property:<name>=<value> argument.
Comment 3 Miguel de Icaza [MSFT] 2014-01-28 17:31:08 UTC
I love it.

We should handle the case where we do not have the provisioning profile.
Comment 4 Jeffrey Stedfast 2014-11-19 15:33:51 UTC
*** Bug 24633 has been marked as a duplicate of this bug. ***
Comment 5 Rustam Zaitov 2015-05-04 13:18:47 UTC
The issue is still here. "About XS"
https://gist.github.com/rzaitov/fda0f03c96429fbabdb2
Comment 6 Mikayla Hutchinson [MSFT] 2015-10-21 15:45:54 UTC
@jeff device specific builds should have taken care of the core issue here.

Just wondering about a couple of other cases. What happens when
1) we don't find a provisioning profile for the device?
2) we would for one device, then unplug it, plug in another that isn't included in the provisioning profile, and deploy to that?
Comment 7 Jeffrey Stedfast 2015-11-18 15:08:34 UTC
I think both of those conditions will fail currently