Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

URI scheme of Google+ iOS app?

I'm working on something cool and I want to link to my Google+ profile in the iOS app.

Has anyone found out how to use the mgc:// URI scheme that the Google+ app on iOS provides to open a specific profile the way you can do it with fb://, twitter:// and almost every other account-based iOS app?

like image 353
Tobias Timpe Avatar asked Mar 15 '13 14:03

Tobias Timpe


People also ask

What is URI scheme in iOS?

URL Schemas are used to launch an application from either a browser of from another application on iOS. iOS application developers can specify and register their own custom URL schemas.

How do I find and use iOS URL schemes for shortcuts?

Open a specific shortcut using a URL scheme You can launch the app to a particular shortcut in your collection. Open a URL with the following structure: shortcuts://open-shortcut?name=[name] , and provide the name of the shortcut in the name parameter.


1 Answers

In fact it's really simple. Check your URL in a web browser and replace http:// or https:// with gplus://

Example :

If the URL in your browser is https://plus.google.com/u/0/100711776131865357077 then you open the profile in the app with the following code.

NSURL *gPlusUrl = [NSURL URLWithString:@"gplus://plus.google.com/u/0/100711776131865357077"];

if ([[UIApplication sharedApplication] canOpenURL:gPlusUrl]) {
    [[UIApplication sharedApplication] openURL:gPlusUrl];
}
like image 155
adhumi Avatar answered Oct 04 '22 19:10

adhumi