Skip to content

Commit e2a911b

Browse files
authored
[file_selector] Update minimum Flutter version to 3.3 and iOS 11 (flutter#3325)
1 parent bfdb4eb commit e2a911b

File tree

11 files changed

+91
-46
lines changed

11 files changed

+91
-46
lines changed

packages/file_selector/file_selector/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.9.2+4
2+
3+
* Updates iOS minimum version in README.
4+
15
## 0.9.2+3
26

37
* Updates links for the merge of flutter/plugins into flutter/packages.

packages/file_selector/file_selector/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
A Flutter plugin that manages files and interactions with file dialogs.
88

9-
| | iOS | Linux | macOS | Web | Windows |
10-
|-------------|--------|-------|--------|-----|-------------|
11-
| **Support** | iOS 9+ | Any | 10.11+ | Any | Windows 10+ |
9+
| | iOS | Linux | macOS | Web | Windows |
10+
|-------------|---------|-------|--------|-----|-------------|
11+
| **Support** | iOS 11+ | Any | 10.11+ | Any | Windows 10+ |
1212

1313
## Usage
1414

packages/file_selector/file_selector/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +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+
60A7CC0D9DBA65FFCA53D36F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 682AABBBC8FE68C4C5B4A6AA /* Pods_Runner.framework */; };
1213
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
1314
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1415
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
@@ -32,6 +33,8 @@
3233
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
3334
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3435
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
36+
4B7E5ACCE3F2978378E88F91 /* 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>"; };
37+
682AABBBC8FE68C4C5B4A6AA /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3538
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
3639
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
3740
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
@@ -42,19 +45,41 @@
4245
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4346
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4447
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
48+
B36E3926B64867EDB87D551F /* 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>"; };
49+
D5393CFAB2F68411C1AFA702 /* 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>"; };
4550
/* End PBXFileReference section */
4651

4752
/* Begin PBXFrameworksBuildPhase section */
4853
97C146EB1CF9000F007C117D /* Frameworks */ = {
4954
isa = PBXFrameworksBuildPhase;
5055
buildActionMask = 2147483647;
5156
files = (
57+
60A7CC0D9DBA65FFCA53D36F /* Pods_Runner.framework in Frameworks */,
5258
);
5359
runOnlyForDeploymentPostprocessing = 0;
5460
};
5561
/* End PBXFrameworksBuildPhase section */
5662

