Bug 60384 - Unable to deploy Xamarin Forms app release mode to iPhone
Summary: Unable to deploy Xamarin Forms app release mode to iPhone
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-10-26 02:04 UTC by Shay
Modified: 2017-12-04 15:33 UTC (History)
3 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 Shay 2017-10-26 02:04:52 UTC
This issue suddenly started today after I updated one of the packages.
I can compile (both debug & release). I can deploy debug on my iPhone (5c, 10.3.3), but release failed with the following error (see below).

My certificates and provision are all in order. I was able to Archive the app and upload to the app store.
Not sure why this is happening.
I tried uninstalling the app (didn't help). Deleting obj+bin folder (didn't help). Restarting VS (didn't help).

CopyingFile - PercentComplete: 99%
 CreatingStagingDirectory - PercentComplete: 5%
 ExtractingPackage - PercentComplete: 15%
 InspectingPackage - PercentComplete: 20%
 TakingInstallLock - PercentComplete: 20%
 PreflightingApplication - PercentComplete: 30%
 InstallingEmbeddedProfile - PercentComplete: 30%
 VerifyingApplication - PercentComplete: 40%
 ApplicationVerificationFailed: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.BDBbTF/extracted/ClimbTag.iOS.app : 0xe8008015 (A valid provisioning profile for this executable was not found.)
error MT1006: Could not install the application '/Users/shayo/Projects/ClimbTag/iOS/bin/iPhone/Release/ClimbTag.iOS.app' on the device 'iPhone5cBlue': Your application failed code-signing checks.  Check your certificates, provisioning profiles, and bundle ids.   Probably your device is not part of the selected provisioning profile (error: 0xe8008015).
--- inner exception
Xamarin.Installation.FailedInstallException: Your application failed code-signing checks.  Check your certificates, provisioning profiles, and bundle ids.   Probably your device is not part of the selected provisioning profile (error: 0xe8008015)
  at Xamarin.Installation.InstallationProxyService.InstallApplicationBundle (System.String app_path, Xamarin.Hosting.ProgressCallback callback, System.String shadow_directory) [0x000f5] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Launcher/InstallationProxyService.cs:110 
  at Xamarin.Launcher.DevController.InstallApplicationBundle (Xamarin.Hosting.RealDevice d, Xamarin.Hosting.AppBundle bundle, System.String shadow_directory) [0x00038] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Launcher/controller-device.cs:162 
  at Xamarin.Launcher.DevController+<>c__DisplayClass5_1.<InstallApplicationBundleAsync>b__0 () [0x00000] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Launcher/controller-device.cs:127 
  at Xamarin.Hosting.RealDevice.ExecuteWithSession (System.Action action) [0x00010] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Hosting/RealDevice.cs:367 
  at Xamarin.Launcher.DevController+<InstallApplicationBundleAsync>d__5.MoveNext () [0x000b8] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Launcher/controller-device.cs:127 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.Mac.framework/Versions/ 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.Mac.framework/Versions/ 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.Mac.framework/Versions/ 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.Mac.framework/Versions/ 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/ 
  at Xamarin.Launcher.DevController+<InstallApplicationAsync>d__4.MoveNext () [0x0024a] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Launcher/controller-device.cs:105 
  at Xamarin.Launcher.DevController+<InstallApplicationAsync>d__4.MoveNext () [0x002dd] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Launcher/controller-device.cs:114 
--- End of stack trace from previous location where exception was thrown ---
  at Xamarin.Utils.NSRunLoopExtensions.RunUntilTaskCompletion[T] (Foundation.NSRunLoop this, System.Threading.Tasks.Task`1[TResult] task) [0x00082] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Utils/Extensions.cs:35 
  at Xamarin.Launcher.Driver.Main2 (System.String[] args) [0x00a90] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Launcher/Main.cs:432 
  at Xamarin.Launcher.Driver.Main (System.String[] args) [0x0006d] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Launcher/Main.cs:139 

Application could not be uploaded to the device.

=== Visual Studio Community 2017 for Mac ===

Version 7.2 (build 636)
Installation UUID: 5a97e187-2c14-4d53-a54f-17a33ec3752e
	Mono (2017-06/71277e78f6e) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 504000201

=== NuGet ===


=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 2.0.0
SDK: /usr/local/share/dotnet/sdk/2.0.0/Sdks
SDK Version: 2.0.0
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.6
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 9.0.1 (13249)
Build 9A1004

=== Xamarin.Mac ===

Version: (Visual Studio Community)

=== Xamarin.Android ===

Version: (Visual Studio Community)
Android SDK: /Users/shayo/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)
		7.0    (API level 24)
		7.1    (API level 25)

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

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

Android Designer EPL code available here:

=== Xamarin Inspector ===

Version: 1.3.2
Hash: 461f09a
Branch: 1.3-release
Build date: Tue, 03 Oct 2017 18:26:57 GMT
Client compatibility: 1

=== Xamarin.iOS ===

Version: (Visual Studio Community)
Hash: 2f8bbec0
Branch: d15-4-xi
Build date: 2017-10-05 20:56:05-0400

=== Build Information ===

Release ID: 702000636
Git revision: b349c8fc0c2e1aab0179917d56eed75eb3a03337
Build date: 2017-10-06 15:20:04-04
Xamarin addins: a8da992c78f7eb65b3cdb3f951c34a30337cab35
Build lane: monodevelop-lion-d15-4

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Comment 1 Paul DiPietro [MSFT] 2017-10-26 03:03:49 UTC
Updated which package?
Comment 2 Shay 2017-10-26 03:22:02 UTC
It was the Permission Plugin

I believe this was the only major change that was done since the previous (successful compilation & testing).
Comment 3 Shay 2017-10-27 15:20:28 UTC
This may be related to Xcode automatic update.
I recently found that when I ran Xcode, it asked me to install some new components. I assume this is after the upgrade to version 9.0.1
Does the stable VS for mac (7.2, build 636) supports Xcode 9.0.1? or do I need to switch to some alpha version? 
Can this be the cause of not able to install in release mode?
This has now been replicated on two separate machines.
Comment 4 Phil 2017-10-27 21:17:17 UTC
Same here +Shay. Updated XCode w/ "new components" and now it's not working.
Comment 5 Shay 2017-10-27 21:20:17 UTC
Phil, do you have a small example where this happens?
I only tried this on our big project.
Comment 6 Phil 2017-10-27 23:39:41 UTC
Unfortunately not, just a big project.
Comment 7 Phil 2017-11-01 15:03:51 UTC
Apparently the Xcode update was just a coincidence in my case. Someone on our team had turned on a new feature accidentally (ApplePay) and none of our provisioning profiles were set up to work with ApplePay yet and that is what was causing the problem.
Comment 8 Paul DiPietro [MSFT] 2017-12-04 15:33:47 UTC
As we don't have a reproduction this will be closed for the time being. Please reopen this issue with a reproduction project if this still occurs with the latest Forms 2.5.0 stable on the latest version of VS.

Guidelines for creating reproductions are available at: