App for running Jose things without the other dependencies and uses Detox for running tests on the simulator
-
Install Detox
-
Clone react-native-jose
-
Go to
react-native-jose
folder and use feat/encryption branch and then run:npm i && cd ios && pod install && cd .. && npm pack
-
Come back to
JoseApp
and runnpm i
(if it breaks there's something wrong with the paths, checkpackage.json
to see how@egendata/react-native-jose
is linked currently - will be updated to use the dependency from npm when the new feature is released) -
Install iOS Pods
cd ios && pod install && cd ..
-
Build the app for iOS
detox build -c ios
-
Build the app for Android
detox build -c android
-
Create a simulator for Android in AVD Manager and name it
Detox_Test
(what type of device it is shouldn't matter I think) and use at least Android version 28 -
Run the tests for iOS
detox test -c ios
-
Run the tests for Android
detox test -c android
Error:
/Users/<WHOEVER YOU ARE>/Library/Detox/ios/fa6c43c4cc884a5c2fbfb38206892ed97480bf32/Detox.framework could not be found, this means either you changed a version of Xcode or Detox postinstall script was unsuccessful.
Fix:
detox rebuild-framework-cache