get all iOS url schemes on device

后端 未结 5 607
你的背包
你的背包 2021-02-03 10:30

Is there a way to get all the url schemes of all the apps on a device? There has to be a central repository of them somewhere, maybe a plist?

相关标签:
5条回答
  • 2021-02-03 10:44

    Yes, you can use private api. First

    @interface PrivateApi_LSApplicationWorkspace
    - (NSArray*)privateURLSchemes;
    - (NSArray*)publicURLSchemes;
    @end
    

    then use it:

    PrivateApi_LSApplicationWorkspace* _workspace;
    _workspace = [NSClassFromString(@"LSApplicationWorkspace") new];
    - (NSArray*)privateURLSchemes
    {
        return [_workspace privateURLSchemes];
    }
    
    - (NSArray*)publicURLSchemes
    {
        return [_workspace publicURLSchemes];
    }
    

    check https://github.com/wujianguo/iOSAppsInfo.

    0 讨论(0)
  • 2021-02-03 10:47

    Adding my solution in case someone is still looking. After spending some time researching the answer, I finished off on a mix between @danielbeard's and @Avis' solution.

    Because I know what application I am looking for:

    1. Download the .ipa from iTunes using my computer
    2. Copy the application to my desktop
    3. Rename it to *.zip
    4. Extract the *.zip
    5. Open the 'Payload' folder
    6. Right click on the application and select 'Show Package Contents'
    7. I then double-click the 'Info.plist' file (which Xcode should then open)
    8. Then check 'URL types' > 'Item 0' > 'URL Schemes'

    Using that information I then add it to an array of apps to check (doing what @danielbeard suggested).

    Hope this helps someone in the future.

    0 讨论(0)
  • 2021-02-03 10:48

    if it's programatically, i don't know.

    here is answer to related to your question(not exactly)

    Find out an app's URL programmatically

    But manually, on your device-

    yes...

    there is a way to get url schemes of all apps on your device by this procedure. Install ifunbox on your system. Connect your device, open user applications and open the app that you are trying to find url scheme. you will find app home folder, in that folder you will find info.plist of that app. open info.plist and check url scheme address in the last column.

    it worked for me. you will find url scheme of some apps which are registered for url schemes.

    here are some some links for url scheme addresses of some apps.(might save your time).

    1.http://handleopenurl.com/ 2.http://wiki.akosma.com/IPhone_URL_Schemes

    0 讨论(0)
  • 2021-02-03 10:54

    It's not supported officially by Apple API without jailbreaking

    A workaround might be how Bump knows which apps are launched and support URL Schemes: http://danielamitay.com/blog/2011/2/16/how-to-detect-installed-ios-apps

    0 讨论(0)
  • 2021-02-03 10:59

    I'm going to go out on a whim here and assume you are trying to do the following:

    1. You have a PDF in your app.
    2. You want to check (programmatically) to see if any other app can open PDF files.
    3. If so, open PDF using that app.

    If you want to do this, you don't have to do step 2 manually. As a matter of fact, you can't. However, you can use the UIDocumentInteractionController class to present a menu of compatible apps.

    This is the only way you can "check" for other apps installed on the phone. At least on iOS 7 and under.

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