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

fix(imagepicker): consolidate API / Fix typings #530

Merged
merged 5 commits into from
Sep 16, 2023

Conversation

jcassidyav
Copy link
Contributor

The IOS and Android APIs have diverged with each other, the .d.ts and the docs, this is an attempt to bring them all back into sync.

Changes:

  • authorize() now returns a Promise<AuthorizationResult> for both android and IOS, where the authorized property indicates success, and the details property holds the returned value from the call to @nativescript-community/perms, previously IOS threw an error on , and android returned the raw response from @nativescript-community/perms which came in two different forms depending on android version.

  • In the returned result from present() each result[i].thumbnail is now an ImageSource, this was previously a BitMap for android / ImageSource for IOS.

  • result[i].duration is now typed correctly as a number, previously typed as a string, but was always set with a number.

  • Uses @nativescript-community/perms in IOS.

Copy link
Contributor

@NathanWalker NathanWalker left a comment

Choose a reason for hiding this comment

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

Really nice thank you @jcassidyav

@NathanWalker NathanWalker merged commit 938d880 into NativeScript:main Sep 16, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants