Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error launching application on iPhone Flutter

I'm unable to test my flutter application on VSCode which is running on catalina on vitual box.

After launching application from VSCode, I am just getting single line error Error launching application on Najam’s iPhone. and then application is opening in the device but it is then disconnected with VSCode

Launching lib/main.dart on Najam’s iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: H5PHS46J86
Running pod install...                 277.5s
Running Xcode build...                                                  
 └─Compiling, linking and signing...   114.5s
Xcode build done.                      346.8s
Installing and launching...            59.8s
Error launching application on Najam’s iPhone.

What I've tried

As suggested here https://github.com/flutter/flutter/issues/69632#issuecomment-803646337, I tried below solution but it didn't work for me

  • Setting platform to 10.0 inside the Podfile (platform :ios, '10.0' )
  • Doing a combination of flutter clean, pod cache clean --all and pod install

I also tried this solution too https://stackoverflow.com/a/64661277/7290043. But it didn't work either.

  • flutter clean pod cache clean --all

  • rm -rf ios/Flutter/Flutter.framework

  • flutter pub get

  • pod install

  • flutter run

What should I do?

enter image description here

like image 675
Faizan Kamal Avatar asked May 12 '21 08:05

Faizan Kamal


People also ask

How do I run a Flutter app on my iphone?

To test or deploy our flutter app to a physical device we first need to enable physical device deployment in Xcode using Apple ID or an Apple Developer account. And we also need to set up a package manager to manage flutter plugins that are to be used in the project.

How do I test the Flutter app on my iphone emulator?

Click on the Flutter Inspector from the right pane and click on 'Toggle Platform Mode' from the top menu of the newly opened box. This will change the UI of the running app on your device.

Can you code iOS apps with Flutter?

Flutter is a multi-platform application development framework that enables you, among other platforms, to develop iOS and Android apps from the same source code. However, you need to use Xcode to build an iOS app and Xcode will only work on macOS.

Can Flutter run on both iOS and Android?

Flutter is designed to support mobile apps that run on both Android and iOS, as well as interactive apps that you want to run on your web pages or on the desktop.


Video Answer


1 Answers

The time to launch is very long. What type of machine are you building on? VSCode debugging might just be timing out. Try running directly from xcode and a) see if it remains connected, and b) see if any further errors are reported

like image 168
Agreensh Avatar answered Oct 12 '22 04:10

Agreensh