how to open an app by bundle id on iOS

前端 未结 2 1925
夕颜
夕颜 2021-01-27 09:27

Just now , I create a project based on Single View Application on Xcode6.3.1, then I create a button on Main.storyboard. The code is like this when the button touched:



        
相关标签:
2条回答
  • 2021-01-27 10:00

    * For jail break you can proceed with this *

    There is a mechanism known as URL scheme, which can be used to open app from inside your app. but for that you need to do the proper url schemens setUp in your plist file. I strongly feel that you are not looking at this option.

    * There is another way strictly not recommended ( except JAILBREAK PHONES) the API is private *, but you can do a try & enjoy in development mode.

    • openApplicationWithBundleID : To open the app using bundle identifier.
    • - (NSArray*)allInstalledApplications; : This will list you all the installed application on your device.

    If you want to see an interesting demo it this, kindly run this app in your phone & see the Apple Watch style, spring board, with all apps listed & can be launched on tap.

    Hope that gives the better idea of the private api usage.

    0 讨论(0)
  • 2021-01-27 10:24

    Install the com.conradkramer.open open package from Cydia and you can run open com.bundle.id from shell via SSH or from an app.

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