Skip to content

Commit 1c92ba5

Browse files
committed
macOS support
1 parent ca4cef9 commit 1c92ba5

32 files changed

+1628
-37
lines changed

macos/.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Flutter-related
2+
**/Flutter/ephemeral/
3+
**/Pods/
4+
5+
# Xcode-related
6+
**/xcuserdata/

macos/Flutter/Flutter-Debug.xcconfig

+2
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"
+2
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"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//
2+
// Generated file. Do not edit.
3+
//
4+
5+
import FlutterMacOS
6+
import Foundation
7+
8+
import firebase_auth
9+
import firebase_core
10+
import native_pdf_renderer
11+
import package_info
12+
import path_provider_macos
13+
import shared_preferences_macos
14+
import sqflite
15+
import url_launcher_macos
16+
17+
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
18+
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
19+
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
20+
NativePdfRendererPlugin.register(with: registry.registrar(forPlugin: "NativePdfRendererPlugin"))
21+
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
22+
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
23+
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
24+
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
25+
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
26+
}

macos/Podfile

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
platform :osx, '10.11'
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 parse_KV_file(file, separator='=')
13+
file_abs_path = File.expand_path(file)
14+
if !File.exists? file_abs_path
15+
return [];
16+
end
17+
pods_ary = []
18+
skip_line_start_symbols = ["#", "/"]
19+
File.foreach(file_abs_path) { |line|
20+
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
21+
plugin = line.split(pattern=separator)
22+
if plugin.length == 2
23+
podname = plugin[0].strip()
24+
path = plugin[1].strip()
25+
podpath = File.expand_path("#{path}", file_abs_path)
26+
pods_ary.push({:name => podname, :path => podpath});
27+
else
28+
puts "Invalid plugin specification: #{line}"
29+
end
30+
}
31+
return pods_ary
32+
end
33+
34+
def pubspec_supports_macos(file)
35+
file_abs_path = File.expand_path(file)
36+
if !File.exists? file_abs_path
37+
return false;
38+
end
39+
File.foreach(file_abs_path) { |line|
40+
return true if line =~ /^\s*macos:/
41+
}
42+
return false
43+
end
44+
45+
target 'Runner' do
46+
use_frameworks!
47+
use_modular_headers!
48+
49+
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
50+
# referring to absolute paths on developers' machines.
51+
ephemeral_dir = File.join('Flutter', 'ephemeral')
52+
symlink_dir = File.join(ephemeral_dir, '.symlinks')
53+
symlink_plugins_dir = File.join(symlink_dir, 'plugins')
54+
system("rm -rf #{symlink_dir}")
55+
system("mkdir -p #{symlink_plugins_dir}")
56+
57+
# Flutter Pods
58+
generated_xcconfig = parse_KV_file(File.join(ephemeral_dir, 'Flutter-Generated.xcconfig'))
59+
if generated_xcconfig.empty?
60+
puts "Flutter-Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
61+
end
62+
generated_xcconfig.map { |p|
63+
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
64+
symlink = File.join(symlink_dir, 'flutter')
65+
File.symlink(File.dirname(p[:path]), symlink)
66+
pod 'FlutterMacOS', :path => File.join(symlink, File.basename(p[:path]))
67+
end
68+
}
69+
70+
# Plugin Pods
71+
plugin_pods = parse_KV_file('../.flutter-plugins')
72+
plugin_pods.map { |p|
73+
symlink = File.join(symlink_plugins_dir, p[:name])
74+
File.symlink(p[:path], symlink)
75+
if pubspec_supports_macos(File.join(symlink, 'pubspec.yaml'))
76+
pod p[:name], :path => File.join(symlink, 'macos')
77+
end
78+
}
79+
end
80+
81+
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
82+
install! 'cocoapods', :disable_input_output_paths => true

macos/Podfile.lock

