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
fix(package_info_plus): Added build signature to package info data #340
fix(package_info_plus): Added build signature to package info data #340
Conversation
Can you please merge with |
@mhadaily you want me to merge this into the main on my fork? |
yes, please on your fork, update |
Done. |
packages/package_info_plus/package_info_plus/example/ios/Flutter/Flutter.podspec
Outdated
Show resolved
Hide resolved
Thanks for the PR, this seems to be valuable for Android only. Let me ask @jpnurmi and @miquelbeltran about their opinion. What do you guys think about this PR? |
I think it's valuable because of the use case I laid out - when using Google Maps, Google Place, and other APIs which use platform-specific API keys you need to send the build signature as a header. There are probably other use cases to have the build signature at runtime. It seems like there might be other data that is platform specific people may want in the future. What about taking the approach of Device Info where they return platform data objects specific to each platform? |
|
Just removed the inadvertent iOS changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ,thank you
Description
Re-submission from flutter/plugins#4013
This adds the android build signature to the package_info result. It returns an empty string on all other platforms.
For android this is useful when you need to get the SHA1 fingerprint which signed the current running app, for example when using platform-specific API keys for the Google Maps API where you must provide the signing certificate in a x-android-cert header.
Related Issues
flutter/flutter#83996
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. Updating the
pubspec.yaml
and changelogs is not required.///
).flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?