4 files changed
+54
-2
ios/Podfile
+32
@@ -41,4 +41,36 @@ post_install do |installer|
41
installer.pods_project.targets.each do |target|
42
flutter_additional_ios_build_settings(target)
43
end
44
+
45
+ # Add a build phase to Runner target to patch missing MinimumOSVersion in embedded frameworks
46
+ runner_target = installer.aggregate_targets.find { |t| t.name == 'Pods-Runner' }
47
+ if runner_target
48
+ project = runner_target.user_project
49
+ runner_target.user_targets.each do |target|
50
+ if target.name == 'Runner'
51
+ phase_name = 'Fix Framework MinimumOSVersion'
52
+ phase = target.shell_script_build_phases.find { |p| p.name == phase_name }
53
+ if phase.nil?
54
+ puts "Adding build phase: #{phase_name}"
55
+ phase = target.new_shell_script_build_phase(phase_name)
56
+ end
57
+ phase.shell_script = <<~SCRIPT
58
+ find "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -name "Info.plist" | while read -r plist; do
59
+ if ! plutil -extract MinimumOSVersion xml1 -o /dev/null "$plist"; then
60
+ echo "Adding MinimumOSVersion to $plist"
61
+ plutil -insert MinimumOSVersion -string "16.4" "$plist"
62
+ else
63
+ min_os=$(plutil -extract MinimumOSVersion raw "$plist")
64
+ if [ -z "$min_os" ]; then
65
+ echo "Setting empty MinimumOSVersion to 16.4 in $plist"
66
+ plutil -replace MinimumOSVersion -string "16.4" "$plist"
67
+ fi
68
+ fi
69
+ done
70
+ SCRIPT
71
+ phase.show_env_vars_in_log = '1'
72
+ end
73
+ end
74
+ project.save
75
+ end
76
end
ios/Podfile.lock
+1
-1
@@ -36,6 +36,6 @@ SPEC CHECKSUMS:
36
objectbox_flutter_libs: bfbfc0486c06b0b29b130ca1ad9467e8314f32f1
37
sherpa_onnx_ios: 385d34da9ade98f8e012d9b518f1440bd8ba3636
38
39
-PODFILE CHECKSUM: 6629f972df894304143a32a9a28db974b8bab794
39
+PODFILE CHECKSUM: 4187f32b7d7fb45db2ca41669d1a619a09f7e71b
40
41
COCOAPODS: 1.16.2
ios/Runner.xcodeproj/project.pbxproj
+20
@@ -207,6 +207,7 @@
207
9705A1C41CF9048500538489 /* Embed Frameworks */,
208
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
209
B1A5ACBED1F1575EF58BAE79 /* [CP] Embed Pods Frameworks */,
210
+ C164955A918378A7C7CD2785 /* Fix Framework MinimumOSVersion */,
211
);
212
buildRules = (
213
);
@@ -354,6 +355,25 @@
355
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
356
showEnvVarsInLog = 0;
357
};
358
+ C164955A918378A7C7CD2785 /* Fix Framework MinimumOSVersion */ = {
359
+ isa = PBXShellScriptBuildPhase;
360
+ buildActionMask = 2147483647;
361
+ files = (
362
+ );
363
+ inputFileListPaths = (
364
+ );
365
+ inputPaths = (
366
+ );
367
+ name = "Fix Framework MinimumOSVersion";
368
+ outputFileListPaths = (
369
+ );
370
+ outputPaths = (
371
+ );
372
+ runOnlyForDeploymentPostprocessing = 0;
373
+ shellPath = /bin/sh;
374
+ shellScript = "find \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\" -name \"Info.plist\" | while read -r plist; do\n if ! plutil -extract MinimumOSVersion xml1 -o /dev/null \"$plist\"; then\n echo \"Adding MinimumOSVersion to $plist\"\n plutil -insert MinimumOSVersion -string \"16.4\" \"$plist\"\n else\n min_os=$(plutil -extract MinimumOSVersion raw \"$plist\")\n if [ -z \"$min_os\" ]; then\n echo \"Setting empty MinimumOSVersion to 16.4 in $plist\"\n plutil -replace MinimumOSVersion -string \"16.4\" \"$plist\"\n fi\n fi\ndone\n";
375
+ showEnvVarsInLog = 1;
376
+ };
377
FE687F3DD5306177A50B9426 /* [CP] Check Pods Manifest.lock */ = {
378
isa = PBXShellScriptBuildPhase;
379
buildActionMask = 2147483647;
pubspec.yaml
+1
-1
@@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
16
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
17
# In Windows, build-name is used as the major, minor, and patch parts
18
# of the product and file versions while build-number is used as the build suffix.
19
-version: 1.5.1+55
19
+version: 1.5.1+56
20
21
environment:
22
sdk: ">=3.12.0 <4.0.0"