How does Booking.com close their app programmatically?

前端 未结 1 1052
有刺的猬
有刺的猬 2020-12-28 08:33

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

1条回答
  •  醉梦人生
    2020-12-28 09:11

    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

    0 讨论(0)
提交回复
热议问题