Search code examples
ioslinuxfluttervisual-studio-codecodemagic

(Flutter) Podfile does not exist, app won't build in codemagic (iOS)


I've been looking for a solution and haven't found any for my circumstances.

I develop in linux using VSCode, building and deploying to the AppStore via codemagic.

I have a published App, both stores (apple/android) and just recently updated its dependencies and add a webview to it for a specific action. Nothing complex.

PlayStore: Built without trouble for android and the updated build was published.

AppStore: Went to codemagic to build/deploy it and it failed. The error:

Automatically assigning platform `iOS` with version `11.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile.

Say no more. I go to look for the Podfile... missing! Nobody deleted it (or any other pod related data) and the previous built went smooth! Oh well, maybe something changed (new requirements,etc).

Go and try to recreate the project just for iOS with: flutter create --platforms ios

Command executes fine, but still no Podfile/pod stuff!

All "solutions" I have found suggests actions that are just for a Mac environment (run pod commands). Not my case.

Basically, I have reached a dead end and it's driving me crazy.

What am i missing?


Solution

  • with Codemagic you can use VNC access to the macOS machine where you run your build (check it here https://docs.codemagic.io/troubleshooting/accessing-builder-machine-via-ssh/)

    you will have enough time to generate Podfile and commit it to the repo