Replies: 2 comments 1 reply
-
Custom delegate is there to allow native side access stored data. For Detox, what about using launchApp api to restart the application? You can provide different launch options, so you can call your deeplinks or simply simulate app relaunch. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply! I know about the detox launch args but they don't solve my problem. The app saves a value using AsyncStorage and reads it at app start so it can decide whether its the first app start after install or not. Depending on that the start screen looks different. Maybe my app should expose a "app:AsyncStorage/key/value" deeplink to set a specific async stored value? |
Beta Was this translation helpful? Give feedback.
-
Usage in a detox e2e scenario
My app has a welcome screen that is only shown once, so I save a value using
async-storage
after the first start. In my e2e tests I have scenarios that I want to simulate first starts and non-first starts.For that I would have to modify the saved data (either delete the current value or set it to a specific value).
I see that you are also using detox in the sample project. I just don't get how this custom delegate thing works and why its only invoked on ios devices and not on Android devices.
My current app has the ability to follow deep links and I already have a deep link to clear the apps data via
myapp:reset-data
. That will internally be catched by the apps deeplink code and perform aasync-storage
remove all keys operation.Is that basically the same what you are doing with the delegate or is there more to it?
Beta Was this translation helpful? Give feedback.
All reactions