Flutter Error deploying app from Android Studio to iPhone

668

got it fixed, first upgraded flutter to latest version then exited Xcode and Android Studio run Flutter Clean the iOS deployment target was - 12, now its - 9 ran it and it worked.

Share:
668
Admin
Author by

Admin

Updated on December 25, 2022

Comments

  • Admin
    Admin over 1 year

    I am trying to launch my flutter app from android studio to my iPhone, and I can't.

    when I build my app from Xcode it work, until I stop the process in Xcode and then the app quits on my iPhone. when I try launch in android studio I get this error:

    ═══════════════════════════════════════════════════════════════════════════════════
    Error launching app. Try launching from within Xcode via:
        open ios/Runner.xcworkspace
    
    Your Xcode version may be too old for your iOS version.
    ═══════════════════════════════════════════════════════════════════════════════════
    2020-11-01 13:36:36.578 ios-deploy[40041:293268] [ !! ] Error 0xe8000022: The service is invalid. AMDeviceSecureStartService(device, CFSTR("com.apple.debugserver"), NULL, &con)
    Could not run build/ios/iphoneos/Runner.app on dabb0ea54361e423bbe5c7824457de5ee2bfa182.
    Try launching Xcode and selecting "Product > Run" to fix the problem:
      open ios/Runner.xcworkspace
    
    Error launching application on Yochai’s iPhone.
    

    I use: MacBook Pro 2015 13' iPhone 7 Xcode 12.1 iOS 14.1 Android Studio 4.1 my flutter and dart are up to date my brew, cocoa pods are up to date

    I already tried: restarting Xcode, android studio, my Mac, my iPhone tried clean the build, delete the app.

    and still get that message every time. does anyone has a clue about it?

    • Rahul Sharma
      Rahul Sharma over 3 years
      try changing the iOS deployment target to iOS 9 from iOS 8 in xcode.