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

Upgrade Flutter and all packages to latest #628

Merged
merged 5 commits into from Apr 24, 2024

Conversation

chrisbobbe
Copy link
Collaborator

I'm actually optimistic that this will deal with

; for details see this commit:

deps: Upgrade packages within constraints (tools/upgrade pub)

Fixes: #612

@chrisbobbe chrisbobbe requested a review from gnprice April 23, 2024 20:17
@gnprice
Copy link
Member

gnprice commented Apr 24, 2024

Thanks @chrisbobbe for taking care of this!

All LGTM — merging.

It does sound like this probably fixes #612. We won't know for sure until we try uploading a build with it to TestFlight; when we do, if it turns out the issue isn't fixed, we can always reopen.

And update Flutter's supporting libraries to match.
When building for iOS (`flutter run`), I got this output:

  ios/Runner/AppDelegate.swift uses the deprecated
    @UIApplicationMain attribute, updating.

And sure enough, this change was made, automatically. Sure; might as
well commit it. The following seems to be the explanation for it:
  https://github.com/apple/swift-evolution/blob/43b894b0c/proposals/0383-deprecate-uiapplicationmain-and-nsapplicationmain.md
Actually, I have a hunch that this will be enough for zulip#612,
'"Missing API declaration" warning from Apple'. As that issue says,
the only category of "required reason APIs" that Apple is alerting
about is "user defaults APIs". There's just one API in this
category: `NSUserDefaults`. Using Step 4 in these instructions from
a Flutter maintainer --
  flutter/flutter#145269 (comment)
-- I found that firebase_messaging and flutter_local_notifications,
but no other dependencies, have calls to NSUserDefaults without
declaring reasons in this category in a "privacy manifest" file.

Moreover, unlike in zulip-mobile, our Podfile calls
`use_frameworks!`, which should mean we don't have to manually copy
anything from our dependencies into a privacy manifest file of our
own. See zulip/zulip-mobile#5859 for a link to a mention in the
Flutter project about `use_frameworks!`.

So I'm hoping that the following upgrades, made here, will address
Apple's alerts:

- firebase_messaging to v14.9.0, in which that dependency gets a
  privacy manifest that declares a reason for using "user defaults
  APIs":
    https://github.com/firebase/flutterfire/releases/tag/firebase_messaging-v14.9.0

- flutter_local_notifications to v17.1.0. In v17.0.1, a "user
  defaults APIs" reason declaration was added to this dependency's
  privacy manifest:
    https://github.com/MaikuB/flutter_local_notifications/releases

Fixes: zulip#612
This is the result of `tools/upgrade pod-major`, and some small
adjustments for a breaking API change in share_plus.

Changelogs:
  https://pub.dev/packages/package_info_plus/changelog
  https://pub.dev/packages/share_plus/changelog

Tested on my iPhone and on the office Android device. In particular,
I checked that sharing message content via the message action sheet
still worked, and I checked that the "About Zulip" page still shows
the "App version" field correctly.
@gnprice gnprice merged commit 0b3e4cf into zulip:main Apr 24, 2024
@chrisbobbe chrisbobbe deleted the pr-deps-latest-2024-04-23 branch April 24, 2024 03:03
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.

"Missing API declaration" warning from Apple
2 participants