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:
Miguel Ruivo 2019-05-29 14:02:26 +01:00 committed by GitHub
parent bac9f8174e
commit b72483dc66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 3 deletions

View File

@ -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
**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
* Initial realise.
* Initial release.
* 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.

View File

@ -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/).
```
file_picker: ^1.3.4+1
file_picker: ^1.3.5
```
### Android
Add

View File

@ -131,6 +131,14 @@
#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
- (void)documentPicker:(UIDocumentPickerViewController *)controller
didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls{

View File

@ -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.
author: Miguel Ruivo <miguel@miguelruivo.com>
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
version: 1.3.4+1
version: 1.3.5
dependencies:
flutter: