Closed oneForCode closed 2 weeks ago
Hello!
I wasn’t able to investigate the issue fully because there’s a custom action in your project that has an error, which prevents me from reviewing the entire code. I tried replicating the issue in a new blank project, but I wasn’t able to reproduce it.
The error displayed in custom action is ignored by both "Test mode" and by APK builder. Both work despite of the "error".
To test the issue, you can "Download code", then try building it in Codemagic for iOS. It will succeed for Android, but fail for iOS with that error.
I solved the problem by updating the Podfile that FlutterFlow incorrectly generates.
I was hoping it might help other developers who struggle with it.
I’m glad everything is working as expected now! I’ll go ahead and close this issue, but if you encounter anything else, please don’t hesitate to open a new one!
Excuse me how do you update the podfile? I have the same issue. I am on a hurry to deploy to a client. Please help :)
If you want I can give you acceso to my proyect. I can not fix it
@TheBestLevel
Excuse me how do you update the podfile? I have the same issue. I am on a hurry to deploy to a client. Please help :)
If you want I can give you acceso to my proyect. I can not fix it
I downloaded code. Unzipped it. Than edited ios/Podfile
Then checked it into my Github. Then ran Codemagic build from that repo.
The Podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '14.0.0'
# Add this line at the top
$FirebaseSDKVersion = '11.2.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! :linkage => :static
use_modular_headers!
# Add these lines before flutter_install_all_ios_pods
pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
# Update the Firestore pod to specify the branch
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :branch => "11.2.0"
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.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
Can we access your project?
Current Behavior
Your Podfile is wrong and fails iOS build.
The problem is that you're using the
firestore-ios-sdk-frameworks
binary distribution while also having the regular Firebase pods installed. This can cause conflicts. Here's how to fix your Podfile:# Add this line at the top $FirebaseSDKVersion = '11.2.0'
# Add these lines before flutter_install_all_ios_pods pod 'Firebase', :modular_headers => true pod 'FirebaseCore', :modular_headers => true pod 'GoogleUtilities', :modular_headers => true
# Update the Firestore pod to specify the branch pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :branch => "11.2.0"
Expected Behavior
iOS build used to work in Codemagic.
Steps to Reproduce
Running iOS build from the downloaded code in Codemagic produces this error:
Reproducible from Blank
Bug Report Code (Required)
IT4khc/1sIZ2pbxF7aXhbcFojik7OXoiTL07ttYbZxUjIuPtBJh+ePTCSFdDUt+6Y2lhHGaWhkYy+PzzjYflMMY6GwieG4BYwqtQbDnLTXq8RJSmCrmKWmtREdhUFVSY3JiNmwp7B7BiLE1n3TiIOu6saHbqGZ+/Zwh9f6PHaOI=
Visual documentation
Environment
Additional Information
No response