mirror of
https://github.com/flutter/flutter
synced 2024-08-25 02:46:31 +00:00
Set plugin template minimum iOS version to 12.0 (#143167)
Fixes https://github.com/flutter/flutter/issues/140474 See https://github.com/flutter/flutter/pull/122625 where this was done 11->12.
This commit is contained in:
parent
2207a3077b
commit
2fc19619e8
|
@ -429,7 +429,7 @@ end
|
|||
throw TaskResult.failure('podspec file missing at ${podspec.path}');
|
||||
}
|
||||
final String versionString = target == 'ios'
|
||||
? "s.platform = :ios, '11.0'"
|
||||
? "s.platform = :ios, '12.0'"
|
||||
: "s.platform = :osx, '10.11'";
|
||||
String podspecContent = podspec.readAsStringSync();
|
||||
if (!podspecContent.contains(versionString)) {
|
||||
|
|
|
@ -16,7 +16,7 @@ Pod::Spec.new do |s|
|
|||
s.source_files = 'Classes/**/*'
|
||||
s.public_header_files = 'Classes/**/*.h'
|
||||
s.dependency 'Flutter'
|
||||
s.platform = :ios, '11.0'
|
||||
s.platform = :ios, '12.0'
|
||||
|
||||
# Flutter.framework does not contain a i386 slice.
|
||||
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
|
||||
|
|
|
@ -15,7 +15,7 @@ Pod::Spec.new do |s|
|
|||
s.source = { :path => '.' }
|
||||
s.source_files = 'Classes/**/*'
|
||||
s.dependency 'Flutter'
|
||||
s.platform = :ios, '11.0'
|
||||
s.platform = :ios, '12.0'
|
||||
|
||||
# Flutter.framework does not contain a i386 slice.
|
||||
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
|
||||
|
|
|
@ -20,7 +20,7 @@ Pod::Spec.new do |s|
|
|||
s.source = { :path => '.' }
|
||||
s.source_files = 'Classes/**/*'
|
||||
s.dependency 'Flutter'
|
||||
s.platform = :ios, '11.0'
|
||||
s.platform = :ios, '12.0'
|
||||
|
||||
# Flutter.framework does not contain a i386 slice.
|
||||
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
|
||||
|
|
|
@ -2849,7 +2849,7 @@ void main() {
|
|||
expect(env['flutter']!.allows(Version(3, 2, 9)), false);
|
||||
});
|
||||
|
||||
testUsingContext('newly created iOS plugins has min iOS version of 11.0', () async {
|
||||
testUsingContext('newly created iOS plugins has correct min iOS version', () async {
|
||||
Cache.flutterRoot = '../..';
|
||||
final String flutterToolsAbsolutePath = globals.fs.path.join(
|
||||
Cache.flutterRoot!,
|
||||
|
@ -2882,7 +2882,7 @@ void main() {
|
|||
|
||||
for (final String templatePath in iosPluginTemplates) {
|
||||
final String rawTemplate = globals.fs.file(templatePath).readAsStringSync();
|
||||
expect(rawTemplate, contains("s.platform = :ios, '11.0'"));
|
||||
expect(rawTemplate, contains("s.platform = :ios, '12.0'"));
|
||||
}
|
||||
|
||||
final CreateCommand command = CreateCommand();
|
||||
|
@ -2892,7 +2892,7 @@ void main() {
|
|||
expect(projectDir.childDirectory('ios').childFile('flutter_project.podspec'),
|
||||
exists);
|
||||
final String rawPodSpec = await projectDir.childDirectory('ios').childFile('flutter_project.podspec').readAsString();
|
||||
expect(rawPodSpec, contains("s.platform = :ios, '11.0'"));
|
||||
expect(rawPodSpec, contains("s.platform = :ios, '12.0'"));
|
||||
});
|
||||
|
||||
testUsingContext('default app uses flutter default versions', () async {
|
||||
|
|
|
@ -20,6 +20,6 @@ LICENSE
|
|||
s.dependency 'Flutter'
|
||||
s.ios.framework = 'UIKit'
|
||||
|
||||
s.platform = :ios, '11.0'
|
||||
s.platform = :ios, '12.0'
|
||||
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue