diff --git a/ios/Podfile b/ios/Podfile index 520fdef83..ce17794db 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,7 +1,8 @@ -# Uncomment this line to define a global platform for your project +# Define a global platform for your project platform :ios, '16.0' $FirebaseSDKVersion = '11.13.0' + # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -28,6 +29,7 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe flutter_ios_podfile_setup + target 'Runner' do use_frameworks! @@ -40,5 +42,49 @@ end post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) + + # Ensure all pods use the same iOS deployment target + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0' + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ + '$(inherited)', + + ## dart: PermissionGroup.microphone + 'PERMISSION_MICROPHONE=1', + + ## dart: PermissionGroup.notification + 'PERMISSION_NOTIFICATIONS=1', + + ## dart: PermissionGroup.calendar + 'PERMISSION_EVENTS=1', + + ## dart: PermissionGroup.calendarFullAccess + 'PERMISSION_EVENTS_FULL_ACCESS=1', + + 'PERMISSION_LOCATION=1', + 'PERMISSION_LOCATION_WHENINUSE=0', + + ## dart: PermissionGroup.bluetooth + 'PERMISSION_BLUETOOTH=1', + ] + + # 禁用用户跟踪相关功能 + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'FBSDK_DISABLE_IDFA=1' + + # 移除可能的用户跟踪权限描述 + if target.name == 'Runner' + # 确保不包含NSUserTrackingUsageDescription + config.build_settings.delete('NSUserTrackingUsageDescription') + end + end + + # 针对Facebook SDK禁用广告ID收集 + if target.name.start_with?('FBSDKCoreKit') || target.name.start_with?('FacebookSDK') + target.build_configurations.each do |config| + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)'] + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'FBSDK_DISABLE_IDFA=1' + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'FBSDK_DISABLE_AUTO_LOG_APP_EVENTS=1' + end + end end -end +end \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 847868ba3..b5b804f1f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -62,8 +62,8 @@ dependencies: app_settings: 5.2.0 fluwx: ^5.7.1 url_launcher: ^6.3.1 - firebase_core: ^3.12.1 - firebase_auth: ^5.5.1 + firebase_core: ^4.0.0 + firebase_auth: ^6.0.1 google_sign_in: ^6.2.2 flutter_facebook_auth: ^7.1.1 sign_in_with_apple: ^7.0.1