简体   繁体   English

获取任何iOS应用程序的完整自定义URL方案和路径

[英]Get full custom URL scheme & path for any iOS application

I followed the instructions here: 我按照这里的说明操作:

How can I extract the Custom URL Scheme from a .ipa file? 如何从.ipa文件中提取自定义URL方案?

And was able to get the main URL scheme. 并且能够获得主要的URL方案。 For example, for the Hulu Application I got: 例如,对于Hulu应用程序,我得到了:

"hulu://" “葫芦://”

But I actually want to figure out how to get the remaining information so that I can directly link into the Hulu Application to a particular video. 但我实际上想弄清楚如何获取剩余信息,以便我可以直接链接到特定视频的Hulu应用程序。 I know for Hulu that the URL scheme is this: 我知道Hulu的URL方案是这样的:

"hulu://w/ id number for video " “hulu:// w / id for video

But i was only able to get this by going to the Hulu site and seeing them redirect me using the above scheme. 但我只能通过前往Hulu网站并看到他们使用上述方案重定向我。 Is there any way to figure out the full scheme by using the .ipa file or anything else? 有没有办法通过使用.ipa文件或其他任何东西来找出完整的方案?

There are 7 or 8 apps that I am trying to get the scheme for. 有7或8个应用程序,我试图获得该计划。 The first part is easy, the 2nd part is hard. 第一部分很容易,第二部分很难。

If you don't need to do it programmatically, you can simply search up the applications on http://handleopenurl.com/ – they have a great list over URL schemes. 如果您不需要以编程方式执行此操作,则可以在http://handleopenurl.com/上搜索应用程序 - 他们有一个很棒的URL方案列表。 The wiki http://wiki.akosma.com/IPhone_URL_Schemes also has a comprehensive list. 维基http://wiki.akosma.com/IPhone_URL_Schemes也有一个全面的列表。

When developers make their custom URL schemes, they only register the base scheme ( hulu:// ), and they later split and match the URL programmatically. 当开发人员制作他们的自定义URL方案时,他们只注册基本方案( hulu:// ),然后他们以编程方式分割和匹配URL。 See below example: 见下面的例子:

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
    NSLog(@"url recieved: %@", url);
    NSLog(@"query string: %@", [url query]);
    NSLog(@"host: %@", [url host]);
    NSLog(@"url path: %@", [url path]);
    NSDictionary *dict = [self parseQueryString:[url query]];
    NSLog(@"query dict: %@", dict);
    return YES;
}

When compiled, the code revealing the steps become unreadable, so you can no longer extract that informataion, which in turn doesn't help you much. 编译时,显示步骤的代码变得不可读,因此您无法再提取该信息,这反过来对您没有多大帮助。 I suggest you contact the developers of the apps in question, they have full insight in these schemes! 我建议您联系相关应用程序的开发人员,他们对这些方案有充分的了解!

The full scheme resolution is done in the code (handleOpenURL in the AppDelegate), which is no more readable after compilation, so you won't be able to get it from the IPA. 完整的方案解析在代码(AppDelegate中的handleOpenURL)中完成,在编译后不再可读,因此您将无法从IPA获取它。

There are some lists of app url schemes: 有一些app url方案列表:

..but none of them gives hints about hulu. ..但他们都没有给出关于hulu的提示。 Contacting the developer might be the best solution, here. 在这里联系开发人员可能是最好的解决方案。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM