Bug 23303 - Unable to deploy to device
Summary: Unable to deploy to device
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: 5.4
Hardware: Macintosh Mac OS
: High normal
Target Milestone: 5.5.4
Assignee: Jeffrey Stedfast
URL:
: 24185 ()
Depends on:
Blocks:
 
Reported: 2014-09-23 15:41 UTC by Neal
Modified: 2015-06-18 20:31 UTC (History)
12 users (show)

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


Attachments
Signing dialog (100.10 KB, image/jpeg)
2014-09-26 16:51 UTC, Neal
Details
Embedded_Mobileprovision (115.59 KB, application/x-apple-aspen-mobileprovision)
2014-11-12 09:13 UTC, Saurabh
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 Neal 2014-09-23 15:41:05 UTC
Hello,

I'm trying to deploy my app in development to an iPhone 6 Plus on iOS 8 with XCode 6.0.1.  I am getting the error below.  I've tried cleaning the solution, deleting obj/bin folders, power cycling the device, manually installing Apple provisioning profiles through XCode, changing the signing settings from Automatic, nothing is working.

Installing application bundle
writeDictToFile:1249 open failed for /Users/Neal/Dev/ncsoftware/apdlCustomContainerModel/apdl/obj/iPhone/Release/mtouch-cache/install-shadow-directory/5708903205471db87fa26d2e2be9f80c/589ef0fc2e0e61843d31e739445f2180268686a7/ManifestCache.plist : No such file or directory
MDMCacheDirectoryManifest:1323 writeDictToFile failed to write to /Users/Neal/Dev/ncsoftware/apdlCustomContainerModel/apdl/obj/iPhone/Release/mtouch-cache/install-shadow-directory/5708903205471db87fa26d2e2be9f80c/589ef0fc2e0e61843d31e739445f2180268686a7/ManifestCache.plist : No such file or directory
error MT1006: Could not install the application '/Users/Neal/Dev/ncsoftware/apdlCustomContainerModel/apdl/bin/iPhone/Release/apdl.app' on the device Neal's iPhone 6+: Your code signing/provisioning profiles are not correctly configured.   Probably you have an entitlement not supported by your current provisioning profile, check the iOS Device Log for details (error: 0xe8008016).
failed to suspend thread 0xb0195000, hopefully it is dead

Others reporting this as well:

https://forums.xamarin.com/discussion/24676/unable-to-deploy-any-app-to-ios-device-since-upgrading-xcode-and-xamarin
Comment 1 Neal 2014-09-23 18:48:23 UTC
I believe the bug I reported https://bugzilla.xamarin.com/show_bug.cgi?id=23302 may be related and should be marked critical.  I opened up my entitlements and unchecked passbook and then deployed and it worked.  I also manually installed the provision file (dev) to my device which may also be related.  But I believe the Passbook turning back on automatically is causing an entitlements conflict and the fix should be escalated.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2014-09-24 05:18:30 UTC
This is the significant error line:

error MT1006: Could not install the application '/Users/Neal/Dev/ncsoftware/apdlCustomContainerModel/apdl/bin/iPhone/Release/apdl.app' on the device Neal's iPhone 6+: Your code signing/provisioning profiles are not correctly configured.   Probably you have an entitlement not supported by your current provisioning profile, check the iOS Device Log for details (error: 0xe8008016).

Please check the device log [1] during a failed deploy, iOS will usually print out which entitlement is causing the problem.

[1] In Xamarin Studio, open the menu View -> Pads -> iOS Device Log, and then connect.
Comment 3 Neal 2014-09-25 13:58:01 UTC
Rolf - we found a work around so I would have to go back and try to trigger this again.  I posted the steps in the above mentioned forum link to get things working.  I'm not sure if it's an Apple issue with profiles, a CloudKit issue as Apple changed everyone to CloudKit, what if we only want to use the key-value store for light iCloud use?  Does the app need full CloudKit configuration?  Also there is a bug reported and fixed about Passbook always checking when going to Entitlements.plist which may be associated?  Not sure... here is the work around:

1) Go to the iOS Dev portal and review your iCloud settings, Apple migrated everyone to the new CloudKit. I don't know if this is a big deal or not but I set mine back to XCode 5

2) Save and then regen your profile and download your DEV profile

3) Using Xcode (Window/Devices) remove all of your old provisioning files from your device and now add your new DEV profile

4) Double-click on Entitlements.plist in your solution if you have one and uncheck Passbook (there is a bug where it remains on, which is now marked fixed). With passbook UNCHECKED now deploy to your device.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2014-09-25 16:09:09 UTC
I'm not entirely sure there's a bug here, but in any case reassigning to Jeff since he knows much more about code signing than I do (and if there is a bug somewhere, it's in Xamarin Studio).
Comment 5 Jeffrey Stedfast 2014-09-25 16:16:49 UTC
Neal:

Is the error you are getting something along the lines of "Invalid entitlement... com.apple.developer.icloud-services ..."?

The com.apple.developer part is the important bit.

If so, I committed a fix for that earlier today.

If that's the issue, let me know, and I can try to make a pull request to get this fix into Xamarin.iOS 8.2 (the fix is in the msbuild system).
Comment 6 Neal 2014-09-25 16:20:37 UTC
I'm going to have to try and undo the fix and trigger this error again.  Maybe you can get more information asking in the forum thread as well?

https://forums.xamarin.com/discussion/24676/unable-to-deploy-any-app-to-ios-device-since-upgrading-xcode-and-xamarin

I'll see what I can do to cause the issue again soon, I can't break it right now.
Comment 7 Jeffrey Stedfast 2014-09-25 16:22:12 UTC
Actually, I just realized that you might not be using the msbuild system.

Is your app still a Classic app? (ie. does it use the MonoTouch.Foundation/etc namespaces?)

Do you use App Extensions (App Extensions will also enable the use of MSBuild)?

I'm going to try and make the same build fix to the old build system logic (which *is* actually part of XS).
Comment 8 Neal 2014-09-25 16:25:03 UTC
No App extensions, working on a 3 year in the making app so yes, I assume classic
Comment 9 Jeffrey Stedfast 2014-09-25 16:30:43 UTC
Hmmm, XS is already fixed to strip out the com.apple.developer.* keys from the compiled Entitlements, so if this is Entitlements related, it must be something else.

The PassBook checkbox bug only showed "enabled" even though the PassBook keys were not set in the Entitlements.plist, fwiw, so I don't think that is related (although it is possible).

Anyway... thanks for clarifying that you are using Classic - that will help narrow this down a lot.
Comment 10 Neal 2014-09-26 10:32:37 UTC
Jeff, after a little sleep I had the idea of trying to deploy to another device I have (iPad) to see if the problem occurs and it does.  Hopefully this helps and if you get it fixed please escalate to priority 1 as we can't push dev, adhoc, and probably even app store release builds to get reviewed/approved.

Xam IOS (latest stables) deploy log: ---------------------------------------


Please ensure your device is connected...
Connected to: Neal’s iPad 4
Installing application bundle
writeDictToFile:1249 open failed for /Users/Neal/Dev/ncsoftware/apdlCustomContainerModel/apdl/obj/iPhone/Release/mtouch-cache/install-shadow-directory/5708903205471db87fa26d2e2be9f80c/d7e8860ee2557d030a83013185c75a6325fd43ce/ManifestCache.plist : No such file or directory
MDMCacheDirectoryManifest:1323 writeDictToFile failed to write to /Users/Neal/Dev/ncsoftware/apdlCustomContainerModel/apdl/obj/iPhone/Release/mtouch-cache/install-shadow-directory/5708903205471db87fa26d2e2be9f80c/d7e8860ee2557d030a83013185c75a6325fd43ce/ManifestCache.plist : No such file or directory
error MT1006: Could not install the application '/Users/Neal/Dev/ncsoftware/apdlCustomContainerModel/apdl/bin/iPhone/Release/apdl.app' on the device Neal’s iPad 4: Your code signing/provisioning profiles are not correctly configured.   Probably you have an entitlement not supported by your current provisioning profile, check the iOS Device Log for details (error: 0xe8008016).
The application was terminated by a signal: SIGHUP




device log:----------------------------------------------

ASL is here to serve you
Sep 26 10:29:07 Neals-iPad-4 syslog_relay[221] <Notice>: syslog_relay found the ASL prompt. Starting...
Sep 26 10:29:13 Neals-iPad-4 streaming_zip_conduit[218] <Warning>: LaunchServices: installing app for existing placeholder <LSApplicationProxy: 0x14d19230> com.apdl.net
Sep 26 10:29:13 Neals-iPad-4 streaming_zip_conduit[218] <Warning>: LaunchServices: Not creating progress for <LSApplicationProxy: 0x14d19230> com.apdl.net since it is not a placeholder.
Sep 26 10:29:13 Neals-iPad-4 installd[36] <Notice>: 0x1d45000 -[MIClientConnection _doBackgroundInstallationForPath:withOptions:completion:]: Install of "/var/mobile/Media/PublicStaging/apdl.app" type Developer requested by streaming_zip_conduit (pid 218)
Sep 26 10:29:13 Neals-iPad-4 installd[36] <Notice>: 0x1d45000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=com.apdl.net; Version=0.9.33.4254, ShortVersion=SVN 5h>
Sep 26 10:29:13 Neals-iPad-4 MobileStorageMounter[230] <Error>: 0x3c54e9dc Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such process
Sep 26 10:29:13 Neals-iPad-4 MobileStorageMounter[230] <Error>: 0x3c54e9dc Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such file or directory
Sep 26 10:29:13 Neals-iPad-4 MobileStorageMounter[230] <Error>: 0x3c54e9dc Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such file or directory
Sep 26 10:29:13 Neals-iPad-4 MobileStorageMounter[230] <Error>: 0x3c54e9dc Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such file or directory
Sep 26 10:29:14 Neals-iPad-4 profiled[81] <Notice>: (Note ) MC: Provisioning profiles changed
Sep 26 10:29:14 Neals-iPad-4 installd[36] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
Sep 26 10:29:14 Neals-iPad-4 installd[36] <Error>: entitlement 'com.apple.developer.ubiquity-container-identifiers' has value not permitted by provisioning profile 'iOS Team Provisioning Profile: com.apdl.net'
Sep 26 10:29:14 Neals-iPad-4 installd[36] <Error>: entitlement 'com.apple.developer.ubiquity-container-identifiers' has value not permitted by provisioning profile 'APDL Development (com.apdl.net)'
Sep 26 10:29:14 Neals-iPad-4 installd[36] <Error>: 0x1d45000 -[MICodeSigningVerifier performValidationWithError:]: 186: Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.VainXi/extracted/apdl.app identifier = com.apdl.net type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)
Sep 26 10:29:14 Neals-iPad-4 installd[36] <Error>: 0x1d45000 -[MIInstaller performInstallationWithError:]: Verification stage failed
Sep 26 10:29:14 Neals-iPad-4 streaming_zip_conduit[218] <Error>: 0x503000 __MobileInstallationInstallForLaunchServices_block_invoke240: Returned error Error Domain=MIInstallerErrorDomain Code=13 "Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.VainXi/extracted/apdl.app identifier = com.apdl.net type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)" UserInfo=0x14d27640 {LibMISErrorNumber=-402620394, LegacyErrorString=ApplicationVerificationFailed, FunctionName=-[MICodeSigningVerifier performValidationWithError:], NSLocalizedDescription=Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.VainXi/extracted/apdl.app identifier = com.apdl.net type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile), SourceFileLine=186}
Sep 26 10:29:14 Neals-iPad-4 streaming_zip_conduit[218] <Warning>: ERROR: MobileInstallationInstallForLaunchServices returned nil
Sep 26 10:29:14 Neals-iPad-4 streaming_zip_conduit[218] <Warning>: __dispatch_source_read_socket_block_invoke:203: Failed to install application at file:///var/mobile/Media/PublicStaging/apdl.app/ : Error Domain=LaunchServicesError Code=0 "The operation couldn’t be completed. (LaunchServicesError error 0.)" UserInfo=0x14d276e0 {Error=ApplicationVerificationFailed, ErrorDetail=-402620394, ErrorDescription=Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.VainXi/extracted/apdl.app identifier = com.apdl.net type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)}
Sep 26 10:29:14 Neals-iPad-4 mobile_installation_proxy[212] <Error>: 0x882000 handle_connection: Could not receive request from host.
Sep 26 10:29:23 Neals-iPad-4 assistantd[48] <Error>: tcp_connection_destination_mptcp_check_socket_error_and_shutdown 5 will shut down MPTCP socket because of error: Software caused connection abort

Xam studio about info --------------------------------------

=== Xamarin Studio ===

Version 5.4 (build 240)
Installation UUID: 99b05837-84cf-4971-a1b4-a52835a6ed01
Runtime:
	Mono 3.8.0 ((no/db71bc1)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000013

=== Xamarin.Android ===

Version: 4.16.0 (Business Edition)
Android SDK: /Users/Neal/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.iOS ===

Version: 8.0.0.63 (Business Edition)
Hash: 58b46df
Branch: 
Build date: 2014-09-18 22:32:07-0400

=== Xamarin.Mac ===

Version:

=== Build Information ===

Release ID: 504000240
Git revision: 01786bc67c7024ec33d327ed27e4416d7a846f4e
Build date: 2014-09-17 10:58:48-04
Xamarin addins: 7cd7dfcd6b7b7b53281508954ec080f1cd153ad3

=== Operating System ===

Mac OS X 10.9.5
Darwin neals-mbp.home 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 11 Jeffrey Stedfast 2014-09-26 13:44:49 UTC
We were able to reproduce this last night, but only by using an invalid provisioning profile (by invalid, I mean that the website showed "Invalid" as the status of the provisioning profile).

Could that be the issue you are hitting?
Comment 12 Neal 2014-09-26 14:27:07 UTC
It's all GREEN in the apple portal, I just double-checked everything.

I went into xcode and deleted and readded my apple id and refreshed my profiles after finding out where they are stored on my mac so I could be sure there were no conflicts.  I deleted ~/Library/MobileDevice/Provisioning

We are set to use CloudKit and not Xcode5 compat iCloud if that matters.

Gave it another try on the iPad and same result:

Please ensure your device is connected...
Connected to: Neal’s iPad 4
Installing application bundle
writeDictToFile:1249 open failed for /Users/Neal/Dev/ncsoftware/apdlCustomContainerModel/apdl/obj/iPhone/Release/mtouch-cache/install-shadow-directory/5708903205471db87fa26d2e2be9f80c/d7e8860ee2557d030a83013185c75a6325fd43ce/ManifestCache.plist : No such file or directory
MDMCacheDirectoryManifest:1323 writeDictToFile failed to write to /Users/Neal/Dev/ncsoftware/apdlCustomContainerModel/apdl/obj/iPhone/Release/mtouch-cache/install-shadow-directory/5708903205471db87fa26d2e2be9f80c/d7e8860ee2557d030a83013185c75a6325fd43ce/ManifestCache.plist : No such file or directory
error MT1006: Could not install the application '/Users/Neal/Dev/ncsoftware/apdlCustomContainerModel/apdl/bin/iPhone/Release/apdl.app' on the device Neal’s iPad 4: Your code signing/provisioning profiles are not correctly configured.   Probably you have an entitlement not supported by your current provisioning profile, check the iOS Device Log for details (error: 0xe8008016).
failed to suspend thread 0xb0217000, hopefully it is dead

-------------

Sep 26 14:23:35 Neals-iPad-4 streaming_zip_conduit[218] <Warning>: LaunchServices: installing app for existing placeholder <LSApplicationProxy: 0x14e25900> com.apdl.net
Sep 26 14:23:35 Neals-iPad-4 streaming_zip_conduit[218] <Warning>: LaunchServices: Not creating progress for <LSApplicationProxy: 0x14e25900> com.apdl.net since it is not a placeholder.
Sep 26 14:23:35 Neals-iPad-4 installd[36] <Notice>: 0x1dc7000 -[MIClientConnection _doBackgroundInstallationForPath:withOptions:completion:]: Install of "/var/mobile/Media/PublicStaging/apdl.app" type Developer requested by streaming_zip_conduit (pid 218)
Sep 26 14:23:35 Neals-iPad-4 installd[36] <Notice>: 0x1dc7000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=com.apdl.net; Version=0.9.33.4254, ShortVersion=SVN 5h>
Sep 26 14:23:35 Neals-iPad-4 MobileStorageMounter[302] <Error>: 0x3c54e9dc Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such process
Sep 26 14:23:35 Neals-iPad-4 MobileStorageMounter[302] <Error>: 0x3c54e9dc Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such file or directory
Sep 26 14:23:35 Neals-iPad-4 MobileStorageMounter[302] <Error>: 0x3c54e9dc Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such file or directory
Sep 26 14:23:35 Neals-iPad-4 MobileStorageMounter[302] <Error>: 0x3c54e9dc Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such file or directory
Sep 26 14:23:35 Neals-iPad-4 profiled[81] <Notice>: (Note ) MC: Provisioning profiles changed
Sep 26 14:23:35 Neals-iPad-4 installd[36] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
Sep 26 14:23:35 Neals-iPad-4 installd[36] <Error>: entitlement 'com.apple.developer.ubiquity-container-identifiers' has value not permitted by provisioning profile 'APDL Development (com.apdl.net)'
Sep 26 14:23:35 Neals-iPad-4 installd[36] <Error>: 0x1dc7000 -[MICodeSigningVerifier performValidationWithError:]: 186: Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.z6K3HI/extracted/apdl.app identifier = com.apdl.net type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)
Sep 26 14:23:35 Neals-iPad-4 installd[36] <Error>: 0x1dc7000 -[MIInstaller performInstallationWithError:]: Verification stage failed
Sep 26 14:23:36 Neals-iPad-4 streaming_zip_conduit[218] <Error>: 0x503000 __MobileInstallationInstallForLaunchServices_block_invoke240: Returned error Error Domain=MIInstallerErrorDomain Code=13 "Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.z6K3HI/extracted/apdl.app identifier = com.apdl.net type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)" UserInfo=0x14e26400 {LibMISErrorNumber=-402620394, LegacyErrorString=ApplicationVerificationFailed, FunctionName=-[MICodeSigningVerifier performValidationWithError:], NSLocalizedDescription=Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.z6K3HI/extracted/apdl.app identifier = com.apdl.net type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile), SourceFileLine=186}
Sep 26 14:23:36 Neals-iPad-4 streaming_zip_conduit[218] <Warning>: ERROR: MobileInstallationInstallForLaunchServices returned nil
Sep 26 14:23:36 Neals-iPad-4 streaming_zip_conduit[218] <Warning>: __dispatch_source_read_socket_block_invoke:203: Failed to install application at file:///var/mobile/Media/PublicStaging/apdl.app/ : Error Domain=LaunchServicesError Code=0 "The operation couldn’t be completed. (LaunchServicesError error 0.)" UserInfo=0x14e264d0 {Error=ApplicationVerificationFailed, ErrorDetail=-402620394, ErrorDescription=Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.z6K3HI/extracted/apdl.app identifier = com.apdl.net type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)}
Sep 26 14:23:36 Neals-iPad-4 mobile_installation_proxy[212] <Error>: 0x581000 handle_connection: Could not receive request from host.
Sep 26 14:24:01 Neals-iPad-4 wifid[68] <Notice>: WiFi:[433448641.766314]: WiFiLocaleManagerCheckLocale: locale <US> was determined at 9/26/14, 2:03:25 PM Eastern Daylight Time, has been valid for 20.61 mins [cache timeout 60.00 mins]
Comment 13 Jeffrey Stedfast 2014-09-26 14:29:48 UTC
Okay, thanks for checking. The only thing I can think of trying is to remove the com.apple.developer.ubiquity-container-identifiers key from the xcent file.

I'll add that to the logic and link you to a build of that when it's done.
Comment 14 Neal 2014-09-26 14:30:37 UTC
I'm not so sure this is really a provisioning profile issue as much as it is something with the deploy system and the folder structure not found so it's probably erroring out in the build/signing process.

writeDictToFile:1249 open failed for /Users/Neal/Dev/ncsoftware/LogbookPro/Logbook_Pro/obj/iPhone/Release/mtouch-cache/install-shadow-directory/c89fed2076853d52c1e4e927c710d4e1/d7e8860ee2557d030a83013185c75a6325fd43ce/ManifestCache.plist : No such file or directory
MDMCacheDirectoryManifest:1323 writeDictToFile failed to write to /Users/Neal/Dev/ncsoftware/LogbookPro/Logbook_Pro/obj/iPhone/Release/mtouch-cache/install-shadow-directory/c89fed2076853d52c1e4e927c710d4e1/d7e8860ee2557d030a83013185c75a6325fd43ce/ManifestCache.plist : No such file or directory
error MT1006: Could not install the application '/Users/Neal/Dev/ncsoftware/LogbookPro/Logbook_Pro/bin/iPhone/Release/LogbookPro.app' on the device Neal’s iPad 4: Your code signing/provisioning profiles are not correctly configured.   Probably you have an entitlement not supported by your current provisioning profile, check the iOS Device Log for details (error: 0xe8008016).
failed to suspend thread 0xb0217000, hopefully it is dead

I'm NOT using Yosemite - all latest production and stables
Comment 15 Neal 2014-09-26 14:32:03 UTC
I tried my other app as you can see just in case it was more complex entitlements than the APDL app.
Comment 16 Jeffrey Stedfast 2014-09-26 16:27:01 UTC
Could you give this build of XS a try?

https://files.xamarin.com/~jeff/XamarinStudio-5.6.0.206.dmg

That strips out the com.apple.developer.ubiquity-container-identifiers key

If that doesn't fix it, then I think this is a Xamarin.iOS bug and not a Xamarin Studio bug.
Comment 17 Jeffrey Stedfast 2014-09-26 16:27:22 UTC
(btw, you'll need to clean & rebuild)
Comment 18 Neal 2014-09-26 16:33:05 UTC
I'll download and install it now.  If this doesn't work and/or if I need to go back to the latest stable I assume just download it from the web site?
Comment 19 Jeffrey Stedfast 2014-09-26 16:39:40 UTC
You can just go to the Xamarin Studio updater (Xamarin Studio -> Check for Updates) and the updater will install the latest version released to whatever channel you choose.
Comment 20 Neal 2014-09-26 16:44:00 UTC
No change with this build, same error messages :(
Comment 21 Neal 2014-09-26 16:51:22 UTC
If I remove "Entitlements.plist" from Custom Entitlements it WORKS!!!!  I tried this both in release and adhoc.  Is Entitlements.plist supposed to be in there and if removed will it still register our icloud etc. entitlements???
Comment 22 Neal 2014-09-26 16:51:43 UTC
Created attachment 8212 [details]
Signing dialog
Comment 23 Jeffrey Stedfast 2014-09-26 17:04:21 UTC
If you remove that, it won't use the Entitlements.plist file for code signing, which means you won't get iCloud/etc support.

Is there a key in the Entitlements.plist file, perhaps, that is causing the breakage?
Comment 24 Neal 2014-09-26 17:10:34 UTC
This is what it contains:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.developer.ubiquity-container-identifiers</key>
	<array>
		<string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
	</array>
	<key>com.apple.developer.ubiquity-kvstore-identifier</key>
	<string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
</dict>
</plist>

Are we supposed to put a period before $(CFBundleIdentifier) is the above correct?
Comment 25 Neal 2014-09-26 17:17:04 UTC
I deleted the Entitlements and created a new one.  Checked the top two items for iCloud and KeyValue store.  Custom Entitlements added the Entitlements.plist entry back.

Does not deploy.

I then tried checking all four top items for cloudkit, etc. related to iCloud, and it again does not deploy.  So it's definitely something with entitlements.  We are all GREEN on the portal.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.developer.ubiquity-container-identifiers</key>
	<array>
		<string>$(AppIdentifierPrefix)com.apdl.net</string>
	</array>
	<key>com.apple.developer.ubiquity-kvstore-identifier</key>
	<string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
	<key>com.apple.developer.icloud-services</key>
	<array>
		<string>CloudDocuments</string>
		<string>CloudKit</string>
	</array>
</dict>
</plist>
Comment 26 Neal 2014-09-26 17:26:34 UTC
I recently enabled push notifications in the apple portal.  Am I supposed to add any entitlement in Xamarin for that?
Comment 27 Neal 2014-09-26 17:54:08 UTC
I turned off remote notifications on the portal, got everything back to green on the portal, refreshed xcode, clean/rebuild - same issue so it's not APNS
Comment 28 Jeffrey Stedfast 2014-09-26 17:55:19 UTC
I don't think there are any entitlements for push notification.

The problem is the iCloud keys, though.

Between Xcode 5 and Xcode 6, the iCloud container-identifier Entitlement keys changed.

Xcode 5: com.apple.developer.ubiquity-container-identifiers

Xcode 6: com.apple.developer.icloud-container-identifiers

Try editing the file in a text editor and changing the name of that key.
Comment 29 Neal 2014-09-26 18:23:49 UTC
It sounds like you're on to something but I haven't been able to get it to work and/or Xam won't build it - build fails.

I set things back to Xcode 5 hoping I could just go back but once you refresh your profiles with Xcode 6 it migrated you to CloudKit automatically so this is obviously a critical issue and the entitlments for iCloud need to get fixed.  I wonder if entitlements is required, i.e. if the profile has the cloudkit option is entitlements.plist for icloud really needed now, kind of like push notifications where it merges it in automatically?
Comment 30 Neal 2014-09-26 18:25:03 UTC
I'm going to try removing the Entitlements.plist and see if iCloud still works or not
Comment 31 Neal 2014-09-26 18:44:13 UTC
This is NOT official but it WORKED!  I removed the entitlements and iCloud works by default as set in CloudKit in the portal.  I used one app, waited 30 seconds, went to the other app and the info appeared.
Comment 32 Neal 2014-09-26 23:11:12 UTC
Jeff, I think whatever the original change is you made for the 5.6 build for me will need to get reverted.  I submitted the app for review and it failed the initial validation, I don't recall the exact message but it was related to the com.apple.whatever you stripped out.  I went back to 5.4 stable and it submitted fine.

FYI
Comment 33 Jeffrey Stedfast 2014-09-29 11:56:27 UTC
ok, thanks for the info.
Comment 34 Jorge Fernandez 2014-09-29 16:48:20 UTC
@Jeffrey:These changes did not work for me, unfortunately.  I did each step that @Neal described. See https://forums.xamarin.com/discussion/24676/unable-to-deploy-any-app-to-ios-device-since-upgrading-xcode-and-xamarin. This problem started when I created the Entitlements.plist, but removing it did not solve the problem.  I can download the app to the phone in Debug and Release with the Developer provisioning Profile. The app is not downloaded to the phone when I use the Distribution Profile. I already have recreated the certificates and profiles several times for Distribution mode and still not working.  

Can you provide me with a work-around solution to download the app to the phone with iOS8? What information do you need from me?
Comment 35 Satish 2014-09-29 16:59:48 UTC
@Jeffrey I have similar error as Jorge, I have my application working fine on iOS 7, but when I am trying to update my application with the latest iOS8 providing distribution provision profile ends up with an unusual error saying mismatch of the provisional profile.

So in short, can you please tell me, is there any other way I can deal with submiting my application with a latest iOS update using XamariniOS 8.1

please provide steps if possible. [URGENT please]
Comment 36 Neal 2014-09-29 17:19:53 UTC
I'm not sure if iCloud is included or not as it stopped working for us today. Maybe we need to redo our implementation for CloudKit or maybe it's a profile issue. Awaiting the Xamarin experts on all of this.
Comment 37 Jeffrey Stedfast 2014-09-30 10:56:47 UTC
Rolf: who on the iOS team knows about iCloud stuff that can help with this?
Comment 38 Neal 2014-09-30 11:03:26 UTC
Come to find out iCloud was down yesterday and still is supposedly having issues today.  Last night I did some googling and found this on your site:

http://developer.xamarin.com/guides/ios/platform_features/intro_to_cloudkit/

I hope someone has a lightbulb come on as this is a huge show stopper for people deploying and testing.  Wish I could help better, I'll retest iCloud today with my theory and see what I can find and report back if anything new and exciting.
Comment 39 Jeffrey Stedfast 2014-09-30 13:26:42 UTC
From playing around a bit more with Xcode and poking around in the files it generates, I think I may have found a solution.

I'll post a link to an updated Xamarin Studio once the bots build it.
Comment 40 Jeffrey Stedfast 2014-09-30 14:47:58 UTC
I've uploaded a new Xamarin Studio build with my new fixes here: https://files.xamarin.com/~jeff/XamarinStudio-5.6.0.215.dmg

I think part of the problem may have been that when we archived a build, we stripped all of the icloud entitlements from the archived-expanded-entitlements.plist file that gets bundled into the archive (for later resigning).

Anyway, let me know how this works out.
Comment 41 Neal 2014-09-30 15:06:26 UTC
I installed your brew, added the Entitlements back and checked the top two items for iCloud and cleaned then rebuild, upload to device in release/iphone:

Installing application bundle
writeDictToFile:1249 open failed for /Users/Neal/Dev/ncsoftware/apdlCustomContainerModel/apdl/obj/iPhone/Release/mtouch-cache/install-shadow-directory/5708903205471db87fa26d2e2be9f80c/589ef0fc2e0e61843d31e739445f2180268686a7/ManifestCache.plist : No such file or directory
MDMCacheDirectoryManifest:1323 writeDictToFile failed to write to /Users/Neal/Dev/ncsoftware/apdlCustomContainerModel/apdl/obj/iPhone/Release/mtouch-cache/install-shadow-directory/5708903205471db87fa26d2e2be9f80c/589ef0fc2e0e61843d31e739445f2180268686a7/ManifestCache.plist : No such file or directory
error MT1006: Could not install the application '/Users/Neal/Dev/ncsoftware/apdlCustomContainerModel/apdl/bin/iPhone/Release/apdl.app' on the device Neal's iPhone 6+: Your code signing/provisioning profiles are not correctly configured.   Probably you have an entitlement not supported by your current provisioning profile, check the iOS Device Log for details (error: 0xe8008016).
The application was terminated by a signal: SIGHUP

-----

Are we supposed to use entitlements or not?
Comment 42 Neal 2014-09-30 15:08:14 UTC
Device log info:

Sep 30 15:07:38 Neals-iPhone-6 streaming_zip_conduit[3008] <Warning>: LaunchServices: installing app for existing placeholder <LSApplicationProxy: 0x15d6212f0> com.apdl.net
Sep 30 15:07:38 Neals-iPhone-6 streaming_zip_conduit[3008] <Warning>: LaunchServices: Not creating progress for <LSApplicationProxy: 0x15d6212f0> com.apdl.net since it is not a placeholder.
Sep 30 15:07:38 Neals-iPhone-6 installd[2979] <Notice>: 0x10050c000 -[MIClientConnection _doBackgroundInstallationForPath:withOptions:completion:]: Install of "/var/mobile/Media/PublicStaging/apdl.app" type Developer requested by streaming_zip_conduit (pid 3008)
Sep 30 15:07:38 Neals-iPhone-6 installd[2979] <Notice>: 0x10050c000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=com.apdl.net; Version=0.9.33.4320, ShortVersion=SVN 5h>
Sep 30 15:07:38 Neals-iPhone-6 profiled[2919] <Notice>: (Note ) MC: Provisioning profiles changed
Sep 30 15:07:38 Neals-iPhone-6 installd[2979] <Error>:  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
Sep 30 15:07:39 Neals-iPhone-6 installd[2979] <Error>: entitlement 'com.apple.developer.ubiquity-container-identifiers' has value not permitted by provisioning profile 'iOS Team Provisioning Profile: com.apdl.net'
Sep 30 15:07:39 Neals-iPhone-6 installd[2979] <Error>: entitlement 'com.apple.developer.icloud-container-identifiers' has value not permitted by provisioning profile 'APDL Development (com.apdl.net)'
Sep 30 15:07:39 Neals-iPhone-6 installd[2979] <Error>: entitlement 'com.apple.developer.icloud-container-identifiers' has value not permitted by provisioning profile 'Logbook Pro iPhone v2 Dev'
Sep 30 15:07:39 Neals-iPhone-6 installd[2979] <Error>: entitlement 'com.apple.developer.icloud-container-identifiers' has value not permitted by provisioning profile 'iOS Team Provisioning Profile: com.nc-software.com.logbookpro2'
Sep 30 15:07:39 Neals-iPhone-6 installd[2979] <Error>: 0x10050c000 -[MICodeSigningVerifier performValidationWithError:]: 186: Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.lh0c8y/extracted/apdl.app identifier = com.apdl.net type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)
Sep 30 15:07:39 Neals-iPhone-6 installd[2979] <Error>: 0x10050c000 -[MIInstaller performInstallationWithError:]: Verification stage failed
Sep 30 15:07:39 Neals-iPhone-6 streaming_zip_conduit[3008] <Error>: 0x1001a8000 __MobileInstallationInstallForLaunchServices_block_invoke240: Returned error Error Domain=MIInstallerErrorDomain Code=13 "Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.lh0c8y/extracted/apdl.app identifier = com.apdl.net type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)" UserInfo=0x15d623ca0 {LibMISErrorNumber=-402620394, LegacyErrorString=ApplicationVerificationFailed, SourceFileLine=186, FunctionName=-[MICodeSigningVerifier performValidationWithError:], NSLocalizedDescription=Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.lh0c8y/extracted/apdl.app identifier = com.apdl.net type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)}
Sep 30 15:07:39 Neals-iPhone-6 streaming_zip_conduit[3008] <Warning>: ERROR: MobileInstallationInstallForLaunchServices returned nil
Sep 30 15:07:39 Neals-iPhone-6 streaming_zip_conduit[3008] <Warning>: __dispatch_source_read_socket_block_invoke:203: Failed to install application at file:///var/mobile/Media/PublicStaging/apdl.app/ : Error Domain=LaunchServicesError Code=0 "The operation couldn’t be completed. (LaunchServicesError error 0.)" UserInfo=0x15d623e10 {Error=ApplicationVerificationFailed, ErrorDetail=-402620394, ErrorDescription=Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.lh0c8y/extracted/apdl.app identifier = com.apdl.net type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)}
Comment 43 Jeffrey Stedfast 2014-09-30 15:35:59 UTC
Neal, can you attach your Entitlements.plist file?

One thing I just noticed is that when you use Xamarin Studio's Entitlements.plist editor to enable iCloud support, it still uses the Ubiquity Containers key (com.apple.developer.ubiquity-container-identifiers) instead of the CloudKit key that Xcode6 is now using: com.apple.developer.icloud-container-identifiers.

I just fixed that up and am waiting for that to finish building.
Comment 44 Neal 2014-09-30 15:40:44 UTC
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.developer.ubiquity-container-identifiers</key>
	<array>
		<string>$(AppIdentifierPrefix)com.apdl.net</string>
	</array>
	<key>com.apple.developer.ubiquity-kvstore-identifier</key>
	<string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
</dict>
</plist>
Comment 45 Jeffrey Stedfast 2014-09-30 15:58:06 UTC
Thanks Neal.

I think the keys should look like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.developer.icloud-container-identifiers</key>
    <array>
        <string>iCloud.com.apdl.net</string>
    </array>
    <key>com.apple.developer.ubiquity-kvstore-identifier</key>
    <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
</dict>
</plist>

It seems that key also uses a different format for the value, so I just updated Xamarin Studio for that as well.

If you replace your Entitlements.plist file with that, it *might* work. Hopefully.

I'll provide a new build when it's ready, but it will only make it so that the keys get created correctly - it won't fix them (the build will just warn about the obsolete key).
Comment 46 Neal 2014-09-30 16:02:27 UTC
You can't hard code it to iCloud.bundleId as when Apple transitioned Logbook Pro the container became TeamId.BundleId.  I tried creating the same for APDL and it wouldn't allow it so they may be locking down now to iCloud.bundleId but again, it needs to be overridable.
Comment 47 Jeffrey Stedfast 2014-09-30 16:51:01 UTC
Ah, thanks for the info. I'll make Xamarin Studio not hard-code an "iCloud." prefix.
Comment 48 Neal 2014-10-01 08:10:02 UTC
Jeff, I'm not well versed in Xcode 6 but maybe you or someone proficient in Xcode can setup a project there and see what it's generating such as for entitlements, control of the container and bundle settings, etc.?  I'm sure stating the obvious but hope we can pin this down soon as it's obviously a show stopper for many and I'm sure we'd all like this resolved before Evolve.
Comment 49 Jorge Fernandez 2014-10-01 08:40:25 UTC
Jeff. We are stuck. We are added and removed icloud.  We still cannot download  to the phone  as Distribution.  There is a very high level of confusion and unknowns in which settings to use. We have tried everything recommended by Neal and others in the forum for more than one week by now.  Can you tell if you  replicated this behavior? All this happened when adding the Entitlements.list file. As simple as that. I would like to know if you duplicated this problem  and if you have a specific solution by now. We have angry customers that have updated their phone to os 8 and we must upload a revised app. Can you and your team send me step by step in what settings we should use to solve thIs problem this morning. It is a very urgent matter.  Thanks.
Comment 50 Neal 2014-10-01 09:40:14 UTC
Jorge,

