Take the example of starting Instagram
Custom URL Scheme
Opening instagram://, followed by one of the following parameters, would open our app and perform a custo M action. For example, for camera, you would direct users on the IPhone to the custom URL instagram://camera.
URL |
OPENS |
App |
The Instagram app |
Camera |
The camera (or photo library on Non-camera devices) |
media?id=media_id |
Media with this ID |
User?username=username |
User with this username |
location?id=location_id |
Location feeds for this location ID |
Tag?name=tag |
Tag feed for this tag |
The OBJECTIVE-C call to open one of these URLs is as follows:
Nsurl *instagramurl = [Nsurl urlwithstring:@ "instagram://location?id=1"];if ([[UIApplication sharedApplication] Canopenurl:instagramurl]) { [[uiapplication sharedapplication] openurl:instagramurl];}
Open Browser opens a webpage [[UIApplication sharedapplication] openurl:[nsurl urlwithstring:@ "https://instagram.com/"]];</span >
https://instagram.com/developer/mobile-sharing/iphone-hooks/#
IOS-launch third-party apps with URL scheme