I have two apps - App1
and App2
, and they communicate using x-callback-url
protocol. My question is - how to close 'sender' App1
after calling App2
?
I don't need kill App1
when it's go background, only kill from specific function/viewcontroller in 0-2 seconds after redirection
p.s. after redirecting this code not executing at all.
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(false)
print("viewWillDisappear")
}
some variation with calling closing before/after redirect gives nothing too
p.p.s. using this code to close app
DispatchQueue.main.asyncAfter(deadline: .now()) {
UIApplication.shared.perform(#selector(NSXPCConnection.suspend))
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
exit(0)
}
}