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?
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.
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.
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];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With