Have you checked your Apple provisioning portal to check that iCloud is set to XCode 6 CloudKit and you've also created/assigned a container to your iCloud then check your distribution and development profiles as they probably all have to be regenerated/saved to get them green again.  Then sync your Xcode 6 account on your Mac to get the profiles local and then retry.  Also using Xcode I believe it's under Window/Devices show provisioning profiles on your device and remove them all, then retry upload to your device without entitlements until they fix the iCloud entitlements.
Comment 51 Jorge Fernandez 2014-10-01 10:24:52 UTC
Hi Neal, Thanks for your reply. I am going to try these steps right now. At the moment, I do not have the Entitlements.plist file.  Do I create it again?
Comment 52 Neal 2014-10-01 10:30:01 UTC
No, not until Xamarin resolves the Xcode 6 iCloud entitlements problem.  iCloud will most likely not work until they fix that issue but you should still be able to deploy to your device.
Comment 53 Jorge Fernandez 2014-10-01 11:52:42 UTC
Neal, I did every step on your list. Options: iOS Build SDK 8.0; Link SDK Assy. Bundle build: Identity: Distribution; Prov Profile: Distribution. Custom Entitlements:  Blank. iOS IPA options:: Distribution - iPhone.
iOS Application Deployment Target 8.0.  I got the same error under  "Application cannot be downloaded to the device". Are you using the Stable channel or the Alpha channel?
Another question: How do I install the SDK 7.1 to target the Distribution build? I only have 2 choices in the iOS Build: 8.0 and default when I select Distribution. I am assuming that Default takes the target set in iOS Application/info.plist. where I can select.g 7.1. Please let me know what your settings are in the project options.  Thanks.
Comment 54 Jeffrey Stedfast 2014-10-01 12:17:36 UTC
Here's an updated Xamarin Studio build (took the bots forever to get to it last night): https://files.xamarin.com/~jeff/XamarinStudio-5.6.0.219.dmg

@Jorge: You should be able to use the Stable channel, other than the Xamarin Studio I'm linking.

There's no way to install older SDK's in Xcode anymore (that I'm aware of). The only option is to use the latest version (with Xcode 6.1, that is SDK 8.0). Apple has generally only accepted binaries built with the latest SDK anyway.
Comment 55 Jorge Fernandez 2014-10-01 13:06:08 UTC
Neal, I did every step on your list. Options: iOS Build SDK 8.0; Link SDK Assy. Bundle build: Identity: Distribution; Prov Profile: Distribution. Custom Entitlements:  Blank. iOS IPA options:: Distribution - iPhone.
iOS Application Deployment Target 8.0.  I got the same error under  "Application cannot be downloaded to the device". Are you using the Stable channel or the Alpha channel?
Another question: How do I install the SDK 7.1 to target the Distribution build? I only have 2 choices in the iOS Build: 8.0 and default when I select Distribution. I am assuming that Default takes the target set in iOS Application/info.plist. where I can select.g 7.1. Please let me know what your settings are in the project options.  Thanks.
Comment 56 Neal 2014-10-01 13:13:30 UTC
Jeff,

It worked!  However, for Logbook Pro which has TeamId.BundleId I manually changed it to XYZ.bundleid and closed and reopened Entitlements.plist and it reverts to iCloud.bundleid.  I'm fine with that, I'll just create a new container for Logbook Pro using the iCloud prefix but an FYI that manually entering a value does not seem to persist.
Comment 57 Jorge Fernandez 2014-10-01 14:02:11 UTC
Jeff, Neil: We installed upgrade Xamarin 5.6 an FINALLY!  We are now able to download to the iPhone with iOS8. Thank you both.
Comment 58 Jeffrey Stedfast 2014-10-01 14:21:05 UTC
Awesome, glad this is finally working for you guys.

Neal, I'll work on fixing that persist bug.
Comment 59 Jeffrey Stedfast 2014-10-01 15:11:26 UTC
Okay, this new build should fix that least issue: https://files.xamarin.com/~jeff/XamarinStudio-5.6.0.220.dmg
Comment 60 Neal 2014-10-01 15:13:25 UTC
When will this make STABLE - we need this out before "yesterday" :)

Thanks Jeff, I'll test and if any issues with that latest brew will reopen, otherwise push to stable ASAP.
Comment 61 Neal 2014-10-01 15:39:44 UTC
Tests good, persists my change now.  Release this bad boy to STABLE.
Comment 62 Jeffrey Stedfast 2014-10-01 16:43:48 UTC
Probably won't get pushed to Stable until after Evolve (next week), 5.5 is about to be pushed in the next few days.
Comment 63 Neal 2014-10-01 16:52:17 UTC
If you can roll this fix into 5.5 I'd highly recommend it as the impact is obviously critical.
Comment 64 Jeffrey Stedfast 2014-10-01 17:14:02 UTC
Already tried :-(
Comment 65 Neal 2014-10-04 10:33:46 UTC
Now that 5.5 stable is out, please get this hotfix published ASAP.  We can't even push adhoc installs as they fail to install to iOS 8 / iPhone 6 devices.
Comment 66 Neal 2014-10-04 14:26:59 UTC
This may be more complicated than first thought. If we support min ios of 7.1 then I believe we are going to need entitlements for BOTH.
Comment 67 Neal 2014-10-04 14:29:58 UTC
I don't know how this is supposed to be handled honestly. But installing my build on an iOS 7.1 device shows iCloud not available. It's fine on iOS 8. Not using CloudKit. Just key-value store.
Comment 68 Jeffrey Stedfast 2014-10-06 15:27:11 UTC
I'm guessing the new com.apple.developer.icloud-container-identifiers depends on iCloud Drive while the old com.apple.developer.ubiquity-container-identifiers depends on the old iCloud protocol, perhaps?

I've modified the build to go back to allowing the ubiquity key, but only if it is present in the Provisioning Profile's Entitlements.
Comment 69 Neal 2014-10-06 15:34:13 UTC
I don't know how this is supposed to be handled.  I imagine, as I've heard, you're either iCloud Drive (CloudKit) or not.  I think if you use XCode 6 you're hosed, you have no choice as it seems to set your app bundle id to Xcode 6 when refreshing profiles.  I have a feeling that iCloud is dead on iOS 7.x unless you use Xcode 5.  I'm not sure if you can support iOS 7.x and iOS 8 iCloud at the same time, you probably know better than I.  Confusing!
Comment 70 Jeffrey Stedfast 2014-10-06 15:35:53 UTC
I suspect that you are right, and Apple generally doesn't allow apps to be submitted with older versions of Xcode for long, so this may be the end of the old iCloud support.
Comment 71 Jeffrey Stedfast 2014-10-22 17:18:55 UTC
it looks like this fix will make it into an upcoming 5.5 release at the beginning of November.
Comment 72 Neal 2014-10-22 21:02:56 UTC
Jeff,

I tried the build you sent me today 5.7(322) and it's not deploying to the device.  I tried removing all of the provisioning profiles off the device, refresh Xcode 6.1 - repeat of the past:

/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" -installdev "/Users/Neal/Dev/ncsoftware/LogbookPro/Logbook_Pro/bin/iPhone/Ad-Hoc/LogbookPro.app" "--devname=Neal's iPhone 6+"
Please ensure your device is connected...
Connected to: Neal's iPhone 6+
Installing application bundle
writeDictToFile:1249 open failed for /Users/Neal/Dev/ncsoftware/LogbookPro/Logbook_Pro/obj/iPhone/Ad-Hoc/mtouch-cache/install-shadow-directory/c75242c45cb0ecc8ba87a936ba6ec275/589ef0fc2e0e61843d31e739445f2180268686a7/ManifestCache.plist : No such file or directory
MDMCacheDirectoryManifest:1323 writeDictToFile failed to write to /Users/Neal/Dev/ncsoftware/LogbookPro/Logbook_Pro/obj/iPhone/Ad-Hoc/mtouch-cache/install-shadow-directory/c75242c45cb0ecc8ba87a936ba6ec275/589ef0fc2e0e61843d31e739445f2180268686a7/ManifestCache.plist : No such file or directory
error MT1006: Could not install the application '/Users/Neal/Dev/ncsoftware/LogbookPro/Logbook_Pro/bin/iPhone/Ad-Hoc/LogbookPro.app' on the device Neal's iPhone 6+: Your code signing/provisioning profiles are not correctly configured.   Probably you have an entitlement not supported by your current provisioning profile, check the iOS Device Log for details (error: 0xe8008016).
failed to suspend thread 0xb0217000 due to Thread is detaching, hopefully it is dead
The application was terminated by a signal: SIGHUP

---

the entitlements contents is:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.developer.icloud-container-identifiers</key>
	<array>
		<string>iCloud.com.nc-software.com.logbookpro2</string>
	</array>
	<key>com.apple.developer.ubiquity-kvstore-identifier</key>
	<string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
</dict>
</plist>
Comment 73 Neal 2014-10-22 21:18:53 UTC
I'm reverting back to stable - can't get this to work.  In addition I see a few more issues to bring to your attention:

1) In a clean solution with no Entitlements.plist I Add New File, select Entitlements.plist and it creates it and it's add to the build options for all builds.  When I build I get an error that Entitlements.plist can't be found so I have to click the browse button to select it and then it will build.  Maybe an internal path is wrong?

2) I learned from Michael Hutch...'s session at Evolve the different colors in the output windows one of which is RED which indicates an Error.  The deploy pad shows red when the deploy fails but also when deploy succeeds - not sure if that's intended or not.  The pad text doesn't turn red but the deploy succeeded line is red/bold.  FYI
Comment 74 Neal 2014-10-22 21:29:52 UTC
I tried publishing to test flight and then download to device - still won't install.  Has to be something with provisioning profiles/signing.  

Speaking of test flight, you all may need to distinguish between the TestFlightApp.com vs. Apple's Test Flight going forward.
Comment 75 Jeffrey Stedfast 2014-10-24 13:10:14 UTC
1) I can't seem to reproduce this at all. Where did you create the Entitlements.plist file? What was the value in the .csproj after adding it (which caused a build error)?

This probably should be in a separate bug report for easier tracking.

2) AFAIK (I didn't write the code) the colors are based on whether the message was printed to stdout vs stderr, not whether it is an actual error or not and XS probably parses output only from stderr (in order to know when the Sim started, etc). Not sure if we can change this or not.

3) Could you submit a bug report about the Test Flight stuff? I don't work on that code either so it's hard for me to comment on it.
Comment 76 Neal 2014-10-24 13:16:23 UTC
1) I right-clicked on the project, add new file, chose the Entitlements.plist file

Not really a "bug" but as with yesterday's announcement that Test Flight is now both internal (25 user) and external (1000 user) the test flight is fully functional.  It looks like thought Test Flight, as an FYI via Apple, is via app loader and not any other upload method as it's directly tied into iTunes connect.  With all that said I believe it all should be left as is other than maybe a name change "Publish to TestFlightApp.com" to delineate old vs. new (testflightapp vs. iTunes Connect).
Comment 77 Jeffrey Stedfast 2014-10-24 13:37:41 UTC
1) Hmmm, that's what I did as well :-\

Not sure what the problem could be...


Thanks for the clarification on the TestFlight stuff, I've just made the changes you suggested.
Comment 78 Neal 2014-11-03 15:03:56 UTC
Jeff - any idea when we're going to get iCloud Entitlements fixed for Xcode 6? 

Thanks
Comment 79 Jeffrey Stedfast 2014-11-03 15:28:05 UTC
I think all of my patches have made it into an upcoming XS 5.5.4 release due out this week
Comment 80 Neal 2014-11-03 15:29:32 UTC
Thanks Jeff - need to get iCloud back in play again.
Comment 81 Lluis Sanchez 2014-11-04 07:16:27 UTC
Fixed in 5.5.4.
Comment 82 Jeffrey Stedfast 2014-11-04 14:18:47 UTC
*** Bug 24185 has been marked as a duplicate of this bug. ***
Comment 83 Saurabh 2014-11-11 02:03:25 UTC
I have checked this Issue with XS 5.5.4 I am still unable to deploy application on iPhone when I have select four options in Entitlement.plist (Enable iCloud, Key-Value Storage, iCloud Document and CloudKit). However I the provisioning provisioning profile which I am using have iCloud, Passbook, Data Protection enabled.

