I just saw this trick the Booking.com app does to let you change the application's language:
I'm not aware of any technique to programmatically close an iOS app (and it's also forbidden by Apple's guidelines, but let's "pretend" that my boss wants me to do this).
How do they do it? I've tried exit(0)
but it immediately quit like when the process crashes, while their app animates to the home screen normally. Is there maybe a private URL scheme that opens the home screen?
You can try
// after change language dim display and follow it with this snippet
DispatchQueue.main.asyncAfter(deadline: .now() + 1.5) {
UIApplication.shared.perform(#selector(NSXPCConnection.suspend))
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
exit(0)
}
}
I have done it many times in similar cases and the app accepted without rejection
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With