简体   繁体   中英

Find supported url scheme parameters

What is the best way of finding all of the supported url scheme parameters of an app?

The Apple URL Scheme Reference for Map s lists several parameters that I can't find in its plist.

Examples:
t= The type of map to display.
z= The zoom level.
saddr= The source address, which is used when generating driving directions
daddr= The destination address, which is used when generating driving directions.

在此处输入图片说明

You'd need to disassemble the application, which is no easy task.

Handling of custom URL scheme parameters is decided at runtime, and is part of the application's logic. Each application decides what it needs to do with the URL within:

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation

This is what the iOS runtime queries on the destination application's app delegate, and if it returns YES, the runtime proceeds to open the app.

Parameters are not laid out anywhere in an easy to read plist unfortunately, unlike the custom URL protocol, such as maps:// . The reason URL Protocols are static in a plist file is so the iOS runtime can easily register the custom scheme within it's own internal register, but it's up to the app to determine how to parse the parameters.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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