Bug 26773 - Embedded Profile is not exported with the App
Summary: Embedded Profile is not exported with the App
Status: VERIFIED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: 1.11.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 2.0.x
Assignee: Chris Hamons
URL:
Depends on:
Blocks:
 
Reported: 2015-02-05 09:54 UTC by David Lilley
Modified: 2015-03-05 01:23 UTC (History)
5 users (show)

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


Attachments
Signature Setup (120.93 KB, image/png)
2015-02-12 04:45 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:
VERIFIED FIXED

Description David Lilley 2015-02-05 09:54:38 UTC
When creating an App, I have noticed the Embedded Provisioning Profile is not exported with the App.

I have recreated my Cert and Provision Profiles and multiple builds all fail with the following below.

The only way I can get it to run is to manually install the profile myself.

05/02/15 15:46:13,284 taskgated-helper[785]: Failed reading data: Error Domain=NSCocoaErrorDomain Code=260 "The file “embedded.provisionprofile” couldn’t be opened because there is no such file." UserInfo=0x7fcb01d16690 {NSFilePath=/Users/davidlilley/Code/Subsembly_Banking/MacBanking/bin/Debug/Banking4X.app/Contents/embedded.provisionprofile, NSUnderlyingError=0x7fcb01d188d0 "The operation couldn’t be completed. No such file or directory"}
05/02/15 15:46:13,284 taskgated-helper[785]: returning 0 provisioning profiles
05/02/15 15:46:13,284 taskgated-helper[785]: none of the 0 applicable provisioning profile(s) apply
05/02/15 15:46:13,284 taskgated-helper[785]: CPValidateProvisioningDictionaries returning NO with error: (null)
05/02/15 15:46:13,285 taskgated[70]: killed com.Subsembly.Banking4X[pid 815] because its use of the com.apple.developer.ubiquity-container-identifiers entitlement is not allowed (error code -67050)
05/02/15 15:46:13,301 com.apple.xpc.launchd[1]: (com.apple.ReportCrash[819]) Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.ReportCrash
05/02/15 15:46:13,327 com.apple.xpc.launchd[1]: (com.apple.imfoundation.IMRemoteURLConnectionAgent) The _DirtyJetsamMemoryLimit key is not available on this platform.
05/02/15 15:46:13,364 com.apple.xpc.launchd[1]: (com.apple.imfoundation.IMRemoteURLConnectionAgent) The _DirtyJetsamMemoryLimit key is not available on this platform.
05/02/15 15:46:13,368 ReportCrash[819]: Trying to extract VM information using cr2
05/02/15 15:46:13,388 com.apple.xpc.launchd[1]: (com.Subsembly.Banking4X.246828.0BA13FDE-04F6-4DAE-8040-A49F3DB28EF7[815]) Binary is improperly signed.
05/02/15 15:46:13,753 ReportCrash[819]: Saved crash report for Banking4X[815] version ??? to /Users/davidlilley/Library/Logs/DiagnosticReports/Banking4X_2015-02-05-154613_Davids-iMac.crash
Comment 1 David Lilley 2015-02-05 10:01:29 UTC
=== Xamarin Studio ===

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

	Package version: 312000068

=== Xamarin.Android ===

Not Installed

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.1.20 (Business Edition)
Hash: 3b3ef43
Branch: 
Build date: 2015-01-24 09:42:21-0500

=== Xamarin.Mac ===

Version: 1.12.0.4 (Business Edition)

=== Build Information ===

Release ID: 507010014
Git revision: a4dd61ad7f8b3695be4b17bcb5c3ae6b81438cf7
Build date: 2015-01-19 15:21:09-05
Xamarin addins: 081208fe3bbf40e24a562867c6c7fba20a9b94b6

=== 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 2 Chris Hamons 2015-02-05 10:38:17 UTC
I posted this on the forums:

Could one/both of you guys try to downgrade to stable and install just the XM
1.12 package:

https://www.dropbox.com/s/yd5duddbwi88lv9/xamarin.mac-1.12.0.4-1-2.pkg?dl=0

That way we can isolate it to XS or XM.

Also, are you using unified or classic guys? Right now they are completely
different build systems, so you need to specify which one you are using for
bugs like this.
Comment 3 David Lilley 2015-02-05 11:07:07 UTC
Just Tested :)

Same as Before

05/02/15 17:04:10,973 taskgated-helper[1612]: Failed reading data: Error Domain=NSCocoaErrorDomain Code=260 "The file “embedded.provisionprofile” couldn’t be opened because there is no such file." UserInfo=0x7fc3b8d00de0 {NSFilePath=/Users/davidlilley/Code/Subsembly_Banking/MacBanking/bin/Debug/Banking4X.app/Contents/embedded.provisionprofile, NSUnderlyingError=0x7fc3b8d275e0 "The operation couldn’t be completed. No such file or directory"}
05/02/15 17:04:10,973 taskgated-helper[1612]: returning 0 provisioning profiles
05/02/15 17:04:10,973 taskgated-helper[1612]: none of the 0 applicable provisioning profile(s) apply
05/02/15 17:04:10,973 taskgated-helper[1612]: CPValidateProvisioningDictionaries returning NO with error: (null)
05/02/15 17:04:10,974 taskgated[70]: killed com.Subsembly.Banking4X[pid 1674] because its use of the com.apple.developer.ubiquity-container-identifiers entitlement is not allowed (error code -67050)
05/02/15 17:04:11,020 ReportCrash[1650]: Trying to extract VM information using cr2
05/02/15 17:04:11,023 com.apple.xpc.launchd[1]: (com.Subsembly.Banking4X.246828.62F0FB68-85E6-478B-8630-2A8C98245557[1674]) Binary is improperly signed.
05/02/15 17:04:11,330 ReportCrash[1650]: Saved crash report for Banking4X[1674] version ??? to /Users/davidlilley/Library/Logs/DiagnosticReports/Banking4X_2015-02-05-170411_Davids-iMac.crash
05/02/15 17:04:11,331 ReportCrash[1650]: Removing excessive log: file:///Users/davidlilley/Library/Logs/DiagnosticReports/Banking4X_2015-02-05-120620_Davids-iMac.crash
Comment 4 David Lilley 2015-02-05 11:07:37 UTC
=== Xamarin Studio ===

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

	Package version: 312000068

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.Android ===

Not Installed

=== Xamarin.iOS ===

Version: 8.6.0.51 (Business Edition)
Hash: dfb682f
Branch: 
Build date: 2015-01-08 13:39:32-0500

=== Xamarin.Mac ===

Version: 1.12.0.4 (Business Edition)

=== Build Information ===

Release ID: 507000661
Git revision: b70bab61da996da29045ea8ee8aed1a6faedbe78
Build date: 2015-01-05 16:31:31-05
Xamarin addins: 82f6c71490562d6cd125a09287f441902fdac3d7

=== 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 5 Chris Hamons 2015-02-05 11:09:08 UTC
@David - so XS 5.7 and XM 1.12 fails. Can you confirm that XS 5.7 and XM 1.10 works? If so it is a regression in XM 1.10 to 1.12.
Comment 6 David Lilley 2015-02-05 11:15:14 UTC
I am using unified API so reverting to 1.10 I am getting a lot nint -> int issues.
Comment 8 David Lilley 2015-02-05 11:39:23 UTC
Hi Chris 

I have uploaded my test case.

On Beta I have seen the crash
On Stable this works

I have yet too Stable with XM 1.12 but since my big project file crash i suspect this will to
Comment 9 David Lilley 2015-02-05 12:01:31 UTC
So Testing Complete.

Beta -> Fails.
Stable with XM 1.12 Fails.
Stable with XM 1.10 Works.
Comment 10 Chris Hamons 2015-02-05 12:38:06 UTC
@David

Could you test with this build:

https://www.dropbox.com/s/6yy728b852tdbrw/xamarin.mac-1.12.0.4_msbuild.pkg?dl=0

We believe it may have the issue fixed.
Comment 12 David Lilley 2015-02-05 16:42:15 UTC
@Chris does the test build matter if it the build is Stable or Beta ? I suspect not ?
Comment 13 Chris Hamons 2015-02-05 16:43:17 UTC
Negative. Though test it with the beta just because those builds would be going out togeather.
Comment 14 Chris Hamons 2015-02-05 17:30:44 UTC
Fixed in master. Working on pick to 1.12
Comment 15 info 2015-02-09 03:26:47 UTC
@Chris As Dave is not back in the office before Wednesday, I tried your Xamarin.Mac build with our project and I can confirm that the provisioning profile is now embedded in the App bundle and the App bundle now works fine on un-provisioned Macs. Thank you very much!
Comment 16 David Lilley 2015-02-11 05:33:17 UTC
Hi @Chris,
Just tested the app further and the profile does not appear to make it in to PKG.
Comment 17 David Lilley 2015-02-11 05:51:16 UTC
Also noted when removing signing and provision profile (To Make a non signed build)

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets: error : Error executing task EmbedProvisionProfileTask: Required property 'ProvisioningProfile' not set.
Comment 18 Chris Hamons 2015-02-11 10:27:00 UTC
@David. Yeah. We caught that yesterday and have it fixed. Taking a look at the pkg issue..
Comment 20 Chris Hamons 2015-02-11 15:26:03 UTC
@David - We've found what could be your issue.

Are you selecting "Automatic" or something similar for your key / profile options in the dialog?

Try this build:

https://www.dropbox.com/s/nww0bq844po5otp/xamarin.mac-1.12.0.6.pkg?dl=0

as it has a fix for unified when selecting option of that type. I was using a specific instance, which is why I was not seeing the issue.
Comment 23 David Lilley 2015-02-12 04:45:11 UTC
Created attachment 9789 [details]
Signature Setup
Comment 24 David Lilley 2015-02-12 04:46:53 UTC
PS I Tested with suggested package
Comment 25 David Lilley 2015-02-18 03:51:51 UTC
Hi @Chris, Do you have all the info you need now ? Do you see the issue ?
Comment 26 David Lilley 2015-02-20 05:20:56 UTC
Hi @Chris,

I have managed to create manual build of the pkg and this works.

The differences between the packages is Xamarin built package does not have the following:
./Banking4X.app/Contents/_CodeSignature/CodeResources: 
./Banking4X.app/Contents/embedded.provisionprofile:
.
Comment 27 Chris Hamons 2015-02-20 10:04:14 UTC
@David, I'll take a look today.
Comment 28 David Lilley 2015-02-20 10:07:54 UTC
@Chris Thanks
Comment 29 Chris Hamons 2015-02-20 15:30:04 UTC
@David

I used the newest/latest XM 1.12 that we haven't released yet:

https://www.dropbox.com/s/al5n5ai3czw83dk/xamarin.mac-1.12.0.8.pkg?dl=0 (uploading now).

and I think it has been fixed now:

bash-3.2$ find SigningTestFriday.app
SigningTestFriday.app
SigningTestFriday.app/Contents
SigningTestFriday.app/Contents/_CodeSignature
--->    SigningTestFriday.app/Contents/_CodeSignature/CodeResources
--->    SigningTestFriday.app/Contents/embedded.provisionprofile
SigningTestFriday.app/Contents/Info.plist
SigningTestFriday.app/Contents/MacOS
SigningTestFriday.app/Contents/MacOS/SigningTestFriday
SigningTestFriday.app/Contents/MonoBundle
SigningTestFriday.app/Contents/MonoBundle/config
SigningTestFriday.app/Contents/MonoBundle/mscorlib.dll
SigningTestFriday.app/Contents/MonoBundle/SigningTestFriday.exe
SigningTestFriday.app/Contents/MonoBundle/System.Core.dll
SigningTestFriday.app/Contents/MonoBundle/System.dll
SigningTestFriday.app/Contents/MonoBundle/Xamarin.Mac.dll
SigningTestFriday.app/Contents/Resources
SigningTestFriday.app/Contents/Resources/archived-expanded-entitlements.xcent
SigningTestFriday.app/Contents/Resources/MainMenu.nib
SigningTestFriday.app/Contents/Resources/MainWindow.nib

Please try that and get back to me. That is the version we're testing to go out to Alpha/Beta soonish.
Comment 30 David Lilley 2015-02-25 04:10:49 UTC
@Chris

My Apologies for the delay and it does work :) I tested from the Beta Channel.
Comment 32 Chris Hamons 2015-02-25 08:49:47 UTC
Awesome! This should be in stable in a week or so.
Comment 33 Udham Singh 2015-03-05 01:23:43 UTC
As per comment 30, I am closing this issue. Thanks!