get all iOS url schemes on device

后端 未结 5 622
你的背包
你的背包 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.

提交回复
热议问题