Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
270 views
in Technique[技术] by (71.8m points)

swift - How to restart react native app from the native code

I'm looking for a way to restart my react-native app from the native code (swift/kotlin).

I need to find a way to restart the app after user inactivity.

I've encountered issues doing the restart with react-native-restart given the code is executed on the JS side. It tends to create crashes when the app is in the background after a certain amount of time.

Is there any way I could execute the restart directly from the native code in swift/kotlin? I've tried to dig into the source of RN restart but couldn't figure out how this works.

Thanks!

question from:https://stackoverflow.com/questions/65902519/how-to-restart-react-native-app-from-the-native-code

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...