class: RaveSocial

header: <RaveSocial/RaveSocial.h>

initializeRave (with launch options and ready callback) - New in 3.1.1#

Initialize Rave when using FBSDKCoreKit for Facebook 4.x and call from your UIApplicationDelegate application:didFinishLaunchingWithOptions:. Will attempt to load config JSON from application bundle:

+ (void)initializeRaveWithLaunchOptions:(NSDictionary *)launchOptions withReadyCallback:(RaveCompletionCallback)readyCallback;

Parameters:

launchOptions - Launch options forwarded from UIApplication delegate, may be nil though that may introduce incorrect behavior from FBSDKCoreKit

readyCallback - Callback when Rave is ready after initializing, which may include some asynchronous operations


initializeRave (with config URL, launch options, and ready callback) - New in 3.1.1#

Initialize Rave when using FBSDKCoreKit for Facebook 4.x and call from your UIApplicationDelegate application:didFinishLaunchingWithOptions::

+ (void)initializeRaveWithConfig:(NSURL *)configURL withLaunchOptions:(NSDictionary *)launchOptions withReadyCallback:(RaveCompletionCallback)readyCallback;

Parameters:

configURL - URL for alternate path to JSON configuration for Rave settings, may be nil

launchOptions - Launch options forwarded from UIApplication delegate, may be nil though that may introduce incorrect behavior from FBSDKCoreKit

readyCallback - Callback when Rave is ready after initializing, which may include some asynchronous operations


handleURL (with URL, source application, and annotation) - New in 3.0.x#

Integration method to forward URL requests from the UIApplicationDelegate for internal Rave usage:

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

Parameters:

url - URL forwarded from application delegate

sourceApplication - Source application forwarded from application delegate

annotation - Annotation forwarded from application delegate

Returns: YES if Rave handled the URL request otherwise NO, typically should be returned from the UIApplicationDelegate


initializeRave#

Initialize the SDK:

+ (void)initializeRave

initializeRave (with callback)#

Initialize the SDK and callback on completion:

+ (void)initializeRaveWithReadyCallback:(RaveCompletionCallback)readyCallback

Parameters:

readyCallback - The block to callback when initialization is complete


initializeRaveWithConfig#

Initialize the SDK with a custom JSON config source:

+ (void)initializeRaveWithConfig:(NSURL *)configURL

Parameters:

configURL - A url to the config JSON


initializeRaveWithConfig (with callback)#

Initialize the SDK with a custom JSON config source and callback on completion:

+ (void)initializeRaveWithConfig:(NSURL *)configURL withReadyCallback:(RaveCompletionCallback)readyCallback

Parameters:

configURL - A url to the config JSON

readyCallback - The block to callback when initialization is complete


volatileRaveId#

Returns a Rave Id after initialization call has returned. Value may change after ready callback has fired:

+ (NSString *)volatileRaveId

Returns: Best guess UUID for the Rave user prior to completing initialization


connectTo#

Attention

Rather than implementing a fully custom control for connecting your users we suggest as best practice that you instead use your custom UI to wrap one of our connect controllers. Please read Adding a Facebook (or another social provider) button to your App.

Connect the current user to an authentication provider

+ (void)connectTo:(NSString *)pluginKeyName callback:(RaveCompletionCallback)callback

Parameters:

pluginKeyName - The KeyName of the authentication provider plugin

callback - A completion callback


loginWith#

Attention

Rather than implementing a fully custom control for connecting your users we suggest as best practice that you instead use your custom UI to wrap one of our connect controllers. Please read Adding a Facebook (or another social provider) button to your App.

Logs in with an authentication provider. Make sure the current user isn’t already authenticated in before use. This will either connect the current anonymous user to the provider, or it will create a new session.

+ (void)loginWith:(NSString *)pluginKeyName callback:(RaveCompletionCallback)callback

Parameters:

pluginKeyName - The KeyName of the authentication provider plugin

callback - A completion callback


disconnectFrom#

Disconnects the current user from an authentication provider

+ (void)disconnectFrom:(NSString *)pluginKeyName callback:(RaveCompletionCallback)callback

Parameters:

pluginKeyName - The keyname of the plugin

callback - A completion callback


logOut (with callback) - New parameter in 3.0.x#

Logs the current user out of Rave. Deletes the current session and clears the cache. If the setting RaveSettings.General.AutoGuestLogin is enabled, a new guest account will be logged in immediately.

Providing a null callback will result in operations such as automatic guest login and session deletion happening asynchronously. To guarantee that a race does not happen with any other authentication actions, it is highly recommended that a listener be set and that no other Rave APIs be called until the listener has called back.

+ (void)logOut:(RaveCompletionCallback) callback;

Parameters:

callback - A completion callback


loginAsGuest#

Logs in as a guest account. Do not call this if already logged in. This will not work if the setting RaveSettings.General.AutoGuestLogin is enabled, as guest login is controlled by Rave in that case and cannot be explicitly controlled.

+ (void)loginAsGuest:(RaveCompletionCallback)callback

Parameters:

callback - A completion callback


currentUser#

Gets the current user from cache if the user is logged in and cached user data is available:

+ (id<RaveUser>)currentUser

checkReadinessOf#

Checks the state of an authentication provider to determine if it is ready to use A plugin is “Ready” if it has a token available from the provider and the current user is connected with a matching ID to the token:

+ (void)checkReadinessOf:(NSString *)pluginKeyName callback:(RaveReadinessCallback)callback

Parameters:

pluginKeyName - The KeyName of the authentication provider plugin

callback - A readiness callback


isPluginReady#

Returns the cached value of the last time an authentication provider was checked for readiness. A plugin is “Ready” if it has a token available from the provider and the current user is connected with a matching ID to the token:

+ (BOOL)isPluginReady:(NSString *)pluginKeyName

Parameters:

pluginKeyName - The KeyName of the authentication provider plugin

Returns: true if the plugin is ready, false if not


isLoggedIn#

Returns if there is an active session in any state (Guest, Authenticated or otherwise).

+ (BOOL)isLoggedIn

Returns: true if there is an active session, false if not


isLoggedInAsGuest#

Returns if there is an active session and the session is for a user in an anonymous (guest) state:

+ (BOOL)isLoggedInAsGuest

Returns: true if the current user is a guest, false if not or if there is no session


isPersonalized#

Returns if there is an active session and the session is for a user in personalized state:

+ (BOOL)isPersonalized

Returns: true if the current user is personalized, false if not or if there is no session


isAuthenticated#

Returns if there is an active session and the session is for a user in authenticated state:

+ (BOOL)isAuthenticated

Returns: true if the current user is authenticated, false if not or if there is no session


isNetworkAvailable#

Returns if there is a network connection available:

+ (BOOL)isNetworkAvailable

Parameters:

context - An Android Context


Feature Manager Access#

All feature managers are available through the RaveSocial class.

achievementsManager - Achievements Manager

contactsManager - Contacts Manager

giftsManager - Gifts Manager

leaderboardsManager - Leaderboards Manager

promotionsManager - Promotions Manager

sharingManager - Sharing Manager

usersManager - Users Manager