Create flutter

cdFlutter create -t module flutter_mix (flutter_mix is the name of a user-defined FLUTTER project)Copy the code

Add dependencies using Cocoapods

1. Add the following code to your Podfile:

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

source 'https://github.com/CocoaPods/Specs.git'

flutter_application_path = '.. /flutter_mix/'
load File.join(flutter_application_path, '.ios'.'Flutter'.'podhelper.rb')

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

  # Pods for zyc_ios

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

  target 'zyc_iosUITests' do
    # Pods for testing
  end
  install_all_flutter_pods(flutter_application_path)
end
Copy the code

Flutter_mix Specifies the project name for flutter

2. Run pod Install

If error [!]  InvalidPodfilefile: No such file or directory @ rb_sysopen - ./my_flutter/.ios/Flutter/podhelper.rb. To generate flutter configurations including. Ios and. Android, run the following flutter run in the flutter_MIX folder.Copy the code