Bring previous app back to the front when user is done with my iOS app

前端 未结 2 1009
遇见更好的自我
遇见更好的自我 2020-12-11 22:18

My iOS 4/5/6 app is meant to be used briefly. I want the user to click a \"Done, now go away\" button which takes them back to the app they were using before mine came to th

相关标签:
2条回答
  • 2020-12-11 22:57

    I want the user to click a "Done, now go away" button

    That button is the Home button.

    I want to programmatically return the previous app to the front.

    There's no public API for switching to another app. Users have a number of options for switching between apps, though. In addition to the swipe gesture you mentioned, they can do a four-finger upward swipe to get to the list of recent apps, or double-tap the home button for the same effect, or hit the home button once to go back to Springboard. Users, not apps, are supposed to be in control of which app is in the foreground. And the way they do that should be standard from one app to another. I can understand wanting to make life easier for the user, but what you're trying to do just isn't possible with the available API.

    0 讨论(0)
  • 2020-12-11 22:59

    I Don't think you can do that if the previous application is not your property or if you are not aware if a URL Scheme has been incorporated in the previous application that you know of.

    Launch App Via URL Scheme!

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