Saturday, March 9, 2024
HomeiOS Developmentios - Flutter post-install hook of the Podfile error

ios – Flutter post-install hook of the Podfile error


I created a brand new flutter venture from scratch, added the required packages to the pubspec.yaml file and ran the flutter pub get after which pod set up command, however I get this error. I get this error each in my previous initiatives and in my new initiatives.

An error occurred whereas processing the post-install hook of the Podfile.
 
undefined native variable or technique `config' for #<Pod::Podfile:0x00007fb1da9d7bd0>
 
/Customers/m/Paperwork/MobileProjects/projectOne/ios/Podfile:43:in `block (3 ranges) in from_ruby'
/Customers/m/Paperwork/MobileProjects/projectOne/ios/Podfile:41:in `every'
/Customers/m/Paperwork/MobileProjects/projectOne/ios/Podfile:41:in `block (2 ranges) in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/podfile.rb:196:in `post_install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:1013:in `run_podfile_post_install_hook'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:1001:in `block in run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:149:in `message'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:1000:in `run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:337:in `block (2 ranges) in create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in `write!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:336:in `block in create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in `part'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:315:in `create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:307:in `generate_pods_project'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:183:in `combine'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:170:in `set up!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command/set up.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/bin/pod:55:in `<high (required)>'
/usr/native/bin/pod:23:in `load'
/usr/native/bin/pod:23:in `<most important>'

My podfile is like this.

# Uncomment this line to outline a world platform in your venture
platform :ios, '11.0'
 
# CocoaPods analytics sends community stats synchronously affecting flutter construct latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
 
venture 'Runner', {
'Debug' => :debug,
'Profile' => :launch,
'Launch' => :launch,
}
 
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.be a part of('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
except File.exist?(generated_xcode_build_settings_path)
elevate "#{generated_xcode_build_settings_path} should exist. In the event you're working pod set up manually, be sure flutter pub get is executed first"
finish
 
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT=(.*)/)
return matches[1].strip if matches
finish
elevate "FLUTTER_ROOT not present in #{generated_xcode_build_settings_path}. Attempt deleting Generated.xcconfig, then run flutter pub get"
finish
 
require File.expand_path(File.be a part of('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
 
flutter_ios_podfile_setup
 
goal 'Runner' do
use_frameworks!
use_modular_headers!
 
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
goal 'RunnerTests' do
inherit! :search_paths
finish
finish
 
post_install do |installer|
installer.pods_project.targets.every do |goal|
flutter_additional_ios_build_settings(goal)
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
finish
finish
 
goal 'OneSignalNotificationServiceExtension' do
use_frameworks!
pod 'OneSignalXCFramework', '>= 5.0.0', '< 6.0'
finish

Additionally, it doesn’t matter what I do, Pods_Runner is coloured pink in Xcode and can’t be discovered.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments