Skip to content

[question]: having problem while installing pods for oneSignal (IOS) #968

@ArslanAsghar123

Description

@ArslanAsghar123

How can we help?

getting this while pod install

Screenshot 2024-11-04 at 4 35 14 PM

i downgraded oneSignal but issue remains

this is podFile

Uncomment this line to define a global platform for your project

platform :ios, '13.0'

CocoaPods analytics sends network stats synchronously affecting flutter build latency.

ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), FILE)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(FILE))

target 'RunnerTests' do

inherit! :search_paths

end

end
target 'OneSignalNotificationServiceExtension' do
pod 'OneSignalXCFramework', '>= 5.0.0', '< 6.0'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end

Updating spec repo trunk

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Command

/usr/local/bin/pod repo update

Report

  • What did you do?

  • What did you expect to happen?

  • What happened instead?

Stack

CocoaPods : 1.16.2
Ruby : ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin24]
RubyGems : 3.0.3.1
Host : macOS 15.1 (24B83)
Xcode : 16.1 (16B40)
Git : git version 2.33.0
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Plugins

cocoapods-deintegrate : 1.0.5
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.1
cocoapods-trunk : 1.6.0
cocoapods-try : 1.2.0

Podfile

ruby

Uncomment this line to define a global platform for your project

platform :ios, '13.0'

CocoaPods analytics sends network stats synchronously affecting flutter build latency.

ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), FILE)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(FILE))
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end

target 'OneSignalNotificationServiceExtension' do
use_frameworks!
pod 'OneSignalXCFramework', '>= 5.0.0', '< 6.0'
end

Error

LoadError - cannot load such file -- ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi.rb:5:in rescue in <top (required)>' /Library/Ruby/Gems/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi.rb:2:in <top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
/Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon.rb:3:in <top (required)>' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' /Library/Ruby/Gems/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in <top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.16.2/lib/cocoapods-core/cdn_source.rb:446:in download_typhoeus_impl_async' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.16.2/lib/cocoapods-core/cdn_source.rb:378:in download_and_save_with_retries_async'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.16.2/lib/cocoapods-core/cdn_source.rb:371:in download_file_async' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.16.2/lib/cocoapods-core/cdn_source.rb:344:in download_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.16.2/lib/cocoapods-core/cdn_source.rb:79:in deprecated_local_podspecs' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.16.2/lib/cocoapods-core/cdn_source.rb:61:in preheat_existing_files'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.16.2/lib/cocoapods-core/cdn_source.rb:258:in update' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/sources_manager.rb:144:in block (3 levels) in update'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/sources_manager.rb:143:in block (2 levels) in update'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/sources_manager.rb:142:in each' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/sources_manager.rb:142:in block in update'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/sources_manager.rb:140:in open' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/sources_manager.rb:140:in update'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/command/repo/update.rb:23:in run' /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:52:in run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/bin/pod:55:in <top (required)>'
/usr/local/bin/pod:23:in load' /usr/local/bin/pod:23:in

'

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=cannot+load+such+file+--+ffi_c&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...

and 11 more at:
https://github.com/cocoapods/cocoapods/search?q=cannot%20load%20such%20file%20--%20ffi_c&type=Issues&utf8=✓

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions