Skip to content

Commit 607227b

Browse files
committed
Merge fixes
1 parent 81839f3 commit 607227b

File tree

5 files changed

+116
-59
lines changed

5 files changed

+116
-59
lines changed

example/ios/Podfile

Lines changed: 49 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,49 +15,64 @@ def parse_KV_file(file, separator='=')
1515
if !File.exists? file_abs_path
1616
return [];
1717
end
18-
pods_ary = []
18+
generated_key_values = {}
1919
skip_line_start_symbols = ["#", "/"]
20-
File.foreach(file_abs_path) { |line|
21-
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
22-
plugin = line.split(pattern=separator)
23-
if plugin.length == 2
24-
podname = plugin[0].strip()
25-
path = plugin[1].strip()
26-
podpath = File.expand_path("#{path}", file_abs_path)
27-
pods_ary.push({:name => podname, :path => podpath});
28-
else
29-
puts "Invalid plugin specification: #{line}"
30-
end
31-
}
32-
return pods_ary
20+
File.foreach(file_abs_path) do |line|
21+
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
22+
plugin = line.split(pattern=separator)
23+
if plugin.length == 2
24+
podname = plugin[0].strip()
25+
path = plugin[1].strip()
26+
podpath = File.expand_path("#{path}", file_abs_path)
27+
generated_key_values[podname] = podpath
28+
else
29+
puts "Invalid plugin specification: #{line}"
30+
end
31+
end
32+
generated_key_values
3333
end
3434

3535
target 'Runner' do
36-
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
37-
# referring to absolute paths on developers' machines.
38-
system('rm -rf .symlinks')
39-
system('mkdir -p .symlinks/plugins')
36+
# Flutter Pod
4037

41-
# Flutter Pods
42-
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
43-
if generated_xcode_build_settings.empty?
44-
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
45-
end
46-
generated_xcode_build_settings.map { |p|
47-
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
48-
symlink = File.join('.symlinks', 'flutter')
49-
File.symlink(File.dirname(p[:path]), symlink)
50-
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
38+
copied_flutter_dir = File.join(__dir__, 'Flutter')
39+
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
40+
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
41+
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
42+
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
43+
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
44+
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
45+
46+
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
47+
unless File.exist?(generated_xcode_build_settings_path)
48+
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
5149
end
52-
}
50+
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
51+
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
52+
53+
unless File.exist?(copied_framework_path)
54+
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
55+
end
56+
unless File.exist?(copied_podspec_path)
57+
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
58+
end
59+
end
60+
61+
# Keep pod path relative so it can be checked into Podfile.lock.
62+
pod 'Flutter', :path => 'Flutter'
5363

5464
# Plugin Pods
65+
66+
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
67+
# referring to absolute paths on developers' machines.
68+
system('rm -rf .symlinks')
69+
system('mkdir -p .symlinks/plugins')
5570
plugin_pods = parse_KV_file('../.flutter-plugins')
56-
plugin_pods.map { |p|
57-
symlink = File.join('.symlinks', 'plugins', p[:name])
58-
File.symlink(p[:path], symlink)
59-
pod p[:name], :path => File.join(symlink, 'ios')
60-
}
71+
plugin_pods.each do |name, path|
72+
symlink = File.join('.symlinks', 'plugins', name)
73+
File.symlink(path, symlink)
74+
pod name, :path => File.join(symlink, 'ios')
75+
end
6176
end
6277

6378
post_install do |installer|

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
/* Begin PBXBuildFile section */
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12-
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
13-
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1412
64C63106B45E49DD7F628B0C /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FE2D282FF075D0669CDC60BE /* libPods-Runner.a */; };
15-
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16-
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1713
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
1814
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
1915
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
@@ -29,8 +25,6 @@
2925
dstPath = "";
3026
dstSubfolderSpec = 10;
3127
files = (
32-
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
33-
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
3428
);
3529
name = "Embed Frameworks";
3630
runOnlyForDeploymentPostprocessing = 0;
@@ -42,14 +36,12 @@
4236
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
4337
28351E1278E0A755200AB738 /* 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>"; };
4438
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
45-
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
4639
72CA1E3E2BDF74F03AC64FC3 /* 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>"; };
4740
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
4841
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
4942
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
5043
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
5144
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
52-
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
5345
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
5446
97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
5547
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
@@ -64,8 +56,6 @@
6456
isa = PBXFrameworksBuildPhase;
6557
buildActionMask = 2147483647;
6658
files = (
67-
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
68-
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
6959
64C63106B45E49DD7F628B0C /* libPods-Runner.a in Frameworks */,
7060
);
7161
runOnlyForDeploymentPostprocessing = 0;
@@ -84,9 +74,7 @@
8474
9740EEB11CF90186004384FC /* Flutter */ = {
8575
isa = PBXGroup;
8676
children = (
87-
3B80C3931E831B6300D905FE /* App.framework */,
8877
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
89-
9740EEBA1CF902C7004384FC /* Flutter.framework */,
9078
9740EEB21CF90195004384FC /* Debug.xcconfig */,
9179
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9280
9740EEB31CF90195004384FC /* Generated.xcconfig */,
@@ -162,6 +150,7 @@
162150
9705A1C41CF9048500538489 /* Embed Frameworks */,
163151
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
164152
9ED9A28711126C77C037EB08 /* [CP] Embed Pods Frameworks */,
153+
3FAD03EA8C530DA512BBEE0B /* [CP] Copy Pods Resources */,
165154
);
166155
buildRules = (
167156
);
@@ -232,7 +221,25 @@
232221
);
233222
runOnlyForDeploymentPostprocessing = 0;
234223
shellPath = /bin/sh;
235-
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
224+
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
225+
};
226+
3FAD03EA8C530DA512BBEE0B /* [CP] Copy Pods Resources */ = {
227+
isa = PBXShellScriptBuildPhase;
228+
buildActionMask = 2147483647;
229+
files = (
230+
);
231+
inputPaths = (
232+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh",
233+
"${PODS_ROOT}/PhoneNumberKit/PhoneNumberKit/Resources/PhoneNumberMetadata.json",
234+
);
235+
name = "[CP] Copy Pods Resources";
236+
outputPaths = (
237+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/PhoneNumberMetadata.json",
238+
);
239+
runOnlyForDeploymentPostprocessing = 0;
240+
shellPath = /bin/sh;
241+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
242+
showEnvVarsInLog = 0;
236243
};
237244
9740EEB61CF901F6004384FC /* Run Script */ = {
238245
isa = PBXShellScriptBuildPhase;
@@ -255,7 +262,7 @@
255262
);
256263
inputPaths = (
257264
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
258-
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
265+
"${PODS_ROOT}/../Flutter/Flutter.framework",
259266
);
260267
name = "[CP] Embed Pods Frameworks";
261268
outputPaths = (

example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

Lines changed: 0 additions & 8 deletions
This file was deleted.

example/lib/main.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ class MyHomePageState extends State<MyHomePage> {
522522
),
523523
SizedBox(height: 15),
524524
FormBuilderSignaturePad(
525+
initialValue: sampleSignature,
525526
decoration: const InputDecoration(labelText: 'Signature'),
526527
attribute: 'signature',
527528
// height: 250,

pubspec.lock

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,27 @@ packages:
2929
url: "https://pub.dartlang.org"
3030
source: hosted
3131
version: "1.6.0"
32+
asn1lib:
33+
dependency: transitive
34+
description:
35+
name: asn1lib
36+
url: "https://pub.dartlang.org"
37+
source: hosted
38+
version: "0.6.5"
3239
async:
3340
dependency: transitive
3441
description:
3542
name: async
3643
url: "https://pub.dartlang.org"
3744
source: hosted
3845
version: "2.4.1"
46+
basic_utils:
47+
dependency: transitive
48+
description:
49+
name: basic_utils
50+
url: "https://pub.dartlang.org"
51+
source: hosted
52+
version: "2.5.4"
3953
boolean_selector:
4054
dependency: transitive
4155
description:
@@ -242,6 +256,13 @@ packages:
242256
url: "https://pub.dartlang.org"
243257
source: hosted
244258
version: "0.6.2"
259+
json_annotation:
260+
dependency: transitive
261+
description:
262+
name: json_annotation
263+
url: "https://pub.dartlang.org"
264+
source: hosted
265+
version: "3.0.1"
245266
logging:
246267
dependency: transitive
247268
description:
@@ -340,6 +361,13 @@ packages:
340361
url: "https://pub.dartlang.org"
341362
source: hosted
342363
version: "1.0.2"
364+
pointycastle:
365+
dependency: transitive
366+
description:
367+
name: pointycastle
368+
url: "https://pub.dartlang.org"
369+
source: hosted
370+
version: "1.0.2"
343371
pool:
344372
dependency: transitive
345373
description:
@@ -361,6 +389,13 @@ packages:
361389
url: "https://pub.dartlang.org"
362390
source: hosted
363391
version: "2.1.3"
392+
random_string:
393+
dependency: transitive
394+
description:
395+
name: random_string
396+
url: "https://pub.dartlang.org"
397+
source: hosted
398+
version: "2.1.0"
364399
rating_bar:
365400
dependency: "direct main"
366401
description:
@@ -374,7 +409,7 @@ packages:
374409
name: shelf
375410
url: "https://pub.dartlang.org"
376411
source: hosted
377-
version: "0.7.5"
412+
version: "0.7.7"
378413
shelf_packages_handler:
379414
dependency: transitive
380415
description:
@@ -402,7 +437,7 @@ packages:
402437
name: signature
403438
url: "https://pub.dartlang.org"
404439
source: hosted
405-
version: "3.1.1"
440+
version: "3.1.2"
406441
sky_engine:
407442
dependency: transitive
408443
description: flutter
@@ -491,14 +526,21 @@ packages:
491526
name: validators
492527
url: "https://pub.dartlang.org"
493528
source: hosted
494-
version: "2.0.0+1"
529+
version: "2.0.1"
495530
vector_math:
496531
dependency: transitive
497532
description:
498533
name: vector_math
499534
url: "https://pub.dartlang.org"
500535
source: hosted
501536
version: "2.0.8"
537+
vin_decoder:
538+
dependency: transitive
539+
description:
540+
name: vin_decoder
541+
url: "https://pub.dartlang.org"
542+
source: hosted
543+
version: "0.1.2"
502544
vm_service:
503545
dependency: transitive
504546
description:

0 commit comments

Comments
 (0)