Phase 2 of multi-environment setup. Adds Firebase core, Crashlytics, Analytics, Remote Config, Performance, Messaging and flutter_local_notifications, plus full APNs configuration for iOS push. - Wire setupFirebase(env) and setupNotifications() in initApp - Add firebase_options for dev and staging via flutterfire (sf-platform-pre) - Register google-services / firebase-perf / crashlytics gradle plugins - Add per-flavor GoogleService-Info.plist with Build Phase script that copies the right plist into the .app bundle based on \$CONFIGURATION - Bump iOS deployment target 13.0 -> 15.0 (required by firebase_analytics) - Pin flutter_local_notifications to ^19.4.2 (v20+ needs Dart SDK >=3.10) - Add aps-environment to staging (development) and production entitlements; development flavor intentionally excluded (no App Store Connect entry) - Fix AppDelegate.swift to call super.application after forwarding to AntelopAppDelegate, otherwise Firebase Messaging swizzling breaks and the APNs token is never captured - Crashlytics reports in all builds (debug + release) for early detection - Tag analytics events with env user property per flavor - App Check intentionally not included (debug-token friction with large QA team); can be re-added release-only later
50 lines
1.6 KiB
Ruby
50 lines
1.6 KiB
Ruby
# Uncomment this line to define a global platform for your project
|
|
platform :ios, '15.0'
|
|
|
|
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
|
|
|
project 'Runner', {
|
|
'Debug-development' => :debug,
|
|
'Debug-staging' => :debug,
|
|
'Debug-production' => :debug,
|
|
'Profile-development' => :release,
|
|
'Profile-staging' => :release,
|
|
'Profile-production' => :release,
|
|
'Release-development' => :release,
|
|
'Release-staging' => :release,
|
|
'Release-production' => :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!
|
|
|
|
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
|
target 'RunnerTests' do
|
|
inherit! :search_paths
|
|
end
|
|
end
|
|
|
|
post_install do |installer|
|
|
installer.pods_project.targets.each do |target|
|
|
flutter_additional_ios_build_settings(target)
|
|
end
|
|
end
|