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?
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];
}
I know this is an old post, but I found the solution here (just search "google"). The URL scheme is gplus://
. I have tested this myself and verified that it worked. Usage example:
NSURL *gPlusUrl = [NSURL URLWithString:@"gplus://"];
if ([[UIApplication sharedApplication] canOpenURL:gPlusUrl]) {
[[UIApplication sharedApplication] openURL:gPlusUrl];
}