Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vsCode doesn't run flutter app on physical iPhone

I just installed the latest version of flutter and xcode and I'm getting an error when I try running the flutter app on an actual iPhone. Works on ios simulator. The weird thing is that it works when I run it from xcode, but when I run it from vsCode, I get the following error:

It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
  open ios/Runner.xcworkspace

What I tried doing:

  • Change the bundle identifier to [email protected]
  • Clean and build the ios app
  • clean then ran flutter build bundle

What am I doing wrong and how can I get vsCode to run the app on an iPhone?

Here's the full error:

Launching lib/main.dart on Jessica’s iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: ITYTO5RCWD
Xcode build done.                                           25.4s
Failed to build iOS app
Error output from Xcode build:
↳
    2020-04-19 13:53:51.828 xcodebuild[2046:21215] [MT] iPhoneConnect: 📱<DVTiOSDevice ...> == Underlying device preparation errors ==
    2020-04-19 13:53:51.828 xcodebuild[2046:21215] [MT] iPhoneConnect: Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode.
    Domain: com.apple.platform.iphoneos
    Code: 5
    Failure Reason: allowsSecureServices: 1. isConnected: 0. Platform: <"...platform info...">. DTDKDeviceIdentifierIsIDID: 0
    User Info: {
        DVTDeviceDescription = "...device info..."
    }
    --
    2020-04-19 13:53:51.829 xcodebuild[2046:21215] [MT] iPhoneConnect: 📱<"...platform info..."> == END: Underlying device preparation errors ==
    ** BUILD FAILED **
Xcode's output:
↳
    /Users/Jessica/Development/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1/darwin/Classes/AudioplayersPlugin.m:88:37: warning: incompatible pointer types sending 'FlutterEngine *' to parameter of type 'NSObject<FlutterBinaryMessenger> * _Nonnull' [-Wincompatible-pointer-types]
                        binaryMessenger:_headlessEngine];
                                        ^~~~~~~~~~~~~~~
    In module 'Flutter' imported from /Users/Jessica/Development/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1/darwin/Classes/AudioplayersPlugin.h:2:
    /Users/Jessica/Desktop/flutter_game2/ios/Flutter/Flutter.framework/Headers/FlutterChannels.h:178:74: note: passing argument to parameter 'messenger' here
                          binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;
                                                                             ^
    1 warning generated.
    /Users/Jessica/Desktop/flutter_game2/build/ios/Debug-iphoneos/Runner.app: resource fork, Finder information, or similar detritus not allowed
    Command CodeSign failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
Could not build the precompiled application for the device.

It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
  open ios/Runner.xcworkspace

Error launching application on Jessica’s iPhone.
Exited (sigterm)
like image 393
Jessica Avatar asked Oct 20 '25 03:10

Jessica


1 Answers

Better to use as follows to give app company / organization name

flutter create --org com.yourdomain your_app_name

Swift, Kotlin, and androidx dependencies are the default options

After just open the created project in Android Studio or in VSCode

Parameter

--org com.yourcompany

will form applicationId for Android:

com.yourcompany.yourappname and iOS PRODUCT_BUNDLE_IDENTIFIER:

com.yourcompany.yourAppName To explore all possible parameters type

flutter create --help
like image 181
Vamsee. Avatar answered Oct 21 '25 20:10

Vamsee.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!