Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump min iOS version to 11 #1383

Merged
merged 8 commits into from
Oct 13, 2023

Conversation

navaronbracke
Copy link
Collaborator

This PR bumps the minimum iOS version to version 11.0, which is the minimum required by the current stable releases.
Flutter 3.0 was the last release to support iOS 10.

I also fixed two warnings in the plugin:

  • a deprecated method for iOS 10 that could be removed
  • a warning about passing null to an array of NSURL, which did not allow null

Fixes #1382

@@ -35,8 +35,7 @@ linter:
- diagnostic_describe_all_properties
- empty_statements
- hash_and_equals
- iterable_contains_unrelated_type
- list_remove_unrelated_type
- collection_methods_unrelated_type
Copy link
Collaborator Author

@navaronbracke navaronbracke Oct 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two lints are deprecated and are replaced by this new one

@@ -50,5 +50,9 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was generated by Flutter's tooling.

@@ -73,7 +72,7 @@ class FilePickerIO extends FilePicker {
bool? withData,
bool? withReadStream,
) async {
final String type = describeEnum(fileType);
final String type = fileType.name;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

decribeEnum() has been deprecated for a while, in favor of the name property on enums themselves.

@@ -484,7 +460,7 @@ -(void)picker:(PHPickerViewController *)picker didFinishPicking:(NSArray<PHPicke
__block NSError * blockError;

for (NSInteger index = 0; index < results.count; ++index) {
[urls addObject:[NSNull null]];
[urls addObject:[NSURL URLWithString:@""]];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning came from the fact that the urls array did not accept null. Since the first element in the array is replaced, I just added an empty NSURL. (and rather than using new I went with URLWithString, as the former also generates a warning)

Log(@"Multiple file selection is only supported on iOS 11 and above. Single selection will be used.");
}

self.documentPickerController.allowsMultipleSelection = allowsMultipleSelection;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing availability checks for iOS 11.0, as that is now the minimum

@@ -1,17 +1,17 @@
#
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a generated file and should not be checked in, will fix this as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is autogenerated, so should not be checked in. It was the only one which is autogenerated, but checked in, so I removed it here.

Copy link
Owner

@miguelpruivo miguelpruivo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, could you bump the changelog and also the pubspec version — I'd say that if this could potentially introduce breaking changes (specially since it plays with version constraints) to bump the minor (or major?) version.

@navaronbracke
Copy link
Collaborator Author

A breaking change would mean we bump the major version, per semantic versioning.

Will bump to version 6.0.0 then

@miguelpruivo
Copy link
Owner

A breaking change would mean we bump the major version, per semantic versioning.

Will bump to version 6.0.0 then

Correct. The question was more wether or not it could actually break or could be just some constraints that wouldn't probably break anything. But, as per your reply, major seems correct to me. Thank you!

@miguelpruivo miguelpruivo merged commit 411bb01 into miguelpruivo:master Oct 13, 2023
3 checks passed
@miguelpruivo
Copy link
Owner

@navaronbracke because of your recent contributions to this plugin I'd like to ask you if you're interested into become a contributor since lately I couldn't keep trace of a couple of issues that might appear (updates and related stuff) on the mobile/web side. Typically @philenius is responsible for the desktop implementations/maintenance.

Let me know if you're interested so I can assign you with the right permissions.

Thank you.

@navaronbracke navaronbracke deleted the ios_version_bump branch October 18, 2023 16:00
@navaronbracke
Copy link
Collaborator Author

@miguelpruivo Yes I would be interested in helping out. I think I'll start on the plugin_platform_interface work that I had scheduled to do, which moves the selection of the file picker implementation to the pubspec. This is the fix for #1343

After that is fixed, I'll try working my way through the backlog. I do not have a Linux machine available (nor do I have win32 or gtk experience), but I should be able to help out for other platforms.

@miguelpruivo
Copy link
Owner

@miguelpruivo Yes I would be interested in helping out. I think I'll start on the plugin_platform_interface work that I had scheduled to do, which moves the selection of the file picker implementation to the pubspec. This is the fix for #1343

After that is fixed, I'll try working my way through the backlog. I do not have a Linux machine available (nor do I have win32 or gtk experience), but I should be able to help out for other platforms.

Hi, thank you I really appreciate that, because due to this plugins popularity and being myself the only maintainer along with @philenius for the desktop side makes it harder to trace/handle all the PRs lately. A lot of them are just (as expected) doubts that are in wiki or stuff that is a no-op, but there are a couple of relevant issues that need attention.

I'd say to focus only in the the mobile/web issues and let alone the desktop (linux/mac/win) for @philenius and assign to him, as it is right now, unless is some immediate thing that we can take care of.

There is an action to automatically publish a new versions to the pub.dev upon master commit, so have that in mind.

I'll provide you with the right permissions now. Thank you once again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Tech Debt] Bump file_picker minimum iOS version to 11.0
2 participants