Integrating Swift Code with CryptoKit into a Turbo Native Module (React Native 0.78) #895
restarajat
started this conversation in
Feedback
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I’m building a Turbo Native Module for React Native 0.78 and need help integrating Swift code that uses the CryptoKit package.
What I’m Trying to Achieve
I have implemented HMAC-SHA256 hashing in Swift using CryptoKit, and I want to expose this function in my Turbo Native Module so it can be used in React Native.
React Native Version
Swift Implementation
Here’s my Swift code:
Objective-C Bridging (Turbo Native Module)
I’ve written the Objective-C bridge as follows:
NativeCrypto.mm
NativeCrypto.h
Issues I’m Facing
Swift integration in TurboModule:
CryptoKit Compatibility:
TurboModule Setup:
What I’ve Tried
Would love to get guidance on the best way to integrate Swift with TurboModules in React Native 0.78.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions