Неверный файл `Podfile`: нет такого файла или каталога @ rb_sysopen - flutter_module / .ios / Flutter / podhelper.rb - PullRequest
2 голосов
/ 18 июня 2019

Я интегрирую модуль флаттера в приложение iOS и при установке модуля получаю эту ошибку.

Ниже приведен код в подфайле.

# 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

Я тоже пробовал с

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

Кроме того, файл существует в

flutter_module⁩/.ios/Flutter/podhelper.rb

Пожалуйста, помогите. Заранее спасибо.

1 Ответ

2 голосов
/ 18 июня 2019

Я получил это работает. Я удалил podfile и повторно инициализировал pod в каталоге проекта, а также изменил

flutter_application_path = 'flutter_module'

до

flutter_application_path = 'flutter_module/'

Обратите внимание на '/' в конце.

Теперь после установки модуля

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`.
...