Skip to content

Commit 381c612

Browse files
authored
Add and configure macOS as a build target (bizz84#137)
1 parent e497f6f commit 381c612

32 files changed

+1744
-6
lines changed

.metadata

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled.
55

66
version:
7-
revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
7+
revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
88
channel: stable
99

1010
project_type: app
@@ -13,11 +13,11 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
17-
base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
18-
- platform: web
19-
create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
20-
base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
16+
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
17+
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
18+
- platform: macos
19+
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
20+
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
2121

2222
# User provided section
2323

macos/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Flutter-related
2+
**/Flutter/ephemeral/
3+
**/Pods/
4+
5+
# Xcode-related
6+
**/dgph
7+
**/xcuserdata/

macos/Flutter/Flutter-Debug.xcconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2+
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2+
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//
2+
// Generated file. Do not edit.
3+
//
4+
5+
import FlutterMacOS
6+
import Foundation
7+
8+
import cloud_firestore
9+
import desktop_webview_auth
10+
import firebase_auth
11+
import firebase_core
12+
import shared_preferences_foundation
13+
14+
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
15+
FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin"))
16+
DesktopWebviewAuthPlugin.register(with: registry.registrar(forPlugin: "DesktopWebviewAuthPlugin"))
17+
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
18+
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
19+
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
20+
}

macos/Podfile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
platform :osx, '10.14'
2+
3+
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5+
6+
project 'Runner', {
7+
'Debug' => :debug,
8+
'Profile' => :release,
9+
'Release' => :release,
10+
}
11+
12+
def flutter_root
13+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14+
unless File.exist?(generated_xcode_build_settings_path)
15+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16+
end
17+
18+
File.foreach(generated_xcode_build_settings_path) do |line|
19+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
20+
return matches[1].strip if matches
21+
end
22+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23+
end
24+
25+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26+
27+
flutter_macos_podfile_setup
28+
29+
target 'Runner' do
30+
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.9.0'
31+
use_frameworks!
32+
use_modular_headers!
33+
34+
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
35+
target 'RunnerTests' do
36+
inherit! :search_paths
37+
end
38+
end
39+
40+
post_install do |installer|
41+
# Ensure pods also use the minimum deployment target set above
42+
# https://stackoverflow.com/a/64385584/436422
43+
puts 'Determining pod project minimum deployment target'
44+
45+
pods_project = installer.pods_project
46+
deployment_target_key = 'MACOSX_DEPLOYMENT_TARGET'
47+
deployment_targets = pods_project.build_configurations.map{ |config| config.build_settings[deployment_target_key] }
48+
minimum_deployment_target = deployment_targets.min_by{ |version| Gem::Version.new(version) }
49+
50+
puts 'Minimal deployment target is ' + minimum_deployment_target
51+
puts 'Setting each pod deployment target to ' + minimum_deployment_target
52+
53+
installer.pods_project.targets.each do |target|
54+
flutter_additional_macos_build_settings(target)
55+
target.build_configurations.each do |config|
56+
config.build_settings[deployment_target_key] = minimum_deployment_target
57+
end
58+
end
59+
end

macos/Podfile.lock

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
PODS:
2+
- cloud_firestore (4.7.1):
3+
- Firebase/CoreOnly (~> 10.9.0)
4+
- Firebase/Firestore (~> 10.9.0)
5+
- firebase_core
6+
- FlutterMacOS
7+
- nanopb (< 2.30910.0, >= 2.30908.0)
8+
- desktop_webview_auth (0.0.1):
9+
- FlutterMacOS
10+
- Firebase/Auth (10.9.0):
11+
- Firebase/CoreOnly
12+
- FirebaseAuth (~> 10.9.0)
13+
- Firebase/CoreOnly (10.9.0):
14+
- FirebaseCore (= 10.9.0)
15+
- Firebase/Firestore (10.9.0):
16+
- Firebase/CoreOnly
17+
- FirebaseFirestore (~> 10.9.0)
18+
- firebase_auth (4.6.1):
19+
- Firebase/Auth (~> 10.9.0)
20+
- Firebase/CoreOnly (~> 10.9.0)
21+
- firebase_core
22+
- FlutterMacOS
23+
- firebase_core (2.13.0):
24+
- Firebase/CoreOnly (~> 10.9.0)
25+
- FlutterMacOS
26+
- FirebaseAppCheckInterop (10.10.0)
27+
- FirebaseAuth (10.9.0):
28+
- FirebaseAppCheckInterop (~> 10.0)
29+
- FirebaseCore (~> 10.0)
30+
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
31+
- GoogleUtilities/Environment (~> 7.8)
32+
- GTMSessionFetcher/Core (< 4.0, >= 2.1)
33+
- FirebaseCore (10.9.0):
34+
- FirebaseCoreInternal (~> 10.0)
35+
- GoogleUtilities/Environment (~> 7.8)
36+
- GoogleUtilities/Logger (~> 7.8)
37+
- FirebaseCoreInternal (10.10.0):
38+
- "GoogleUtilities/NSData+zlib (~> 7.8)"
39+
- FirebaseFirestore (10.9.0):
40+
- FirebaseFirestore/AutodetectLeveldb (= 10.9.0)
41+
- FirebaseFirestore/AutodetectLeveldb (10.9.0):
42+
- FirebaseFirestore/Base
43+
- FirebaseFirestore/WithLeveldb
44+
- FirebaseFirestore/Base (10.9.0)
45+
- FirebaseFirestore/WithLeveldb (10.9.0):
46+
- FirebaseFirestore/Base
47+
- FlutterMacOS (1.0.0)
48+
- GoogleUtilities/AppDelegateSwizzler (7.11.1):
49+
- GoogleUtilities/Environment
50+
- GoogleUtilities/Logger
51+
- GoogleUtilities/Network
52+
- GoogleUtilities/Environment (7.11.1):
53+
- PromisesObjC (< 3.0, >= 1.2)
54+
- GoogleUtilities/Logger (7.11.1):
55+
- GoogleUtilities/Environment
56+
- GoogleUtilities/Network (7.11.1):
57+
- GoogleUtilities/Logger
58+
- "GoogleUtilities/NSData+zlib"
59+
- GoogleUtilities/Reachability
60+
- "GoogleUtilities/NSData+zlib (7.11.1)"
61+
- GoogleUtilities/Reachability (7.11.1):
62+
- GoogleUtilities/Logger
63+
- GTMSessionFetcher/Core (3.1.1)
64+
- nanopb (2.30909.0):
65+
- nanopb/decode (= 2.30909.0)
66+
- nanopb/encode (= 2.30909.0)
67+
- nanopb/decode (2.30909.0)
68+
- nanopb/encode (2.30909.0)
69+
- PromisesObjC (2.2.0)
70+
- shared_preferences_foundation (0.0.1):
71+
- Flutter
72+
- FlutterMacOS
73+
74+
DEPENDENCIES:
75+
- cloud_firestore (from `Flutter/ephemeral/.symlinks/plugins/cloud_firestore/macos`)
76+
- desktop_webview_auth (from `Flutter/ephemeral/.symlinks/plugins/desktop_webview_auth/macos`)
77+
- firebase_auth (from `Flutter/ephemeral/.symlinks/plugins/firebase_auth/macos`)
78+
- firebase_core (from `Flutter/ephemeral/.symlinks/plugins/firebase_core/macos`)
79+
- FirebaseFirestore (from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `10.9.0`)
80+
- FlutterMacOS (from `Flutter/ephemeral`)
81+
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
82+
83+
SPEC REPOS:
84+
trunk:
85+
- Firebase
86+
- FirebaseAppCheckInterop
87+
- FirebaseAuth
88+
- FirebaseCore
89+
- FirebaseCoreInternal
90+
- GoogleUtilities
91+
- GTMSessionFetcher
92+
- nanopb
93+
- PromisesObjC
94+
95+
EXTERNAL SOURCES:
96+
cloud_firestore:
97+
:path: Flutter/ephemeral/.symlinks/plugins/cloud_firestore/macos
98+
desktop_webview_auth:
99+
:path: Flutter/ephemeral/.symlinks/plugins/desktop_webview_auth/macos
100+
firebase_auth:
101+
:path: Flutter/ephemeral/.symlinks/plugins/firebase_auth/macos
102+
firebase_core:
103+
:path: Flutter/ephemeral/.symlinks/plugins/firebase_core/macos
104+
FirebaseFirestore:
105+
:git: https://github.com/invertase/firestore-ios-sdk-frameworks.git
106+
:tag: 10.9.0
107+
FlutterMacOS:
108+
:path: Flutter/ephemeral
109+
shared_preferences_foundation:
110+
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
111+
112+
CHECKOUT OPTIONS:
113+
FirebaseFirestore:
114+
:git: https://github.com/invertase/firestore-ios-sdk-frameworks.git
115+
:tag: 10.9.0
116+
117+
SPEC CHECKSUMS:
118+
cloud_firestore: b0993cb852e4da90c4297bcedac4b931e72847f5
119+
desktop_webview_auth: 9bba53a29c9bc6a4ff621fd0ebfbb18856c4dada
120+
Firebase: bd152f0f3d278c4060c5c71359db08ebcfd5a3e2
121+
firebase_auth: 6fc0967d98c2ff489d3e2977c9e9f52a5b69eb22
122+
firebase_core: feb9ea6e23cfb6d4961cd2abeec1b79b47790b8d
123+
FirebaseAppCheckInterop: 7d3521f56872cf74a01792c0a095a30e054ff6ae
124+
FirebaseAuth: 21d5e902fcea44d0d961540fc4742966ae6118cc
125+
FirebaseCore: b68d3616526ec02e4d155166bbafb8eca64af557
126+
FirebaseCoreInternal: 971029061d326000d65bfdc21f5502c75c8b0893
127+
FirebaseFirestore: 8418f3a8d5892bf386b05d5f988b6e7e253a2ea6
128+
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
129+
GoogleUtilities: 9aa0ad5a7bc171f8bae016300bfcfa3fb8425749
130+
GTMSessionFetcher: e8647203b65cee28c5f73d0f473d096653945e72
131+
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
132+
PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef
133+
shared_preferences_foundation: e2dae3258e06f44cc55f49d42024fd8dd03c590c
134+
135+
PODFILE CHECKSUM: fb90be0dc01e76c332e93d62b285815e265b39e0
136+
137+
COCOAPODS: 1.11.3

0 commit comments

Comments
 (0)