Google+ Platform for iOS

GPPShare Class Reference


Overview

The primary class for the share action on Google+.

For more information on sharing, see http://developers.google.com/+/mobile/ios/share .

Public Member Functions

(id< GPPShareBuilder >) - shareDialog
 Returns a share dialog builder instance.
(id< GPPNativeShareBuilder >) - nativeShareDialog
 Returns a native share dialog builder instance.
(void) - closeActiveNativeShareDialog
 Closes the active native share dialog immediately, if one exists.
(BOOL) - handleURL:sourceApplication:annotation:
 This method should be called from your UIApplicationDelegate's application:openURL:sourceApplication:annotation.

Static Public Member Functions

(GPPShare *) + sharedInstance
 Returns a shared GPPShare instance.

Properties

NSObject< GPPShareDelegate > * delegate
 The object to be notified when the share action has finished.

Member Function Documentation

Returns a shared GPPShare instance.

[GPPSignIn sharedInstance].clientID must be initialized with a client ID registered in the Google API console, https://code.google.com/apis/console/ with the app's bundle ID.

Returns a share dialog builder instance.

Call its open method to create the dialog after setting the parameters as needed.

Returns a native share dialog builder instance.

Call its open method to create the dialog after setting the parameters as needed. Before the native share dialog can be opened, the user must have consented to the OAuth2 scope "https://www.googleapis.com/auth/plus.login".

Closes the active native share dialog immediately, if one exists.

Note that it is usually not necessary to call this method, as the sharebox closes itself once the share action has completed either successfully or with an error. Only call this method when you need to permanently interrupt the user in the middle of sharing, because whatever the user entered will be lost.

- (BOOL) handleURL: (NSURL *)  url
sourceApplication: (NSString *)  sourceApplication
annotation: (id)  annotation 

This method should be called from your UIApplicationDelegate's application:openURL:sourceApplication:annotation.

Returns YES if GPPShare handled this URL. Also see handleURL:sourceApplication:annotation: in GPPURLHandler.


Property Documentation

- (NSObject<GPPShareDelegate>*) delegate [read, write, assign]

The object to be notified when the share action has finished.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.