IOSBfgManager Class
This is the bfgManager wrapper class for iOS. More...
Public Member Functions | |
void | setParentViewController () |
Currently only works for iOS More... | |
long | userID () |
Get current user ID. | |
void | setUserID (long userID) |
Set the current user ID More... | |
void | setAttributionUserID (string userID) |
Set the attribution user ID More... | |
long | sessionCount () |
Currently only works for iOS. Determines the number of sessions in the application. | |
bool | isInitialLaunch () |
Currently only works for iOS. Determines if this is the initial launch or "install" of the application. | |
bool | isFirstTime () |
Currently only works for iOS. Determines if the application has been started from a cold-start. | |
bool | isInitialized () |
Determines if SDK is initialized yet. | |
void | showSupport () |
Launches the Help Center Activity. Requires that parentViewController is set. | |
void | showPrivacy () |
Show the Privacy page using the in-game browser. | |
void | showTerms () |
Show the Terms of Use page with the in-game browser. | |
void | showWebBrowser (string startPage) |
Show an in-game browser displaying startPage. More... | |
void | removeWebBrowser () |
Removes the in-game browser shown via showWebBrowser: | |
bool | checkForInternetConnection () |
Returns a boolean indicating whether the device can access the Internet. For convenience, this also displays a built-in alert dialog notifying the user that an Internet connection was not found. | |
bool | checkForInternetConnectionAndAlert (bool displayAlert) |
Returns a boolean indicating whether the device can access the Internet. Also can display an alert if the device is not connected. More... | |
void | showNoConnectivityAlert (bool showStore) |
void | addPauseResumeDelegate () |
Currently only works on iOS. Call this method to add a delegate to listen for pause/resume events from the SDK. | |
void | removePauseResumeDelegate () |
Currently only works on iOS. Call this method to remove a pause/resume event delegate. | |
bool | isPaused () |
Test to see if game should be paused. Returns true if the game should be paused. | |
bool | getDebugDictionary (ref string jsonDebugDictionary) |
Currently only works on iOS. Currently only works on iOS. Gets the debug dictionary currently being used for purchase testing. More... | |
void | setDebugDictionary (string jsonDebugDictionary) |
Currently only works on iOS. Sets the debug dictionary for purchase testing based on the given json. More... | |
void | addPolicyListener (NotificationHandler willShowPolicies, NotificationHandler onPoliciesCompleted) |
Adds the policy listener. This method internally creates a notification observer for bfgCommon.BFG_POLICY_LISTENER_WILLSHOWPOLICIES and bfgCommon.BFG_POLICY_LISTENER_ONPOLICIESCOMPLETED. To remove the policy listeners, please call removePolicyListener with the notification observers you have created. More... | |
void | removePolicyListener (NotificationHandler willShowPolicies, NotificationHandler onPoliciesCompleted) |
Removes the policy listener. More... | |
bool | didAcceptPolicyControl (string policyControl) |
Determines if a given policy control was accepted. More... | |
void | setLimitEventAndDataUsage (bool limitData) |
Limits Facebook's use of data to analytics and conversions. More... | |
void | requestTrackingAuthorization () |
Triggers the display of the Apple App Transparency Tracking prompt to request user's permission to retrieve IDFA. More... | |
bool | attSelectionRequired () |
Returns TRUE when user must make an AppTrackingTransparency selection. To be used in conjunction with requestTrackingAuthorization()More... | |
int | attStatus () |
Return an int representing the user's App Tracking Transparency status as defined by Apple's enum: ATTrackingManager.AuthorizationStatus More... | |
Detailed Description
This is the bfgManager wrapper class for iOS.
Member Function Documentation
◆ addPolicyListener()
| inline |
Adds the policy listener. This method internally creates a notification observer for bfgCommon.BFG_POLICY_LISTENER_WILLSHOWPOLICIES and bfgCommon.BFG_POLICY_LISTENER_ONPOLICIESCOMPLETED. To remove the policy listeners, please call removePolicyListener with the notification observers you have created.
- Parameters
willShowPolicies The listener for willShowPolicies. onPoliciesCompleted The listener for onPoliciesCompleted.
◆ attSelectionRequired()
| inline |
Returns TRUE when user must make an AppTrackingTransparency selection. To be used in conjunction with requestTrackingAuthorization()
- Warning
- Only for iOS 14 and above. On Android and lower iOS versions, this method will always return FALSE.
◆ attStatus()
| inline |
Return an int representing the user's App Tracking Transparency status as defined by Apple's enum: ATTrackingManager.AuthorizationStatus
- -3: An error occurred and a value could not be determined
- -2: User is running on a non-iOS device; no action required
- -1: User is running on a iOS device but pre-iOS 14; no action required
- 0: notDetermined
- 1: restricted
- 2: denied
- 3: authorized
- Returns
- int representing user's App Tracking Transparency status
◆ checkForInternetConnectionAndAlert()
| inline |
Returns a boolean indicating whether the device can access the Internet. Also can display an alert if the device is not connected.
- Parameters
displayAlert Whether an alert should be displayed if there is no connection.
◆ didAcceptPolicyControl()
| inline |
Determines if a given policy control was accepted.
- Parameters
policyControl The policy control name to check
- Returns
- TRUE if the control specified by policyControl was accepted, otherwise FALSE.
◆ getDebugDictionary()
| inline |
Currently only works on iOS. Currently only works on iOS. Gets the debug dictionary currently being used for purchase testing.
- Parameters
jsonDebugDictionary The current debug dictionary as a string
- Returns
- If true, the debug dictionary was successfully retrieved. If false, there was a problem while retrieving the debug dictionary.
◆ removePolicyListener()
| inline |
Removes the policy listener.
- Parameters
willShowPolicies The listener for willShowPolicies. onPoliciesCompleted The listener for onPoliciesCompleted.
◆ requestTrackingAuthorization()
| inline |
Triggers the display of the Apple App Transparency Tracking prompt to request user's permission to retrieve IDFA.
- Warning
- Only for iOS 14 and above. On Android and lower iOS versions, this method will have no effect.
◆ setAttributionUserID()
| inline |
Set the attribution user ID
- Parameters
userID User ID to set.
◆ setDebugDictionary()
| inline |
Currently only works on iOS. Sets the debug dictionary for purchase testing based on the given json.
- Parameters
jsonDebugDictionary The new debug dictionary to use
◆ setLimitEventAndDataUsage()
| inline |
Limits Facebook's use of data to analytics and conversions.
- Parameters
limitData Limits data usage if true
◆ setParentViewController()
| inline |
Currently only works for iOS This sets the view controller to use when showing the GDN or interstitials for both launch (startup) and resume events in the UI. The parent view controller is initially set using the initializeWithActivity, but can be changed by calling this method if a different view should become the parent view for receiving GDN and interstitials. If you change your root Activity, you must call this method.
◆ setUserID()
| inline |
Set the current user ID
- Parameters
userID User ID to set.
◆ showWebBrowser()
| inline |
Show an in-game browser displaying startPage.
- Parameters
startPage startPage URL whose content is to be displayed to the user.