I have a feeling these two things are related, and so I'm asking them together.
I am trying my darn best to get my Flutter app built for ios, and I'm really close. I have it attempting to build, but it fails, stating all of my packages need to be downloaded.
It seems like the podfile target does this? I honestly can't tell, and the documentation on Flutter: https://docs.flutter.dev/development/add-to-app/ios/project-setup and CocoaPods doesn't really specify: https://guides.cocoapods.org/syntax/podfile.html#target
First, what exactly do I put for "MyApp"? Is it the file directory name or what I want my app name to be? I just don't really understand it.
I could really use the assistance getting these packages imported for IOS and getting this thing running already. The community has been extremely helpful so far, and I am really close here to the finish line.
I have it running great on Android, so I just am wondering what changes between the two.
Thanks!
EDIT 1:
So from further investigation and sort of piecing together information, it seems like pod install
in my ios folder does the dependency/package installation?
However it said I needed a podhelper.rb file, so I copied and modified a template from here:
https://github.com/flutter/flutter/blob/master/packages/flutter_tools/templates/module/ios/library/Flutter.tmpl/podhelper.rb.tmpl
I tried running the command again, and got this:
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19/rbconfig.rb:229: warning: Insecure world writable dir /Users/brandonpetroski/Desktop/ticket_board-master/ticket_board-master/ios in PATH, mode 040777
[!] Invalid `Podfile` file: cannot load such file -- ../ticket_board-master/ios/Flutter/podhelper.rb.
# from /Users/prime/Desktop/ticket_board-master/ticket_board-master/ios/Podfile:14
# -------------------------------------------
# flutter_application_path = '../ticket_board-master'
> load File.join(flutter_application_path, 'ios', 'Flutter', 'podhelper.rb')
#
# -------------------------------------------
I'll be honest, I'm really not sure how to proceed. I'm going to just look up a few ios flutter tutorial videos to see what steps I'm missing here.
EDIT 2: Major progress. So my Android version had a generated file called flutter-plugins-dependencies. Well, that file was hidden in the directory, unless I go into Visual Code, where it shows up, and I could manually delete it. I basically deleted every generated file manually. I then reopened the project, and Visual Code pulled in and generated everything I needed! Going to attempt to build this now!
EDIT 3: So its actually sort of working! We made progress. The issue now is Module 'cloud_firestore' not found
, which I'm going to go research now.
EDIT 4: this error was fixed following this thread: Flutter on IOS: fatal error: module 'cloud_firestore' not found Combined with running into another bug, and solving it with this: https://github.com/RevenueCat/purchases-flutter/issues/125 I basically had to run the pod install to get all of the packages I need, but I had my ios versions mismatched. I matched them up to 11.0 and it pulled everything I needed.
Now I have this warning, which I am investigating now:
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).
I'm so darn close here. I'm really excited.
Edit 5: Fix found for configuration issue. Followed this thread here: Cocoapods Warning - CocoaPods did not set the base configuration of your project because because your project already has a custom config set
Man, this is an ungodly amount of hoops to jump through.
Now getting an error from one of the pod packages:
ARC Semantic Issue: no visible @interface for 'UIImage' declares the selector 'imageByPreparingForDisplay'
I'm making a new question post for it, because this has diverged so much from this original question, and I have technically solved my original question as of now haha. Hopefully this thread helps someone out if they are trying to build an ios flutter app from android. There is a lot of hoops to jump through, so I wish you the best of luck.