Day2: IOS Platform Setup - pollyolly/FLUTTER-NOTES GitHub Wiki

Install Xcode

Mac App Store

Agree to Xcode license

$ sudo xcodebuild -license

Install Cocoapods

$ sudo gem install cocoapods

Also Apple Silicon Run the command Below

$ sudo gem uninstall ffi && sudo gem install ffi -- --enable-libffi-alloc

Setup Simulator

$ xcodebuild -downloadPlatform iOS
$ open -a Simulator

Run Project

$ open -a Simulator
$ flutter run

Troubleshoot

ERROR:  Error installing cocoapods:
	The last version of drb (>= 0) to support your Ruby & RubyGems was 2.0.5. Try installing it with `gem install drb -v 2.0.5` and then running the current command again
	drb requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210.
$ sudo gem install drb -v 2.0.5
ERROR:  Error installing cocoapods:
	The last version of activesupport (>= 5.0, < 8) to support your Ruby & RubyGems was 6.1.7.6. Try installing it with `gem install activesupport -v 6.1.7.6` and then running the current command again
	activesupport requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210.
$ sudo gem install activesupport -v 6.1.7.6
Exception: Error running pod install
$ cd money_saver/
$ rm -r ios/
$ flutter create --platform ios .
$ cd money_saver/ios/
$ arch -x86_64 pod install
$ pod install
$ open -a Simulator
$ flutter run
ERROR: The method 'File.create' has fewer named arguments than those of overridden method 'File.create'.
$ flutter clean
$ dart pub upgrade
ERROR: Error (Xcode): ../../../.pub-cache/hosted/pub.dev/firebase_core-1.24.0/lib/src/firebase_app.dart:18:25: Error: Member not found:
'FirebaseAppPlatform.verifyExtends'.
$ flutter pub upgrade --major-versions
ERROR: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
$pod install --repo-update