AppsFlyerSDK / appsflyer-flutter-plugin

Flutter Plugin for AppsFlyer SDK
MIT License
153 stars 119 forks source link

[!] CocoaPods could not find compatible versions for pod "AppsFlyerFramework": #190

Open kimiangel opened 2 years ago

kimiangel commented 2 years ago

[!] CocoaPods could not find compatible versions for pod "AppsFlyerFramework": In Podfile: appsflyer_sdk (from .symlinks/plugins/appsflyer_sdk/ios) was resolved to 6.4.4, which depends on AppsFlyerFramework (= 6.4.4)

None of your spec sources contain a spec satisfying the dependency: AppsFlyerFramework (= 6.4.4).

You have either:

out-of-date source repos which you can update with pod repo update or with pod install --repo-update. mistyped the name or version. not added the source repo that hosts the Podspec to your Podfile.

GM-appsflyer commented 2 years ago

Hey @kimiangel ,

Did you make sure to run: flutter pub get -> cd iOS -> pod update

Mozzus commented 2 years ago

The same to me, after pod update I get:

Command

/usr/local/bin/pod update

Report

Stack

   CocoaPods : 1.11.2
        Ruby : ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]
    RubyGems : 3.0.3.1
        Host : macOS 12.0.1 (21A559)
       Xcode : 13.0 (13A233)
         Git : git version 2.30.1 (Apple Git-130)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Plugins

cocoapods-clean       : 0.0.1
cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

Podfile

# Uncomment this line to define a global platform for your project
# platform :ios, '9.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

Error

LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/lib/ffi_c.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/ffi_c.bundle' (no such file) - /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/lib/ffi_c.bundle
/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.14.2/lib/ffi.rb:6:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/lib/ffi.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/ethon-0.12.0/lib/ethon.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/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.11.2/lib/cocoapods-core/cdn_source.rb:440:in `download_typhoeus_impl_async'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:372:in `download_and_save_with_retries_async'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:365:in `download_file_async'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:338:in `download_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:78:in `deprecated_local_podspecs'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:60:in `preheat_existing_files'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:257:in `update'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/sources_manager.rb:144:in `block (3 levels) in update'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/sources_manager.rb:143:in `block (2 levels) in update'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/sources_manager.rb:142:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/sources_manager.rb:142:in `block in update'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/sources_manager.rb:140:in `open'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/sources_manager.rb:140:in `update'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:145:in `block in update_repositories'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:143:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:143:in `update_repositories'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:237:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:236:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:161:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command/update.rb:63: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.11.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

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

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=dlopen%28%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.14.2%2Flib%2Fffi_c.bundle%2C+0x0009%29%3A+tried%3A+%27%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.14.2%2Flib%2Fffi_c.bundle%27+%28mach-o+file%2C+but+is+an+incompatible+architecture+%28have+%27arm64%27%2C+need+%27x86_64%27%29%29%2C+%27%2Fusr%2Flib%2Fffi_c.bundle%27+%28no+such+file%29+-+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.14.2%2Flib%2Fffi_c.bundle&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!

kimiangel commented 2 years ago

嘿@kimiangel,

您是否确保运行: flutter pub get-> cd iOS->pod update

Yes, I have run it, and I still keep reporting this error. I have no problem running on the android side, but there will be problems with ios。

I want to ask if there is a version requirement for 6.4.4. The 6.4.0 I used a few days ago is normal. Then I specified the 6.4.0 version in pubspec.yaml, but pub get is still 6.4.4. But I reported an error again on 6.4.4, I don’t know what to do

kimiangel commented 2 years ago

嘿@kimiangel,

您是否确保运行: flutter pub get-> cd iOS->pod update

Yes, the error I posted after pod update is exactly the same as you, so what should I do if I change it

Mozzus commented 2 years ago

Hey @kimiangel ,

Did you make sure to run: flutter pub get -> cd iOS -> pod update

I have created a new project and attached to it latest version of AppsFlyer, and got the same error. But my other old projects are working with the previous versions of AppsFlyer. The last version that actually working is 6.4.0

GM-appsflyer commented 2 years ago

Hey team,

We've tried running a clean demo project, and everything seems to be working as expected. Please try running flutter clean, and make sure the version specified in the pub.yaml is ^6.4.4+2.

If you're still encountering the issue, we would kindly ask you to submit a support ticket to support@appsflyer.com, so we can deep dive into the details.

When submitting the ticket, please specify your AppsFlyer sign-up (account) email, app ID, reproduction steps, code snippets, logs, the links you used, and any additional relevant information.

ErnestGaisieViuHealth commented 1 year ago

Also facing this , has this been resolved yet?

I get this when I run pod update with appsflyer version Pubspec.yaml "^6.11.1":

[!] CocoaPods could not find compatible versions for pod "AppsFlyerFramework": In Podfile: appsflyer_sdk (from .symlinks/plugins/appsflyer_sdk/ios) was resolved to 6.8.0, which depends on AppsFlyerFramework (= 6.10.1)

jadrdev commented 1 year ago

Also

[!] CocoaPods could not find compatible versions for pod "AppsFlyerFramework": In Podfile: appsflyer_sdk (from .symlinks/plugins/appsflyer_sdk/ios) was resolved to 6.8.0, which depends on AppsFlyerFramework (= 6.10.1) flutter_segment (from .symlinks/plugins/flutter_segment/ios) was resolved to 3.12.1, which depends on segment-appsflyer-ios (= 6.9.1) was resolved to 6.9.1, which depends on segment-appsflyer-ios/Main (= 6.9.1) was resolved to 6.9.1, which depends on AppsFlyerFramework (= 6.9.1)

Any solution?

Icety commented 1 year ago

This issue is caused by the fact that you already have the AppsFlyer pod installed, but with a different version. For some reason this is not detected by pod install or pod update so it either does nothing or throws an error. The solution I currently use when this occurs is deleting the Pods that are not updating, eg:

rm -rf ios/Pods/AppsFlyerFramework/

And then run

cd ios && pod update

It will then recheck all pods, and download a new one for Appsflyer, this time with the one defined in your Flutter appsflyer_sdk plugin.

My suggestion would be to create a Make-file to create a shortcut for this call: eg:

fix-af:
    rm -rf ios/Pods/AppsFlyerFramework/
    cd ios && pod update