Deploy to Device Output: https://gist.github.com/saurabh360/25fb60c1e97aa53579c7
iOS Device Log: https://gist.github.com/saurabh360/f48aa48d8f817ffd658e
Build Output: https://gist.github.com/saurabh360/ec7d6d3d55edee513a43

Entitlements.Plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.developer.pass-type-identifiers</key>
	<array>
		<string>7V723M9SQ5.pass.com.xamarin.coupon.banana</string>
		<string>7V723M9SQ5.pass.com.xamarin.coupon.bananas</string>
		<string>7V723M9SQ5.pass.com.xamarin.test</string>
	</array>
	<key>com.apple.developer.icloud-container-identifiers</key>
	<array>
		<string>iCloud.com.your-company.testSingeAppls</string>
	</array>
	<key>com.apple.developer.ubiquity-kvstore-identifier</key>
	<string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
	<key>com.apple.developer.icloud-services</key>
	<array>
		<string>CloudDocuments</string>
		<string>CloudKit</string>
	</array>
</dict>
</plist>

Version Info:
X.S 5.5.4 (Build 12)
Git revision: 0399d0c8c0112ec4683161d5081f67e668b00f10
X.iOS 8.4.0.36
Xcode 6.1 (6604)
Build 6A1052d

Device Info:
iPhone 4S version 7.1.1
iPhone 4S version 8.1
iPad2 version 7.1.2
Comment 84 Jeffrey Stedfast 2014-11-11 11:33:37 UTC
I'll need to see your provisioning profile as well
Comment 85 Saurabh 2014-11-12 00:14:51 UTC
I am using 'iOSTeam provisioning' profile this is the screencast for the same: http://www.screencast.com/t/tYtyTK96Tj2
Comment 86 Saurabh 2014-11-12 00:29:09 UTC
An update to Comment#85
This is the list of provisioning profiles which I am using on my machine: https://gist.github.com/saurabh360/c480bb966e52874508fd
Comment 88 Jeffrey Stedfast 2014-11-12 08:59:16 UTC
I don't need to see the name of the profile, I need to see the actual profile. Can you attach the embedded.mobileprovision file from your compiled .app directory? Thanks.
Comment 89 Saurabh 2014-11-12 09:13:30 UTC
Created attachment 8700 [details]
Embedded_Mobileprovision

This is Embedded_Mobileprovision of my running app.
Comment 90 Saurabh 2014-11-12 09:14:08 UTC
As per comment#89 changing status to Confirmed.
Comment 91 Jeffrey Stedfast 2014-11-12 11:50:08 UTC
The problem is that your Provisioning Profile can only be used with com.apple.developer.ubiquity-container-identifiers and your Entitlements.plist has com.apple.developer.icloud-container-identifiers, which are incompatible.
Comment 94 Jeffrey Stedfast 2014-11-13 12:11:11 UTC
Right, the Provisioning Profile is Xcode5 compatible but you are using the Xcode6 keys.

Xamarin Studio's iCloud Entitlements editor no longer uses the old iCloud keys, it now always uses the Xcode6 keys, so you cannot use the nice GUI editor to add the old iCloud keys.

Open your Entitlements.plist in a normal text editor and replace this:

<key>com.apple.developer.icloud-container-identifiers</key>
 <array>
     <string>iCloud.com.your-company.testSingeAppls</string>
 </array>

with this:

<key>com.apple.developer.ubiquity-container-identifiers</key>
 <array>
     <string>$(TeamIdentifierPrefix)com.your-company.testSingeAppls</string>
 </array>

You also need to remove the following lines:

    <key>com.apple.developer.icloud-services</key>
    <array>
        <string>CloudDocuments</string>
        <string>CloudKit</string>
    </array>

because these are not valid for Xcode5 iCloud support.
Comment 95 Atin 2014-11-13 13:52:37 UTC
Thanks Jeff

After following steps mentioned in comment 94, I am successfully able to deploy and launch application on iOS Device.

Hence closing this issue.
Comment 96 Neal 2014-11-18 11:01:31 UTC
iOS 8 and iPhone 6's out over two months now and still no Entitlements support in the STABLE channel.  Please escalate and get us what we need please.
Comment 97 Neal 2014-11-20 19:03:56 UTC
Jeff, I just installed 5.5.4 STABLE.  Everytime the Entitlements.plist is opened Passbook is checked again.
Comment 98 Jeffrey Stedfast 2014-11-21 07:49:19 UTC
I didn't backport that patch to 5.5.4, but it will be in 5.7 (the next scheduled stable)
Comment 99 Neal 2014-11-23 09:18:12 UTC
Jeff, just some feedback without opening another case, but open one if you feel the need.  I've had a heck of a time with bundle signing.  The only way I've been able to succeed across two separate apps with AdHoc and App Store builds is NOT using the automatic options but selecting my distribution specific item and the same for the application and specific to adhoc and app store.  Then it signs properly.

My first app (Logbook Pro) which was around before the second is a bit more confusing as I think Apple or something got changed in the team identifier.  So in the icloud provision with key-value store selected I could not use the variables but instead had to paste in the full string manually, then that worked.

Back to signing again, I saw in the build output a message about duplicate something so the signing was going to have to choose, I guess there are multiple matches for the Automatic option.  The problem may have been the wrong choice made.  Not sure how to handle this, i.e. have some way to resolve the duplicate, prompt the user on which to use instead of making an assumption, etc.

FYI
Comment 100 Jeffrey Stedfast 2014-11-23 10:08:22 UTC
What did the string look like that you needed to paste for the team identifier? Was this in the iCloud list control in the UI editor?

In 5.5.3 and older, it used to auto-magically prefix whatever string you added with "$(TeamIdentifierPrefix)" which would get expanded at build time, however, when solving this bug, I noticed that Apple was no longer using the TeamIdentifierPrefix in that list, it was using "icloud" always (at least in all of the test cases I had), and so I removed the logic that added the prefix in 5.5.4 (which I think just got pushed Thursday or Friday this past week).

As far as the multiples go... yea, I agree that what it does now is not really the best, but unfortunately there's no way for the msbuild tasks to prompt the user.

There might be improvements we can make to the logic that tries to figure out which one to use, though. For example, perhaps you have an updated provisioning profile or something and so if it chooses the newest one by creation date, that would be better?
Comment 101 Neal 2014-11-23 11:19:33 UTC
For the iCloud key-value element it was the two variables combined that is supposed to be replaced at compile time, I don't remember it exactly.  TeamIdentifier.BundleId... and in my case I have several Team ID's I believe.  So I replaced this value with the explicit value from the Apple portal i.e. X1234.com.app.foo and that worked

For the multiple provisioning profiles - I'm not sure honestly as I can refresh them and who knows what dates correspond to what.  Xcode may refresh them all for example.  It's probably "junk" I have in the apple system over years as I'm sure I'm not the only one but it's just important for people to know that if automatic doesn't work try the specific one.  The only problem this causes is it could break a build on another machine if you don't use automatics, i.e. across team members, etc.  Joyous I'm sure :) Tough nut to crack...
Comment 102 Jon Goldberger [MSFT] 2015-06-18 20:31:02 UTC
Another issue that is causing an app not to deploy or build for a device:
https://bugzilla.xamarin.com/show_bug.cgi?id=31239