0

Having a hard time finding any info on how to add a specific pod to my flutter project for iOS support. The Podfile is generated automatically, so doesn't seem like just adding it to the Podfile is the way to go. Or am I completely wrong and I should just update the Podfile and git add the Podfile and it's .lock file?

1
  • Flutter project root -> IOS -> podfile Commented Mar 18, 2020 at 23:12

1 Answer 1

1

I think it depends on your specific case. As a general rule, I have not added files to the podfile, although I typically have to do a "podfile install" on repos that I've downloaded.

However, when I've had to do it, it's always been to support firebase.

I had to install firebase a number of months ago and had to add it to the podfile, and I think I saw this entry: Flutter Podfile and Firebase

Perhaps it's still the case, because I found this tutorial, and step 4 indicates that the firebase SDK should be added to the podfile, and that article is dated late Dec, 2019: https://www.freecodecamp.org/news/how-to-integrate-your-ios-flutter-app-with-firebase-on-macos-6ad08e2714f0/

So, I think the answer is "yes... but not usually"

For that project, I had to add the podfile to the repo, and I've had to add build.gradle files as well, so I don't think it's out of place.

Sign up to request clarification or add additional context in comments.

5 Comments

Good to know. For the project where you are tracking/committing Podfile changes, have you run into any trouble or any other gotchas? I'm wondering if eventually I'd run into a situation where I'd have to remove the Podfile and let it auto-generate again and re-add any pods I needed.
I've never had to auto-generate the file again. I've only added to the podfile as indicated above, or I've had to do the initial "pod install" when downloading someone else's repo. I've probably had at least 10 projects that used some portion of firebase (auth, database, storage) and after initial setup, I've been able to share the repo with other members of the team. (They, however, had to do a pod install when the did their pull)
Did this answer work for you? If so, I'd greatly appreciate if you'd select it, and give it an upvote. If not, please let me know how else I can help.
Yeah, sorry. Was still working through it. That makes sense that they need to do a pod install if you're only committing the Podfile change. This did help me out. Appreciate it.
No problem. Thank you very much for selecting my answer and upvoting it. Feel free to stop by if you get stuck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.