Bug 27450 - AppStore Unified Builds Cannot be Signed - No OS X code signing key
Summary: AppStore Unified Builds Cannot be Signed - No OS X code signing key
Status: RESOLVED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: 1.12.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Chris Hamons
URL:
Depends on:
Blocks:
 
Reported: 2015-02-26 05:31 UTC by David Lilley
Modified: 2015-02-27 15:48 UTC (History)
2 users (show)

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


Attachments
Build Log for attached MyTest - Unified (6.14 KB, text/plain)
2015-02-27 03:47 UTC, David Lilley
Details


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 David Lilley 2015-02-26 05:31:31 UTC
Create 2 Brand new Applications 

One Unified
One Classic

Copied the Same Plist and Entitlements Over to the Applications

Using the Same Cert and ProvisionProfile

For the Unified Project I Get

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets: error : No OS X code signing key matches specified provisioning profile 'fdf009fb-60c8-43ea-9fb5-7178a3a4400f'.
	Task "DetectSigningIdentityTask" execution -- FAILED
	Done building target "_DetectSigningIdentity" in project "/Users/davidlilley/Projects/MacBanking4XUni/MacBanking4XUni/MacBanking4XUni.csproj".-- FAILED
	
Done building project "/Users/davidlilley/Projects/MacBanking4XUni/MacBanking4XUni/MacBanking4XUni.csproj".-- FAILED
Comment 2 David Lilley 2015-02-26 05:39:33 UTC
=== Xamarin Studio ===

