bfgRave Class
Public Types | |
enum | AccountDeletionRequestResult { Success = 0 , FailedForAuth , NetworkUnavailable , FailedToSend } |
This is used by bfgRave.requestAccountDeletion() These are the possible payload values provided when subscribing to the bfgCommon.BFG_RAVE_ACCOUNT_DELETION_REQUEST_FAILURE notification: More... | |
Static Public Member Functions | |
static string | currentRaveId () |
Returns the current Rave Id, or null if Rave is not initialized More... | |
static string | currentRaveEmail () |
Get the Rave email of the current user. More... | |
static bool | isAuthenticated () |
Get whether the current user is authenticated. More... | |
static bool | isCurrentGuest () |
Returns whether the current user is a guest or not. More... | |
static string | lastRaveId () |
Returns the previous user's raveId. Note: Returns null if the previous user and current user are the same. More... | |
static bool | isLastGuest () |
Returns whether the previous user was a guest or not. Note: Returns false if the previous user is the same as the current user. More... | |
static void | logoutCurrentUser () |
Logs out the current Rave user. NOTE: This will result in a new Rave id. | |
static void | presentSignIn () |
Displays the Rave login page to the user. Rave handles checking for any needed permissions, giving the user a friendly message about the permission it's about to request, and then requesting it. | |
static void | presentProfile () |
Shows the Rave Profile model. | |
static bool | isRaveInitialized () |
Returns whether Rave is initialized or not. More... | |
static string | currentRaveDisplayName () |
Get the Rave display name of the current user. More... | |
static void | changeRaveDisplayName (string raveDisplayName) |
Call this to set the Rave display name. More... | |
static void | fetchCurrentAppDataKey () |
Initiate a fetch of the current Rave App Data Key. More... | |
static void | selectRaveAppDataKey (string key) |
Select the App Data Key. More... | |
static bool | isCurrentAuthenticated () |
Checks if the current user is authenticated. More... | |
static bool | isCurrentPersonalized () |
Is the user logged in and in personalized state. More... | |
static void | presentNewsletterSignup () |
Displays the Rave newsletter sign up page to the user. Rave handles checking for any needed permissions, giving the user a friendly message about the permission it's about to request, and then requesting it. | |
static void | presentNewsletterSignupWithOrigin (string origin) |
Displays the Rave newsletter sign up page to the user. Rave handles checking for any needed permissions, giving the user a friendly message about the permission it's about to request, and then requesting it. More... | |
static void | presentProfileWithOrigin (string origin) |
Presents the standard profile screen if the current user is authenticated or personalized. More... | |
static void | presentSignInWithOrigin (string origin) |
Displays the Rave login page to the user. Rave handles checking for any needed permissions, giving the user a friendly message about the permission it's about to request, and then requesting it. An origin can be provided that identifies which screen or app started the AuthFlow login process. This origin will be provided in the first scene event in AuthFlow reporting analytics. More... | |
static void | enableFBClassicLoginMode (bool enabled) |
Rave has Facebook's Limited Login enabled by default. Call this method to enable Facebook's Classic Login mode. The SDK automatically calls this if/when a user opts in to ATT from #bfgManager.requestTrackingAuthorization() More... | |
static void | setFacebookReadPermissions (string permissions) |
Set Facebook Read Permissions dynamically More... | |
static string | getCurrentFacebookPermissions () |
Get current Facebook Permissions More... | |
static bool | facebookClassicLoginModeEnabled () |
Determine if Facebook Classic Login mode is enabled More... | |
static string | getAuthSource () |
Get authentication provider with which the user has authenticated More... | |
static string[] | getAllAuthSources () |
Get authentication provider with which the user has authenticated More... | |
static void | getAppAssociatedFacebookFriends () |
Initiate a fetch of app-associated facebook friends for the current user if authenticated through Facebook More... | |
static void | requestAccountDeletion () |
Sends a Zendesk request for account deletion and logs the user out of Rave. More... | |
Member Enumeration Documentation
◆ AccountDeletionRequestResult
This is used by bfgRave.requestAccountDeletion() These are the possible payload values provided when subscribing to the bfgCommon.BFG_RAVE_ACCOUNT_DELETION_REQUEST_FAILURE notification:
- Success: Account deletion request was successfully sent through Zendesk
- FailedForAuth: The user is not authenticated through Rave
- NetworkUnavailable: The user doesn't have a network connection
- FailedToSend: A network or client error occurred while sending the account deletion request through Zendesk
Member Function Documentation
◆ changeRaveDisplayName()
| inlinestatic |
Call this to set the Rave display name. The potential display name value that is passed in must meet the following requirements:
- String cannot be null
- String length must be between 4 characters and 16 characters in length
- Parameters
raveDisplayName The name that the Rave display name will be changed to.
◆ currentRaveDisplayName()
| inlinestatic |
Get the Rave display name of the current user.
- Returns
- The Rave display name of the current user or null if there isn't one.
◆ currentRaveEmail()
| inlinestatic |
Get the Rave email of the current user.
- Returns
- The Rave email of the current user or null if there isn't one.
◆ currentRaveId()
| inlinestatic |
Returns the current Rave Id, or null if Rave is not initialized
- Returns
- The current Rave Id, possibly null.
◆ enableFBClassicLoginMode()
| inlinestatic |
Rave has Facebook's Limited Login enabled by default. Call this method to enable Facebook's Classic Login mode. The SDK automatically calls this if/when a user opts in to ATT from #bfgManager.requestTrackingAuthorization()
- Warning
- iOS only.
- Since
- 7.2.1
- Parameters
enabled TRUE to enable Facebook Classic Login mode, FALSE to enable Limited Login
◆ facebookClassicLoginModeEnabled()
| inlinestatic |
Determine if Facebook Classic Login mode is enabled
- Returns
- Return TRUE if Facebook's Classic Login mode is enabled, FALSE otherwise
◆ fetchCurrentAppDataKey()
| inlinestatic |
Initiate a fetch of the current Rave App Data Key. This makes an asynchronous call to Rave to retrieve the App Data Key. If the fetch is successful, the delegate method bfgRaveFetchCurrentAppDataKeyDidSucceed will be called. If the fetch is unsuccessful, the delegate method bfgRaveFetchCurrentAppDataKeyDidFailWithError will be called. In the case where you are offline and have unresolved keys or logged out while offline, calling this method will call the delegate method bfgRaveFetchCurrentAppDataKeyDidFailWithError with null as the error value.
◆ getAllAuthSources()
| inlinestatic |
Get authentication provider with which the user has authenticated
- Returns
- A string representing the authentication provider: "unknown_auth", "facebook", "apple", "big_fish"
◆ getAppAssociatedFacebookFriends()
| inlinestatic |
Initiate a fetch of app-associated facebook friends for the current user if authenticated through Facebook This makes an asynchronous call to Rave to retrieve a json string containing the app-associated friend data.
- If successful, the BFG_RAVE_EXTERNALCALLBACK_GET_APP_ASSOCIATED_FACEBOOK_FRIENDS_DID_SUCCEED event will be dispatched containing the json string.
- If unsuccessful, the BFG_RAVE_EXTERNALCALLBACK_GET_APP_ASSOCIATED_FACEBOOK_FRIENDS_DID_FAIL event will be dispatched containing the error string.
- Warning
- iOS only.
- Since
- 7.2.4
◆ getAuthSource()
| inlinestatic |
Get authentication provider with which the user has authenticated
- Returns
- A string representing the authentication provider: "unknown_auth", "facebook", "apple", "big_fish"
◆ getCurrentFacebookPermissions()
| inlinestatic |
Get current Facebook Permissions
- Returns
- A string representing the permissions, e.g. "public_profile,email" or "public_profile,email,user_friends"
◆ isAuthenticated()
| inlinestatic |
Get whether the current user is authenticated.
- Returns
- YES if the current user is a authenticated, NO if unauthenticated.
◆ isCurrentAuthenticated()
| inlinestatic |
Checks if the current user is authenticated.
- Returns
- TRUE if the user is authenticated.
◆ isCurrentGuest()
| inlinestatic |
Returns whether the current user is a guest or not.
- Returns
- boolean value indicating whether the current user is a guest or not.
◆ isCurrentPersonalized()
| inlinestatic |
Is the user logged in and in personalized state.
- Returns
- TRUE if logged in and personalized.
◆ isLastGuest()
| inlinestatic |
Returns whether the previous user was a guest or not. Note: Returns false if the previous user is the same as the current user.
- Returns
- boolean value indicating if the last user to use the app was a guest or not.
◆ isRaveInitialized()
| inlinestatic |
Returns whether Rave is initialized or not.
- Returns
- boolean value indicating the status of Rave initilization.
◆ lastRaveId()
| inlinestatic |
Returns the previous user's raveId. Note: Returns null if the previous user and current user are the same.
- Returns
- String the previous user's raveId or null.
◆ presentNewsletterSignupWithOrigin()
| inlinestatic |
Displays the Rave newsletter sign up page to the user. Rave handles checking for any needed permissions, giving the user a friendly message about the permission it's about to request, and then requesting it.
- Parameters
origin A string denoting the starting point of the auth flow for reporting. Allows us to measure which areas in the game produce the highest authentication conversions. Example: 'level_end'
◆ presentProfileWithOrigin()
| inlinestatic |
Presents the standard profile screen if the current user is authenticated or personalized.
- Parameters
origin A string denoting the starting point of the auth flow for reporting. Allows us to measure which areas in the game produce the highest authentication conversions. Example: 'level_end'
◆ presentSignInWithOrigin()
| inlinestatic |
Displays the Rave login page to the user. Rave handles checking for any needed permissions, giving the user a friendly message about the permission it's about to request, and then requesting it. An origin can be provided that identifies which screen or app started the AuthFlow login process. This origin will be provided in the first scene event in AuthFlow reporting analytics.
- Parameters
origin Name of the origin activity that launched the sign-in AuthFlow (e.g., "leaderboard"); NULL if no origin specified.
◆ requestAccountDeletion()
| inlinestatic |
Sends a Zendesk request for account deletion and logs the user out of Rave.
The BFG_RAVE_ACCOUNT_DELETION_REQUEST_FAILURE notification is dispatched upon failure with one of the following AccountDeletionRequestResult failure codes:
- Warning
- This method MUST be called after BFG_RAVE_READY notification is received.
The BFG_RAVE_ACCOUNT_DELETION_REQUEST_FAILURE notification is dispatched upon failure with one of the following AccountDeletionRequestResult failure codes:
- FailedForAuth (1): The user is not authenticated through Rave.
- NetworkUnavailable (2): The user doesn't have a network connection.
- FailedToSend (3): A network or client error occurred while sending the account deletion request through Zendesk.
- Since
- 9.4.1 (iOS), 9.5.0 (Android)
◆ selectRaveAppDataKey()
| inlinestatic |
Select the App Data Key. NOTE: Only call this after a key is selected(by the user or the game) from the set of unresolved keys.
- Parameters
key The key that the App Data Key will be changed to.
◆ setFacebookReadPermissions()
| inlinestatic |
Set Facebook Read Permissions dynamically
- Warning
- iOS only.
- Since
- 7.2.1
- Parameters
permissions Facebook permissions required by the app, e.g. "public_profile,email" or "public_profile,email,user_friends"