Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

hpoul
Copy link
Contributor

@hpoul hpoul commented Mar 23, 2020

Description

  1. adds macos support to package_info plugin. (similar to firebase_core) moves the objective c implementation file to darwin/Classes and symlinks to ios/Classes and macos/Classes.
  2. add macos example (basically just a flutter create) - i've also added an explicit version code to pubspec.yaml of the example app.

Related Issues

flutter/flutter#41727

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See [Contributor Guide]).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the [Flutter Style Guide].
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy].
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the [CLA].
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@stuartmorgan-g
Copy link
Contributor

I believe the failures here are that you've added a version to the example, and the package version check script is trying to compare your new version to the (non-existent) old version. You'll need to either revert that change to the example's pubspec, or you or someone else will need to fix the script (filtering out example/ directories would probably be the best option)

@hpoul
Copy link
Contributor Author

hpoul commented Mar 24, 2020

@stuartmorgan thanks for taking a look. I have removed the version and updated the tests.

The version property actually got me a bit confused.. because on iOS it is a warning if omitted:

Warning: Missing build name (CFBundleShortVersionString).
Warning: Missing build number (CFBundleVersion).
Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App Store.

and even though the pubspec.yaml documentation says "If you omit it, your package is implicitly versioned 0.0.0." - but it seems in the app templates for android it falls back to 1.0. 🤔️

anyway, it seems the package_info/example/ios is not even set up to use the flutter version strings (the iOS Info.plist file specifies it directly instead of referencing FLUTTER_BUILD_NAME/FLUTTER_BUILD_NUMBER) so my test updates weren't even correct 🤦️

@stuartmorgan-g
Copy link
Contributor

I suspect this example app's creation predates both the warning, and the iOS version wire-up. If you feel inspired to re-create the example with a current template as a separate PR, that probably wouldn't be a bad idea (assuming the version check script is fixed as well), but it definitely doesn't need to block this.

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

The macOS parts all look good to me. It'll need a review from a flutter/plugins owner though.

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

LGTM code wise. I didn't look into too much on the generated files.

@stuartmorgan-g
Copy link
Contributor

@cyanglaz Any idea what's going on with the test failures here? Was there an issue with running tests against stable recently?

@cyanglaz
Copy link
Contributor

cyanglaz commented Apr 9, 2020

@stuartmorgan Not sure, im triggering a re-run and let's see what happens

@hpoul
Copy link
Contributor Author

hpoul commented Apr 29, 2020

@stuartmorgan @cyanglaz any chance to take another look at this? no idea what the test failures are all about.. thanks..

@stuartmorgan-g
Copy link
Contributor

@hpoul Sorry, getting back to this was buried in my todo list. Can you try reverting the ios/ changes in this PR and see if that fixes the issue? I know that was tool-generated rather than something you did manually, but they are the most obvious candidate for having broken iOS tests.

@hpoul
Copy link
Contributor Author

hpoul commented Apr 30, 2020

@stuartmorgan thanks, looks like you were right.. :) seems like the master channel made the xcodeproj incompatible with stable.. sounds a bit like flutter/flutter#51453 .. no idea why i actually committed that file

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

LGTM

@stuartmorgan-g stuartmorgan-g requested a review from cyanglaz May 3, 2020 22:17
@stuartmorgan-g
Copy link
Contributor

@cyanglaz PTAL; you said LGTM above but didn't actually approve, so I'm not sure if you wanted to take a final look once everything was green.

@stuartmorgan-g
Copy link
Contributor

@cyanglaz Ping again on this (easy) review.

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

LGTM!

@stuartmorgan-g
Copy link
Contributor

@hpoul If you can sync with master and resolve the conflicts, I can go ahead and land this :)

@hpoul
Copy link
Contributor Author

hpoul commented May 14, 2020

@stuartmorgan 👍️ merged with master, let's hope the tests are still happy 🤞️

@stuartmorgan-g
Copy link
Contributor

And they are! Landing, thanks for doing this!

@stuartmorgan-g stuartmorgan-g merged commit f567f5a into flutter:master May 14, 2020
mgonzalezc pushed a commit to mgonzalezc/plugins that referenced this pull request May 19, 2020
* master: (96 commits)
  Update README.md (flutter#2768)
  [url_launcher_web] Launch mailto urls in same window in Safari (flutter#2740)
  update README with enableJavaScript info (flutter#2766)
  Run publish ci check on master (flutter#2764)
  [image_picker] Add documentation for Android external storage permissions (flutter#2765)
  [package_info] add support for macos to package_info plugin (flutter#2618)
  fixed detach from engine logic (flutter#2759)
  [url_launcher] Initialize previousAutomaticSystemUiAdjustment in launch (flutter#2757)
  [google_maps_flutter] add todo on skipped test. (flutter#2752)
  [google_maps_flutter] use `WaitUntilTouchesEndedPolicy` to fix the cameraIdle not called issue on iOS (flutter#2746)
  Use Xvfb for Linux desktop tests (flutter#2750)
  update lower dart bound to 2.1.0 (flutter#2751)
  [camera] Update lower bound of dart dependency to 2.1.0. (flutter#2749)
  [battery] update dart deps lower bound to 2.1.0 (flutter#2748)
  [android_alarm_manager] update dart deps lower bound to 2.1.0 (flutter#2747)
  [url_launcher] Add web to example app. (flutter#2736)
  [in_app_purchase] update docs to warn about `completePurchase` (flutter#2739)
  [video_player] upgraded video_player to use pigeon (flutter#2544)
  [video_player]: fixed platform_interface unit tests (flutter#2745)
  [video_player]: added test class to fix video_player unit tests (flutter#2744)
  ...

# Conflicts:
#	packages/quick_actions/ios/Classes/FLTQuickActionsPlugin.m
@hpoul
Copy link
Contributor Author

hpoul commented Jun 2, 2020

Any chance to publish this update to pub? :-) https://pub.dev/packages/package_info is still 0.4.0+18

@stuartmorgan-g
Copy link
Contributor

@hpoul Sorry about that, I sound have published when I landed it. Thanks for pinging. 0.4.1 is live.

EdwinRomelta pushed a commit to EdwinRomelta/plugins that referenced this pull request Jun 11, 2020
jorgefspereira pushed a commit to jorgefspereira/plugins_flutter that referenced this pull request Oct 10, 2020
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this pull request Nov 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants