Detox icon indicating copy to clipboard operation
Detox copied to clipboard

fix(android): crash message handling on client.waitUntilAppIsReady

Open noomorph opened this issue 1 year ago • 1 comments

Description

Resolves #3500.

Notes

Adds a 3rd party dependency to read launch arguments (because seemingly we have it implemented only for Android):

+ "react-native-launch-arguments": "^3.1.0",

🤷‍♂️

image

noomorph avatar Jul 20 '22 16:07 noomorph

Note that this 3rd🥳 dependency isn't taking the launch args from where it should on iOS, it takes the process args instead, see: https://github.com/iamolegga/react-native-launch-arguments/blob/master/ios/LaunchArguments.m#L23

In order to fetch them on the native side, we should get them from the user defaults:

[NSUserDefaults.standardUserDefaults objectForKey:"<launch argument key>"];

Specifically, for boolean or string objects we have boolForKey and stringForKey.

asafkorem avatar Jul 28 '22 09:07 asafkorem

Well looks like I got it working + stable on Android. On iOS it works but not well enough - the original error message (simulated error ...) isn't reported. @asafkorem could use your advice.

d4vidi avatar Aug 16 '22 19:08 d4vidi