Showing
35 changed files
with
1803 additions
and
3 deletions
@@ -72,6 +72,14 @@ | @@ -72,6 +72,14 @@ | ||
72 | lib/generated_plugin_registrant.dart | 72 | lib/generated_plugin_registrant.dart |
73 | **/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist | 73 | **/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist |
74 | 74 | ||
75 | +# macOS | ||
76 | +**/macos/Flutter/GeneratedPluginRegistrant.swift | ||
77 | +**/macos/Flutter/ephemeral | ||
78 | +**/macos/Pods | ||
79 | +**/macos/Runner.xcodeproj/xcuserdata | ||
80 | +**/macos/Runner.xcworkspace/xcuserdata | ||
81 | +**/ios/Flutter/Flutter.podspec | ||
82 | + | ||
75 | # Exceptions to above rules. | 83 | # Exceptions to above rules. |
76 | !**/ios/**/default.mode1v3 | 84 | !**/ios/**/default.mode1v3 |
77 | !**/ios/**/default.mode2v3 | 85 | !**/ios/**/default.mode2v3 |
@@ -3,6 +3,7 @@ import 'dart:io'; | @@ -3,6 +3,7 @@ import 'dart:io'; | ||
3 | import 'dart:typed_data'; | 3 | import 'dart:typed_data'; |
4 | import 'dart:ui' as ui; | 4 | import 'dart:ui' as ui; |
5 | 5 | ||
6 | +import 'package:flutter/foundation.dart'; | ||
6 | import 'package:flutter/material.dart'; | 7 | import 'package:flutter/material.dart'; |
7 | import 'package:flutter/rendering.dart'; | 8 | import 'package:flutter/rendering.dart'; |
8 | import 'package:flutter/services.dart'; | 9 | import 'package:flutter/services.dart'; |
@@ -16,7 +17,10 @@ import 'package:printing/printing.dart'; | @@ -16,7 +17,10 @@ import 'package:printing/printing.dart'; | ||
16 | import 'document.dart'; | 17 | import 'document.dart'; |
17 | import 'viewer.dart'; | 18 | import 'viewer.dart'; |
18 | 19 | ||
19 | -void main() => runApp(MaterialApp(home: MyApp())); | 20 | +void main() { |
21 | + debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia; | ||
22 | + runApp(MaterialApp(home: MyApp())); | ||
23 | +} | ||
20 | 24 | ||
21 | class MyApp extends StatefulWidget { | 25 | class MyApp extends StatefulWidget { |
22 | @override | 26 | @override |
printing/example/macos/Podfile
0 → 100644
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 |
printing/example/macos/Podfile.lock
0 → 100644
1 | +PODS: | ||
2 | + - FlutterMacOS (1.0.0) | ||
3 | + - printing (0.0.1): | ||
4 | + - FlutterMacOS | ||
5 | + | ||
6 | +DEPENDENCIES: | ||
7 | + - FlutterMacOS (from `Flutter/ephemeral/.symlinks/flutter/darwin-x64`) | ||
8 | + - printing (from `Flutter/ephemeral/.symlinks/plugins/printing/macos`) | ||
9 | + | ||
10 | +EXTERNAL SOURCES: | ||
11 | + FlutterMacOS: | ||
12 | + :path: Flutter/ephemeral/.symlinks/flutter/darwin-x64 | ||
13 | + printing: | ||
14 | + :path: Flutter/ephemeral/.symlinks/plugins/printing/macos | ||
15 | + | ||
16 | +SPEC CHECKSUMS: | ||
17 | + FlutterMacOS: 15bea8a44d2fa024068daa0140371c020b4b6ff9 | ||
18 | + printing: 2f60992a2ee8b3d92204832d03a8dd0b864846e3 | ||
19 | + | ||
20 | +PODFILE CHECKSUM: d8ba9b3e9e93c62c74a660b46c6fcb09f03991a7 | ||
21 | + | ||
22 | +COCOAPODS: 1.8.4 |
1 | +// !$*UTF8*$! | ||
2 | +{ | ||
3 | + archiveVersion = 1; | ||
4 | + classes = { | ||
5 | + }; | ||
6 | + objectVersion = 51; | ||
7 | + objects = { | ||
8 | + | ||
9 | +/* Begin PBXAggregateTarget section */ | ||
10 | + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { | ||
11 | + isa = PBXAggregateTarget; | ||
12 | + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; | ||
13 | + buildPhases = ( | ||
14 | + 33CC111E2044C6BF0003C045 /* ShellScript */, | ||
15 | + ); | ||
16 | + dependencies = ( | ||
17 | + ); | ||
18 | + name = "Flutter Assemble"; | ||
19 | + productName = FLX; | ||
20 | + }; | ||
21 | +/* End PBXAggregateTarget section */ | ||
22 | + | ||
23 | +/* Begin PBXBuildFile section */ | ||
24 | + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; | ||
25 | + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; | ||
26 | + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; | ||
27 | + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; | ||
28 | + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; | ||
29 | + 33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; }; | ||
30 | + 33D1A10522148B93006C7A3E /* FlutterMacOS.framework in Bundle Framework */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | ||
31 | + D73912F022F37F9E000D13A0 /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D73912EF22F37F9E000D13A0 /* App.framework */; }; | ||
32 | + D73912F222F3801D000D13A0 /* App.framework in Bundle Framework */ = {isa = PBXBuildFile; fileRef = D73912EF22F37F9E000D13A0 /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | ||
33 | + FAFCDC119D6F65916930B501 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A64AB1A7623B8F4172F5E1C /* Pods_Runner.framework */; }; | ||
34 | +/* End PBXBuildFile section */ | ||
35 | + | ||
36 | +/* Begin PBXContainerItemProxy section */ | ||
37 | + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { | ||
38 | + isa = PBXContainerItemProxy; | ||
39 | + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; | ||
40 | + proxyType = 1; | ||
41 | + remoteGlobalIDString = 33CC111A2044C6BA0003C045; | ||
42 | + remoteInfo = FLX; | ||
43 | + }; | ||
44 | +/* End PBXContainerItemProxy section */ | ||
45 | + | ||
46 | +/* Begin PBXCopyFilesBuildPhase section */ | ||
47 | + 33CC110E2044A8840003C045 /* Bundle Framework */ = { | ||
48 | + isa = PBXCopyFilesBuildPhase; | ||
49 | + buildActionMask = 2147483647; | ||
50 | + dstPath = ""; | ||
51 | + dstSubfolderSpec = 10; | ||
52 | + files = ( | ||
53 | + D73912F222F3801D000D13A0 /* App.framework in Bundle Framework */, | ||
54 | + 33D1A10522148B93006C7A3E /* FlutterMacOS.framework in Bundle Framework */, | ||
55 | + ); | ||
56 | + name = "Bundle Framework"; | ||
57 | + runOnlyForDeploymentPostprocessing = 0; | ||
58 | + }; | ||
59 | +/* End PBXCopyFilesBuildPhase section */ | ||
60 | + | ||
61 | +/* Begin PBXFileReference section */ | ||
62 | + 1A64AB1A7623B8F4172F5E1C /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
63 | + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; }; | ||
64 | + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; }; | ||
65 | + 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
66 | + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; | ||
67 | + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; }; | ||
68 | + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; }; | ||
69 | + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = "<group>"; }; | ||
70 | + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = "<group>"; }; | ||
71 | + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = "<group>"; }; | ||
72 | + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = "<group>"; }; | ||
73 | + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = "<group>"; }; | ||
74 | + 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FlutterMacOS.framework; path = Flutter/ephemeral/FlutterMacOS.framework; sourceTree = SOURCE_ROOT; }; | ||
75 | + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; }; | ||
76 | + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; }; | ||
77 | + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; }; | ||
78 | + 4D17B735914EA846461FA35E /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; }; | ||
79 | + 6DA67D29B9658D956CCB8667 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; }; | ||
80 | + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; }; | ||
81 | + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; }; | ||
82 | + D73912EF22F37F9E000D13A0 /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/ephemeral/App.framework; sourceTree = SOURCE_ROOT; }; | ||
83 | + FBDA4A919488314ACA32DB53 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; }; | ||
84 | +/* End PBXFileReference section */ | ||
85 | + | ||
86 | +/* Begin PBXFrameworksBuildPhase section */ | ||
87 | + 33CC10EA2044A3C60003C045 /* Frameworks */ = { | ||
88 | + isa = PBXFrameworksBuildPhase; | ||
89 | + buildActionMask = 2147483647; | ||
90 | + files = ( | ||
91 | + D73912F022F37F9E000D13A0 /* App.framework in Frameworks */, | ||
92 | + 33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */, | ||
93 | + FAFCDC119D6F65916930B501 /* Pods_Runner.framework in Frameworks */, | ||
94 | + ); | ||
95 | + runOnlyForDeploymentPostprocessing = 0; | ||
96 | + }; | ||
97 | +/* End PBXFrameworksBuildPhase section */ | ||
98 | + | ||
99 | +/* Begin PBXGroup section */ | ||
100 | + 2EEF2EEF14D2775BC29C6ECC /* Pods */ = { | ||
101 | + isa = PBXGroup; | ||
102 | + children = ( | ||
103 | + 6DA67D29B9658D956CCB8667 /* Pods-Runner.debug.xcconfig */, | ||
104 | + FBDA4A919488314ACA32DB53 /* Pods-Runner.release.xcconfig */, | ||
105 | + 4D17B735914EA846461FA35E /* Pods-Runner.profile.xcconfig */, | ||
106 | + ); | ||
107 | + path = Pods; | ||
108 | + sourceTree = "<group>"; | ||
109 | + }; | ||
110 | + 33BA886A226E78AF003329D5 /* Configs */ = { | ||
111 | + isa = PBXGroup; | ||
112 | + children = ( | ||
113 | + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, | ||
114 | + 9740EEB21CF90195004384FC /* Debug.xcconfig */, | ||
115 | + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, | ||
116 | + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, | ||
117 | + ); | ||
118 | + path = Configs; | ||
119 | + sourceTree = "<group>"; | ||
120 | + }; | ||
121 | + 33CC10E42044A3C60003C045 = { | ||
122 | + isa = PBXGroup; | ||
123 | + children = ( | ||
124 | + 33FAB671232836740065AC1E /* Runner */, | ||
125 | + 33CEB47122A05771004F2AC0 /* Flutter */, | ||
126 | + 33CC10EE2044A3C60003C045 /* Products */, | ||
127 | + D73912EC22F37F3D000D13A0 /* Frameworks */, | ||
128 | + 2EEF2EEF14D2775BC29C6ECC /* Pods */, | ||
129 | + ); | ||
130 | + sourceTree = "<group>"; | ||
131 | + }; | ||
132 | + 33CC10EE2044A3C60003C045 /* Products */ = { | ||
133 | + isa = PBXGroup; | ||
134 | + children = ( | ||
135 | + 33CC10ED2044A3C60003C045 /* example.app */, | ||
136 | + ); | ||
137 | + name = Products; | ||
138 | + sourceTree = "<group>"; | ||
139 | + }; | ||
140 | + 33CC11242044D66E0003C045 /* Resources */ = { | ||
141 | + isa = PBXGroup; | ||
142 | + children = ( | ||
143 | + 33CC10F22044A3C60003C045 /* Assets.xcassets */, | ||
144 | + 33CC10F42044A3C60003C045 /* MainMenu.xib */, | ||
145 | + 33CC10F72044A3C60003C045 /* Info.plist */, | ||
146 | + ); | ||
147 | + name = Resources; | ||
148 | + path = ..; | ||
149 | + sourceTree = "<group>"; | ||
150 | + }; | ||
151 | + 33CEB47122A05771004F2AC0 /* Flutter */ = { | ||
152 | + isa = PBXGroup; | ||
153 | + children = ( | ||
154 | + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, | ||
155 | + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, | ||
156 | + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, | ||
157 | + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, | ||
158 | + D73912EF22F37F9E000D13A0 /* App.framework */, | ||
159 | + 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */, | ||
160 | + ); | ||
161 | + path = Flutter; | ||
162 | + sourceTree = "<group>"; | ||
163 | + }; | ||
164 | + 33FAB671232836740065AC1E /* Runner */ = { | ||
165 | + isa = PBXGroup; | ||
166 | + children = ( | ||
167 | + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, | ||
168 | + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, | ||
169 | + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, | ||
170 | + 33E51914231749380026EE4D /* Release.entitlements */, | ||
171 | + 33CC11242044D66E0003C045 /* Resources */, | ||
172 | + 33BA886A226E78AF003329D5 /* Configs */, | ||
173 | + ); | ||
174 | + path = Runner; | ||
175 | + sourceTree = "<group>"; | ||
176 | + }; | ||
177 | + D73912EC22F37F3D000D13A0 /* Frameworks */ = { | ||
178 | + isa = PBXGroup; | ||
179 | + children = ( | ||
180 | + 1A64AB1A7623B8F4172F5E1C /* Pods_Runner.framework */, | ||
181 | + ); | ||
182 | + name = Frameworks; | ||
183 | + sourceTree = "<group>"; | ||
184 | + }; | ||
185 | +/* End PBXGroup section */ | ||
186 | + | ||
187 | +/* Begin PBXNativeTarget section */ | ||
188 | + 33CC10EC2044A3C60003C045 /* Runner */ = { | ||
189 | + isa = PBXNativeTarget; | ||
190 | + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; | ||
191 | + buildPhases = ( | ||
192 | + 410530DCEE9AB5C928DEA636 /* [CP] Check Pods Manifest.lock */, | ||
193 | + 33CC10E92044A3C60003C045 /* Sources */, | ||
194 | + 33CC10EA2044A3C60003C045 /* Frameworks */, | ||
195 | + 33CC10EB2044A3C60003C045 /* Resources */, | ||
196 | + 33CC110E2044A8840003C045 /* Bundle Framework */, | ||
197 | + 3399D490228B24CF009A79C7 /* ShellScript */, | ||
198 | + BB6CDC1283CD1FBBD52F7CE4 /* [CP] Embed Pods Frameworks */, | ||
199 | + ); | ||
200 | + buildRules = ( | ||
201 | + ); | ||
202 | + dependencies = ( | ||
203 | + 33CC11202044C79F0003C045 /* PBXTargetDependency */, | ||
204 | + ); | ||
205 | + name = Runner; | ||
206 | + productName = Runner; | ||
207 | + productReference = 33CC10ED2044A3C60003C045 /* example.app */; | ||
208 | + productType = "com.apple.product-type.application"; | ||
209 | + }; | ||
210 | +/* End PBXNativeTarget section */ | ||
211 | + | ||
212 | +/* Begin PBXProject section */ | ||
213 | + 33CC10E52044A3C60003C045 /* Project object */ = { | ||
214 | + isa = PBXProject; | ||
215 | + attributes = { | ||
216 | + LastSwiftUpdateCheck = 0920; | ||
217 | + LastUpgradeCheck = 1120; | ||
218 | + ORGANIZATIONNAME = "Google LLC"; | ||
219 | + TargetAttributes = { | ||
220 | + 33CC10EC2044A3C60003C045 = { | ||
221 | + CreatedOnToolsVersion = 9.2; | ||
222 | + LastSwiftMigration = 1100; | ||
223 | + ProvisioningStyle = Automatic; | ||
224 | + SystemCapabilities = { | ||
225 | + com.apple.Sandbox = { | ||
226 | + enabled = 1; | ||
227 | + }; | ||
228 | + }; | ||
229 | + }; | ||
230 | + 33CC111A2044C6BA0003C045 = { | ||
231 | + CreatedOnToolsVersion = 9.2; | ||
232 | + ProvisioningStyle = Manual; | ||
233 | + }; | ||
234 | + }; | ||
235 | + }; | ||
236 | + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; | ||
237 | + compatibilityVersion = "Xcode 8.0"; | ||
238 | + developmentRegion = en; | ||
239 | + hasScannedForEncodings = 0; | ||
240 | + knownRegions = ( | ||
241 | + en, | ||
242 | + Base, | ||
243 | + ); | ||
244 | + mainGroup = 33CC10E42044A3C60003C045; | ||
245 | + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; | ||
246 | + projectDirPath = ""; | ||
247 | + projectRoot = ""; | ||
248 | + targets = ( | ||
249 | + 33CC10EC2044A3C60003C045 /* Runner */, | ||
250 | + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, | ||
251 | + ); | ||
252 | + }; | ||
253 | +/* End PBXProject section */ | ||
254 | + | ||
255 | +/* Begin PBXResourcesBuildPhase section */ | ||
256 | + 33CC10EB2044A3C60003C045 /* Resources */ = { | ||
257 | + isa = PBXResourcesBuildPhase; | ||
258 | + buildActionMask = 2147483647; | ||
259 | + files = ( | ||
260 | + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, | ||
261 | + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, | ||
262 | + ); | ||
263 | + runOnlyForDeploymentPostprocessing = 0; | ||
264 | + }; | ||
265 | +/* End PBXResourcesBuildPhase section */ | ||
266 | + | ||
267 | +/* Begin PBXShellScriptBuildPhase section */ | ||
268 | + 3399D490228B24CF009A79C7 /* ShellScript */ = { | ||
269 | + isa = PBXShellScriptBuildPhase; | ||
270 | + buildActionMask = 2147483647; | ||
271 | + files = ( | ||
272 | + ); | ||
273 | + inputFileListPaths = ( | ||
274 | + ); | ||
275 | + inputPaths = ( | ||
276 | + ); | ||
277 | + outputFileListPaths = ( | ||
278 | + ); | ||
279 | + outputPaths = ( | ||
280 | + ); | ||
281 | + runOnlyForDeploymentPostprocessing = 0; | ||
282 | + shellPath = /bin/sh; | ||
283 | + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename\n"; | ||
284 | + }; | ||
285 | + 33CC111E2044C6BF0003C045 /* ShellScript */ = { | ||
286 | + isa = PBXShellScriptBuildPhase; | ||
287 | + buildActionMask = 2147483647; | ||
288 | + files = ( | ||
289 | + ); | ||
290 | + inputFileListPaths = ( | ||
291 | + Flutter/ephemeral/FlutterInputs.xcfilelist, | ||
292 | + ); | ||
293 | + inputPaths = ( | ||
294 | + Flutter/ephemeral/tripwire, | ||
295 | + ); | ||
296 | + outputFileListPaths = ( | ||
297 | + Flutter/ephemeral/FlutterOutputs.xcfilelist, | ||
298 | + ); | ||
299 | + outputPaths = ( | ||
300 | + ); | ||
301 | + runOnlyForDeploymentPostprocessing = 0; | ||
302 | + shellPath = /bin/sh; | ||
303 | + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh\ntouch Flutter/ephemeral/tripwire\n"; | ||
304 | + }; | ||
305 | + 410530DCEE9AB5C928DEA636 /* [CP] Check Pods Manifest.lock */ = { | ||
306 | + isa = PBXShellScriptBuildPhase; | ||
307 | + buildActionMask = 2147483647; | ||
308 | + files = ( | ||
309 | + ); | ||
310 | + inputFileListPaths = ( | ||
311 | + ); | ||
312 | + inputPaths = ( | ||
313 | + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", | ||
314 | + "${PODS_ROOT}/Manifest.lock", | ||
315 | + ); | ||
316 | + name = "[CP] Check Pods Manifest.lock"; | ||
317 | + outputFileListPaths = ( | ||
318 | + ); | ||
319 | + outputPaths = ( | ||
320 | + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", | ||
321 | + ); | ||
322 | + runOnlyForDeploymentPostprocessing = 0; | ||
323 | + shellPath = /bin/sh; | ||
324 | + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; | ||
325 | + showEnvVarsInLog = 0; | ||
326 | + }; | ||
327 | + BB6CDC1283CD1FBBD52F7CE4 /* [CP] Embed Pods Frameworks */ = { | ||
328 | + isa = PBXShellScriptBuildPhase; | ||
329 | + buildActionMask = 2147483647; | ||
330 | + files = ( | ||
331 | + ); | ||
332 | + inputFileListPaths = ( | ||
333 | + ); | ||
334 | + name = "[CP] Embed Pods Frameworks"; | ||
335 | + outputFileListPaths = ( | ||
336 | + ); | ||
337 | + runOnlyForDeploymentPostprocessing = 0; | ||
338 | + shellPath = /bin/sh; | ||
339 | + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; | ||
340 | + showEnvVarsInLog = 0; | ||
341 | + }; | ||
342 | +/* End PBXShellScriptBuildPhase section */ | ||
343 | + | ||
344 | +/* Begin PBXSourcesBuildPhase section */ | ||
345 | + 33CC10E92044A3C60003C045 /* Sources */ = { | ||
346 | + isa = PBXSourcesBuildPhase; | ||
347 | + buildActionMask = 2147483647; | ||
348 | + files = ( | ||
349 | + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, | ||
350 | + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, | ||
351 | + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, | ||
352 | + ); | ||
353 | + runOnlyForDeploymentPostprocessing = 0; | ||
354 | + }; | ||
355 | +/* End PBXSourcesBuildPhase section */ | ||
356 | + | ||
357 | +/* Begin PBXTargetDependency section */ | ||
358 | + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { | ||
359 | + isa = PBXTargetDependency; | ||
360 | + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; | ||
361 | + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; | ||
362 | + }; | ||
363 | +/* End PBXTargetDependency section */ | ||
364 | + | ||
365 | +/* Begin PBXVariantGroup section */ | ||
366 | + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { | ||
367 | + isa = PBXVariantGroup; | ||
368 | + children = ( | ||
369 | + 33CC10F52044A3C60003C045 /* Base */, | ||
370 | + ); | ||
371 | + name = MainMenu.xib; | ||
372 | + path = Runner; | ||
373 | + sourceTree = "<group>"; | ||
374 | + }; | ||
375 | +/* End PBXVariantGroup section */ | ||
376 | + | ||
377 | +/* Begin XCBuildConfiguration section */ | ||
378 | + 338D0CE9231458BD00FA5F75 /* Profile */ = { | ||
379 | + isa = XCBuildConfiguration; | ||
380 | + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | ||
381 | + buildSettings = { | ||
382 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
383 | + CLANG_ANALYZER_NONNULL = YES; | ||
384 | + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; | ||
385 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; | ||
386 | + CLANG_CXX_LIBRARY = "libc++"; | ||
387 | + CLANG_ENABLE_MODULES = YES; | ||
388 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
389 | + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | ||
390 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
391 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
392 | + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; | ||
393 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
394 | + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; | ||
395 | + CLANG_WARN_EMPTY_BODY = YES; | ||
396 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
397 | + CLANG_WARN_INFINITE_RECURSION = YES; | ||
398 | + CLANG_WARN_INT_CONVERSION = YES; | ||
399 | + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | ||
400 | + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | ||
401 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
402 | + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | ||
403 | + CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
404 | + CODE_SIGN_IDENTITY = "-"; | ||
405 | + COPY_PHASE_STRIP = NO; | ||
406 | + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||
407 | + ENABLE_NS_ASSERTIONS = NO; | ||
408 | + ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
409 | + GCC_C_LANGUAGE_STANDARD = gnu11; | ||
410 | + GCC_NO_COMMON_BLOCKS = YES; | ||
411 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
412 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
413 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
414 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
415 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
416 | + MACOSX_DEPLOYMENT_TARGET = 10.11; | ||
417 | + MTL_ENABLE_DEBUG_INFO = NO; | ||
418 | + SDKROOT = macosx; | ||
419 | + SWIFT_COMPILATION_MODE = wholemodule; | ||
420 | + SWIFT_OPTIMIZATION_LEVEL = "-O"; | ||
421 | + }; | ||
422 | + name = Profile; | ||
423 | + }; | ||
424 | + 338D0CEA231458BD00FA5F75 /* Profile */ = { | ||
425 | + isa = XCBuildConfiguration; | ||
426 | + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; | ||
427 | + buildSettings = { | ||
428 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
429 | + CLANG_ENABLE_MODULES = YES; | ||
430 | + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; | ||
431 | + CODE_SIGN_IDENTITY = "-"; | ||
432 | + CODE_SIGN_STYLE = Automatic; | ||
433 | + COMBINE_HIDPI_IMAGES = YES; | ||
434 | + FRAMEWORK_SEARCH_PATHS = ( | ||
435 | + "$(inherited)", | ||
436 | + "$(PROJECT_DIR)/Flutter/ephemeral", | ||
437 | + ); | ||
438 | + INFOPLIST_FILE = Runner/Info.plist; | ||
439 | + LD_RUNPATH_SEARCH_PATHS = ( | ||
440 | + "$(inherited)", | ||
441 | + "@executable_path/../Frameworks", | ||
442 | + ); | ||
443 | + PROVISIONING_PROFILE_SPECIFIER = ""; | ||
444 | + SWIFT_VERSION = 5.0; | ||
445 | + }; | ||
446 | + name = Profile; | ||
447 | + }; | ||
448 | + 338D0CEB231458BD00FA5F75 /* Profile */ = { | ||
449 | + isa = XCBuildConfiguration; | ||
450 | + buildSettings = { | ||
451 | + CODE_SIGN_STYLE = Manual; | ||
452 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
453 | + }; | ||
454 | + name = Profile; | ||
455 | + }; | ||
456 | + 33CC10F92044A3C60003C045 /* Debug */ = { | ||
457 | + isa = XCBuildConfiguration; | ||
458 | + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; | ||
459 | + buildSettings = { | ||
460 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
461 | + CLANG_ANALYZER_NONNULL = YES; | ||
462 | + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; | ||
463 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; | ||
464 | + CLANG_CXX_LIBRARY = "libc++"; | ||
465 | + CLANG_ENABLE_MODULES = YES; | ||
466 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
467 | + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | ||
468 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
469 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
470 | + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; | ||
471 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
472 | + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; | ||
473 | + CLANG_WARN_EMPTY_BODY = YES; | ||
474 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
475 | + CLANG_WARN_INFINITE_RECURSION = YES; | ||
476 | + CLANG_WARN_INT_CONVERSION = YES; | ||
477 | + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | ||
478 | + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | ||
479 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
480 | + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | ||
481 | + CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
482 | + CODE_SIGN_IDENTITY = "-"; | ||
483 | + COPY_PHASE_STRIP = NO; | ||
484 | + DEBUG_INFORMATION_FORMAT = dwarf; | ||
485 | + ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
486 | + ENABLE_TESTABILITY = YES; | ||
487 | + GCC_C_LANGUAGE_STANDARD = gnu11; | ||
488 | + GCC_DYNAMIC_NO_PIC = NO; | ||
489 | + GCC_NO_COMMON_BLOCKS = YES; | ||
490 | + GCC_OPTIMIZATION_LEVEL = 0; | ||
491 | + GCC_PREPROCESSOR_DEFINITIONS = ( | ||
492 | + "DEBUG=1", | ||
493 | + "$(inherited)", | ||
494 | + ); | ||
495 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
496 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
497 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
498 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
499 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
500 | + MACOSX_DEPLOYMENT_TARGET = 10.11; | ||
501 | + MTL_ENABLE_DEBUG_INFO = YES; | ||
502 | + ONLY_ACTIVE_ARCH = YES; | ||
503 | + SDKROOT = macosx; | ||
504 | + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; | ||
505 | + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; | ||
506 | + }; | ||
507 | + name = Debug; | ||
508 | + }; | ||
509 | + 33CC10FA2044A3C60003C045 /* Release */ = { | ||
510 | + isa = XCBuildConfiguration; | ||
511 | + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | ||
512 | + buildSettings = { | ||
513 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
514 | + CLANG_ANALYZER_NONNULL = YES; | ||
515 | + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; | ||
516 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; | ||
517 | + CLANG_CXX_LIBRARY = "libc++"; | ||
518 | + CLANG_ENABLE_MODULES = YES; | ||
519 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
520 | + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | ||
521 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
522 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
523 | + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; | ||
524 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
525 | + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; | ||
526 | + CLANG_WARN_EMPTY_BODY = YES; | ||
527 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
528 | + CLANG_WARN_INFINITE_RECURSION = YES; | ||
529 | + CLANG_WARN_INT_CONVERSION = YES; | ||
530 | + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | ||
531 | + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | ||
532 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
533 | + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | ||
534 | + CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
535 | + CODE_SIGN_IDENTITY = "-"; | ||
536 | + COPY_PHASE_STRIP = NO; | ||
537 | + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||
538 | + ENABLE_NS_ASSERTIONS = NO; | ||
539 | + ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
540 | + GCC_C_LANGUAGE_STANDARD = gnu11; | ||
541 | + GCC_NO_COMMON_BLOCKS = YES; | ||
542 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
543 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
544 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
545 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
546 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
547 | + MACOSX_DEPLOYMENT_TARGET = 10.11; | ||
548 | + MTL_ENABLE_DEBUG_INFO = NO; | ||
549 | + SDKROOT = macosx; | ||
550 | + SWIFT_COMPILATION_MODE = wholemodule; | ||
551 | + SWIFT_OPTIMIZATION_LEVEL = "-O"; | ||
552 | + }; | ||
553 | + name = Release; | ||
554 | + }; | ||
555 | + 33CC10FC2044A3C60003C045 /* Debug */ = { | ||
556 | + isa = XCBuildConfiguration; | ||
557 | + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; | ||
558 | + buildSettings = { | ||
559 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
560 | + CLANG_ENABLE_MODULES = YES; | ||
561 | + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; | ||
562 | + CODE_SIGN_IDENTITY = "-"; | ||
563 | + CODE_SIGN_STYLE = Automatic; | ||
564 | + COMBINE_HIDPI_IMAGES = YES; | ||
565 | + FRAMEWORK_SEARCH_PATHS = ( | ||
566 | + "$(inherited)", | ||
567 | + "$(PROJECT_DIR)/Flutter/ephemeral", | ||
568 | + ); | ||
569 | + INFOPLIST_FILE = Runner/Info.plist; | ||
570 | + LD_RUNPATH_SEARCH_PATHS = ( | ||
571 | + "$(inherited)", | ||
572 | + "@executable_path/../Frameworks", | ||
573 | + ); | ||
574 | + PROVISIONING_PROFILE_SPECIFIER = ""; | ||
575 | + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; | ||
576 | + SWIFT_VERSION = 5.0; | ||
577 | + }; | ||
578 | + name = Debug; | ||
579 | + }; | ||
580 | + 33CC10FD2044A3C60003C045 /* Release */ = { | ||
581 | + isa = XCBuildConfiguration; | ||
582 | + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; | ||
583 | + buildSettings = { | ||
584 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
585 | + CLANG_ENABLE_MODULES = YES; | ||
586 | + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; | ||
587 | + CODE_SIGN_IDENTITY = "-"; | ||
588 | + CODE_SIGN_STYLE = Automatic; | ||
589 | + COMBINE_HIDPI_IMAGES = YES; | ||
590 | + FRAMEWORK_SEARCH_PATHS = ( | ||
591 | + "$(inherited)", | ||
592 | + "$(PROJECT_DIR)/Flutter/ephemeral", | ||
593 | + ); | ||
594 | + INFOPLIST_FILE = Runner/Info.plist; | ||
595 | + LD_RUNPATH_SEARCH_PATHS = ( | ||
596 | + "$(inherited)", | ||
597 | + "@executable_path/../Frameworks", | ||
598 | + ); | ||
599 | + PROVISIONING_PROFILE_SPECIFIER = ""; | ||
600 | + SWIFT_VERSION = 5.0; | ||
601 | + }; | ||
602 | + name = Release; | ||
603 | + }; | ||
604 | + 33CC111C2044C6BA0003C045 /* Debug */ = { | ||
605 | + isa = XCBuildConfiguration; | ||
606 | + buildSettings = { | ||
607 | + CODE_SIGN_STYLE = Manual; | ||
608 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
609 | + }; | ||
610 | + name = Debug; | ||
611 | + }; | ||
612 | + 33CC111D2044C6BA0003C045 /* Release */ = { | ||
613 | + isa = XCBuildConfiguration; | ||
614 | + buildSettings = { | ||
615 | + CODE_SIGN_STYLE = Automatic; | ||
616 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
617 | + }; | ||
618 | + name = Release; | ||
619 | + }; | ||
620 | +/* End XCBuildConfiguration section */ | ||
621 | + | ||
622 | +/* Begin XCConfigurationList section */ | ||
623 | + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { | ||
624 | + isa = XCConfigurationList; | ||
625 | + buildConfigurations = ( | ||
626 | + 33CC10F92044A3C60003C045 /* Debug */, | ||
627 | + 33CC10FA2044A3C60003C045 /* Release */, | ||
628 | + 338D0CE9231458BD00FA5F75 /* Profile */, | ||
629 | + ); | ||
630 | + defaultConfigurationIsVisible = 0; | ||
631 | + defaultConfigurationName = Release; | ||
632 | + }; | ||
633 | + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { | ||
634 | + isa = XCConfigurationList; | ||
635 | + buildConfigurations = ( | ||
636 | + 33CC10FC2044A3C60003C045 /* Debug */, | ||
637 | + 33CC10FD2044A3C60003C045 /* Release */, | ||
638 | + 338D0CEA231458BD00FA5F75 /* Profile */, | ||
639 | + ); | ||
640 | + defaultConfigurationIsVisible = 0; | ||
641 | + defaultConfigurationName = Release; | ||
642 | + }; | ||
643 | + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { | ||
644 | + isa = XCConfigurationList; | ||
645 | + buildConfigurations = ( | ||
646 | + 33CC111C2044C6BA0003C045 /* Debug */, | ||
647 | + 33CC111D2044C6BA0003C045 /* Release */, | ||
648 | + 338D0CEB231458BD00FA5F75 /* Profile */, | ||
649 | + ); | ||
650 | + defaultConfigurationIsVisible = 0; | ||
651 | + defaultConfigurationName = Release; | ||
652 | + }; | ||
653 | +/* End XCConfigurationList section */ | ||
654 | + }; | ||
655 | + rootObject = 33CC10E52044A3C60003C045 /* Project object */; | ||
656 | +} |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<Scheme | ||
3 | + LastUpgradeVersion = "1120" | ||
4 | + version = "1.3"> | ||
5 | + <BuildAction | ||
6 | + parallelizeBuildables = "YES" | ||
7 | + buildImplicitDependencies = "YES"> | ||
8 | + <BuildActionEntries> | ||
9 | + <BuildActionEntry | ||
10 | + buildForTesting = "YES" | ||
11 | + buildForRunning = "YES" | ||
12 | + buildForProfiling = "YES" | ||
13 | + buildForArchiving = "YES" | ||
14 | + buildForAnalyzing = "YES"> | ||
15 | + <BuildableReference | ||
16 | + BuildableIdentifier = "primary" | ||
17 | + BlueprintIdentifier = "33CC10EC2044A3C60003C045" | ||
18 | + BuildableName = "example.app" | ||
19 | + BlueprintName = "Runner" | ||
20 | + ReferencedContainer = "container:Runner.xcodeproj"> | ||
21 | + </BuildableReference> | ||
22 | + </BuildActionEntry> | ||
23 | + </BuildActionEntries> | ||
24 | + </BuildAction> | ||
25 | + <TestAction | ||
26 | + buildConfiguration = "Debug" | ||
27 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
28 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
29 | + shouldUseLaunchSchemeArgsEnv = "YES"> | ||
30 | + <MacroExpansion> | ||
31 | + <BuildableReference | ||
32 | + BuildableIdentifier = "primary" | ||
33 | + BlueprintIdentifier = "33CC10EC2044A3C60003C045" | ||
34 | + BuildableName = "example.app" | ||
35 | + BlueprintName = "Runner" | ||
36 | + ReferencedContainer = "container:Runner.xcodeproj"> | ||
37 | + </BuildableReference> | ||
38 | + </MacroExpansion> | ||
39 | + <Testables> | ||
40 | + <TestableReference | ||
41 | + skipped = "NO"> | ||
42 | + <BuildableReference | ||
43 | + BuildableIdentifier = "primary" | ||
44 | + BlueprintIdentifier = "00380F9121DF178D00097171" | ||
45 | + BuildableName = "RunnerUITests.xctest" | ||
46 | + BlueprintName = "RunnerUITests" | ||
47 | + ReferencedContainer = "container:Runner.xcodeproj"> | ||
48 | + </BuildableReference> | ||
49 | + </TestableReference> | ||
50 | + </Testables> | ||
51 | + </TestAction> | ||
52 | + <LaunchAction | ||
53 | + buildConfiguration = "Debug" | ||
54 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
55 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
56 | + launchStyle = "0" | ||
57 | + useCustomWorkingDirectory = "NO" | ||
58 | + ignoresPersistentStateOnLaunch = "NO" | ||
59 | + debugDocumentVersioning = "YES" | ||
60 | + debugServiceExtension = "internal" | ||
61 | + allowLocationSimulation = "YES"> | ||
62 | + <BuildableProductRunnable | ||
63 | + runnableDebuggingMode = "0"> | ||
64 | + <BuildableReference | ||
65 | + BuildableIdentifier = "primary" | ||
66 | + BlueprintIdentifier = "33CC10EC2044A3C60003C045" | ||
67 | + BuildableName = "example.app" | ||
68 | + BlueprintName = "Runner" | ||
69 | + ReferencedContainer = "container:Runner.xcodeproj"> | ||
70 | + </BuildableReference> | ||
71 | + </BuildableProductRunnable> | ||
72 | + </LaunchAction> | ||
73 | + <ProfileAction | ||
74 | + buildConfiguration = "Release" | ||
75 | + shouldUseLaunchSchemeArgsEnv = "YES" | ||
76 | + savedToolIdentifier = "" | ||
77 | + useCustomWorkingDirectory = "NO" | ||
78 | + debugDocumentVersioning = "YES"> | ||
79 | + <BuildableProductRunnable | ||
80 | + runnableDebuggingMode = "0"> | ||
81 | + <BuildableReference | ||
82 | + BuildableIdentifier = "primary" | ||
83 | + BlueprintIdentifier = "33CC10EC2044A3C60003C045" | ||
84 | + BuildableName = "example.app" | ||
85 | + BlueprintName = "Runner" | ||
86 | + ReferencedContainer = "container:Runner.xcodeproj"> | ||
87 | + </BuildableReference> | ||
88 | + </BuildableProductRunnable> | ||
89 | + </ProfileAction> | ||
90 | + <AnalyzeAction | ||
91 | + buildConfiguration = "Debug"> | ||
92 | + </AnalyzeAction> | ||
93 | + <ArchiveAction | ||
94 | + buildConfiguration = "Release" | ||
95 | + revealArchiveInOrganizer = "YES"> | ||
96 | + </ArchiveAction> | ||
97 | +</Scheme> |
1 | +{ | ||
2 | + "images" : [ | ||
3 | + { | ||
4 | + "size" : "16x16", | ||
5 | + "idiom" : "mac", | ||
6 | + "filename" : "app_icon_16.png", | ||
7 | + "scale" : "1x" | ||
8 | + }, | ||
9 | + { | ||
10 | + "size" : "16x16", | ||
11 | + "idiom" : "mac", | ||
12 | + "filename" : "app_icon_32.png", | ||
13 | + "scale" : "2x" | ||
14 | + }, | ||
15 | + { | ||
16 | + "size" : "32x32", | ||
17 | + "idiom" : "mac", | ||
18 | + "filename" : "app_icon_32.png", | ||
19 | + "scale" : "1x" | ||
20 | + }, | ||
21 | + { | ||
22 | + "size" : "32x32", | ||
23 | + "idiom" : "mac", | ||
24 | + "filename" : "app_icon_64.png", | ||
25 | + "scale" : "2x" | ||
26 | + }, | ||
27 | + { | ||
28 | + "size" : "128x128", | ||
29 | + "idiom" : "mac", | ||
30 | + "filename" : "app_icon_128.png", | ||
31 | + "scale" : "1x" | ||
32 | + }, | ||
33 | + { | ||
34 | + "size" : "128x128", | ||
35 | + "idiom" : "mac", | ||
36 | + "filename" : "app_icon_256.png", | ||
37 | + "scale" : "2x" | ||
38 | + }, | ||
39 | + { | ||
40 | + "size" : "256x256", | ||
41 | + "idiom" : "mac", | ||
42 | + "filename" : "app_icon_256.png", | ||
43 | + "scale" : "1x" | ||
44 | + }, | ||
45 | + { | ||
46 | + "size" : "256x256", | ||
47 | + "idiom" : "mac", | ||
48 | + "filename" : "app_icon_512.png", | ||
49 | + "scale" : "2x" | ||
50 | + }, | ||
51 | + { | ||
52 | + "size" : "512x512", | ||
53 | + "idiom" : "mac", | ||
54 | + "filename" : "app_icon_512.png", | ||
55 | + "scale" : "1x" | ||
56 | + }, | ||
57 | + { | ||
58 | + "size" : "512x512", | ||
59 | + "idiom" : "mac", | ||
60 | + "filename" : "app_icon_1024.png", | ||
61 | + "scale" : "2x" | ||
62 | + } | ||
63 | + ], | ||
64 | + "info" : { | ||
65 | + "version" : 1, | ||
66 | + "author" : "xcode" | ||
67 | + } | ||
68 | +} |

45.9 KB

5.79 KB

14.5 KB
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> | ||
3 | + <dependencies> | ||
4 | + <deployment identifier="macosx"/> | ||
5 | + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/> | ||
6 | + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
7 | + </dependencies> | ||
8 | + <objects> | ||
9 | + <customObject id="-2" userLabel="File's Owner" customClass="NSApplication"> | ||
10 | + <connections> | ||
11 | + <outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/> | ||
12 | + </connections> | ||
13 | + </customObject> | ||
14 | + <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> | ||
15 | + <customObject id="-3" userLabel="Application" customClass="NSObject"/> | ||
16 | + <customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Runner" customModuleProvider="target"> | ||
17 | + <connections> | ||
18 | + <outlet property="applicationMenu" destination="uQy-DD-JDr" id="XBo-yE-nKs"/> | ||
19 | + <outlet property="mainFlutterWindow" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/> | ||
20 | + </connections> | ||
21 | + </customObject> | ||
22 | + <customObject id="YLy-65-1bz" customClass="NSFontManager"/> | ||
23 | + <menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6"> | ||
24 | + <items> | ||
25 | + <menuItem title="APP_NAME" id="1Xt-HY-uBw"> | ||
26 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
27 | + <menu key="submenu" title="APP_NAME" systemMenu="apple" id="uQy-DD-JDr"> | ||
28 | + <items> | ||
29 | + <menuItem title="About APP_NAME" id="5kV-Vb-QxS"> | ||
30 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
31 | + <connections> | ||
32 | + <action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/> | ||
33 | + </connections> | ||
34 | + </menuItem> | ||
35 | + <menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/> | ||
36 | + <menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/> | ||
37 | + <menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/> | ||
38 | + <menuItem title="Services" id="NMo-om-nkz"> | ||
39 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
40 | + <menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/> | ||
41 | + </menuItem> | ||
42 | + <menuItem isSeparatorItem="YES" id="4je-JR-u6R"/> | ||
43 | + <menuItem title="Hide APP_NAME" keyEquivalent="h" id="Olw-nP-bQN"> | ||
44 | + <connections> | ||
45 | + <action selector="hide:" target="-1" id="PnN-Uc-m68"/> | ||
46 | + </connections> | ||
47 | + </menuItem> | ||
48 | + <menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO"> | ||
49 | + <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> | ||
50 | + <connections> | ||
51 | + <action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/> | ||
52 | + </connections> | ||
53 | + </menuItem> | ||
54 | + <menuItem title="Show All" id="Kd2-mp-pUS"> | ||
55 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
56 | + <connections> | ||
57 | + <action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/> | ||
58 | + </connections> | ||
59 | + </menuItem> | ||
60 | + <menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/> | ||
61 | + <menuItem title="Quit APP_NAME" keyEquivalent="q" id="4sb-4s-VLi"> | ||
62 | + <connections> | ||
63 | + <action selector="terminate:" target="-1" id="Te7-pn-YzF"/> | ||
64 | + </connections> | ||
65 | + </menuItem> | ||
66 | + </items> | ||
67 | + </menu> | ||
68 | + </menuItem> | ||
69 | + <menuItem title="Edit" id="5QF-Oa-p0T"> | ||
70 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
71 | + <menu key="submenu" title="Edit" id="W48-6f-4Dl"> | ||
72 | + <items> | ||
73 | + <menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg"> | ||
74 | + <connections> | ||
75 | + <action selector="undo:" target="-1" id="M6e-cu-g7V"/> | ||
76 | + </connections> | ||
77 | + </menuItem> | ||
78 | + <menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam"> | ||
79 | + <connections> | ||
80 | + <action selector="redo:" target="-1" id="oIA-Rs-6OD"/> | ||
81 | + </connections> | ||
82 | + </menuItem> | ||
83 | + <menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/> | ||
84 | + <menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG"> | ||
85 | + <connections> | ||
86 | + <action selector="cut:" target="-1" id="YJe-68-I9s"/> | ||
87 | + </connections> | ||
88 | + </menuItem> | ||
89 | + <menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU"> | ||
90 | + <connections> | ||
91 | + <action selector="copy:" target="-1" id="G1f-GL-Joy"/> | ||
92 | + </connections> | ||
93 | + </menuItem> | ||
94 | + <menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL"> | ||
95 | + <connections> | ||
96 | + <action selector="paste:" target="-1" id="UvS-8e-Qdg"/> | ||
97 | + </connections> | ||
98 | + </menuItem> | ||
99 | + <menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk"> | ||
100 | + <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> | ||
101 | + <connections> | ||
102 | + <action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/> | ||
103 | + </connections> | ||
104 | + </menuItem> | ||
105 | + <menuItem title="Delete" id="pa3-QI-u2k"> | ||
106 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
107 | + <connections> | ||
108 | + <action selector="delete:" target="-1" id="0Mk-Ml-PaM"/> | ||
109 | + </connections> | ||
110 | + </menuItem> | ||
111 | + <menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m"> | ||
112 | + <connections> | ||
113 | + <action selector="selectAll:" target="-1" id="VNm-Mi-diN"/> | ||
114 | + </connections> | ||
115 | + </menuItem> | ||
116 | + <menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/> | ||
117 | + <menuItem title="Find" id="4EN-yA-p0u"> | ||
118 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
119 | + <menu key="submenu" title="Find" id="1b7-l0-nxx"> | ||
120 | + <items> | ||
121 | + <menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W"> | ||
122 | + <connections> | ||
123 | + <action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/> | ||
124 | + </connections> | ||
125 | + </menuItem> | ||
126 | + <menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz"> | ||
127 | + <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> | ||
128 | + <connections> | ||
129 | + <action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/> | ||
130 | + </connections> | ||
131 | + </menuItem> | ||
132 | + <menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye"> | ||
133 | + <connections> | ||
134 | + <action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/> | ||
135 | + </connections> | ||
136 | + </menuItem> | ||
137 | + <menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV"> | ||
138 | + <connections> | ||
139 | + <action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/> | ||
140 | + </connections> | ||
141 | + </menuItem> | ||
142 | + <menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt"> | ||
143 | + <connections> | ||
144 | + <action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/> | ||
145 | + </connections> | ||
146 | + </menuItem> | ||
147 | + <menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd"> | ||
148 | + <connections> | ||
149 | + <action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/> | ||
150 | + </connections> | ||
151 | + </menuItem> | ||
152 | + </items> | ||
153 | + </menu> | ||
154 | + </menuItem> | ||
155 | + <menuItem title="Spelling and Grammar" id="Dv1-io-Yv7"> | ||
156 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
157 | + <menu key="submenu" title="Spelling" id="3IN-sU-3Bg"> | ||
158 | + <items> | ||
159 | + <menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI"> | ||
160 | + <connections> | ||
161 | + <action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/> | ||
162 | + </connections> | ||
163 | + </menuItem> | ||
164 | + <menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7"> | ||
165 | + <connections> | ||
166 | + <action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/> | ||
167 | + </connections> | ||
168 | + </menuItem> | ||
169 | + <menuItem isSeparatorItem="YES" id="bNw-od-mp5"/> | ||
170 | + <menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN"> | ||
171 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
172 | + <connections> | ||
173 | + <action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/> | ||
174 | + </connections> | ||
175 | + </menuItem> | ||
176 | + <menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG"> | ||
177 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
178 | + <connections> | ||
179 | + <action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/> | ||
180 | + </connections> | ||
181 | + </menuItem> | ||
182 | + <menuItem title="Correct Spelling Automatically" id="78Y-hA-62v"> | ||
183 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
184 | + <connections> | ||
185 | + <action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/> | ||
186 | + </connections> | ||
187 | + </menuItem> | ||
188 | + </items> | ||
189 | + </menu> | ||
190 | + </menuItem> | ||
191 | + <menuItem title="Substitutions" id="9ic-FL-obx"> | ||
192 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
193 | + <menu key="submenu" title="Substitutions" id="FeM-D8-WVr"> | ||
194 | + <items> | ||
195 | + <menuItem title="Show Substitutions" id="z6F-FW-3nz"> | ||
196 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
197 | + <connections> | ||
198 | + <action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/> | ||
199 | + </connections> | ||
200 | + </menuItem> | ||
201 | + <menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/> | ||
202 | + <menuItem title="Smart Copy/Paste" id="9yt-4B-nSM"> | ||
203 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
204 | + <connections> | ||
205 | + <action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/> | ||
206 | + </connections> | ||
207 | + </menuItem> | ||
208 | + <menuItem title="Smart Quotes" id="hQb-2v-fYv"> | ||
209 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
210 | + <connections> | ||
211 | + <action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/> | ||
212 | + </connections> | ||
213 | + </menuItem> | ||
214 | + <menuItem title="Smart Dashes" id="rgM-f4-ycn"> | ||
215 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
216 | + <connections> | ||
217 | + <action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/> | ||
218 | + </connections> | ||
219 | + </menuItem> | ||
220 | + <menuItem title="Smart Links" id="cwL-P1-jid"> | ||
221 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
222 | + <connections> | ||
223 | + <action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/> | ||
224 | + </connections> | ||
225 | + </menuItem> | ||
226 | + <menuItem title="Data Detectors" id="tRr-pd-1PS"> | ||
227 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
228 | + <connections> | ||
229 | + <action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/> | ||
230 | + </connections> | ||
231 | + </menuItem> | ||
232 | + <menuItem title="Text Replacement" id="HFQ-gK-NFA"> | ||
233 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
234 | + <connections> | ||
235 | + <action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/> | ||
236 | + </connections> | ||
237 | + </menuItem> | ||
238 | + </items> | ||
239 | + </menu> | ||
240 | + </menuItem> | ||
241 | + <menuItem title="Transformations" id="2oI-Rn-ZJC"> | ||
242 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
243 | + <menu key="submenu" title="Transformations" id="c8a-y6-VQd"> | ||
244 | + <items> | ||
245 | + <menuItem title="Make Upper Case" id="vmV-6d-7jI"> | ||
246 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
247 | + <connections> | ||
248 | + <action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/> | ||
249 | + </connections> | ||
250 | + </menuItem> | ||
251 | + <menuItem title="Make Lower Case" id="d9M-CD-aMd"> | ||
252 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
253 | + <connections> | ||
254 | + <action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/> | ||
255 | + </connections> | ||
256 | + </menuItem> | ||
257 | + <menuItem title="Capitalize" id="UEZ-Bs-lqG"> | ||
258 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
259 | + <connections> | ||
260 | + <action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/> | ||
261 | + </connections> | ||
262 | + </menuItem> | ||
263 | + </items> | ||
264 | + </menu> | ||
265 | + </menuItem> | ||
266 | + <menuItem title="Speech" id="xrE-MZ-jX0"> | ||
267 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
268 | + <menu key="submenu" title="Speech" id="3rS-ZA-NoH"> | ||
269 | + <items> | ||
270 | + <menuItem title="Start Speaking" id="Ynk-f8-cLZ"> | ||
271 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
272 | + <connections> | ||
273 | + <action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/> | ||
274 | + </connections> | ||
275 | + </menuItem> | ||
276 | + <menuItem title="Stop Speaking" id="Oyz-dy-DGm"> | ||
277 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
278 | + <connections> | ||
279 | + <action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/> | ||
280 | + </connections> | ||
281 | + </menuItem> | ||
282 | + </items> | ||
283 | + </menu> | ||
284 | + </menuItem> | ||
285 | + </items> | ||
286 | + </menu> | ||
287 | + </menuItem> | ||
288 | + <menuItem title="View" id="H8h-7b-M4v"> | ||
289 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
290 | + <menu key="submenu" title="View" id="HyV-fh-RgO"> | ||
291 | + <items> | ||
292 | + <menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa"> | ||
293 | + <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/> | ||
294 | + <connections> | ||
295 | + <action selector="toggleFullScreen:" target="-1" id="dU3-MA-1Rq"/> | ||
296 | + </connections> | ||
297 | + </menuItem> | ||
298 | + </items> | ||
299 | + </menu> | ||
300 | + </menuItem> | ||
301 | + <menuItem title="Window" id="aUF-d1-5bR"> | ||
302 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
303 | + <menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo"> | ||
304 | + <items> | ||
305 | + <menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV"> | ||
306 | + <connections> | ||
307 | + <action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/> | ||
308 | + </connections> | ||
309 | + </menuItem> | ||
310 | + <menuItem title="Zoom" id="R4o-n2-Eq4"> | ||
311 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
312 | + <connections> | ||
313 | + <action selector="performZoom:" target="-1" id="DIl-cC-cCs"/> | ||
314 | + </connections> | ||
315 | + </menuItem> | ||
316 | + <menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/> | ||
317 | + <menuItem title="Bring All to Front" id="LE2-aR-0XJ"> | ||
318 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
319 | + <connections> | ||
320 | + <action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/> | ||
321 | + </connections> | ||
322 | + </menuItem> | ||
323 | + </items> | ||
324 | + </menu> | ||
325 | + </menuItem> | ||
326 | + </items> | ||
327 | + <point key="canvasLocation" x="142" y="-258"/> | ||
328 | + </menu> | ||
329 | + <window title="APP_NAME" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="MainFlutterWindow" customModule="Runner" customModuleProvider="target"> | ||
330 | + <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/> | ||
331 | + <rect key="contentRect" x="335" y="390" width="800" height="600"/> | ||
332 | + <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1577"/> | ||
333 | + <view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ"> | ||
334 | + <rect key="frame" x="0.0" y="0.0" width="800" height="600"/> | ||
335 | + <autoresizingMask key="autoresizingMask"/> | ||
336 | + </view> | ||
337 | + </window> | ||
338 | + </objects> | ||
339 | +</document> |
1 | +// Application-level settings for the Runner target. | ||
2 | +// | ||
3 | +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the | ||
4 | +// future. If not, the values below would default to using the project name when this becomes a | ||
5 | +// 'flutter create' template. | ||
6 | + | ||
7 | +// The application's name. By default this is also the title of the Flutter window. | ||
8 | +PRODUCT_NAME = example | ||
9 | + | ||
10 | +// The application's bundle identifier | ||
11 | +PRODUCT_BUNDLE_IDENTIFIER = com.example.example | ||
12 | + | ||
13 | +// The copyright displayed in application information | ||
14 | +PRODUCT_COPYRIGHT = Copyright © 2019 com.example. All rights reserved. |
1 | +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings | ||
2 | +GCC_WARN_UNDECLARED_SELECTOR = YES | ||
3 | +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES | ||
4 | +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE | ||
5 | +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES | ||
6 | +CLANG_WARN_PRAGMA_PACK = YES | ||
7 | +CLANG_WARN_STRICT_PROTOTYPES = YES | ||
8 | +CLANG_WARN_COMMA = YES | ||
9 | +GCC_WARN_STRICT_SELECTOR_MATCH = YES | ||
10 | +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES | ||
11 | +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES | ||
12 | +GCC_WARN_SHADOW = YES | ||
13 | +CLANG_WARN_UNREACHABLE_CODE = YES |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
3 | +<plist version="1.0"> | ||
4 | +<dict> | ||
5 | + <key>com.apple.security.app-sandbox</key> | ||
6 | + <true/> | ||
7 | + <key>com.apple.security.cs.allow-jit</key> | ||
8 | + <true/> | ||
9 | + <key>com.apple.security.network.client</key> | ||
10 | + <true/> | ||
11 | + <key>com.apple.security.network.server</key> | ||
12 | + <true/> | ||
13 | + <key>com.apple.security.print</key> | ||
14 | + <true/> | ||
15 | +</dict> | ||
16 | +</plist> |
printing/example/macos/Runner/Info.plist
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
3 | +<plist version="1.0"> | ||
4 | +<dict> | ||
5 | + <key>CFBundleDevelopmentRegion</key> | ||
6 | + <string>$(DEVELOPMENT_LANGUAGE)</string> | ||
7 | + <key>CFBundleExecutable</key> | ||
8 | + <string>$(EXECUTABLE_NAME)</string> | ||
9 | + <key>CFBundleIconFile</key> | ||
10 | + <string></string> | ||
11 | + <key>CFBundleIdentifier</key> | ||
12 | + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
13 | + <key>CFBundleInfoDictionaryVersion</key> | ||
14 | + <string>6.0</string> | ||
15 | + <key>CFBundleName</key> | ||
16 | + <string>$(PRODUCT_NAME)</string> | ||
17 | + <key>CFBundlePackageType</key> | ||
18 | + <string>APPL</string> | ||
19 | + <key>CFBundleShortVersionString</key> | ||
20 | + <string>$(FLUTTER_BUILD_NAME)</string> | ||
21 | + <key>CFBundleVersion</key> | ||
22 | + <string>$(FLUTTER_BUILD_NUMBER)</string> | ||
23 | + <key>LSMinimumSystemVersion</key> | ||
24 | + <string>$(MACOSX_DEPLOYMENT_TARGET)</string> | ||
25 | + <key>NSHumanReadableCopyright</key> | ||
26 | + <string>$(PRODUCT_COPYRIGHT)</string> | ||
27 | + <key>NSMainNibFile</key> | ||
28 | + <string>MainMenu</string> | ||
29 | + <key>NSPrincipalClass</key> | ||
30 | + <string>NSApplication</string> | ||
31 | +</dict> | ||
32 | +</plist> |
1 | +import Cocoa | ||
2 | +import FlutterMacOS | ||
3 | + | ||
4 | +class MainFlutterWindow: NSWindow { | ||
5 | + override func awakeFromNib() { | ||
6 | + let flutterViewController = FlutterViewController() | ||
7 | + let windowFrame = frame | ||
8 | + contentViewController = flutterViewController | ||
9 | + setFrame(windowFrame, display: true) | ||
10 | + | ||
11 | + RegisterGeneratedPlugins(registry: flutterViewController) | ||
12 | + | ||
13 | + super.awakeFromNib() | ||
14 | + } | ||
15 | +} |
printing/macos/Classes/PrintJob.swift
0 → 100644
1 | +/* | ||
2 | + * Copyright (C) 2017, David PHAM-VAN <dev.nfet.net@gmail.com> | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | + | ||
17 | +import FlutterMacOS | ||
18 | +import Foundation | ||
19 | +import WebKit | ||
20 | + | ||
21 | +func dataProviderReleaseDataCallback(info _: UnsafeMutableRawPointer?, data: UnsafeRawPointer, size _: Int) { | ||
22 | + data.deallocate() | ||
23 | +} | ||
24 | + | ||
25 | +public class PrintJob: NSView, NSSharingServicePickerDelegate { | ||
26 | + private var printing: PrintingPlugin | ||
27 | + public var index: Int | ||
28 | + | ||
29 | + private var printOperation: NSPrintOperation? | ||
30 | + private var pdfDocument: CGPDFDocument? | ||
31 | + private var page: CGPDFPage? | ||
32 | + | ||
33 | + public init(printing: PrintingPlugin, index: Int) { | ||
34 | + self.printing = printing | ||
35 | + self.index = index | ||
36 | + super.init(frame: NSZeroRect) | ||
37 | + } | ||
38 | + | ||
39 | + required init?(coder _: NSCoder) { | ||
40 | + fatalError("init(coder:) has not been implemented") | ||
41 | + } | ||
42 | + | ||
43 | + // Return the number of pages available for printing | ||
44 | + public override func knowsPageRange(_ range: NSRangePointer) -> Bool { | ||
45 | + setFrameSize(printOperation!.printPanel.printInfo.paperSize) | ||
46 | + setBoundsSize(printOperation!.printPanel.printInfo.paperSize) | ||
47 | + range.pointee.length = pdfDocument?.numberOfPages ?? 0 | ||
48 | + return true | ||
49 | + } | ||
50 | + | ||
51 | + // Return the drawing rectangle for a particular page number | ||
52 | + public override func rectForPage(_ page: Int) -> NSRect { | ||
53 | + self.page = pdfDocument?.page(at: page) | ||
54 | + return self.page?.getBoxRect(CGPDFBox.mediaBox) ?? NSZeroRect | ||
55 | + } | ||
56 | + | ||
57 | + @objc func printOperationDidRun(printOperation _: NSPrintOperation, success: Bool, contextInfo _: UnsafeRawPointer?) { | ||
58 | + printing.onCompleted(printJob: self, completed: success, error: nil) | ||
59 | + } | ||
60 | + | ||
61 | + func setDocument(_ data: Data?) { | ||
62 | + let bytesPointer = UnsafeMutablePointer<UInt8>.allocate(capacity: data?.count ?? 0) | ||
63 | + data?.copyBytes(to: bytesPointer, count: data?.count ?? 0) | ||
64 | + let dataProvider = CGDataProvider(dataInfo: nil, data: bytesPointer, size: data?.count ?? 0, releaseData: dataProviderReleaseDataCallback) | ||
65 | + pdfDocument = CGPDFDocument(dataProvider!) | ||
66 | + | ||
67 | + let window = NSApplication.shared.mainWindow! | ||
68 | + printOperation!.runModal(for: window, delegate: self, didRun: #selector(printOperationDidRun(printOperation:success:contextInfo:)), contextInfo: nil) | ||
69 | + } | ||
70 | + | ||
71 | + public override func draw(_: NSRect) { | ||
72 | + if pdfDocument != nil { | ||
73 | + let ctx = NSGraphicsContext.current?.cgContext | ||
74 | + if page != nil { | ||
75 | + ctx?.drawPDFPage(page!) | ||
76 | + } | ||
77 | + } | ||
78 | + } | ||
79 | + | ||
80 | + public func directPrintPdf(name _: String, data _: Data, withPrinter _: String) {} | ||
81 | + | ||
82 | + public func printPdf(name: String, withPageSize _: CGSize, andMargin _: CGRect) { | ||
83 | + let sharedInfo = NSPrintInfo.shared | ||
84 | + let sharedDict = sharedInfo.dictionary() | ||
85 | + let printInfoDict = NSMutableDictionary(dictionary: sharedDict) | ||
86 | + let printInfo = NSPrintInfo(dictionary: printInfoDict as! [NSPrintInfo.AttributeKey: Any]) | ||
87 | + | ||
88 | + // Print the custom view | ||
89 | + printOperation = NSPrintOperation(view: self, printInfo: printInfo) | ||
90 | + printOperation!.jobTitle = name | ||
91 | + printOperation!.printPanel.options = [.showsPreview] | ||
92 | + | ||
93 | + printing.onLayout( | ||
94 | + printJob: self, | ||
95 | + width: printOperation!.printInfo.paperSize.width, | ||
96 | + height: printOperation!.printInfo.paperSize.height, | ||
97 | + marginLeft: printOperation!.printInfo.leftMargin, | ||
98 | + marginTop: printOperation!.printInfo.topMargin, | ||
99 | + marginRight: printOperation!.printInfo.rightMargin, | ||
100 | + marginBottom: printOperation!.printInfo.bottomMargin | ||
101 | + ) | ||
102 | + } | ||
103 | + | ||
104 | + public func cancelJob() {} | ||
105 | + | ||
106 | + public static func sharePdf(data: Data, withSourceRect rect: CGRect, andName name: String) { | ||
107 | + let tempFile = NSTemporaryDirectory() + name | ||
108 | + let file = NSURL(fileURLWithPath: tempFile) | ||
109 | + | ||
110 | + do { | ||
111 | + try data.write(to: file.absoluteURL!) | ||
112 | + } catch { | ||
113 | + print("Unable to save the pdf file to \(tempFile)") | ||
114 | + return | ||
115 | + } | ||
116 | + | ||
117 | + let view = NSApplication.shared.mainWindow!.contentView! | ||
118 | + let sharingServicePicker = NSSharingServicePicker(items: [file]) | ||
119 | + sharingServicePicker.show(relativeTo: rect, of: view, preferredEdge: NSRectEdge.maxY) | ||
120 | + | ||
121 | +// DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(2)) { | ||
122 | +// let fileManager = FileManager.default | ||
123 | +// do { | ||
124 | +// try fileManager.removeItem(atPath: tempFile) | ||
125 | +// } catch let error as NSError { | ||
126 | +// print("Unable to delete \(tempFile): \(error)") | ||
127 | +// } | ||
128 | +// } | ||
129 | + } | ||
130 | + | ||
131 | + public func convertHtml(_ data: String, withPageSize size: CGRect, andMargin margin: CGRect, andBaseUrl baseUrl: URL?) { | ||
132 | + let tempFile = NSTemporaryDirectory() + NSUUID().uuidString | ||
133 | + let directoryURL = URL(fileURLWithPath: tempFile) | ||
134 | + | ||
135 | + let printOpts: [NSPrintInfo.AttributeKey: Any] = [NSPrintInfo.AttributeKey.jobDisposition: NSPrintInfo.JobDisposition.save, NSPrintInfo.AttributeKey.jobSavingURL: directoryURL] | ||
136 | + let printInfo = NSPrintInfo(dictionary: printOpts) | ||
137 | + printInfo.horizontalPagination = NSPrintInfo.PaginationMode.automatic | ||
138 | + printInfo.verticalPagination = NSPrintInfo.PaginationMode.automatic | ||
139 | + printInfo.paperSize.width = size.width | ||
140 | + printInfo.paperSize.height = size.height | ||
141 | + printInfo.topMargin = margin.minY | ||
142 | + printInfo.leftMargin = margin.minX | ||
143 | + printInfo.rightMargin = size.width - margin.maxX | ||
144 | + printInfo.bottomMargin = size.height - margin.maxY | ||
145 | + | ||
146 | + let webView = WebView() | ||
147 | + webView.mainFrame.loadHTMLString(data, baseURL: baseUrl) | ||
148 | + let when = DispatchTime.now() + 1 | ||
149 | + | ||
150 | + DispatchQueue.main.asyncAfter(deadline: when) { | ||
151 | + let printOperation = NSPrintOperation(view: webView.mainFrame.frameView.documentView, printInfo: printInfo) | ||
152 | + printOperation.showsPrintPanel = false | ||
153 | + printOperation.showsProgressPanel = false | ||
154 | + printOperation.run() | ||
155 | + | ||
156 | + do { | ||
157 | + let data = try Data(contentsOf: directoryURL) | ||
158 | + self.printing.onHtmlRendered(printJob: self, pdfData: data) | ||
159 | + let fileManager = FileManager.default | ||
160 | + try fileManager.removeItem(atPath: tempFile) | ||
161 | + } catch { | ||
162 | + self.printing.onHtmlError(printJob: self, error: "Unable to load the pdf file from \(tempFile)") | ||
163 | + } | ||
164 | + } | ||
165 | + } | ||
166 | + | ||
167 | + public static func pickPrinter(result: @escaping FlutterResult, withSourceRect _: CGRect) { | ||
168 | + result(NSNumber(value: 1)) | ||
169 | + } | ||
170 | + | ||
171 | + public static func printingInfo() -> NSDictionary { | ||
172 | + let data: NSDictionary = [ | ||
173 | + "directPrint": false, | ||
174 | + "dynamicLayout": false, | ||
175 | + "canPrint": true, | ||
176 | + "canConvertHtml": true, | ||
177 | + "canShare": true, | ||
178 | + ] | ||
179 | + return data | ||
180 | + } | ||
181 | +} |
printing/macos/Classes/PrintingPlugin.swift
0 → 100644
1 | +/* | ||
2 | + * Copyright (C) 2017, David PHAM-VAN <dev.nfet.net@gmail.com> | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | + | ||
17 | +import FlutterMacOS | ||
18 | +import Foundation | ||
19 | + | ||
20 | +public class PrintingPlugin: NSObject, FlutterPlugin { | ||
21 | + private var channel: FlutterMethodChannel | ||
22 | + | ||
23 | + init(_ channel: FlutterMethodChannel) { | ||
24 | + self.channel = channel | ||
25 | + super.init() | ||
26 | + } | ||
27 | + | ||
28 | + /// Entry point | ||
29 | + public static func register(with registrar: FlutterPluginRegistrar) { | ||
30 | + let channel = FlutterMethodChannel(name: "net.nfet.printing", binaryMessenger: registrar.messenger) | ||
31 | + let instance = PrintingPlugin(channel) | ||
32 | + registrar.addMethodCallDelegate(instance, channel: channel) | ||
33 | + } | ||
34 | + | ||
35 | + /// Flutter method handlers | ||
36 | + public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { | ||
37 | + let args = call.arguments! as! [String: Any] | ||
38 | + if call.method == "printPdf" { | ||
39 | + let name = args["name"] as! String | ||
40 | + let width = CGFloat((args["width"] as? NSNumber)?.floatValue ?? 0.0) | ||
41 | + let height = CGFloat((args["height"] as? NSNumber)?.floatValue ?? 0.0) | ||
42 | + let marginLeft = CGFloat((args["marginLeft"] as? NSNumber)?.floatValue ?? 0.0) | ||
43 | + let marginTop = CGFloat((args["marginTop"] as? NSNumber)?.floatValue ?? 0.0) | ||
44 | + let marginRight = CGFloat((args["marginRight"] as? NSNumber)?.floatValue ?? 0.0) | ||
45 | + let marginBottom = CGFloat((args["marginBottom"] as? NSNumber)?.floatValue ?? 0.0) | ||
46 | + let printJob = PrintJob(printing: self, index: args["job"] as! Int) | ||
47 | + printJob.printPdf(name: name, | ||
48 | + withPageSize: CGSize( | ||
49 | + width: width, | ||
50 | + height: height | ||
51 | + ), | ||
52 | + andMargin: CGRect( | ||
53 | + x: marginLeft, | ||
54 | + y: marginTop, | ||
55 | + width: width - marginRight - marginLeft, | ||
56 | + height: height - marginBottom - marginTop | ||
57 | + )) | ||
58 | + result(NSNumber(value: 1)) | ||
59 | +// } else if call.method == "directPrintPdf" { | ||
60 | +// let name = args["name"] as! String | ||
61 | +// let printer = args["printer"] as! String | ||
62 | +// let object = args["doc"] as! FlutterStandardTypedData | ||
63 | +// let printJob = PrintJob(printing: self, index: args["job"] as! Int) | ||
64 | +// printJob.directPrintPdf(name: name, data: object.data, withPrinter: printer) | ||
65 | +// result(NSNumber(value: 1)) | ||
66 | + } else if call.method == "sharePdf" { | ||
67 | + let object = args["doc"] as! FlutterStandardTypedData | ||
68 | + PrintJob.sharePdf( | ||
69 | + data: object.data, | ||
70 | + withSourceRect: CGRect( | ||
71 | + x: CGFloat((args["x"] as? NSNumber)?.floatValue ?? 0.0), | ||
72 | + y: CGFloat((args["y"] as? NSNumber)?.floatValue ?? 0.0), | ||
73 | + width: CGFloat((args["w"] as? NSNumber)?.floatValue ?? 0.0), | ||
74 | + height: CGFloat((args["h"] as? NSNumber)?.floatValue ?? 0.0) | ||
75 | + ), | ||
76 | + andName: args["name"] as! String | ||
77 | + ) | ||
78 | + result(NSNumber(value: 1)) | ||
79 | + } else if call.method == "convertHtml" { | ||
80 | + let width = CGFloat((args["width"] as? NSNumber)?.floatValue ?? 0.0) | ||
81 | + let height = CGFloat((args["height"] as? NSNumber)?.floatValue ?? 0.0) | ||
82 | + let marginLeft = CGFloat((args["marginLeft"] as? NSNumber)?.floatValue ?? 0.0) | ||
83 | + let marginTop = CGFloat((args["marginTop"] as? NSNumber)?.floatValue ?? 0.0) | ||
84 | + let marginRight = CGFloat((args["marginRight"] as? NSNumber)?.floatValue ?? 0.0) | ||
85 | + let marginBottom = CGFloat((args["marginBottom"] as? NSNumber)?.floatValue ?? 0.0) | ||
86 | + let printJob = PrintJob(printing: self, index: args["job"] as! Int) | ||
87 | + | ||
88 | + printJob.convertHtml( | ||
89 | + args["html"] as! String, | ||
90 | + withPageSize: CGRect( | ||
91 | + x: 0.0, | ||
92 | + y: 0.0, | ||
93 | + width: width, | ||
94 | + height: height | ||
95 | + ), | ||
96 | + andMargin: CGRect( | ||
97 | + x: marginLeft, | ||
98 | + y: marginTop, | ||
99 | + width: width - marginRight - marginLeft, | ||
100 | + height: height - marginBottom - marginTop | ||
101 | + ), | ||
102 | + andBaseUrl: args["baseUrl"] as? String == nil ? nil : URL(string: args["baseUrl"] as! String) | ||
103 | + ) | ||
104 | + result(NSNumber(value: 1)) | ||
105 | +// } else if call.method == "pickPrinter" { | ||
106 | +// PrintJob.pickPrinter(result: result, withSourceRect: CGRect( | ||
107 | +// x: CGFloat((args["x"] as? NSNumber)?.floatValue ?? 0.0), | ||
108 | +// y: CGFloat((args["y"] as? NSNumber)?.floatValue ?? 0.0), | ||
109 | +// width: CGFloat((args["w"] as? NSNumber)?.floatValue ?? 0.0), | ||
110 | +// height: CGFloat((args["h"] as? NSNumber)?.floatValue ?? 0.0) | ||
111 | +// )) | ||
112 | + } else if call.method == "printingInfo" { | ||
113 | + result(PrintJob.printingInfo()) | ||
114 | + } else { | ||
115 | + result(FlutterMethodNotImplemented) | ||
116 | + } | ||
117 | + } | ||
118 | + | ||
119 | + /// Request the Pdf document from flutter | ||
120 | + public func onLayout(printJob: PrintJob, width: CGFloat, height: CGFloat, marginLeft: CGFloat, marginTop: CGFloat, marginRight: CGFloat, marginBottom: CGFloat) { | ||
121 | + let arg = [ | ||
122 | + "width": width, | ||
123 | + "height": height, | ||
124 | + "marginLeft": marginLeft, | ||
125 | + "marginTop": marginTop, | ||
126 | + "marginRight": marginRight, | ||
127 | + "marginBottom": marginBottom, | ||
128 | + "job": printJob.index, | ||
129 | + ] as [String: Any] | ||
130 | + | ||
131 | + channel.invokeMethod("onLayout", arguments: arg, result: { (result: Any?) -> Void in | ||
132 | + if result as? Bool == false { | ||
133 | + printJob.cancelJob() | ||
134 | + } else { | ||
135 | + let object = result as! FlutterStandardTypedData | ||
136 | + printJob.setDocument(object.data) | ||
137 | + } | ||
138 | + }) | ||
139 | + } | ||
140 | + | ||
141 | + /// send completion status to flutter | ||
142 | + public func onCompleted(printJob: PrintJob, completed: Bool, error: NSString?) { | ||
143 | + let data: NSDictionary = [ | ||
144 | + "completed": completed, | ||
145 | + "error": error as Any, | ||
146 | + "job": printJob.index, | ||
147 | + ] | ||
148 | + channel.invokeMethod("onCompleted", arguments: data) | ||
149 | + } | ||
150 | + | ||
151 | + /// send html to pdf data result to flutter | ||
152 | + public func onHtmlRendered(printJob: PrintJob, pdfData: Data) { | ||
153 | + let data: NSDictionary = [ | ||
154 | + "doc": FlutterStandardTypedData(bytes: pdfData), | ||
155 | + "job": printJob.index, | ||
156 | + ] | ||
157 | + channel.invokeMethod("onHtmlRendered", arguments: data) | ||
158 | + } | ||
159 | + | ||
160 | + /// send html to pdf conversion error to flutter | ||
161 | + public func onHtmlError(printJob: PrintJob, error: String) { | ||
162 | + let data: NSDictionary = [ | ||
163 | + "error": error, | ||
164 | + "job": printJob.index, | ||
165 | + ] | ||
166 | + channel.invokeMethod("onHtmlError", arguments: data) | ||
167 | + } | ||
168 | +} |
printing/macos/printing.podspec
0 → 100644
1 | +# | ||
2 | +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html | ||
3 | +# | ||
4 | +Pod::Spec.new do |s| | ||
5 | + s.name = 'printing' | ||
6 | + s.version = '0.0.1' | ||
7 | + s.summary = 'Plugin that allows Flutter apps to generate and print documents to android or ios compatible printers' | ||
8 | + s.description = <<-DESC | ||
9 | +Plugin that allows Flutter apps to generate and print documents to android or ios compatible printers | ||
10 | + DESC | ||
11 | + s.homepage = 'http://example.com' | ||
12 | + s.license = { :file => '../LICENSE' } | ||
13 | + s.author = { 'Your Company' => 'email@example.com' } | ||
14 | + s.source = { :path => '.' } | ||
15 | + s.source_files = 'Classes/**/*' | ||
16 | + s.dependency 'FlutterMacOS' | ||
17 | + | ||
18 | + s.platform = :osx | ||
19 | + s.osx.deployment_target = '10.11' | ||
20 | +end |
@@ -8,7 +8,7 @@ version: 2.1.9 | @@ -8,7 +8,7 @@ version: 2.1.9 | ||
8 | 8 | ||
9 | environment: | 9 | environment: |
10 | sdk: ">=2.3.0 <3.0.0" | 10 | sdk: ">=2.3.0 <3.0.0" |
11 | - flutter: "^1.7.0" | 11 | + flutter: "^1.10.0" |
12 | 12 | ||
13 | dependencies: | 13 | dependencies: |
14 | flutter: | 14 | flutter: |
@@ -25,5 +25,11 @@ dependency_overrides: | @@ -25,5 +25,11 @@ dependency_overrides: | ||
25 | 25 | ||
26 | flutter: | 26 | flutter: |
27 | plugin: | 27 | plugin: |
28 | - androidPackage: net.nfet.flutter.printing | 28 | + platforms: |
29 | + android: | ||
30 | + package: net.nfet.flutter.printing | ||
31 | + pluginClass: PrintingPlugin | ||
32 | + ios: | ||
33 | + pluginClass: PrintingPlugin | ||
34 | + macos: | ||
29 | pluginClass: PrintingPlugin | 35 | pluginClass: PrintingPlugin |
-
Please register or login to post a comment