fix(ios): exclude Firebase from iOS build, keep deployment target 13.0
This commit is contained in:
@@ -74,7 +74,7 @@ jobs:
|
|||||||
- name: Install Linux desktop dependencies
|
- name: Install Linux desktop dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev
|
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libsecret-1-dev libjsoncpp-dev
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: flutter pub get
|
run: flutter pub get
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ jobs:
|
|||||||
- name: Install Linux desktop dependencies
|
- name: Install Linux desktop dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev
|
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libsecret-1-dev libjsoncpp-dev
|
||||||
- name: Get dependencies
|
- name: Get dependencies
|
||||||
run: flutter pub get
|
run: flutter pub get
|
||||||
- name: Build Linux
|
- name: Build Linux
|
||||||
|
|||||||
+25
-1
@@ -1,9 +1,33 @@
|
|||||||
# Uncomment this line to define a global platform for your project
|
# Uncomment this line to define a global platform for your project
|
||||||
# platform :ios, '13.0'
|
platform :ios, '13.0'
|
||||||
|
|
||||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||||
|
|
||||||
|
require 'json'
|
||||||
|
|
||||||
|
# Firebase is Android-only: FCM is used solely by the `oneme` flavor, and on
|
||||||
|
# iOS there is a single `ru.komet.app` bundle that never initialises push.
|
||||||
|
# Keep the Firebase SDK out of the iOS build entirely so iOS is not forced up
|
||||||
|
# to the iOS 15 deployment target that firebase_core's podspec requires.
|
||||||
|
FIREBASE_IOS_PLUGINS = %w[firebase_core firebase_messaging].freeze
|
||||||
|
|
||||||
|
deps_file = File.expand_path('../.flutter-plugins-dependencies', __dir__)
|
||||||
|
if File.exist?(deps_file)
|
||||||
|
deps = JSON.parse(File.read(deps_file))
|
||||||
|
ios_plugins = deps.dig('plugins', 'ios')
|
||||||
|
if ios_plugins
|
||||||
|
ios_plugins.reject! { |p| FIREBASE_IOS_PLUGINS.include?(p['name']) }
|
||||||
|
File.write(deps_file, JSON.generate(deps))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
registrant = File.expand_path('Runner/GeneratedPluginRegistrant.m', __dir__)
|
||||||
|
if File.exist?(registrant)
|
||||||
|
drop = /firebase_core|firebase_messaging|FLTFirebaseCorePlugin|FLTFirebaseMessagingPlugin/
|
||||||
|
File.write(registrant, File.readlines(registrant).reject { |line| line =~ drop }.join)
|
||||||
|
end
|
||||||
|
|
||||||
project 'Runner', {
|
project 'Runner', {
|
||||||
'Debug' => :debug,
|
'Debug' => :debug,
|
||||||
'Profile' => :release,
|
'Profile' => :release,
|
||||||
|
|||||||
Reference in New Issue
Block a user