+164
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
PODS:
2+
- Firebase/Auth (6.21.0):
3+
- Firebase/CoreOnly
4+
- FirebaseAuth (~> 6.5.1)
5+
- Firebase/Core (6.21.0):
6+
- Firebase/CoreOnly
7+
- FirebaseAnalytics (= 6.4.0)
8+
- Firebase/CoreOnly (6.21.0):
9+
- FirebaseCore (= 6.6.5)
10+
- firebase_auth (0.0.1):
11+
- Firebase/Auth (~> 6.0)
12+
- Firebase/Core
13+
- FlutterMacOS
14+
- firebase_core (0.0.1):
15+
- Firebase/Core
16+
- FlutterMacOS
17+
- FirebaseAuth (6.5.1):
18+
- FirebaseAuthInterop (~> 1.0)
19+
- FirebaseCore (~> 6.6)
20+
- GoogleUtilities/AppDelegateSwizzler (~> 6.5)
21+
- GoogleUtilities/Environment (~> 6.5)
22+
- GTMSessionFetcher/Core (~> 1.1)
23+
- FirebaseAuthInterop (1.1.0)
24+
- FirebaseCore (6.6.5):
25+
- FirebaseCoreDiagnostics (~> 1.2)
26+
- FirebaseCoreDiagnosticsInterop (~> 1.2)
27+
- GoogleUtilities/Environment (~> 6.5)
28+
- GoogleUtilities/Logger (~> 6.5)
29+
- FirebaseCoreDiagnostics (1.2.2):
30+
- FirebaseCoreDiagnosticsInterop (~> 1.2)
31+
- GoogleDataTransportCCTSupport (~> 2.0)
32+
- GoogleUtilities/Environment (~> 6.5)
33+
- GoogleUtilities/Logger (~> 6.5)
34+
- nanopb (~> 0.3.901)
35+
- FirebaseCoreDiagnosticsInterop (1.2.0)
36+
- FlutterMacOS (1.0.0)
37+
- FMDB (2.7.5):
38+
- FMDB/standard (= 2.7.5)
39+
- FMDB/standard (2.7.5)
40+
- GoogleDataTransport (5.1.0)
41+
- GoogleDataTransportCCTSupport (2.0.1):
42+
- GoogleDataTransport (~> 5.1)
43+
- nanopb (~> 0.3.901)
44+
- GoogleUtilities/AppDelegateSwizzler (6.5.2):
45+
- GoogleUtilities/Environment
46+
- GoogleUtilities/Logger
47+
- GoogleUtilities/Network
48+
- GoogleUtilities/Environment (6.5.2)
49+
- GoogleUtilities/Logger (6.5.2):
50+
- GoogleUtilities/Environment
51+
- GoogleUtilities/Network (6.5.2):
52+
- GoogleUtilities/Logger
53+
- "GoogleUtilities/NSData+zlib"
54+
- GoogleUtilities/Reachability
55+
- "GoogleUtilities/NSData+zlib (6.5.2)"
56+
- GoogleUtilities/Reachability (6.5.2):
57+
- GoogleUtilities/Logger
58+
- GTMSessionFetcher/Core (1.3.1)
59+
- nanopb (0.3.9011):
60+
- nanopb/decode (= 0.3.9011)
61+
- nanopb/encode (= 0.3.9011)
62+
- nanopb/decode (0.3.9011)
63+
- nanopb/encode (0.3.9011)
64+
- native_pdf_renderer (1.0.0):
65+
- FlutterMacOS
66+
- package_info (0.0.1):
67+
- FlutterMacOS
68+
- path_provider (0.0.1)
69+
- path_provider_macos (0.0.1):
70+
- FlutterMacOS
71+
- shared_preferences (0.0.1)
72+
- shared_preferences_macos (0.0.1):
73+
- FlutterMacOS
74+
- sqflite (0.0.2):
75+
- FlutterMacOS
76+
- FMDB (>= 2.7.5)
77+
- url_launcher (0.0.1)
78+
- url_launcher_macos (0.0.1):
79+
- FlutterMacOS
80+
81+
DEPENDENCIES:
82+
- firebase_auth (from `Flutter/ephemeral/.symlinks/plugins/firebase_auth/macos`)
83+
- firebase_core (from `Flutter/ephemeral/.symlinks/plugins/firebase_core/macos`)
84+
- FlutterMacOS (from `Flutter/ephemeral/.symlinks/flutter/darwin-x64`)
85+
- native_pdf_renderer (from `Flutter/ephemeral/.symlinks/plugins/native_pdf_renderer/macos`)
86+
- package_info (from `Flutter/ephemeral/.symlinks/plugins/package_info/macos`)
87+
- path_provider (from `Flutter/ephemeral/.symlinks/plugins/path_provider/macos`)
88+
- path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`)
89+
- shared_preferences (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences/macos`)
90+
- shared_preferences_macos (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos`)
91+
- sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/macos`)
92+
- url_launcher (from `Flutter/ephemeral/.symlinks/plugins/url_launcher/macos`)
93+
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
94+
95+
SPEC REPOS:
96+
trunk:
97+
- Firebase
98+
- FirebaseAuth
99+
- FirebaseAuthInterop
100+
- FirebaseCore
101+
- FirebaseCoreDiagnostics
102+
- FirebaseCoreDiagnosticsInterop
103+
- FMDB
104+
- GoogleDataTransport
105+
- GoogleDataTransportCCTSupport
106+
- GoogleUtilities
107+
- GTMSessionFetcher
108+
- nanopb
109+
110+
EXTERNAL SOURCES:
111+
firebase_auth:
112+
:path: Flutter/ephemeral/.symlinks/plugins/firebase_auth/macos
113+
firebase_core:
114+
:path: Flutter/ephemeral/.symlinks/plugins/firebase_core/macos
115+
FlutterMacOS:
116+
:path: Flutter/ephemeral/.symlinks/flutter/darwin-x64
117+
native_pdf_renderer:
118+
:path: Flutter/ephemeral/.symlinks/plugins/native_pdf_renderer/macos
119+
package_info:
120+
:path: Flutter/ephemeral/.symlinks/plugins/package_info/macos
121+
path_provider:
122+
:path: Flutter/ephemeral/.symlinks/plugins/path_provider/macos
123+
path_provider_macos:
124+
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos
125+
shared_preferences:
126+
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences/macos
127+
shared_preferences_macos:
128+
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos
129+
sqflite:
130+
:path: Flutter/ephemeral/.symlinks/plugins/sqflite/macos
131+
url_launcher:
132+
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher/macos
133+
url_launcher_macos:
134+
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
135+
136+
SPEC CHECKSUMS:
137+
Firebase: f378c80340dd41c0ad0914af740c021eb282a04b
138+
firebase_auth: f953268a67a0676db04a594cb816c3cab54ada14
139+
firebase_core: b77314bf4bfacf4fb7253ce9bcdd39eb1cff9348
140+
FirebaseAuth: a6da11d78dfd956b7f7af3222a0f0b1c93ef8fc9
141+
FirebaseAuthInterop: a0f37ae05833af156e72028f648d313f7e7592e9
142+
FirebaseCore: 9f495d3afacb7b558711e6218ebb14b1c51b5802
143+
FirebaseCoreDiagnostics: e9b4cd8ba60dee0f2d13347332e4b7898cca5b61
144+
FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850
145+
FlutterMacOS: 15bea8a44d2fa024068daa0140371c020b4b6ff9
146+
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
147+
GoogleDataTransport: b29a21d813e906014ca16c00897827e40e4a24ab
148+
GoogleDataTransportCCTSupport: 6f15a89b0ca35d6fa523e1f752ef818588885988
149+
GoogleUtilities: ad0f3b691c67909d03a3327cc205222ab8f42e0e
150+
GTMSessionFetcher: cea130bbfe5a7edc8d06d3f0d17288c32ffe9925
151+
nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd
152+
native_pdf_renderer: 88fab8a66bc2da5107316894eb288749d9d356b2
153+
package_info: 6eba2fd8d3371dda2d85c8db6fe97488f24b74b2
154+
path_provider: e0848572d1d38b9a7dd099e79cf83f5b7e2cde9f
155+
path_provider_macos: a0a3fd666cb7cd0448e936fb4abad4052961002b
156+
shared_preferences: 9fec34d1bd906196a4da48fcf6c3ad521cc00b8d
157+
shared_preferences_macos: 480ce071d0666e37cef23fe6c702293a3d21799e
158+
sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea
159+
url_launcher: af78307ef9bafff91273b34f1c6c0c86a0004fd7
160+
url_launcher_macos: 45af3d61de06997666568a7149c1be98b41c95d4
161+
162+
PODFILE CHECKSUM: d8ba9b3e9e93c62c74a660b46c6fcb09f03991a7
163+
164+
COCOAPODS: 1.8.4

0 commit comments

Comments
 (0)