4

I am integrating flutter module in the iOS app and while installing the pod, I am getting this error.

Below is the code in podfile.

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'FlutteriOSApp' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for FlutteriOSApp

  target 'FlutteriOSAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'FlutteriOSAppUITests' do
    inherit! :search_paths
    # Pods for testing
  end

flutter_application_path = 'flutter_module⁩/.ios/Flutter/podhelper.rb'
eval(File.read(File.join(flutter_application_path)), binding)

end

I also tried with

flutter_application_path = 'flutter_module'
  eval(File.read(File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')), binding)

Also, the file exists at

flutter_module⁩/.ios/Flutter/podhelper.rb

Please help. Thanks in advance.

Nirav Tukadiya
  • 3,367
  • 1
  • 18
  • 36

3 Answers3

3

I got it working. I deleted podfile and reinitialized pod in the project directory and also changing

flutter_application_path = 'flutter_module'

to

flutter_application_path = 'flutter_module/'

Notice the '/' at last.

Now after pod install

Analyzing dependencies
Fetching podspec for `Flutter` from `flutter_module/.ios/Flutter/engine`
Fetching podspec for `FlutterPluginRegistrant` from `flutter_module/.ios/Flutter/FlutterPluginRegistrant`
Downloading dependencies
Installing Flutter (1.0.0)
Installing FlutterPluginRegistrant (0.0.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.

[!] Automatically assigning platform `ios` with version `12.2` on target `FlutteriOSApp` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Nirav Tukadiya
  • 3,367
  • 1
  • 18
  • 36
2

i just used these commands:

flutter clean

flutter pub get

flutter precache

cd ios

pod install

i hope this work for you. Happy coding!

Pedro Molina
  • 1,101
  • 12
  • 12
0

Hello After Searching a lot that's what has worked for me -> "This my Pod file Below "

enter image description here

K-Soliman
  • 914
  • 7
  • 11