-
Notifications
You must be signed in to change notification settings - Fork 57
🎉 Add support for Expo SDK 48+ #45
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
Conversation
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.
Awesome, thank you 💛
@@ -49,6 +49,13 @@ function getRandomValues (array) { | |||
throw new QuotaExceededError('Can only request a maximum of 65536 bytes') | |||
} | |||
|
|||
// Expo SDK 48+ | |||
if (global.expo && global.expo.modules && global.expo.modules.ExpoCrypto && global.expo.modules.ExpoCrypto.getRandomValues) { | |||
// ExpoCrypto.getRandomValues doesn't return the array |
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.
I think that was because we were limited in being able to return typedarrays from Expo modules back then. I'll check if we can't readd it so it matches the web spec
Released as 🚢 1.9.0 / 2023-05-18 |
Seeing My android build logs suggest that
|
@adamhari did this previously work on 1.8.0? Does this happen when you call the global @aleqsio is there a possibility that
|
It works on 1.8.0, I reverted to using that. It happens because I'm using |
Hmm, I'm not sure I follow here, is it |
Yeah, I'm not using |
|
Hmm, not sure why this would happen, we didn't touch getRandomBytes other than moving it to a different package and I can't see anything in the code that would indicate it can break. @adamhari If you can provide a minimal reproduction I can take a look 🙏 |
Hey folks, |
The current code works but uses deprecated functions on SDK 48, this PR adds a code path that calls uses
getRandomValues
fromexpo-crypto
.Fixes #41