maui: failed to prepare device for development. xcode 14.2, iOS 16.2 - Physical device

Description

I’m trying to Debug my app on a physical (iPhone X with iOS 16.2), from Visual Studio for Mac 2022 with Xcode 14.2. The application is installed to my phone, but the icon does not appear, and I still cannot launch the application.

- the application runs normally on a Simulator (iPhone 14 with IOS 16.2) - the application runs normally on the same Physical (iPhone X with iOS 16.2) when it installed from TestFlight

When I click on the application icon on my IPhone : unable to install [APP NAME] this app cannot be installed because its integrity could not be verified

I also get these logs from Visual Studio for Mac :

DVTRadarComponentKey=261622, NSLocalizedDescription=The disk image is not allowed to be mounted.}}, NSLocalizedRecoverySuggestion=This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your Mac and device in order to correctly detect compatibility., NSLocalizedFailure=The disk image is not allowed to be mounted., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare the device for development.}
warning HE0030: Could not mount developer tools on 'iPhone X Ios 16.2': Failed to prepare the device for development.
        
warning HE0031: Failed to mount developer tools on 'iPhone X Ios 16.2'.
Could not find the application 'com.companyname.ios162andxcode142' on the device 'iPhone X Ios 16.2'.

Steps to Reproduce

1 - Create New MAUI APP 2 - Install Xcode 14.2 3 - Debug on iPhone X - IOS 16.2

Link to public reproduction project repository

.

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

IOS 16.2

Did you find any workaround?

I have added a device to the list of devices in the developer account from Apple, but without any benefit

Relevant log output

Application Output :

warning HE0003: Could not load the framework 'DVTDeveloperModeHelper' (path: /Applications/Xcode-14.2.0.app/Contents/SharedFrameworks/DVTDeveloperModeHelper.framework/DVTDeveloperModeHelper): not found.
        
2022-12-23 16:34:01.138 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.IDEDebugger.VariablesViewQuickLookProvider for extension Xcode.IDEDebugger.SpriteKitQuickLookProvider of plug-in com.apple.IDESpriteKitParticleEditor
2022-12-23 16:34:01.140 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.IDEDebugger.VariablesViewQuickLookProvider for extension Xcode.SpriteKit.GKStateMachineQuickLookProvider of plug-in com.apple.IDESpriteKitParticleEditor
2022-12-23 16:34:01.152 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.WatchApplication of plug-in com.apple.dt.IDEWatchSupportUI
2022-12-23 16:34:01.152 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.DataSourceConnection for extension Xcode.DebuggerFoundation.watchOSSimulator.DataSourceConnectionTargetHub of plug-in com.apple.dt.IDEWatchSupportUI
2022-12-23 16:34:01.152 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.Application of plug-in com.apple.dt.IDEWatchSupportUI
2022-12-23 16:34:01.152 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.Tool of plug-in com.apple.dt.IDEWatchSupportUI
2022-12-23 16:34:01.152 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.ViewDescriber for extension Xcode.DebuggerFoundation.watchOSSimulator.ViewDescriber of plug-in com.apple.dt.IDEWatchSupportUI
2022-12-23 16:34:01.152 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.IntentsService-AppExtension of plug-in com.apple.dt.IDEWatchSupportUI
2022-12-23 16:34:01.152 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.InfoEditorType for extension Xcode.Xcode3ProjectSupport.InfoEditorType.WatchOS.Bundle of plug-in com.apple.dt.IDEWatchSupportUI
2022-12-23 16:34:01.152 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.WatchKit2-AppExtension of plug-in com.apple.dt.IDEWatchSupportUI
2022-12-23 16:34:01.152 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.InfoEditorSlice for extension Xcode.Xcode3ProjectSupport.InfoEditorSlice.WatchOS.BundleInfo of plug-in com.apple.dt.IDEWatchSupportUI
2022-12-23 16:34:01.152 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.ViewDescriber for extension Xcode.DebuggerFoundation.watchOS.ViewDescriber of plug-in com.apple.dt.IDEWatchSupportUI
2022-12-23 16:34:01.153 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.Framework of plug-in com.apple.dt.IDEWatchSupportUI
2022-12-23 16:34:01.153 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.ExtensionKitAppExtension of plug-in com.apple.dt.IDEWatchSupportUI
2022-12-23 16:34:01.153 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.AppExtension of plug-in com.apple.dt.IDEWatchSupportUI
2022-12-23 16:34:01.153 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.DataSourceConnection for extension Xcode.DebuggerFoundation.watchOS.DataSourceConnectionTargetHub of plug-in com.apple.dt.IDEWatchSupportUI
2022-12-23 16:34:01.153 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.IDEiPhoneSupport.TargetEditor for extension Xcode.IDEiPhoneSupport.TargetEditor.WatchOS.Application of plug-in com.apple.dt.IDEWatchSupportUI
2022-12-23 16:34:01.154 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.IDEAppleTVSupportUIFramework of plug-in com.apple.dt.IDEAppleTVSupportUI
2022-12-23 16:34:01.154 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.IDEAppleTVSupportUI.Application of plug-in com.apple.dt.IDEAppleTVSupportUI
2022-12-23 16:34:01.154 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.IDEAppleTVSupportUI.AppExtension of plug-in com.apple.dt.IDEAppleTVSupportUI
2022-12-23 16:34:01.154 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.DataSourceConnection for extension Xcode.DebuggerFoundation.tvOSSimulator.DataSourceConnectionTargetHub of plug-in com.apple.dt.IDEAppleTVSupportUI
2022-12-23 16:34:01.154 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.IDEAppleTVSupportUI.ExtensionKitAppExtension of plug-in com.apple.dt.IDEAppleTVSupportUI
2022-12-23 16:34:01.154 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.InfoEditorType for extension Xcode.Xcode3ProjectSupport.InfoEditorType.appletvos.Bundle of plug-in com.apple.dt.IDEAppleTVSupportUI
2022-12-23 16:34:01.154 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.ViewDescriber for extension Xcode.DebuggerFoundation.ATVSimulator.ViewDescriber of plug-in com.apple.dt.IDEAppleTVSupportUI
2022-12-23 16:34:01.154 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.DeviceIconProvider for extension Xcode.DebuggerFoundation.DeviceIconProvider.AppleTV of plug-in com.apple.dt.IDEAppleTVSupportUI
2022-12-23 16:34:01.154 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.ViewDescriber for extension Xcode.DebuggerFoundation.ATV.ViewDescriber of plug-in com.apple.dt.IDEAppleTVSupportUI
2022-12-23 16:34:01.154 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.DataSourceConnection for extension Xcode.DebuggerFoundation.tvOS.DataSourceConnectionTargetHub of plug-in com.apple.dt.IDEAppleTVSupportUI
2022-12-23 16:34:01.154 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.IDEAppleTVSupportUI.XPC of plug-in com.apple.dt.IDEAppleTVSupportUI
2022-12-23 16:34:01.154 mlaunch[1338:28105] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.InfoEditorSlice for extension Xcode.Xcode3ProjectSupport.InfoEditorSlice.appletvos.BundleTargetInfo of plug-in com.apple.dt.IDEAppleTVSupportUI
2022-12-23 16:34:02.118 mlaunch[1338:28130] Thread Pool Worker DTDeviceKit: Failed to mount DDI from '<DVTFilePath:0x600002e0aa70:'/Applications/Xcode-14.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/16.1/DeveloperDiskImage.dmg'>', error=-402652900: Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare the device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x600000a48d80 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402652900 "The disk image is not allowed to be mounted." UserInfo={MobileDeviceErrorCode=(0xE800011C), com.apple.dtdevicekit.stacktrace=(
	0   DTDeviceKitBase                     0x0000000115409c90 DTDKCreateNSErrorFromAMDErrorCode + 235
	1   DTDeviceKitBase                     0x0000000115443c3c -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 902
	2   DTDeviceKitBase                     0x000000011544471c __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 608
	3   libdispatch.dylib                   0x00007ff814b5a317 _dispatch_client_callout + 8
	4   libdispatch.dylib                   0x00007ff814b677ee _dispatch_lane_barrier_sync_invoke_and_complete + 60
	5   DTDeviceKitBase                     0x000000011544445c -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 185
	6   mlaunch                             0x000000010e45c439 xamarin_dyn_objc_msgSend + 217
	7   ???                                 0x0000000116849b9f 0x0 + 4672756639
	8   ???                                 0x0000000116849a33 0x0 + 4672756275
	9   ???                                 0x00000001168446bb 0x0 + 4672734907
	10  ???                                 0x000000011533f2c2 0x0 + 4650693314
	11  ???                                 0x0000000114580ba6 0x0 + 4636281766
	12  ???                                 0x00000001145806eb 0x0 + 4636280555
	13  ???                                 0x000000011533f0f3 0x0 + 4650692851
	14  ???                                 0x00000001168496ee 0x0 + 4672755438
	15  ???                                 0x0000000114850d03 0x0 + 4639231235
	16  ???                                 0x0000000114850b1b 0x0 + 4639230747
	17  ???                                 0x0000000116846723 0x0 + 4672743203
	18  ???                                 0x0000000116846403 0x0 + 4672742403
	19  ???                                 0x000000011534967b 0x0 + 4650735227
	20  ???                                 0x000000011534904b 0x0 + 4650733643
	21  ???                                 0x0000000115348f43 0x0 + 4650733379
	22  ???                                 0x00000001153468ca 0x0 + 4650723530
	23  ???                                 0x0000000115345e9a 0x0 + 4650720922
	24  ???                                 0x00000001153458a3 0x0 + 4650719395
	25  ???                                 0x0000000115345b36 0x0 + 4650720054
	26  mlaunch                             0x000000010e549263 mono_jit_runtime_invoke + 1603
	27  mlaunch                             0x000000010e67f31f mono_runtime_try_invoke + 143
	28  mlaunch                             0x000000010e6cc4ba worker_callback + 938
	29  mlaunch                             0x000000010e6ca111 worker_thread + 369
	30  mlaunch                             0x000000010e6d6963 start_wrapper_internal + 403
	31  mlaunch                             0x000000010e6d67ae start_wrapper + 62
	32  libsystem_pthread.dylib             0x00007ff814d114e1 _pthread_start + 125
	33  libsystem_pthread.dylib             0x00007ff814d0cf6b thread_start + 15
), DVTRadarComponentKey=261622, NSLocalizedDescription=The disk image is not allowed to be mounted.}}, NSLocalizedRecoverySuggestion=This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your Mac and device in order to correctly detect compatibility., NSLocalizedFailure=The disk image is not allowed to be mounted., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare the device for development.}
warning HE0030: Could not mount developer tools on 'iPhone X Ios 16.2': Failed to prepare the device for development.
        
