Adds the document picker delegate for versions below iOS 11 (#87)
* If file not choosen getFile() should return null * minor fix * fixes an issue where sometimes getFilePath could return a List instead of a String * minor fixes * Update README.md * Fix for background activities trying to register the plugin (#66) * Beta (#55) * If picker is canceled in `getFile()`, it should return `null` * Beta (#60) * Added a check to registerWith to prevent background flutter view from trying to register the plugin, as there won't be any activity. * 1.3.3 > 1.3.4 * removes a build.gradle depdency that should't have been added in the last commit * Adds the document picker delegate for versions below iOS 11
This commit is contained in:
parent
bac9f8174e
commit
b72483dc66
|
@ -1,3 +1,7 @@
|
||||||
|
## 1.3.5
|
||||||
|
|
||||||
|
**Bug fix:** Fixes an issue that could prevent users to pick files from the iCloud Drive app, on versions below iOS 11.
|
||||||
|
|
||||||
## 1.3.4+1
|
## 1.3.4+1
|
||||||
|
|
||||||
**Rollback:** Removes a local dependency that shouldn't have been committed with `1.3.4` which would cause Android build to fail.
|
**Rollback:** Removes a local dependency that shouldn't have been committed with `1.3.4` which would cause Android build to fail.
|
||||||
|
@ -106,6 +110,6 @@
|
||||||
|
|
||||||
## 0.1.0
|
## 0.1.0
|
||||||
|
|
||||||
* Initial realise.
|
* Initial release.
|
||||||
* Supports picking paths from files on local storage, cloud.
|
* Supports picking paths from files on local storage, cloud.
|
||||||
* Supports picking paths from both gallery & camera due to [image_picker](https://pub.dartlang.org/packages/image_picker) dependency.
|
* Supports picking paths from both gallery & camera due to [image_picker](https://pub.dartlang.org/packages/image_picker) dependency.
|
||||||
|
|
|
@ -11,7 +11,7 @@ A package that allows you to use a native file explorer to pick single or multip
|
||||||
First, add *file_picker* as a dependency in [your pubspec.yaml file](https://flutter.io/platform-plugins/).
|
First, add *file_picker* as a dependency in [your pubspec.yaml file](https://flutter.io/platform-plugins/).
|
||||||
|
|
||||||
```
|
```
|
||||||
file_picker: ^1.3.4+1
|
file_picker: ^1.3.5
|
||||||
```
|
```
|
||||||
### Android
|
### Android
|
||||||
Add
|
Add
|
||||||
|
|
|
@ -131,6 +131,14 @@
|
||||||
|
|
||||||
#pragma mark - Delegates
|
#pragma mark - Delegates
|
||||||
|
|
||||||
|
// DocumentPicker delegate - iOS 10 only
|
||||||
|
- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentAtURL:(NSURL *)url{
|
||||||
|
[self.documentPickerController dismissViewControllerAnimated:YES completion:nil];
|
||||||
|
NSString * path = (NSString *)[url path];
|
||||||
|
_result(path);
|
||||||
|
_result = nil;
|
||||||
|
}
|
||||||
|
|
||||||
// DocumentPicker delegate
|
// DocumentPicker delegate
|
||||||
- (void)documentPicker:(UIDocumentPickerViewController *)controller
|
- (void)documentPicker:(UIDocumentPickerViewController *)controller
|
||||||
didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls{
|
didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls{
|
||||||
|
|
|
@ -2,7 +2,7 @@ name: file_picker
|
||||||
description: A package that allows you to use a native file explorer to pick single or multiple absolute file paths, with extensions filtering support.
|
description: A package that allows you to use a native file explorer to pick single or multiple absolute file paths, with extensions filtering support.
|
||||||
author: Miguel Ruivo <miguel@miguelruivo.com>
|
author: Miguel Ruivo <miguel@miguelruivo.com>
|
||||||
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
|
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
|
||||||
version: 1.3.4+1
|
version: 1.3.5
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
|
|
Loading…
Reference in New Issue