Module 'firebase_analytics' not found when archiving ios(Flutter app) - ios

I have been trying to archive my ios app for days but i keep getting this error. When i run in debug mode though, it builds successfully.
I've done these repeatedly but still no hope:
Adding GoogleService-info.plist via xcode
Flutter clean
Deleted podfile, podfile.lock, symlinks
Flutter pub get
pod install &&pod repo update
Launch Runner.xcworkspace in xcode
My podfile
platform :ios, '11.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
Firebase packages im using
firebase_core: ^0.5.3
firebase_analytics: ^6.3.0
firebase_messaging: ^7.0.3
firebase_dynamic_links: ^0.6.3

I also faced the same issue, here's what worked for me:
Add this in Pod file
target 'Runner' do
pod 'Firebase/Analytics'
end

Related

The 'Pods-Runner' target has frameworks with conflicting names: libavcodec.xcframework, libavdevice.xcframework, libavfilter.xcframework

I'm trying to run a flutter app on ios simulator. But, first I'm trying to run pod install command.
Some of the pods get installed but after Installing webview_flutter_wkwebview (0.0.1), I get the error
[!] The 'Pods-Runner' target has frameworks with conflicting names: libavcodec.xcframework, libavdevice.xcframework, libavfilter.xcframework, libavformat.xcframework, libavutil.xcframework, libswresample.xcframework, and libswscale.xcframework.
These are the things I've tried but failed:
Flutter Clean and re run after flutter pub get
flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs
pod deintegrate and pod install
Flutter pub cache repair and flutter pub get.
Is there any other solution I can try? Thank You.
Here's my podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '12.1'
# 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)
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end

CocoaPods could not find compatible versions for pod "FirebaseAppCheck"

When i try to run my app on an ios device simulator (IOS 15.4) here what happen :
[!] CocoaPods could not find compatible versions for pod "FirebaseAppCheck":
In Podfile:
firebase_app_check (from .symlinks/plugins/firebase_app_check/ios) was resolved to 0.0.6-7, which depends on
FirebaseAppCheck (~> 7.7.0-beta)
None of your spec sources contain a spec satisfying the dependency: FirebaseAppCheck (~> 7.7.0-beta).
In my pubspec.yaml there is Firebase app firebase_app_check: ^0.0.6+7.
Here my podfile :
# Override Firebase SDK Version
$FirebaseSDKVersion = '7.7.0'
# Uncomment this line to define a global platform for your project
platform :ios, '10.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)
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
Here what i already tried :
flutter clean
pod deintegrate
pod install -repo update
flutter pub get
deleting the pods directory and pod.lock and try pod install
Can someone help me ? Thanks in advance.
As #PaulBeusterien said :
I just had to update my podfile with the appropriate version for Firebase SDK and the appropriate plateform target.
Here my podfile below:
# Override Firebase SDK Version
$FirebaseSDKVersion = '8.5.0'
# Uncomment this line to define a global platform for your project
platform :ios, '11.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)
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
Change the Firebase SDK version to at least 8.5.0.
AppCheck was introduced in Firebase 8.0.0 for iOS 11+ and support added for iOS 10 in 8.5.0.
See the available podspecs at https://github.com/CocoaPods/Specs/tree/master/Specs/1/8/e/FirebaseAppCheck

Can't import Flutter module with Swift in Xcode

When I import Flutter in Swift, Xcode is telling me No Such Module 'Flutter'
I have noticed there are Pods and Development Pods directories. Flutter resides in Development Pods.
Other modules in Pods are accessible.
Here is my Podfile:
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
platform :ios, '14.0'
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
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
pod 'TensorFlowLiteSwift/CoreML' #, '~> 0.0.1-nightly'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
Any ideas?
A shot in the dark but did you try just blowing everything out and seeing if pods fixes itself?
go into the ios folder
delete the Podfile.lock file
rm -rf Pods
pod cache clean --all
pod deintegrate
pod setup
pod install

CocoaPods could not find compatible versions for pod "firebase_auth": In Podfile

I'm trying to run pod install on my terminal but i'm getting this error below.
The error:
[!] CocoaPods could not find compatible versions for pod "firebase_auth":
In Podfile:
firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
Specs satisfying the `firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)` dependency were found, but they required a higher minimum deployment target.
My pubspec.yaml:
dependencies:
flutter:
sdk: flutter
progress_dialog: ^1.2.4
cupertino_icons: ^1.0.2
firebase_auth: ^3.1.3
firebase_core: ^1.7.0
firebase_database: ^8.0.0
flutter_native_splash: ^1.2.4
url_launcher: ^6.0.12
My 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
Add platform :ios, '10.0' to the Podfile.
The latest versions of Firebase require at least iOS 10.

"An error occurred while processing the post-install hook of the Podfile" in Flutter project

I am installing pod for my Flutter project but getting an error. I don't know why this error is occuring. It throws error at the very end of installing...........................................................................................
Pod file
# 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!
use_frameworks!
pod 'CocoaMQTT/WebSockets', '1.3.0-rc.1'
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
Update your Ruby version, the version you are using is outdated.

Resources