Launching Localscope from third party apps

Localscope can be launched from other apps by making use of custom URL schemas, as explained below:

Discover mode

Localscope app supports a discover mode. In discover mode, Localscope shows all the cool nearest locations, photos, videos, etc., around the user’s location. You can launch Localscope app directly into discover mode, by launching this URL from your app:

com.cynapse.localscope://action=discover

The Objective-C code to do this, is:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"com.cynapse.localscope://action=discover"]];

Search mode

In search mode, Localscope searches locations, points of interest, photos, videos, etc., matching a particular search phrase. This search phrase can be passed to Localscope in the launch URL. Just replace the [your search term] part of the URL below with whatever you want Localscope to search with:

com.cynapse.localscope://action=search&query=[your search term]

The Objective-C code for doing the above, is:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"com.cynapse.localscope://action=search&query=[your search term]"]];

The value for query parameter should be UTF-8 encoded and also URL escaped. Extended characters for foreign languages should be encoded to transfer to Localscope properly.

Examples:

Search for Restaurant:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"com.cynapse.localscope://action=search&query=Restaurant"]];

Search for Salle de cinéma:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"com.cynapse.localscope://action=search&query=Salle%%20de%%20cin%%C3%%A9ma"]];

Note how the search term is encoded in the above URL, this is very important if your app is used in non-english regions.

Determine if Localscope app is installed

You can determine if Localscope app is installed by checking the return value from UIApplication’s canOpenURL method, as follows:

BOOL canLaunchLocalscope = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"com.cynapse.localscope://"]];if (canLaunchLocalscope){NSLog(@"Localscope can be launched"); }

Promoting your Localscope integrated app

We’re happy to promote apps making use of the our API on our site. Just let us know. We are open to integrate your feedback into the API to extend it further so you can apply it as per your requirements. Drop us an email and we’ll be happy to talk.