Migration from Windows to Mac: Error on Podfile installation - macos

I just migrated a flutter app made on Windows10, to the Mac, and had problems with the app's execution. I searched the internet for similar errors and found several solutions, but none of them solved my case. I tried to delete the files podfile.lock, Podfile, .symlinks, Flutter.Frameword, Fullet.podspec, pubspec.lock, and after that, the code execution (with flutter run) returned this:
Error running pod install
I tried to run this line of code:
"pod install --repo-update"
And I received this:
[!] Unable to find a target named 'FirebaseApp' in project 'Runner.xcodeproj', did find 'Runner'.
I've tried several things and I don't know what's going on.
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.6 19G2021, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.51.0)
[✓] Connected device (1 available)
• No issues found!
My app is connected to Firebase, android, and I'm studying flutterfire with iOS.

Open the terminal, navigate to the project, and type rm ios/Podfile
After that build the project with flutter build ios

Related

Failed to build iOS app Error (Xcode): Expected Flutter XXX, but found XXX

Just upgraded to flutter 3.7.3 on channel stable. Running on ios simulator works fine, but when I try to archive project:
Failed to build iOS app
Error (Xcode): Expected Flutter 857bd6b74c5eb56151bfafe91e7fa6a82b6fee25, but found 248290d6d50a1bf1a6a246544347c03acda867a5
Encountered error while archiving for device.
Flutter doctor is:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.3, on macOS 13.0 22A380 darwin-arm64, locale fr-FR)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.75.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
Found the fix:
This issue happens when you generated a shader compilation jank. In the generated file (i.e flutter_01.sksl.json) you have to change the Flutter version. Preferably you run the SkSL warmup again with the new flutter version

I can't use Xcode simulator in VSCode (CocoaPods error)

Working with Flutter I tried to use Xcode simulator and I get the error in the picture.
I searched everywhere and following all the possible solutions but nothing is right (gem install commands, pod install(*[!] No Podfile found in the project directory*.), brew commands...).
However, if I tried the last app that I made and I have no problems running the simulator. Why with this project? Thank you in adv!
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.26.0-2.0.pre.131, on Mac OS X 10.15.7 19H15 darwin-x64, locale fr-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.52.1)
[✓] Connected device (2 available)
• No issues found!
Screenshot
Redit:
I figured it out. So it was missing 'a folder' or 'a file' in the IOS folder (either with or without Pods folder).
I do not know what was it to be more specific since I just change the directory (cd <your iOS folder>) and then recreate or update the folder (<flutter create .> .
You'll see that something will update then you can either try the pod install command or give it a shot and try the simulator (remember to go back to your project folder though) .

Android studio keeps showing "Loading..." on device selector

I got stuck in this problem for several days, my android studio suddenly keep showing 'Loading...' on its device selector when there are active android emulator or connected to android device.
i use mac os catalina 10.15.5 and here is some clue that might help :
siekoo-mac:~ siekoo$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.4, on Mac OS X 10.15.5 19F101, locale en-ID)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✗] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS
development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin
code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install:
sudo gem install cocoapods
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.47.0)
[✓] Connected device (1 available)
siekoo-mac:~ siekoo$ adb devices
List of devices attached
16fb14c20205 device
Ive tried several solutions, like run invalidate & cache restart on android studio, reinstalling adb platform tools, reinstalling android SDKs or even downgrade/upgrade the android studio, all doesnt end with good result. For now, i run my project on android device via terminal
In my case it was due to different compile and target SDK versions inside app level gradle and library gradle. It was resolved by changing sdk versions from 26 to 29 in both.
Open another android project in new window (not a flutter project). Now you have two windows of android studio.
then device will detect on Android project. You will be able to connect your device for native android project. Then try again to detect device on flutter project.
Your device will show here.
This worked for me.
maybe
Open in Android Studio - Preferences | Languages & Frameworks | Flutter
Set path SDK .../SDK/flutter

Flutter stable 1.17.1 and Xcode 11.5 issues

After upgrading to Flutter 1.17.1 and Xcode 11.5, I cannot build for iOS anymore.
Despite following all the direction in https://flutter.dev/docs/development/ios-project-migration
Anyone faces the same issue? Any solution?
flutter doctor
Waiting for another flutter command to release the startup lock...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.1, on Mac OS X 10.15.4 19E287, locale en-SG)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
[✓] Android Studio (version 3.6)
[!] Android Studio (version 2.3)
✗ Flutter plugin version 12.1 - the recommended minimum version is 16.0.0
[✓] VS Code (version 1.45.1)
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
Here is the output when I do
flutter run
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Your Xcode project requires migration. See https://flutter.dev/docs/development/ios-project-migration for details.
Error launching application on iPhone 11 Pro Max.
Yes, in addition, I have to remove the above.
thanks
Came from 1.13=>1.17. It did not upgrade my project automatically so I had to work a bit in Xcode. I solved the issue by executing all steps listed on the migration page. Then executing:
rm -rf ios/Flutter/App.framework
rm -rf ios/Pod*
flutter clean
Build and run => success

Your Xcode project requires migration

My project ios build fails after Xcode updating to 11.4.
steps from the manual (https://flutter.dev/docs/development/ios-project-migration) have already been made by flutter automatically(?) - everything written there has been done.
MacBook-Pro-ddd:my_awesome_project dm$ flutter clean
Cleaning Xcode workspace... 2,9s
Deleting build... 1ms
Deleting .dart_tool... 2ms
Deleting Generated.xcconfig... 0ms
Deleting flutter_export_environment.sh... 0ms
Deleting App.framework... 3ms
MacBook-Pro-ddd:my_awesome_project dm$ flutter build ios
Building ru.ddd.awesomeProject for device (ios-release)...
Your Xcode project requires migration. See https://flutter.dev/docs/development/ios-project-migration for details.
MacBook-Pro-ddd:my_awesome_project dm$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.0, on Mac OS X 10.15.4 19E287, locale ru-RU)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
[✓] Android Studio (version 3.6)
[!] IntelliJ IDEA Ultimate Edition (version 2020.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.44.2)
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
MacBook-Pro-ddd:my_awesome_project dm$
After following the official guides, Like #iluvatar_GR suggests delete App.Framework in addition also delete Flutter.framework from the Frameworks directory.
Run flutter clean and try running.
If there are any other errors other than project requires migration you might want to run rm -rf ios/Pods and try again.

Resources