Newcomer in ios with some android experience . I would like to handle app crashes (if possible in ios) in swiftui like i do in android ie forward the user to a custom View.Basically , when an lethal error occurs in java it is caught and user forwarded .
Here is the code in java
public void uncaughtException(Thread thread, Throwable exception) { StringWriter stackTrace = new StringWriter(); exception.printStackTrace(new PrintWriter(stackTrace)); System.err.println(stackTrace); Intent intent = new Intent(myContext, myActivityClass); String s = stackTrace.toString(); intent.putExtra("error", s); myContext.startActivity(intent); android.os.Process.killProcess(android.os.Process.myPid()); System.exit(0);}