5763
/* Begin PBXGroup section */
64+
015F2F1DEA561B08B815E4B6 /* Frameworks */ = {
65+
isa = PBXGroup;
66+
children = (
67+
682AABBBC8FE68C4C5B4A6AA /* Pods_Runner.framework */,
68+
);
69+
name = Frameworks;
70+
sourceTree = "<group>";
71+
};
72+
41F8DF2F792A165075528D28 /* Pods */ = {
73+
isa = PBXGroup;
74+
children = (
75+
D5393CFAB2F68411C1AFA702 /* Pods-Runner.debug.xcconfig */,
76+
B36E3926B64867EDB87D551F /* Pods-Runner.release.xcconfig */,
77+
4B7E5ACCE3F2978378E88F91 /* Pods-Runner.profile.xcconfig */,
78+
);
79+
name = Pods;
80+
path = Pods;
81+
sourceTree = "<group>";
82+
};
5883
9740EEB11CF90186004384FC /* Flutter */ = {
5984
isa = PBXGroup;
6085
children = (
@@ -72,6 +97,8 @@
7297
9740EEB11CF90186004384FC /* Flutter */,
7398
97C146F01CF9000F007C117D /* Runner */,
7499
97C146EF1CF9000F007C117D /* Products */,
100+
41F8DF2F792A165075528D28 /* Pods */,
101+
015F2F1DEA561B08B815E4B6 /* Frameworks */,
75102
);
76103
sourceTree = "<group>";
77104
};
@@ -105,12 +132,14 @@
105132
isa = PBXNativeTarget;
106133
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107134
buildPhases = (
135+
A0D416CFEC051084A2A30D36 /* [CP] Check Pods Manifest.lock */,
108136
9740EEB61CF901F6004384FC /* Run Script */,
109137
97C146EA1CF9000F007C117D /* Sources */,
110138
97C146EB1CF9000F007C117D /* Frameworks */,
111139
97C146EC1CF9000F007C117D /* Resources */,
112140
9705A1C41CF9048500538489 /* Embed Frameworks */,
113141
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
142+
44A901AECD8804EE875841B6 /* [CP] Embed Pods Frameworks */,
114143
);
115144
buildRules = (
116145
);
@@ -176,6 +205,7 @@
176205
files = (
177206
);
178207
inputPaths = (
208+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
179209
);
180210
name = "Thin Binary";
181211
outputPaths = (
@@ -184,6 +214,23 @@
184214
shellPath = /bin/sh;
185215
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
186216
};
217+
44A901AECD8804EE875841B6 /* [CP] Embed Pods Frameworks */ = {
218+
isa = PBXShellScriptBuildPhase;
219+
buildActionMask = 2147483647;
220+
files = (
221+
);
222+
inputFileListPaths = (
223+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
224+
);
225+
name = "[CP] Embed Pods Frameworks";
226+
outputFileListPaths = (
227+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
228+
);
229+
runOnlyForDeploymentPostprocessing = 0;
230+
shellPath = /bin/sh;
231+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
232+
showEnvVarsInLog = 0;
233+
};
187234
9740EEB61CF901F6004384FC /* Run Script */ = {
188235
isa = PBXShellScriptBuildPhase;
189236
alwaysOutOfDate = 1;
@@ -199,6 +246,28 @@
199246
shellPath = /bin/sh;
200247
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
201248
};
249+
A0D416CFEC051084A2A30D36 /* [CP] Check Pods Manifest.lock */ = {
250+
isa = PBXShellScriptBuildPhase;
251+
buildActionMask = 2147483647;
252+
files = (
253+
);
254+
inputFileListPaths = (
255+
);
256+
inputPaths = (
257+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
258+
"${PODS_ROOT}/Manifest.lock",
259+
);
260+
name = "[CP] Check Pods Manifest.lock";
261+
outputFileListPaths = (
262+
);
263+
outputPaths = (
264+
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
265+
);
266+
runOnlyForDeploymentPostprocessing = 0;
267+
shellPath = /bin/sh;
268+
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";
269+
showEnvVarsInLog = 0;
270+
};
202271
/* End PBXShellScriptBuildPhase section */
203272

204273
/* Begin PBXSourcesBuildPhase section */

packages/file_selector/file_selector/example/ios/Runner.xcworkspace/contents.xcworkspacedata

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/file_selector/file_selector/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for opening and saving files, or selecting
33
directories, using native file selection UI.
44
repository: https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector
55
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22
6-
version: 0.9.2+3
6+
version: 0.9.2+4
77

88
environment:
99
sdk: ">=2.12.0 <3.0.0"

packages/file_selector/file_selector_ios/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.5.1
2+
3+
* Updates minimum Flutter version to 3.3 and iOS 11.
4+
15
## 0.5.0+3
26

37
* Updates links for the merge of flutter/plugins into flutter/packages.

packages/file_selector/file_selector_ios/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@
276276
files = (
277277
);
278278
inputPaths = (
279+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
279280
);
280281
name = "Thin Binary";
281282
outputPaths = (

packages/file_selector/file_selector_ios/example/ios/RunnerTests/FileSelectorTests.m

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -55,28 +55,6 @@ - (void)testReturnsPickedFiles {
5555
[self waitForExpectationsWithTimeout:1.0 handler:nil];
5656
}
5757

58-
- (void)testReturnsPickedFileLegacy {
59-
// Tests that it handles the pre iOS 11 UIDocumentPickerDelegate method.
60-
FFSFileSelectorPlugin *plugin = [[FFSFileSelectorPlugin alloc] init];
61-
XCTestExpectation *completionWasCalled = [self expectationWithDescription:@"completion"];
62-
UIDocumentPickerViewController *picker =
63-
[[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[]
64-
inMode:UIDocumentPickerModeImport];
65-
plugin.documentPickerViewControllerOverride = picker;
66-
[plugin openFileSelectorWithConfig:[FFSFileSelectorConfig makeWithUtis:@[]
67-
allowMultiSelection:@NO]
68-
completion:^(NSArray<NSString *> *paths, FlutterError *error) {
69-
NSArray *expectedPaths = @[ @"/file1.txt" ];
70-
XCTAssertEqualObjects(paths, expectedPaths);
71-
[completionWasCalled fulfill];
72-
}];
73-
#pragma GCC diagnostic push
74-
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
75-
[plugin documentPicker:picker didPickDocumentAtURL:[NSURL URLWithString:@"file:///file1.txt"]];
76-
#pragma GCC diagnostic pop
77-
[self waitForExpectationsWithTimeout:1.0 handler:nil];
78-
}
79-
8058
- (void)testCancellingPickerReturnsNil {
8159
FFSFileSelectorPlugin *plugin = [[FFSFileSelectorPlugin alloc] init];
8260
UIDocumentPickerViewController *picker =

packages/file_selector/file_selector_ios/ios/Classes/FFSFileSelectorPlugin.m

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ - (void)openFileSelectorWithConfig:(FFSFileSelectorConfig *)config
2121
initWithDocumentTypes:config.utis
2222
inMode:UIDocumentPickerModeImport];
2323
documentPicker.delegate = self;
24-
if (@available(iOS 11.0, *)) {
25-
documentPicker.allowsMultipleSelection = config.allowMultiSelection.boolValue;
26-
}
24+
documentPicker.allowsMultipleSelection = config.allowMultiSelection.boolValue;
2725

2826
UIViewController *presentingVC =
2927
self.presentingViewControllerOverride
@@ -48,16 +46,6 @@ + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
4846

4947
#pragma mark - UIDocumentPickerDelegate
5048

51-
// This method is only called in iOS < 11.0. The new codepath is
52-
// documentPicker:didPickDocumentsAtURLs:, implemented below.
53-
#pragma clang diagnostic push
54-
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
55-
- (void)documentPicker:(UIDocumentPickerViewController *)controller
56-
didPickDocumentAtURL:(NSURL *)url {
57-
[self sendBackResults:@[ url.path ] error:nil forPicker:controller];
58-
}
59-
#pragma clang diagnostic pop
60-
6149
- (void)documentPicker:(UIDocumentPickerViewController *)controller
6250
didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls {
6351
NSMutableArray *paths = [NSMutableArray arrayWithCapacity:urls.count];

packages/file_selector/file_selector_ios/ios/file_selector_ios.podspec

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ Displays the native iOS document picker.
1616
s.source_files = 'Classes/**/*.{h,m}'
1717
s.module_map = 'Classes/FileSelectorPlugin.modulemap'
1818
s.dependency 'Flutter'
19-
s.platform = :ios, '9.0'
20-
21-
# Flutter.framework does not contain a i386 slice.
22-
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
19+
s.platform = :ios, '11.0'
20+
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
2321
s.swift_version = '5.0'
2422
end

packages/file_selector/file_selector_ios/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: file_selector_ios
22
description: iOS implementation of the file_selector plugin.
33
repository: https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector_ios
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22
5-
version: 0.5.0+3
5+
version: 0.5.1
66

77
environment:
8-
sdk: ">=2.14.4 <3.0.0"
9-
flutter: ">=3.0.0"
8+
sdk: ">=2.18.0 <3.0.0"
9+
flutter: ">=3.3.0"
1010

1111
flutter:
1212
plugin:

0 commit comments

Comments
 (0)