warning HE0031: Failed to mount developer tools on 'iPhone X Ios 16.2'.
warning MT1043: Failed to launch the application using the instruments service. Will try launching the app using gdb service.
        
Launching 'com.companyname.ios162andxcode142' on the device 'iPhone X Ios 16.2'
2022-12-23 16:34:02.506 mlaunch[1338:28105] [MT] DTDeviceKit: Failed to mount DDI from '<DVTFilePath:0x600002e0aa70:'/Applications/Xcode-14.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/16.1/DeveloperDiskImage.dmg'>', error=-402652900: Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare the device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x60000095cfc0 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402652900 "The disk image is not allowed to be mounted." UserInfo={MobileDeviceErrorCode=(0xE800011C), com.apple.dtdevicekit.stacktrace=(
	0   DTDeviceKitBase                     0x0000000115409c90 DTDKCreateNSErrorFromAMDErrorCode + 235
	1   DTDeviceKitBase                     0x0000000115443c3c -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 902
	2   DTDeviceKitBase                     0x000000011544471c __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 608
	3   libdispatch.dylib                   0x00007ff814b5a317 _dispatch_client_callout + 8
	4   libdispatch.dylib                   0x00007ff814b677ee _dispatch_lane_barrier_sync_invoke_and_complete + 60
	5   DTDeviceKitBase                     0x000000011544445c -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 185
	6   mlaunch                             0x000000010e45c439 xamarin_dyn_objc_msgSend + 217
	7   ???                                 0x0000000116849b9f 0x0 + 4672756639
	8   ???                                 0x0000000116849a33 0x0 + 4672756275
	9   ???                                 0x00000001168446bb 0x0 + 4672734907
	10  ???                                 0x000000011533f2c2 0x0 + 4650693314
	11  ???                                 0x0000000114580ba6 0x0 + 4636281766
	12  ???                                 0x00000001145806eb 0x0 + 4636280555
	13  ???                                 0x000000011533f0f3 0x0 + 4650692851
	14  ???                                 0x0000000114853f4e 0x0 + 4639244110
	15  ???                                 0x0000000114853e45 0x0 + 4639243845
	16  ???                                 0x00000001107ba231 0x0 + 4571505201
	17  mlaunch                             0x000000010e549263 mono_jit_runtime_invoke + 1603
	18  mlaunch                             0x000000010e67f31f mono_runtime_try_invoke + 143
	19  mlaunch                             0x000000010e6821cf mono_runtime_invoke + 95
	20  mlaunch                             0x000000010e45970c xamarin_invoke_trampoline + 6220
	21  mlaunch                             0x000000010e45b0d9 xamarin_arch_trampoline + 105
	22  mlaunch                             0x000000010e45c2b6 xamarin_x86_64_common_trampoline + 118
	23  Foundation                          0x00007ff815c55527 __NSThreadPerformPerform + 179
	24  CoreFoundation                      0x00007ff814dd817b __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	25  CoreFoundation                      0x00007ff814dd80e3 __CFRunLoopDoSource0 + 180
	26  CoreFoundation                      0x00007ff814dd7e5d __CFRunLoopDoSources0 + 242
	27  CoreFoundation                      0x00007ff814dd6878 __CFRunLoopRun + 892
	28  CoreFoundation                      0x00007ff814dd5e3c CFRunLoopRunSpecific + 562
	29  Foundation                          0x00007ff815c33d4a -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 216
	30  Foundation                          0x00007ff815cb9c21 -[NSRunLoop(NSRunLoop) runUntilDate:] + 103
	31  mlaunch                             0x000000010e45c439 xamarin_dyn_objc_msgSend + 217
	32  ???                                 0x00000001145775cf 0x0 + 4636243407
	33  ???                                 0x00000001148479cb 0x0 + 4639193547
	34  ???                                 0x000000011484717f 0x0 + 4639191423
	35  ???                                 0x0000000110871e8b 0x0 + 4572257931
	36  ???                                 0x000000011069f9e3 0x0 + 4570348003
	37  ???                                 0x000000011069fe51 0x0 + 4570349137
	38  mlaunch                             0x000000010e549263 mono_jit_runtime_invoke + 1603
	39  mlaunch                             0x000000010e67d918 mono_runtime_invoke_checked + 136
	40  mlaunch                             0x000000010e684ce5 mono_runtime_exec_main_checked + 117
	41  mlaunch                             0x000000010e4a434c mono_jit_exec + 364
	42  mlaunch                             0x000000010e4a73e8 mono_main + 8728
	43  mlaunch                             0x000000010e45cc69 xamarin_main + 1145
	44  mlaunch                             0x000000010e45da74 main + 36
	45  dyld                                0x000000011cf5452e start + 462
), DVTRadarComponentKey=261622, NSLocalizedDescription=The disk image is not allowed to be mounted.}}, NSLocalizedRecoverySuggestion=This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your Mac and device in order to correctly detect compatibility., NSLocalizedFailure=The disk image is not allowed to be mounted., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare the device for development.}
warning HE0030: Could not mount developer tools on 'iPhone X Ios 16.2': Failed to prepare the device for development.
        
warning HE0031: Failed to mount developer tools on 'iPhone X Ios 16.2'.
Could not find the application 'com.companyname.ios162andxcode142' on the device 'iPhone X Ios 16.2'.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 27 (18 by maintainers)

Most upvoted comments

after updating Microsoft Visual Studio 2022 to Version 17.4.4 I did not face this issue again.✅

I can see from the log that despite the fact that I run VS for Mac on the device thinks that it is a build simulator

Good catch, I’m not sure what’s happening here.

Adding this to the csproj (for all configurations, not just Release), should work around it:

<PropertyGroup>
    <RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
</PropertyGroup>

can you try that and confirm if it works?

@KSemenenko the value for aps-environment must be development for builds signed with a development provisioning profile: https://developer.apple.com/documentation/bundleresources/entitlements/aps-environment?language=objc