Reputation: 451
Error Messange:
Could not run build/ios/iphoneos/Runner.app on <iphonedevice>.
Try launching Xcode and selecting "Product > Run" to fix the problem:
open ios/Runner.xcworkspace
It was working fine originally in real machine, but it broke after I updated it to ios17 and xcode15.
And I try to run it in Xcode and it works, but it doesn’t work in Android studio and VSCode.
Flutter doctor -v:
[✓] Flutter (Channel stable, 3.7.12, on macOS 14.0 23A344 darwin-arm64, locale
zh-Hant-TW)
• Flutter version 3.7.12 on channel stable at
/Users/davis_ho/fvm/versions/3.7.12
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4d9e56e694 (6 months ago), 2023-04-17 21:47:46 -0400
• Engine revision 1a65d409c7
• Dart version 2.19.6
• DevTools version 2.20.1
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/davis_ho/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android
Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15A240d
• CocoaPods version 1.12.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.2)
• 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 17.0.6+0-17.0.6b802.4-9586694)
[✓] VS Code (version 1.82.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.72.0
Already tried:
Reinstalling flutter.
Unparing & paring the iPhone in Xcode.
Uninstalling the app.
VPN & Device Management, to accept or trust.
Upvotes: 2
Views: 2558
Reputation: 1
1- Upgrade to Flutter 3.13.9 • channel stable 2- cd iOS in terminal android studio 3- flutter clean 4- flutter pub get 5- pod install 6- run from android studio 7- make allowed Xcode and android studio go to Privacy & Security > Automation 8- done
Upvotes: 0
Reputation: 451
I upgraded Flutter to 3.13.6 and it works!
3.13.5 (September 20, 2023)
flutter/134825 - Fixes an issue where apps built in profile mode would not install or run on physical iOS 17 devices.
flutter/45598 - Fix permissions on macos artifacts making mac framework readable and executable by all
https://github.com/flutter/flutter/releases/tag/3.13.5
Upvotes: 1