在 M1 MacBook 上构建 Flutter v2.8.1 iOS 应用程序时出错。 :错误=-402652958:错误域=com.apple.dtdevicekit代码=806
我正在 M1 MacBook 上开发 Flutter v2.8.1 应用程序。 使用 iOS 构建时出现问题。
我尝试了很长一段时间各种方法,但没有任何效果。
同样的项目在 Intel MacBook 上构建得很好。
我还运行了下面的命令。
> sudo gem install ffi
> sudo gem install cocoapods
为 iOS 构建时,会出现以下错误。
Launching lib/main.dart on iPhone 13 in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 42.9s
Failed to build iOS app
Error output from Xcode build:
↳
2022-02-24 16:35:23.257 xcodebuild[41435:8807886] DTDeviceKit: Failed to mount DDI from '<DVTFilePath:0x6000004a8000:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0/DeveloperDiskImage.dmg'>', error=-402653066: Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x600003838c00 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653066 "Could not support development." UserInfo={MobileDeviceErrorCode=(0xE8000076), com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x0000000107436ff8 DTDKCreateNSErrorFromAMDErrorCode + 272
1 DTDeviceKitBase 0x00000001074703bc -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 912
2 DTDeviceKitBase 0x0000000107470db0 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 564
3 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20
4 libdispatch.dylib 0x0000000182519e00 _dispatch_lane_barrier_sync_invoke_and_complete + 56
5 DTDeviceKitBase 0x0000000107470b20 -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168
6 IDEiOSSupportCore 0x000000010e839070 __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148
7 DVTFoundation 0x0000000102116238 __DVT_CALLING_CLIENT_BLOCK__ + 16
8 DVTFoundation 0x0000000102119ba8 __DVTDispatchGroupAsync_block_invoke + 564
9 libdispatch.dylib 0x0000000182508e60 _dispatch_call_block_and_release + 32
10 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20
11 libdispatch.dylib 0x000000018250e118 _dispatch_continuation_pop + 656
12 libdispatch.dylib 0x000000018250d6dc _dispatch_async_redirect_invoke + 596
13 libdispatch.dylib 0x000000018251c31c _dispatch_root_queue_drain + 396
14 libdispatch.dylib 0x000000018251cb58 _dispatch_worker_thread2 + 164
15 libsystem_pthread.dylib 0x00000001826c5574 _pthread_wqthread + 228
16 libsystem_pthread.dylib 0x00000001826c42c4 start_wqthread + 8
), DVTRadarComponentKey=261622, NSLocalizedDescription=Could not support development.}}, NSLocalizedRecoverySuggestion=If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device., NSLocalizedFailure=This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare device for development.}
2022-02-24 16:35:23.260 xcodebuild[41435:8807886] iPhoneConnect:
I am developing a Flutter v2.8.1 app on M1 MacBook.
There is a problem when building with iOS.
I've tried all sorts of ways for a long time, but nothing works.
The same project builds fine on Intel MacBook.
I also ran the command below.
> sudo gem install ffi
> sudo gem install cocoapods
When building for iOS, the following error occurs.
Launching lib/main.dart on iPhone 13 in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 42.9s
Failed to build iOS app
Error output from Xcode build:
↳
2022-02-24 16:35:23.257 xcodebuild[41435:8807886] DTDeviceKit: Failed to mount DDI from '<DVTFilePath:0x6000004a8000:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0/DeveloperDiskImage.dmg'>', error=-402653066: Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x600003838c00 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653066 "Could not support development." UserInfo={MobileDeviceErrorCode=(0xE8000076), com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x0000000107436ff8 DTDKCreateNSErrorFromAMDErrorCode + 272
1 DTDeviceKitBase 0x00000001074703bc -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 912
2 DTDeviceKitBase 0x0000000107470db0 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 564
3 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20
4 libdispatch.dylib 0x0000000182519e00 _dispatch_lane_barrier_sync_invoke_and_complete + 56
5 DTDeviceKitBase 0x0000000107470b20 -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168
6 IDEiOSSupportCore 0x000000010e839070 __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148
7 DVTFoundation 0x0000000102116238 __DVT_CALLING_CLIENT_BLOCK__ + 16
8 DVTFoundation 0x0000000102119ba8 __DVTDispatchGroupAsync_block_invoke + 564
9 libdispatch.dylib 0x0000000182508e60 _dispatch_call_block_and_release + 32
10 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20
11 libdispatch.dylib 0x000000018250e118 _dispatch_continuation_pop + 656
12 libdispatch.dylib 0x000000018250d6dc _dispatch_async_redirect_invoke + 596
13 libdispatch.dylib 0x000000018251c31c _dispatch_root_queue_drain + 396
14 libdispatch.dylib 0x000000018251cb58 _dispatch_worker_thread2 + 164
15 libsystem_pthread.dylib 0x00000001826c5574 _pthread_wqthread + 228
16 libsystem_pthread.dylib 0x00000001826c42c4 start_wqthread + 8
), DVTRadarComponentKey=261622, NSLocalizedDescription=Could not support development.}}, NSLocalizedRecoverySuggestion=If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device., NSLocalizedFailure=This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare device for development.}
2022-02-24 16:35:23.260 xcodebuild[41435:8807886] iPhoneConnect: ????<DVTiOSDevice (0x1168722b0), Raymond’s iPhone13, iPhone, 15.4 (19E5219e), 00008110-001C3DD93A29801E> unable to mount developer disk image, (Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x600003838c00 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653066 "Could not support development." UserInfo={MobileDeviceErrorCode=(0xE8000076), com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x0000000107436ff8 DTDKCreateNSErrorFromAMDErrorCode + 272
1 DTDeviceKitBase 0x00000001074703bc -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 912
2 DTDeviceKitBase 0x0000000107470db0 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 564
3 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20
4 libdispatch.dylib 0x0000000182519e00 _dispatch_lane_barrier_sync_invoke_and_complete + 56
5 DTDeviceKitBase 0x0000000107470b20 -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168
6 IDEiOSSupportCore 0x000000010e839070 __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148
7 DVTFoundation 0x0000000102116238 __DVT_CALLING_CLIENT_BLOCK__ + 16
8 DVTFoundation 0x0000000102119ba8 __DVTDispatchGroupAsync_block_invoke + 564
9 libdispatch.dylib 0x0000000182508e60 _dispatch_call_block_and_release + 32
10 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20
11 libdispatch.dylib 0x000000018250e118 _dispatch_continuation_pop + 656
12 libdispatch.dylib 0x000000018250d6dc _dispatch_async_redirect_invoke + 596
13 libdispatch.dylib 0x000000018251c31c _dispatch_root_queue_drain + 396
14 libdispatch.dylib 0x000000018251cb58 _dispatch_worker_thread2 + 164
15 libsystem_pthread.dylib 0x00000001826c5574 _pthread_wqthread + 228
16 libsystem_pthread.dylib 0x00000001826c42c4 start_wqthread + 8
), DVTRadarComponentKey=261622, NSLocalizedDescription=Could not support development.}}, NSLocalizedRecoverySuggestion=If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device., NSLocalizedFailure=This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare device for development.}) {
AssociatedMobileDeviceFunction = AMDeviceMountImage;
DVTRadarComponentKey = 487927;
NSLocalizedDescription = "Failed to prepare device for development.";
NSLocalizedFailure = "This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running.";
NSLocalizedRecoverySuggestion = "If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device.";
NSUnderlyingError = "Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653066 \"Could not support development.\" UserInfo={MobileDeviceErrorCode=(0xE8000076), com.apple.dtdevicekit.stacktrace=(\n\t0 DTDeviceKitBase 0x0000000107436ff8 DTDKCreateNSErrorFromAMDErrorCode + 272\n\t1 DTDeviceKitBase 0x00000001074703bc -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 912\n\t2 DTDeviceKitBase 0x0000000107470db0 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 564\n\t3 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20\n\t4 libdispatch.dylib 0x0000000182519e00 _dispatch_lane_barrier_sync_invoke_and_complete + 56\n\t5 DTDeviceKitBase 0x0000000107470b20 -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168\n\t6 IDEiOSSupportCore 0x000000010e839070 __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148\n\t7 DVTFoundation 0x0000000102116238 __DVT_CALLING_CLIENT_BLOCK__ + 16\n\t8 DVTFoundation 0x0000000102119ba8 __DVTDispatchGroupAsync_block_invoke + 564\n\t9 libdispatch.dylib 0x0000000182508e60 _dispatch_call_block_and_release + 32\n\t10 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20\n\t11 libdispatch.dylib 0x000000018250e118 _dispatch_continuation_pop + 656\n\t12 libdispatch.dylib 0x000000018250d6dc _dispatch_async_redirect_invoke + 596\n\t13 libdispatch.dylib 0x000000018251c31c _dispatch_root_queue_drain + 396\n\t14 libdispatch.dylib 0x000000018251cb58 _dispatch_worker_thread2 + 164\n\t15 libsystem_pthread.dylib 0x00000001826c5574 _pthread_wqthread + 228\n\t16 libsystem_pthread.dylib 0x00000001826c42c4 start_wqthread + 8\n), DVTRadarComponentKey=261622, NSLocalizedDescription=Could not support development.}";
}
2022-02-24 16:35:23.260 xcodebuild[41435:8807867] [MT] iPhoneConnect: ????<DVTiOSDevice (0x1168722b0), Raymond’s iPhone13, iPhone, 15.4 (19E5219e), 00008110-001C3DD93A29801E> -- An error occurred whilst preparing device for development -- Failed to prepare device for development.
Domain: com.apple.dtdevicekit
Code: 806
Recovery Suggestion: If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device.
User Info: {
AssociatedMobileDeviceFunction = AMDeviceMountImage;
DVTRadarComponentKey = 487927;
NSLocalizedFailure = "This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running.";
}
--
Could not support development.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653066
User Info: {
DVTRadarComponentKey = 261622;
MobileDeviceErrorCode = "(0xE8000076)";
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x0000000107436ff8 DTDKCreateNSErrorFromAMDErrorCode + 272
1 DTDeviceKitBase 0x00000001074703bc -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 912
2 DTDeviceKitBase 0x0000000107470db0 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 564
3 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20
4 libdispatch.dylib 0x0000000182519e00 _dispatch_lane_barrier_sync_invoke_and_complete + 56
5 DTDeviceKitBase 0x0000000107470b20 -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168
6 IDEiOSSupportCore 0x000000010e839070 __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148
7 DVTFoundation 0x0000000102116238 __DVT_CALLING_CLIENT_BLOCK__ + 16
8 DVTFoundation 0x0000000102119ba8 __DVTDispatchGroupAsync_block_invoke + 564
9 libdispatch.dylib 0x0000000182508e60 _dispatch_call_block_and_release + 32
10 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20
11 libdispatch.dylib 0x000000018250e118 _dispatch_continuation_pop + 656
12 libdispatch.dylib 0x000000018250d6dc _dispatch_async_redirect_invoke + 596
13 libdispatch.dylib 0x000000018251c31c _dispatch_root_queue_drain + 396
14 libdispatch.dylib 0x000000018251cb58 _dispatch_worker_thread2 + 164
15 libsystem_pthread.dylib 0x00000001826c5574 _pthread_wqthread + 228
16 libsystem_pthread.dylib 0x00000001826c42c4 start_wqthread + 8
);
}
--
2022-02-24 16:35:23.260 xcodebuild[41435:8807867] [MT] iPhoneConnect: ????<DVTiOSDevice (0x1168722b0), Raymond’s iPhone13, iPhone, 15.4 (19E5219e), 00008110-001C3DD93A29801E> == Underlying device preparation errors ==
2022-02-24 16:35:23.260 xcodebuild[41435:8807867] [MT] iPhoneConnect: Failed to prepare device for development.
Domain: com.apple.dtdevicekit
Code: 806
Recovery Suggestion: If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device.
User Info: {
AssociatedMobileDeviceFunction = AMDeviceMountImage;
DVTRadarComponentKey = 487927;
NSLocalizedFailure = "This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running.";
}
--
Could not support development.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653066
User Info: {
DVTRadarComponentKey = 261622;
MobileDeviceErrorCode = "(0xE8000076)";
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x0000000107436ff8 DTDKCreateNSErrorFromAMDErrorCode + 272
1 DTDeviceKitBase 0x00000001074703bc -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 912
2 DTDeviceKitBase 0x0000000107470db0 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 564
3 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20
4 libdispatch.dylib 0x0000000182519e00 _dispatch_lane_barrier_sync_invoke_and_complete + 56
5 DTDeviceKitBase 0x0000000107470b20 -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168
6 IDEiOSSupportCore 0x000000010e839070 __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148
7 DVTFoundation 0x0000000102116238 __DVT_CALLING_CLIENT_BLOCK__ + 16
8 DVTFoundation 0x0000000102119ba8 __DVTDispatchGroupAsync_block_invoke + 564
9 libdispatch.dylib 0x0000000182508e60 _dispatch_call_block_and_release + 32
10 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20
11 libdispatch.dylib 0x000000018250e118 _dispatch_continuation_pop + 656
12 libdispatch.dylib 0x000000018250d6dc _dispatch_async_redirect_invoke + 596
13 libdispatch.dylib 0x000000018251c31c _dispatch_root_queue_drain + 396
14 libdispatch.dylib 0x000000018251cb58 _dispatch_worker_thread2 + 164
15 libsystem_pthread.dylib 0x00000001826c5574 _pthread_wqthread + 228
16 libsystem_pthread.dylib 0x00000001826c42c4 start_wqthread + 8
);
}
--
2022-02-24 16:35:23.260 xcodebuild[41435:8807867] [MT] iPhoneConnect: ????<DVTiOSDevice (0x1168722b0), Raymond’s iPhone13, iPhone, 15.4 (19E5219e), 00008110-001C3DD93A29801E> == END: Underlying device preparation errors ==
2022-02-24 16:35:23.892 xcodebuild[41435:8807886] DTDeviceKit: Failed to mount DDI from '<DVTFilePath:0x6000004a8000:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0/DeveloperDiskImage.dmg'>', error=-402653066: Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x600003b0c840 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653066 "Could not support development." UserInfo={MobileDeviceErrorCode=(0xE8000076), com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x0000000107436ff8 DTDKCreateNSErrorFromAMDErrorCode + 272
1 DTDeviceKitBase 0x00000001074703bc -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 912
2 DTDeviceKitBase 0x0000000107470db0 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 564
3 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20
4 libdispatch.dylib 0x0000000182519e00 _dispatch_lane_barrier_sync_invoke_and_complete + 56
5 DTDeviceKitBase 0x0000000107470b20 -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168
6 IDEiOSSupportCore 0x000000010e839070 __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148
7 DVTFoundation 0x0000000102116238 __DVT_CALLING_CLIENT_BLOCK__ + 16
8 DVTFoundation 0x0000000102119ba8 __DVTDispatchGroupAsync_block_invoke + 564
9 libdispatch.dylib 0x0000000182508e60 _dispatch_call_block_and_release + 32
10 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20
11 libdispatch.dylib 0x000000018250e118 _dispatch_continuation_pop + 656
12 libdispatch.dylib 0x000000018250d6dc _dispatch_async_redirect_invoke + 596
13 libdispatch.dylib 0x000000018251c31c _dispatch_root_queue_drain + 396
14 libdispatch.dylib 0x000000018251cb58 _dispatch_worker_thread2 + 164
15 libsystem_pthread.dylib 0x00000001826c5574 _pthread_wqthread + 228
16 libsystem_pthread.dylib 0x00000001826c42c4 start_wqthread + 8
), DVTRadarComponentKey=261622, NSLocalizedDescription=Could not support development.}}, NSLocalizedRecoverySuggestion=If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device., NSLocalizedFailure=This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare device for development.}
2022-02-24 16:35:23.892 xcodebuild[41435:8807886] iPhoneConnect: ????<DVTiOSDevice (0x1168722b0), Raymond’s iPhone13, iPhone, 15.4 (19E5219e), 00008110-001C3DD93A29801E> unable to mount developer disk image, (Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x600003b0c840 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653066 "Could not support development." UserInfo={MobileDeviceErrorCode=(0xE8000076), com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x0000000107436ff8 DTDKCreateNSErrorFromAMDErrorCode + 272
1 DTDeviceKitBase 0x00000001074703bc -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 912
2 DTDeviceKitBase 0x0000000107470db0 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 564
3 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20
4 libdispatch.dylib 0x0000000182519e00 _dispatch_lane_barrier_sync_invoke_and_complete + 56
5 DTDeviceKitBase 0x0000000107470b20 -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168
6 IDEiOSSupportCore 0x000000010e839070 __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148
7 DVTFoundation 0x0000000102116238 __DVT_CALLING_CLIENT_BLOCK__ + 16
8 DVTFoundation 0x0000000102119ba8 __DVTDispatchGroupAsync_block_invoke + 564
9 libdispatch.dylib 0x0000000182508e60 _dispatch_call_block_and_release + 32
10 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20
11 libdispatch.dylib 0x000000018250e118 _dispatch_continuation_pop + 656
12 libdispatch.dylib 0x000000018250d6dc _dispatch_async_redirect_invoke + 596
13 libdispatch.dylib 0x000000018251c31c _dispatch_root_queue_drain + 396
14 libdispatch.dylib 0x000000018251cb58 _dispatch_worker_thread2 + 164
15 libsystem_pthread.dylib 0x00000001826c5574 _pthread_wqthread + 228
16 libsystem_pthread.dylib 0x00000001826c42c4 start_wqthread + 8
), DVTRadarComponentKey=261622, NSLocalizedDescription=Could not support development.}}, NSLocalizedRecoverySuggestion=If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device., NSLocalizedFailure=This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare device for development.}) {
AssociatedMobileDeviceFunction = AMDeviceMountImage;
DVTRadarComponentKey = 487927;
NSLocalizedDescription = "Failed to prepare device for development.";
NSLocalizedFailure = "This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running.";
NSLocalizedRecoverySuggestion = "If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device.";
NSUnderlyingError = "Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653066 \"Could not support development.\" UserInfo={MobileDeviceErrorCode=(0xE8000076), com.apple.dtdevicekit.stacktrace=(\n\t0 DTDeviceKitBase 0x0000000107436ff8 DTDKCreateNSErrorFromAMDErrorCode + 272\n\t1 DTDeviceKitBase 0x00000001074703bc -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 912\n\t2 DTDeviceKitBase 0x0000000107470db0 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 564\n\t3 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20\n\t4 libdispatch.dylib 0x0000000182519e00 _dispatch_lane_barrier_sync_invoke_and_complete + 56\n\t5 DTDeviceKitBase 0x0000000107470b20 -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168\n\t6 IDEiOSSupportCore 0x000000010e839070 __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148\n\t7 DVTFoundation 0x0000000102116238 __DVT_CALLING_CLIENT_BLOCK__ + 16\n\t8 DVTFoundation 0x0000000102119ba8 __DVTDispatchGroupAsync_block_invoke + 564\n\t9 libdispatch.dylib 0x0000000182508e60 _dispatch_call_block_and_release + 32\n\t10 libdispatch.dylib 0x000000018250abac _dispatch_client_callout + 20\n\t11 libdispatch.dylib 0x000000018250e118 _dispatch_continuation_pop + 656\n\t12 libdispatch.dylib 0x000000018250d6dc _dispatch_async_redirect_invoke + 596\n\t13 libdispatch.dylib 0x000000018251c31c _dispatch_root_queue_drain + 396\n\t14 libdispatch.dylib 0x000000018251cb58 _dispatch_worker_thread2 + 164\n\t15 libsystem_pthread.dylib 0x00000001826c5574 _pthread_wqthread + 228\n\t16 libsystem_pthread.dylib 0x00000001826c42c4 start_wqthread + 8\n), DVTRadarComponentKey=261622, NSLocalizedDescription=Could not support development.}";
}
2022-02-24 16:35:23.893 xcodebuild[41435:8807867] [MT] iPhoneConnect: ????<DVTiOSDevice (0x1168722b0), Raymond’s iPhone13, iPhone, 15.4 (19E5219e), 00008110-001C3DD93A29801E> -- An error occurred whilst preparing device for development -- Failed to prepare device for development.
Domain: com.apple.dtdevicekit
Code: 806
Recovery Suggestion: If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device.
User Info: {
AssociatedMobileDeviceFunction = AMDeviceMountImage;
DVTRadarComponentKey = 487927;
NSLocalizedFailure = "This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running.";
}
--
=========================== skip the middle ============================
warning: Stale file '/Users/gracegyu/Documents/Azure/cleverpam/build/ios/Debug-iphonesimulator/image_picker/image_picker.framework/Headers/FLTImagePickerPlugin_Test.h' is located outside of the allowed root paths.
warning: Stale file '/Users/gracegyu/Documents/Azure/cleverpam/build/ios/Debug-iphonesimulator/Runner.app.dSYM/Contents/Resources/DWARF/Runner' is located outside of the allowed root paths.
warning: Stale file '/Users/gracegyu/Documents/Azure/cleverpam/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/device_info_plus.framework' is located outside of the allowed root paths.
warning: Stale file '/Users/gracegyu/Documents/Azure/cleverpam/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/integration_test.framework' is located outside of the allowed root paths.
warning: Stale file '/Users/gracegyu/Documents/Azure/cleverpam/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/share_plus.framework' is located outside of the allowed root paths.
note: Removed stale file '/Users/gracegyu/Library/Developer/Xcode/DerivedData/Runner-gpddwqgzjbasxveiquubzegvfqbi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/PromisesObjC.build/Script-61624EEA4A085137B50822CDE34252BB.sh'
/Users/gracegyu/Documents/Azure/cleverpam/ios/Runner.xcodeproj: warning: The Copy Bundle Resources build phase contains this target's Info.plist file '/Users/gracegyu/Documents/Azure/cleverpam/ios/Runner/Info-Debug.plist'. (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 13.
The result of "flutter doctor -v" is below.
Even if you connect the iPhone real device, it cannot be connected. Xcode doesn't work on iPhone either. I've tried everything, but I can't connect.
It was connected until yesterday, but from today it suddenly cannot connect.
[✓] Flutter (Channel dev, 1.26.0-1.0.pre, on macOS 12.0.1 21A559 darwin-arm, locale en-KR)
• Flutter version 1.26.0-1.0.pre at /Users/gracegyu/dev/flutter
• Framework revision 63062a6443 (1 year, 2 months ago), 2020-12-13 23:19:13 +0800
• Engine revision 4797b06652
• Dart version 2.12.0 (build 2.12.0-141.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at /Users/gracegyu/Library/Android/sdk
• Platform android-31, build-tools 32.0.0
• ANDROID_HOME = /Users/gracegyu/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 13.1, Build version 13A1030d
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
???? https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
???? https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
[✓] VS Code (version 1.64.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.34.0
[✓] Connected device (4 available)
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 12 (API 31) (emulator)
• iPhone 13 (mobile) • 37B922DB-CECE-4299-AFBC-86A1AD5680E2 • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.0.1 21A559 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 98.0.4758.102
! Error: Unable to prepare Raymond’s iPhone13 for development. (code -1)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是因为XCode的版本不支持iPhone上安装的iOS版本。只需更新 XCode 即可。
This is because the version of XCode does not support the version of iOS installed on the iPhone. Just update XCode.