This commit is contained in:
Hamza-Ayed
2024-12-22 01:36:07 +03:00
parent 90d4ca39bf
commit 2910750483
32 changed files with 1804 additions and 1231 deletions

View File

@@ -1,8 +1,6 @@
# Uncomment this line to define a global platform for your project
platform :ios, '14.0'
$iOSVersion = '14.0' # or newer version
$iOSVersion = '14.0' # or your desired version
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
@@ -10,6 +8,7 @@ project 'Runner', {
'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)
@@ -28,29 +27,33 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
use_frameworks! :linkage => :dynamic
pod 'Firebase', :modular_headers => true
# Explicitly enable modular headers for firebase_messaging and other Firebase-related pods
pod 'FirebaseMessaging', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseAuth', :modular_headers => true
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
post_install do |installer|
# add these lines:
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=*]"] = "armv7"
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
end
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
# add these lines:
target.build_configurations.each do |config|
if Gem::Version.new($iOSVersion) > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
end
end
end
end
end