Version 5.7.2 (build 7)
Installation UUID: 974acce5-5296-4842-81d8-fad813eef863
Runtime:
	Mono 3.12.0 ((detached/b8f5055)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000077

=== Xamarin.Android ===

Not Installed

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.2.22 (Business Edition)
Hash: 862702c
Branch: 
Build date: 2015-02-18 15:19:23-0500

=== Xamarin.Mac ===

Version: 1.12.0.8 (Business Edition)

=== Build Information ===

Release ID: 507020007
Git revision: dcf3f486177d3e625349b51a8f3be807e3fa7712
Build date: 2015-02-24 09:14:27-05
Xamarin addins: ea7c65bb7876e4a876ab365208e94acdf8f330ef

=== Operating System ===

Mac OS X 10.10.2
Darwin Davids-iMac.local 14.1.0 Darwin Kernel Version 14.1.0
    Mon Dec 22 23:10:38 PST 2014
    root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
Comment 3 Rajneesh Kumar 2015-02-26 06:05:05 UTC

*** This bug has been marked as a duplicate of bug 26955 ***
Comment 4 Chris Hamons 2015-02-26 16:02:15 UTC
Sorry David,

Yes, while this is a duplicate of an issue we are looking at internally, I want to keep this one open to get more details.

Could you post a full build long showing the issue? We're trying to track down the problem.
Comment 5 Jeffrey Stedfast 2015-02-26 16:35:43 UTC
I'm going to have Chris link you to a new build with a bunch of extra debug logging that will hopefully help narrow down the problem.

The error that you are seeing suggests that the provisioning profile you selected cannot be used with the certificate that you selected. Hopefully the extra logging will show us why it is getting this result.

*** This bug has been marked as a duplicate of bug 26955 ***
Comment 6 Chris Hamons 2015-02-26 16:44:24 UTC
Here is the build Jeff was talking about:

https://www.dropbox.com/s/27vizh8cjk3s5f8/xamarin.mac-1.12.0.8-extra-logging.pkg?dl=0

Could you please install it, restart XS (if open) and build your project again. Please attach the full build log.
Comment 7 David Lilley 2015-02-27 03:47:43 UTC
Created attachment 10072 [details]
Build Log for attached MyTest - Unified

Build Log for attached MyTest - Unified
Comment 9 Jeffrey Stedfast 2015-02-27 10:10:59 UTC
Hi David,

The _DetectSigningIdentity output was not part of the full build log (and in the MyTest build log, it is not printing out the log messages that I added - are you sure those are from the new Xamarin.Mac?)
Comment 10 David Lilley 2015-02-27 10:18:01 UTC
Redownloaded and Reinstalled from the link

https://www.dropbox.com/s/27vizh8cjk3s5f8/xamarin.mac-1.12.0.8-extra-logging.pkg?dl=0

Building: MacBanking4XUni (AppStore)

Build started 2/27/2015 4:17:05 PM.
__________________________________________________
Project "/Users/davidlilley/Projects/B4XUnified/MacBanking4XUni/MacBanking4XUni.csproj" (Build target(s)):
	
	Target _DetectAppManifest:
		FindItemWithLogicalName Task
		  Items:
		    Info.plist
		    Entitlements.plist
		  LogicalName: Info.plist
		  ProjectDir: /Users/davidlilley/Projects/B4XUnified/MacBanking4XUni
		  ResourcePrefix: Resources
	
	Target _DetectSdkLocations:
		DetectSdkLocations Task
		  SdkVersion: <null>
		  XamarinSdkRoot: <null>
	
	Target _CoreCompileInterfaceDefinitions:
		IBTool Task
		  AppManifest: Info.plist
		  InterfaceDefinitions:
		    MainWindow.xib
		    MainMenu.xib
		  IntermediateOutputPath: obj/AppStore/
		  Platform: AnyCPU
		  ResourcePrefix: Resources
		  SdkBinPath: /Applications/Xcode.app/Contents/Developer/usr/bin
		  SdkRoot: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
		  SdkVersion: 10.10
		Tool /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool execution started with arguments: --errors --warnings --notices --output-format xml1 --minimum-deployment-target 10.10 --sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk --compile /Users/davidlilley/Projects/B4XUnified/MacBanking4XUni/obj/AppStore/ibtool/MainWindow.nib /Users/davidlilley/Projects/B4XUnified/MacBanking4XUni/MainWindow.xib
		Tool /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool execution started with arguments: --errors --warnings --notices --output-format xml1 --minimum-deployment-target 10.10 --sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk --compile /Users/davidlilley/Projects/B4XUnified/MacBanking4XUni/obj/AppStore/ibtool/MainMenu.nib /Users/davidlilley/Projects/B4XUnified/MacBanking4XUni/MainMenu.xib
	
	Target _CoreCompileSceneKitAssets:
		CompileSceneKitAssets Task
		  IntermediateOutputPath: obj/AppStore/
		  ProjectDir: /Users/davidlilley/Projects/B4XUnified/MacBanking4XUni
		  ResourcePrefix: Resources
		  SceneKitAssets:
		  SdkDevPath: /Applications/Xcode.app/Contents/Developer
		  SdkRoot: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
		  SdkVersion: 10.10
	
	Target _CollectColladaAssets:
		CollectBundleResources Task
		  BundleResources: <null>
		  OptimizePNGs: False
		  ProjectDir: /Users/davidlilley/Projects/B4XUnified/MacBanking4XUni
		  ResourcePrefix: Resources
	
	Target _CoreCompileColladaAssets:
	No input files were specified for target _CoreCompileColladaAssets, skipping.
	
	Target _CoreCompileTextureAtlases:
		TextureAtlas Task
		  AtlasTextures: <null>
		  IntermediateOutputPath: obj/AppStore/
		  ProjectDir: /Users/davidlilley/Projects/B4XUnified/MacBanking4XUni
		  ResourcePrefix: Resources
		  SdkBinPath: /Applications/Xcode.app/Contents/Developer/usr/bin
		  SdkDevPath: /Applications/Xcode.app/Contents/Developer
		  SdkUsrPath: /Applications/Xcode.app/Contents/Developer/usr
	
	Target _CollectBundleResources:
		CollectBundleResources Task
		  BundleResources:
		  OptimizePNGs: False
		  ProjectDir: /Users/davidlilley/Projects/B4XUnified/MacBanking4XUni
		  ResourcePrefix: Resources
	
	Target PrepareForBuild:
		Configuration: AppStore Platform: AnyCPU
	
	Target _UnpackLibraryResources:
		UnpackLibraryResources Task
		  IntermediateOutputPath: obj/AppStore/
		  Prefix: xammac
		  ReferencedLibraries:
		    /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/System.dll
		    /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/System.Core.dll
		    /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/Xamarin.Mac.dll
		    /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/mscorlib.dll
	
	Target GenerateSatelliteAssemblies:
	No input files were specified for target GenerateSatelliteAssemblies, skipping.
	
	Target CoreCompile:
		Tool /Library/Frameworks/Mono.framework/Commands/mcs execution started with arguments: /noconfig /debug:full /optimize+ /out:obj/AppStore/MacBanking4XUni.exe MainWindow.cs MainWindow.designer.cs MainWindowController.cs MainWindowController.designer.cs Main.cs AppDelegate.cs AppDelegate.designer.cs obj/AppStore/Xamarin.Mac,Version=v2.0.AssemblyAttribute.cs /target:exe /define:__UNIFIED__ /nostdlib /reference:/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/System.dll /reference:/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/System.Core.dll /reference:/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/Xamarin.Mac.dll /reference:/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/mscorlib.dll /warn:4
	
	Target DeployOutputFiles:
		Copying file from '/Users/davidlilley/Projects/B4XUnified/MacBanking4XUni/obj/AppStore/MacBanking4XUni.exe.mdb' to '/Users/davidlilley/Projects/B4XUnified/MacBanking4XUni/bin/AppStore/MacBanking4XUni.exe.mdb'
		Copying file from '/Users/davidlilley/Projects/B4XUnified/MacBanking4XUni/obj/AppStore/MacBanking4XUni.exe' to '/Users/davidlilley/Projects/B4XUnified/MacBanking4XUni/bin/AppStore/MacBanking4XUni.exe'
	
	Target _DetectSigningIdentity:
		DetectSigningIdentity Task
		  AppBundleName: MacBanking4XUni
		  AppManifest: Info.plist
		  RequireCodesigning: True
		  Platform: AnyCPU
		  ProvisioningProfile: fdf009fb-60c8-43ea-9fb5-7178a3a4400f
		  SigningKey: <null>
		Scanning Keychain for Development certificates...
		Matched codesigning certificates:
		    Name="Mac Developer: David Lilley (65P3C659TZ)"; Fingerprint=7A34CB3289B4A46C61A422282FEFC37663E3C2AE
		The specified provisioning profile can be used with any of the following certificates:
		    Name="3rd Party Mac Developer Application: Subsembly GmbH (PT9SVRT2UX)"; Fingerprint=CB24C0BF7228F44191E365ACA1558D25FEBD5FC0
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets: error : No OS X code signing key matches specified provisioning profile 'fdf009fb-60c8-43ea-9fb5-7178a3a4400f'.
	Task "DetectSigningIdentityTask" execution -- FAILED
	Done building target "_DetectSigningIdentity" in project "/Users/davidlilley/Projects/B4XUnified/MacBanking4XUni/MacBanking4XUni.csproj".-- FAILED
	
Done building project "/Users/davidlilley/Projects/B4XUnified/MacBanking4XUni/MacBanking4XUni.csproj".-- FAILED

Build FAILED.
Errors:

/Users/davidlilley/Projects/B4XUnified/MacBanking4XUni/MacBanking4XUni.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets (_DetectSigningIdentity target) ->

	/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets: error : No OS X code signing key matches specified provisioning profile 'fdf009fb-60c8-43ea-9fb5-7178a3a4400f'.

	 0 Warning(s)
	 1 Error(s)

Time Elapsed 00:00:01.0541760

---------------------- Done ----------------------

Build: 1 error, 0 warnings
Comment 11 Jeffrey Stedfast 2015-02-27 11:44:58 UTC
The problem is a typo in Xamarin.Mac.Common.targets

The _DetectSigningIdentity target should look like this (note the spelling of "$(CodeSingingKey)" which was incorrectly spelled "$(CodesignKey)" and thus evaluated to <null>):

	<Target Name="_DetectSigningIdentity">
		<DetectSigningIdentityTask
			AppBundleName="$(_AppBundleName)"
			AppManifest="$(_AppManifest)"
			RequireCodeSigning="$(EnableCodeSigning)"
			Platform="$(Platform)"
			ProvisioningProfile="$(CodeSignProvision)"
			SigningKey="$(CodeSigningKey)"
			>
			<Output TaskParameter="DetectedAppId" PropertyName="_AppIdentifier" />
			<Output TaskParameter="DetectedBundleId" PropertyName="_BundleIdentifier" />
			<Output TaskParameter="DetectedCodeSigningKey" PropertyName="_CodeSigningKey" />
			<Output TaskParameter="DetectedCodesignAllocate" PropertyName="_CodesignAllocate" />
			<Output TaskParameter="DetectedProvisioningProfile" PropertyName="_ProvisioningProfile" />
		</DetectSigningIdentityTask>
	</Target>