skip to Main Content

I was trying to compile and install on my iPhone the app I am developing for iOS, everything was fine until at some point XCode started giving me problems, I attach the detail:

Details

Unable to install "Runner"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653081
Recovery Suggestion: Please check your project settings and ensure that a valid product has been built.
--
There was an internal API error.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653081
User Info: {
    DVTRadarComponentKey = 261622;
    MobileDeviceErrorCode = "(0xE8000067)";
    "com.apple.dtdevicekit.stacktrace" = (
    0   DTDeviceKitBase                     0x000000011e735e98 DTDKCreateNSErrorFromAMDErrorCode + 272
    1   DTDeviceKitBase                     0x000000011e771898 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 160
    2   DVTFoundation                       0x000000010523f670 DVTInvokeWithStrongOwnership + 76
    3   DTDeviceKitBase                     0x000000011e7715e4 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1316
    4   IDEiOSSupportCore                   0x000000011e5ebd40 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.294 + 2928
    5   DVTFoundation                       0x00000001053687fc __DVT_CALLING_CLIENT_BLOCK__ + 16
    6   DVTFoundation                       0x000000010536a220 __DVTDispatchAsync_block_invoke + 680
    7   libdispatch.dylib                   0x000000019592e128 _dispatch_call_block_and_release + 32
    8   libdispatch.dylib                   0x000000019592fec0 _dispatch_client_callout + 20
    9   libdispatch.dylib                   0x00000001959376a8 _dispatch_lane_serial_drain + 620
    10  libdispatch.dylib                   0x00000001959382a4 _dispatch_lane_invoke + 404
    11  libdispatch.dylib                   0x0000000195942b74 _dispatch_workloop_worker_thread + 764
    12  libsystem_pthread.dylib             0x0000000195adb89c _pthread_wqthread + 276
    13  libsystem_pthread.dylib             0x0000000195ada5d4 start_wqthread + 8
);
}
--
System Information

macOS Version 11.5.2 (Build 20G95)
Xcode 12.5.1 (18212) (Build 12E507)
Timestamp: 2021-08-21T02:59:59+02:00

I am also attaching what the Android Studio IDE tells me:

No Provisioning Profile was found for your project's Bundle Identifier or your 
device. You can create a new Provisioning Profile for your project in Xcode for 
your team by:
  1- Open the Flutter project's Xcode target with
       open ios/Runner.xcworkspace
  2- Select the 'Runner' project in the navigator then the 'Runner' target
     in the project settings
  3- Make sure a 'Development Team' is selected under Signing & Capabilities > Team. 
     You may need to:
         - Log in with your Apple ID in Xcode first
         - Ensure you have a valid unique Bundle ID
         - Register your device with your Apple Developer Account
         - Let Xcode automatically provision a profile for your app
  4- Build or run your project again

It's also possible that a previously installed app with the same Bundle 
Identifier was signed with a different certificate.

For more information, please visit:
  https://flutter.dev/setup/#deploy-to-ios-devices

Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════
Could not run build/ios/iphoneos/Runner.app on 00008101-001C09912180001E.
Try launching Xcode and selecting "Product > Run" to fix the problem:
  open ios/Runner.xcworkspace

Error launching application on iPhone.

In xCode -> Preferences -> Account I have the account that I have registered in Apple developer portal, I also have seated the Team in the Runner -> Signing & Capability and the Bundler identifier

2

Answers


  1. Try this step.

    1. Backup ios folder

    2. Remove ios folder

    3. Type this cmd flutter create .

    Login or Signup to reply.
  2. I had the same issue, what I suspect happened with you is that your build was successful but you couldn’t install on your device.

    The issue reported by Xcode Domain: com.apple.dt.MobileDeviceErrorDomain is inaccurate. For me, it turned out that the Provisioning Profiles I had created for one of my target extensions had expired. I don’t know why Xcode even allowed me to compile my bundle when I had an extension with an expired provisioning profile – I suppose it just saw the main target’s Provisioning Profile and Signing and had it cached for extension targets – I don’t know. But I could consistently reproduce this.

    My build installed successfully after removing the extension & clearing old Xcode builds and cache. I could even create a new target extension and add everything back later.

    • Try running on a simulator and not on your physical device to make sure that there is no other problem apart from profile and code signing.

    • Try manually assigning Team and Provisioning Profile for each of your targets, instead of Xcode automatically setting it for you.

    • Verify your Provisioning Profiles, Development Team, Signing Certificate from your Apple Developer Account here

    • Clear Xcode cache (Product → Clean). Since you’re using Flutter, also remove the iOS builds from /builds/ios.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search