The starter fooderlich project doesn't run

The problem is with the Cocoapods (it’s a pity Apple isn’t rich enough to provide a package management system of their own). It always ends up with something like this:

[!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

Error running pod install
Error launching application on iPhone 12 Pro Max.

I tried un-commenting this line in Cocoapods file:

platform :ios, '9.0'

That didn’t really change anything. I found somewhere an opinion that this sort of thing happens because the version of Ruby on my machine (and cocoapods depends on Ruby of course) is below a certain threshold. So I spent quite some time trying and finally updating Ruby and brew. But that didn’t help anything.

I created a completely new Flutter project and copied to it all the essential code from the starter. It didn’t run with the same error.

I created a new default project and started adding to it new code step-by-step following the book. It worked out fine for a while but then it broke again, at the stage of adding card1.dart. Same problem.

Any idea what’s going wrong?

Thanks,

Alexander

Thanks for reporting this.
Do you mind sharing what’s your setup so we can try to reproduce this?
The output of flutter doctor and your version of Cocoapods should be enough.

I tried many different things yesterday and I don’t know what exactly helped but probably it was re-installing Cocoapods. So I am now running the starter project successfully.

Thank you for the prompt response.

Hey Sundraw, I am having the same problem. We’re you ever able to source the exact issue causing this. I did all things you have done and nothing has been a solution for thus far. I am on a Mac M1 and wondering if the architecture is the issue after reading other threads with similar issue.

This article ended up helping me: Simple way to use Cocoapods on M1 | by Doyeon | CodeX | Medium

Make Terminal “Open Using Rosetta”… reinstall FFI and Cocoa etc… Then turn off “open using rosetta”… everything worked after Pod installed correctly and back at it!