FuseSDK (iOS)
 All Data Structures Functions Properties Pages
FuseSDK Class Reference

This is the main Fuse SDK static class. More...

#import <FuseSDK.h>

Inheritance diagram for FuseSDK:

Class Methods

(void) + startSession:delegate:withOptions:
 This method is used to initiate all communication with the Fuse system (and register a <FuseDelegate>) More...
 
(void) + setPlatform:
 This method is used to describe the platform the API is running on. More...
 
(void) + removeDelegate
 Removes the callback Delegate the SDK current has a reference too. More...
 
(void) + setDelegate:
 Set the FuseSDK callback Delegate. More...
 
(void) + registerForPushToken
 This method is used to manually register for a push notification device token. More...
 
(void) + registerForPushToken:
 This method is used to manually register for a push notification device token. More...
 
(void) + applicationdidRegisterForRemoteNotificationsWithDeviceToken:
 This method is used to pass the registered Apple push token to the Fuse servers for future push notification messaging. More...
 
(void) + applicationdidFailToRegisterForRemoteNotificationsWithError:
 This method is used to capture when the registration of a device token has failed. More...
 
(void) + applicationdidReceiveRemoteNotification:Application:
 This method is used to capture when a user either receives an Apple push notification when the application is running or chooses to re-enter the application because of a click on an on-of-application notification . More...
 
(void) + respondToApplicationLaunchOptions:Application:
 This method is optional and can collect launch options. More...
 
(int) + registerEvent:withDict:
 This method is used to register an named event in the Fuse system. More...
 
(int) + registerEvent:ParameterName:ParameterValue:Variables:
 This method will send a named event (with values) to the Fuse system for tracking. More...
 
(int) + registerEvent:ParameterName:ParameterValue:VariableName:VariableValue:
 This method will send a named event (with values) to the Fuse system for tracking. More...
 
(void) + registerCrash:
 This method is used to catch crashes within an app. More...
 
(void) + registerInAppPurchaseList:
 This method is used to register the price and currency that a user is using to make an in-app purchase. More...
 
(void) + registerInAppPurchase:
 This method records in-app purchases in the Fuse system. More...
 
(void) + registerInAppPurchase:TxState:Price:Currency:ProductID:
 This method records in-app purchases in the Fuse system without using the SKPaymentTransaction data type. More...
 
(void) + registerInAppPurchase:TxState:Price:Currency:ProductID:TransactionID:
 This method records in-app purchases in the Fuse system without using the SKPaymentTransaction data type. More...
 
(void) + registerVirtualGoodsPurchase:Amount:CurrencyID:
 This method records purchases of virtual goods. More...
 
(void) + setRewardedVideoUserID:
 This method sets the user ID string for rewarded video server verification. More...
 
(BOOL) + isAdAvailableForZoneID:
 This method returns if an ad was loaded in a particular zone. More...
 
(void) + showAdForZoneID:options:
 This method displays a Fuse interstitial ad for a given ad zone. Different ad zones can be configured via the Fuse Dashboard. More...
 
(void) + preloadAdForZoneID:
 This method loads an ad and reports if it is available to be shown to the user for the specified ad zone. More...
 
(FuseRewardedObject *) + getRewardedInfoForZoneID:
 This Method returns the FuseRewardedObject for a given zoneID, or nil if there is no rewards available. More...
 
(FuseIAPOfferObject *) + getIAPOfferInfoForZoneID:
 This Method returns the FuseIAPOfferObject for a given zoneID, or nil if there is no IAP offer available. More...
 
(FuseVirtualGoodsOfferObject *) + getVirtualGoodsOfferInfoForZoneID:
 This Method returns the FuseRewardedObject for a give zoneID, or nil if there is Virtual Good offer available. More...
 
(BOOL) + zoneHasRewarded:
 Use this method to query wether or not an ad zone has rewarded video content in it;. More...
 
(BOOL) + zoneHasIAPOffer:
 Use this method to query wether or not an ad zone has iap offer content in it;. More...
 
(BOOL) + zoneHasVirtualGoodsOffer:
 Use this method to query wether or not an ad zone has virtual goods content;. More...
 
(NSArray *) + GetAdZoneList
 Get a List of All active ad zones. More...
 
(void) + displayNotifications
 This method is used to display in-game Fuse notifications. More...
 
(BOOL) + isNotificationAvailable
 This method returns whether a Fuse notification is available to be viewed.
 
(void) + registerGender:
 This method registers a gender for the user. More...
 
(void) + registerAge:
 This method registers an age for the user. More...
 
(void) + registerBirthday:Month:Day:
 This method registers a user's birthday. More...
 
(NSString *) + getFuseID
 This method returns the public 'Fuse ID'. More...
 
(void) + gameCenterLogin:
 Game Center account registration. More...
 
(void) + facebookLogin:Name:withAccessToken:
 Facebook account registration. More...
 
(void) + facebookLogin:
 Facebook account registration. More...
 
(void) + facebookLogin:Name:Gender:withAccessToken:
 Facebook account registration. More...
 
(void) + twitterLogin:
 Twitter account registration. More...
 
(void) + twitterLogin:Alias:
 Twitter account registration with user name. More...
 
(void) + fuseLogin:Alias:
 Fuse account registration. More...
 
(void) + emailLogin:Alias:
 Account registration using an email address. More...
 
(void) + deviceLogin:
 Account registration using the unique device identifier. More...
 
(void) + googlePlayLogin:AccessToken:
 Account registration using the google play login identifier. More...
 
(NSString *) + getOriginalAccountID
 Get the original account ID used to log in to the Fuse system that corresponds to the Fuse ID. More...
 
(int) + getOriginalAccountType
 Get the original account type used to log in to the Fuse system that corresponds to the Fuse ID. More...
 
(NSString *) + getOriginalAccountAlias
 Get the original account alias of the user used to log in to the Fuse system. More...
 
(int) + gamesPlayed
 This method returns the amount of times the user has opened the application. More...
 
(NSString *) + libraryVersion
 This method returns the Fuse SDK version. More...
 
(BOOL) + connected
 This method indicates whether the application is connected to the internet. More...
 
(void) + utcTimeFromServer
 This method gets the UTC time from the server. More...
 
(BOOL) + notReadyToTerminate
 This method indicates whether the Fuse SDK has concluded all necessary work before being able to be closed. More...
 
(void) + disableData
 This method opts a user out of data being collected by the API. More...
 
(void) + enableData
 This method opts a user in so that data is collected by the API. More...
 
(BOOL) + dataEnabled
 This method indicates whether the user is opted-in to collecting data. More...
 
(void) + updateFriendsListFromServer
 Get a the user's friends list. More...
 
(NSMutableDictionary *) + getFriendsList
 This method returns the local friends list of the logged in user. More...
 
(void) + addFriend:
 This method is used to invite (add) a friend to the logged in user's friends list. More...
 
(void) + removeFriend:
 This method is used to delete a friend from the logged in user's friends list. More...
 
(void) + acceptFriend:
 This method is used to accept a friend request. More...
 
(void) + rejectFriend:
 This method is used to reject a friend request. More...
 
(void) + migrateFriends:
 This method is used to migrate (one-way) friends from an existing account to the logged in user's friends list. More...
 
(void) + userPushNotification:Message:
 Send an Apple push notification to another user. More...
 
(void) + friendsPushNotification:
 Send an Apple push notification to a user's entire friends list. More...
 
(void) + registerParentalConsent:
 Register the if the user has parental consent. More...
 
(BOOL) + registerCustomEvent:withInt:
 Register an integer value for a custom event that was defined on the Fuse Dashboard. More...
 
(BOOL) + registerCustomEvent:withString:
 Register a string value for a custom event that was defined on the Fuse Dashboard. More...
 
(void) + registerLevel:
 Register a custom event with an integer value. More...
 
(BOOL) + registerCurrency:Balance:
 Register a change in the current balances of the user's in-app currencies. More...
 
(NSString *) + getGameConfigurationValue:
 This method retrieves server configuration values. More...
 
(NSMutableDictionary *) + getGameConfiguration
 This method retrieves the entire server configuration value list. More...
 

Protected Attributes

NSObject< FuseDelegate > * delegate
 

Detailed Description

This is the main Fuse SDK static class.

Method Documentation

+ (void) acceptFriend: (NSString *)  _fuse_id

This method is used to accept a friend request.

The inviting of a friend is a two-step process. The first step is to actually invite the user (source user) using addFriend:, and the second step is the acceptance by the target user using this method. If a <FuseDelegate> has been registered using startSession:delegate:withOptions:, a callback can be made once the friend is accepted (in case a notification is required by the application).

To accept a user:

[FuseSDK acceptFriend:@"012345678"];

The (optional) callback to the <FuseDelegate> is as follows:

-(void) friendAccepted:(NSString*)_fuse_id Error:(NSError*)_error
{
// A friend has been marked as accepted on the server
// If [error intValue] != 0, an error has occurred
// Please see EFuseError for more information on all of the possible error codes
}
Parameters
_fuse_id[NSString*] This is the "Fuse ID" of the player being accepted
See also
+ startSession:delegate:withOptions: for information on setting up the <FuseDelegate>
+ addFriend: for more information on adding a friend and the handshaking process
FuseDelegate::friendAccepted:Error: for more information on the delegate method
Since
Fuse SDK version 1.22
+ (void) addFriend: (NSString *)  _fuse_id

This method is used to invite (add) a friend to the logged in user's friends list.

A friend is not added right away to the inviting user's list. Instead, there is a handshaking mechanism whereby the invited user needs to agree to the invite (see acceptFriend:) before both users are shown in each others list. If a <FuseDelegate> has been registered using startSession:delegate:withOptions:, a callback can be made once the friend is added (in case a notification is required by the application).

To add a friend:

[FuseSDK addFriend:@"012345678"];

The (optional) callback to the <FuseDelegate> is as follows:

-(void) friendAdded:(NSString*)_fuse_id Error:(NSError*)_error
{
// A friend has been added
// If [error intValue] != 0, an error has occurred
// Please see EFuseError for more information on all of the possible error codes
}
Parameters
_fuse_id[NSString*] This is the "Fuse ID" of the player being invited
See also
+ startSession:delegate:withOptions: for information on setting up the <FuseDelegate>
FuseDelegate::friendAdded:Error: for more information on the delegate method
Since
Fuse SDK version 1.22
+ (void) applicationdidFailToRegisterForRemoteNotificationsWithError: (NSError *)  error

This method is used to capture when the registration of a device token has failed.

Parameters
error[NSError*] This method should be called from your application delegate file application:didFailToRegisterForRemoteNotificationsWithError method:
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
[FuseSDK applicationdidFailToRegisterForRemoteNotificationsWithError:error];
}
Parameters
error[NSError*] The error passed to application:didFailToRegisterForRemoteNotificationsWithError
+ (void) applicationdidReceiveRemoteNotification: (NSDictionary *)  userInfo
Application: (UIApplication *)  application 

This method is used to capture when a user either receives an Apple push notification when the application is running or chooses to re-enter the application because of a click on an on-of-application notification .

This method is very important in determining the effectiveness of a push notification in terms of winning back users to the application. This method should be called from your application delegate file application:didFailToRegisterForRemoteNotificationsWithError method:

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
[FuseSDK applicationdidReceiveRemoteNotification:userInfo Application:application];
}
Parameters
userInfo[NSDictionary*] The information dictionary passed to application:didReceiveRemoteNotification
application[UIApplication*] The initiating UIApplication instance
See also
+ applicationdidRegisterForRemoteNotificationsWithDeviceToken: for more information on collecting tokens.
+ (void) applicationdidRegisterForRemoteNotificationsWithDeviceToken: (NSData *)  deviceToken

This method is used to pass the registered Apple push token to the Fuse servers for future push notification messaging.

This method should be called from your application delegate file application:didRegisterForRemoteNotificationsWithDeviceToken method:

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
[FuseSDK applicationdidRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}
Parameters
deviceToken[NSData*] The device token passed to application:didRegisterForRemoteNotificationsWithDeviceToken
+ (BOOL) connected

This method indicates whether the application is connected to the internet.

This method indicates if the application is connected via wifi or cellular network and connected to the internet. To use this method:

BOOL is_connected = [FuseSDK connected];
Return values
[BOOL]The connected status of the application
+ (BOOL) dataEnabled

This method indicates whether the user is opted-in to collecting data.

To see if a user has indicated whether they want data collected:

BOOL is_opted_in = [FuseSDK dataEnabled];
Return values
[BOOL]Indicates if the user has enabled data to be collected
+ (void) deviceLogin: (NSString *)  _alias

Account registration using the unique device identifier.

Uniquely track a user based upon their device identifier. This system can be used in conjunction with the 'set' and 'get' game data to persist per-user. However, this system cannot track users across devices since it is tied to a device. The main benefit to using this call to "log" a user in to the system is to avoid any other sign-in (like Facebook or Game Center).

To call this method:

[FuseSDK deviceLogin:@"Geronimo"];

If required, a callback is sent to the <FuseDelegate> (if registered) indicating that the Fuse system has received the login information.

-(void) accountLoginComplete:(NSNumber*)_type Account:(NSString*)_account_id;
Parameters
_alias[NSString*] The alias or 'handle' of the user
Since
Fuse SDK version 1.25
See also
+ startSession:delegate:withOptions: to see how to register a <FuseDelegate> object to receive the optional callback
- accountLoginComplete:Account: (FuseDelegate-p) to see more information on the account complete callback
+ getFuseID for more information on retrieving the user's Fuse ID once signed in
+ (void) disableData

This method opts a user out of data being collected by the API.

In accordance with Apple's terms of service, a user should always have the option to not have data collected on their play usage. To allow a user to opt out, call the following method:

While it is necessary to allow a user to opt in and out of data collection, the implementation of this method is optional as there is another way to allow a user to stop data collection. By using a settings bundle, which appears in the "Settings" menu for the application, data collection can be toggled without adding any code in the binary. Many developers find this an easier and less intrusive way to integrate this feature. This file can be found on the dashboard in the "Integrate API" section, or at this link:

https://www.fuseboxx.com/api/Settings.bundle.zip

See also
+ enableData to understand how to enable collecting data
Download https://www.fuseboxx.com/api/Settings.bundle.zip to integrate the settings bundle and avoid having to implement this method
+ (void) displayNotifications

This method is used to display in-game Fuse notifications.

The Fuse notification system can be used to deliver textual system notifications to your users, promoting features of your application for example or promoting another application. In addition, the Fuse system automatically configures notifications to rate your application in the App Store as well as upgrade your application when a new version is released. It is best to call this method early in the application flow of your game, preferably on your main menu. Optionally, an action can be assigned to the closing of the dialog to notify the application that an internal action should be taken. In this case, the notificationAction: (FuseDelegate-p) method would be called when the dialog is closing (only if the affirmative button is pressed).

To display notifications:

See also
- notificationAction: (FuseDelegate-p) for more information on handling internal actions
+ (void) emailLogin: (NSString *)  _email
Alias: (NSString *)  _alias 

Account registration using an email address.

Uniquely track a user across devices by passing an email address for a user. This system can be used in conjunction with the 'set' and 'get' game data to persist per-user information across devices.

To call this method:

[FuseSDK emailLogin:@"honky@gmail.com" Alais:@"Geronimo"];

If required, a callback is sent to the <FuseDelegate> (if registered) indicating that the Fuse system has received the login information.

-(void) accountLoginComplete:(NSNumber*)_type Account:(NSString*)_account_id;
Parameters
_email[NSString*] This is the email address of the user signed in to the Fuse system
_alias[NSString*] The alias or 'handle' of the user
Since
Fuse SDK version 1.25
See also
+ startSession:delegate:withOptions: to see how to register a <FuseDelegate> object to receive the optional callback
- accountLoginComplete:Account: (FuseDelegate-p) to see more information on the account complete callback
+ getFuseID for more information on retrieving the user's Fuse ID once signed in
+ (void) enableData

This method opts a user in so that data is collected by the API.

To allow a user to opt in, call the following method:

See also
+ disableData to understand how to disable collecting data and more information on using the settings bundle
Download https://www.fuseboxx.com/api/Settings.bundle.zip to integrate the settings bundle and avoid having to implement this method
+ (void) facebookLogin: ((deprecated))  __attribute__

Facebook account registration.

Uniquely track a user across devices by passing Facebook login information of a user. This system can be used in conjunction with the 'set' and 'get' game data to persist per-user information across devices.

To call this method:

[FuseSDK facebookLogin:@"facebook_id"];

If required, a callback is sent to the <FuseDelegate> (if registered) indicating that the Fuse system has received the login information.

-(void) accountLoginComplete:(NSNumber*)_type Account:(NSString*)_account_id;
Parameters
_facebook_id[NSString*] This is the account id of the user signed in to Facebook (e.g. 122611572)
Since
Fuse SDK version 1.14
See also
+ startSession:delegate:withOptions: to see how to register a <FuseDelegate> object to receive the optional callback
- accountLoginComplete:Account: (FuseDelegate-p) to see more information on the account complete callback
Deprecated:
Since FuseSDK version 1.23. See facebookLogin:Name:withAccessToken: for more information on new method.
+ (void) facebookLogin: (NSString *)  _facebook_id
Name: (NSString *)  _name
Gender: (int)  _gender
withAccessToken: (NSString *)  _accesstoken 

Facebook account registration.

Uniquely track a user across devices by passing Facebook login information of a user. This system can be used in conjunction with the 'set' and 'get' game data to persist per-user information across devices. Use this version if the gender of the player is known.

To call this method:

[FuseSDK facebookLogin:@"facebook_id", Name:"Jon Bon" Gender:2 withAccessToken:@"8971634a47d0b"];

If required, a callback is sent to the <FuseDelegate> (if registered) indicating that the Fuse system has received the login information.

-(void) accountLoginComplete:(NSNumber*)_type Account:(NSString*)_account_id;
Parameters
_facebook_id[NSString*] This is the account id of the user signed in to Facebook (e.g. 122611572)
_name[NSString*] The first and last name of the user (i.e. "Jon Jovi"). Can be "" or nil if unknown.
_gender[int] The suspected gender of the user. Please see kFuseGender for more information on the gender enumerated type.
_accesstoken[NSString*] This is the access token generated if a user signs in to a facebook app on the device (can be "" or nil if not available)
See also
+ startSession:delegate:withOptions: to see how to register a <FuseDelegate> object to receive the optional callback
- accountLoginComplete:Account: (FuseDelegate-p) to see more information on the account complete callback
Since
Fuse SDK version 1.23
+ (void) facebookLogin: (NSString *)  _facebook_id
Name: (NSString *)  _name
withAccessToken: (NSString *)  _accesstoken 

Facebook account registration.

Uniquely track a user across devices by passing Facebook login information of a user. This system can be used in conjunction with the 'set' and 'get' game data to persist per-user information across devices.

To call this method:

[FuseSDK facebookLogin:@"facebook_id"];

If required, a callback is sent to the <FuseDelegate> (if registered) indicating that the Fuse system has received the login information.

-(void) accountLoginComplete:(NSNumber*)_type Account:(NSString*)_account_id;
Parameters
_facebook_id[NSString*] This is the account id of the user signed in to Facebook (e.g. 122611572)
_name[NSString*] The first and last name of the user (i.e. "Jon Jovi"). Can be "" or nil if unknown.
_accesstoken[NSString*] This is the access token generated if a user signs in to a facebook app on the device (can be "" or nil if not available)
See also
+ startSession:delegate:withOptions: to see how to register a <FuseDelegate> object to receive the optional callback
- accountLoginComplete:Account: (FuseDelegate-p) to see more information on the account complete callback
Since
Fuse SDK version 1.23
+ (void) friendsPushNotification: (NSString *)  _message

Send an Apple push notification to a user's entire friends list.

Similar to userPushNotification:Message:, this method sends the same message to each user in the source user's friends list.

To send this type of push notification:

[FuseSDK friendsPushNotification:@"Test Push Message Friends List"];
Parameters
_message[NSString*] The message to be sent to the user (max 256 characters)
See also
+ userPushNotification:Message: for more information on sending a push notification
Since
Fuse SDK version 1.22
+ (void) fuseLogin: (NSString *)  _fuse_id
Alias: (NSString *)  _alias 

Fuse account registration.

Uniquely track a user across devices by passing Fuse login information of a user. This system can be used in conjunction with the 'set' and 'get' game data to persist per-user information across devices.

The Fuse ID is a nine-digit numeric value that is unique to every signed-in player (but not unique to device). Note that this method required UI elements to allow a user to provide credentials to log in, and is currently not implemented.

To call this method:

[FuseSDK fuseLogin:@"012345678"];

If required, a callback is sent to the <FuseDelegate> (if registered) indicating that the Fuse system has received the login information.

-(void) accountLoginComplete:(NSNumber*)_type Account:(NSString*)_account_id;
Parameters
_fuse_id[NSString*] This is the account id of the user signed in to the Fuse system
_alias[NSString*] The alias or 'handle' of the user
Since
Fuse SDK version 1.14
See also
+ startSession:delegate:withOptions: to see how to register a <FuseDelegate> object to receive the optional callback
- accountLoginComplete:Account: (FuseDelegate-p) to see more information on the account complete callback
+ getFuseID for more information on retrieving the user's Fuse ID once signed in
+ (void) gameCenterLogin: (GKLocalPlayer *)  _lp

Game Center account registration.

Uniquely track a user across devices by passing Game Center login information of a user. This system can be used in conjunction with the 'set' and 'get' game data to persist per-user information across devices.

To register the account information, pass the Game Center object as follows as soon as the user has been confirmed to have logged in. This example shows the Fuse SDK method being called in sample Game Center login code:

GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer];
[localPlayer authenticateWithCompletionHandler:^(NSError *error)
{
if (localPlayer.isAuthenticated)
{
[FuseSDK gameCenterLogin:localPlayer];
}
}];

If required, a callback is sent to the <FuseDelegate> (if registered) indicating that the Fuse system has received the login information.

-(void) accountLoginComplete:(NSNumber*)_type Account:(NSString*)_account_id;
Parameters
_lp[GKLocalPlayer*] This is the returned Game Center object from the Game Center completion handler
Since
Fuse SDK version 1.14
See also
+ startSession:delegate:withOptions: to see how to register a <FuseDelegate> object to receive the optional callback
- accountLoginComplete:Account: (FuseDelegate-p) to see more information on the account complete callback
+ (int) gamesPlayed

This method returns the amount of times the user has opened the application.

Call this method to get the number of times the application has been opened either from the Springboard of system tray (minimized)

int played = [FuseSDK gamesPlayed];
Return values
[int]The number of times the application has been opened
+ (NSArray*) GetAdZoneList

Get a List of All active ad zones.

This returns a list of adzones currently setup for displaying ads. It's primary function is developer side debugging in nature, as disabled or empty Adzones should be omitted.

NSArray* adZoneList = [FuseSDK GetAdZoneList]
Since
Fuse SDK version 2.0.0
+ (NSMutableDictionary*) getFriendsList

This method returns the local friends list of the logged in user.

Similar to updateFriendsListFromServer, this method merely returns the local copy of the friends list. The local version of the list can differ from the server version in two ways. Firstly, friends could accept an invite in another device, clearing both users to show up in each other's list. This server updated is not signaled to the client devices. Secondly, given that there are propagation delays and HTTP request ordering issues, any "action" (adding a friend, accepting or deleting) will take a few seconds to reach the server. A request to get the server version very close to one of these actions could result in the list not being representative of the final list.

To get the local friends list:

NSMutableDictionary *local_friends_list = [FuseSDK getFriendsList];
Return values
[NSMutableDictionary*]The local version of the user's friends list
See also
+ updateFriendsListFromServer for more information on retrieving the list from the Fuse servers and the format of the friends list dictionary
Since
Fuse SDK version 1.22
+ (NSString*) getFuseID

This method returns the public 'Fuse ID'.

After a user has registered a login for one of the supported services (i.e. Game Center, etc), a 9-digit 'Fuse ID' is generated that uniquely identifies the user. This ID can be passed between users as a public ID for the Fuse system so that user's can interact (i.e. invite as friends, etc.) without exposing confidential account information.

NSString *my_fuse_id = [FuseSDK getFuseID];
See also
+ gameCenterLogin: for more information on how to register a login with a Game Center ID
+ facebookLogin: for more information on how to register a login with a Facebook account ID
+ twitterLogin: for more information on how to register a login with a Twitter account ID
openFeintLogin: for more information on how to register a login with an OpenFeint account ID
+ fuseLogin:Alias: for more information on how to register a login with a Fuse ID
Return values
[NSString*]The 9-digit Fuse ID. This ID is strictly comprised of integers, but do not cast this value to an integer because a valid ID could have leading zeroes.
Since
Fuse SDK version 1.21
+ (NSMutableDictionary*) getGameConfiguration

This method retrieves the entire server configuration value list.

The Fuse SDK provides a method to store game configuration variables that are provided to the application on start. These are different than "Game Data" values since they are stored on a per-game basis, and not a per-user basis.

In the Fuse dashboard, navigate to the 'configuration' tab in your game view. You can edit the "Game Data" section by adding keys and associated data values. Values can be 256 characters in length and support UTF-8 characters.

NSMutableDictionary *my_vals = [FuseSDK getGameConfiguration];
if (my_vals != nil)
{
// always check against 'nil' before using the value
}

Values are update in the client each time a session is started from the Springboard or system tray. To find out when values are valid in the device, you can use the following <FuseDelegate> callback method that indicates when the values are ready to be inspected.

BOOL has_game_config_returned = NO;
-(void) gameConfigurationReceived
{
has_game_config_returned = YES;
// You can now access your updated server-side data, either here or somewhere else in your code
NSMutableDictionary *my_vals = [FuseSDK getGameConfiguration];
if (my_vals != nil && [my_vals count] > 0)
{
NSArray *keys = [my_vals allKeys];
for (int i = 0; i < [keys count]; i++)
{
NSString *key = [keys objectAtIndex:i];
NSString *value = [my_vals objectForKey:key];
NSLog(@"Key: %@, Value: %@", key, value);
}
}
}

It is recommended that a default value be present on the device in case the user has not or never connects to the Internet.

Return values
[NSMutableDictionary*] The game configuration exists in the returned NSMutableDictionary
See also
+ startSession:delegate:withOptions: for information on setting up the <FuseDelegate>
+ (NSString*) getGameConfigurationValue: (NSString *)  _key

This method retrieves server configuration values.

The Fuse SDK provides a method to store game configuration variables that are provided to the application on start. These are different than "Game Data" values since they are stored on a per-game basis, and not a per-user basis.

In the Fuse dashboard, navigate to the 'configuration' tab in your game view. You can edit the "Game Data" section by adding keys and associated data values. Values can be 256 characters in length and support UTF-8 characters.

NSString *my_val = [FuseSDK getGameConfigurationValue:@"my_key"];
if (my_val != nil)
{
// always check against 'nil' before using the value
}

Values are update in the client each time a session is started from the Springboard or system tray. To find out when values are valid in the device, you can use the following <FuseDelegate> callback method that indicates when the values are ready to be inspected.

BOOL has_game_config_returned = NO;
-(void) gameConfigurationReceived
{
has_game_config_returned = YES;
// You can now access your updated server-side data, either here or somewhere else in your code
NSString *funny_val = [FuseSDK getGameConfigurationValue:@"not_funny"];
}

It is recommended that a default value be present on the device in case the user has not or never connects to the Internet.

Parameters
_key[NSString*] This is the key for which the value is requested.
Return values
[NSString*]This is the value for the corresponding key.
See also
+ startSession:delegate:withOptions: for information on setting up the <FuseDelegate>
+ (FuseIAPOfferObject*) getIAPOfferInfoForZoneID: (NSString *)  _zoneID

This Method returns the FuseIAPOfferObject for a given zoneID, or nil if there is no IAP offer available.

If a zone currently contains a IAP offer, that information will be passed back.

FuseIAPOfferObject * zoneReward = [FuseSDK getIAPOfferInfoForZoneID:@"zoneID"];
Parameters
_zoneID(NSString*)the name to the ad zone to get the reward object from. May be nil, will use default ad zone.
Returns
a FuseIAPOfferObject with the offer information
Since
Fuse SDK version 2.2.0
+ (NSString*) getOriginalAccountAlias

Get the original account alias of the user used to log in to the Fuse system.

This method returns the original user alias.

To call this method

NSString *alias = [FuseSDK getOriginalAccountAlias];
Return values
[NSString*]The user's account alias (i.e. T-Bone300)
See also
+ getOriginalAccountID to get the ID associated with the account type
+ getOriginalAccountType to get the type associated with the account ID
Since
Fuse SDK version 1.29
+ (NSString*) getOriginalAccountID

Get the original account ID used to log in to the Fuse system that corresponds to the Fuse ID.

This method returns the original parameter used to create the user account session.

To call this method

NSString *originalID = [FuseSDK getOriginalAccountID];
Return values
[NSString*]The original account ID used to sign in to the fuse system (for instance 122611572 if the user is signed in using Facebook)
See also
+ getOriginalAccountType to get the type associated with the account ID
+ getOriginalAccountAlias to get the alias associated with the account ID
Since
Fuse SDK version 1.23
+ (int) getOriginalAccountType

Get the original account type used to log in to the Fuse system that corresponds to the Fuse ID.

This method returns the type of account used to create the user account session.

To call this method

// where type corresponds to the following enum:
enum kFuseAccountType
{
FUSE_ACCOUNT_NONE = 0,
FUSE_GAMECENTER = 1,
FUSE_FACEBOOK = 2,
FUSE_TWITTER = 3,
FUSE_OPENFEINT = 4,
FUSE_USER = 5,
FUSE_EMAIL = 6,
FUSE_DEVICE_ID = 7,
FUSE_GOOGLE_PLAY = 8
};
Return values
[int]The original account type used to sign in to the fuse system (for instance 4 if the user is signed in using Facebook)
See also
+ getOriginalAccountID to get the ID associated with the account type
+ getOriginalAccountAlias to get the alias associated with the account ID
Since
Fuse SDK version 1.23
+ (FuseRewardedObject*) getRewardedInfoForZoneID: (NSString *)  _zoneID

This Method returns the FuseRewardedObject for a given zoneID, or nil if there is no rewards available.

If a zone is configured to show rewarded videos, this will return an object containing those details.

FuseRewardedObject * zoneReward = [FuseSDK getRewardedInfoForZoneID:@"zoneID"];
Parameters
_zoneID(NSString*)the name to the ad zone to get the reward object from. May be nil, will use default ad zone.
Returns
a FuseRewardedObject with the reward information
Since
Fuse SDK version 2.0.0
+ (FuseVirtualGoodsOfferObject*) getVirtualGoodsOfferInfoForZoneID: (NSString *)  _zoneID

This Method returns the FuseRewardedObject for a give zoneID, or nil if there is Virtual Good offer available.

If a zone currently contains a Virtual Goods offer, that information will be passed back.

FuseVirtualGoodsOfferObject * zoneReward = [FuseSDK getVirtualGoodsOfferInfoForZoneID:@"zoneID"];
Parameters
_zoneID(NSString*)the name to the ad zone to get the reward object from. May be nil, will use default ad zone.
Returns
a FuseVirtualGoodsOfferObject with the offer information
Since
Fuse SDK version 2.2.0
+ (void) googlePlayLogin: (NSString *)  _alias
AccessToken: (NSString *)  _token 

Account registration using the google play login identifier.

Uniquely track a user based upon their google play identifier. This system can be used in conjunction with the 'set' and 'get' game data to persist per-user. When signing in to the Google Play system, the kGTLAuthScopePlusLogin scope must be specified to get the user's friends list:

GPPSignIn *signIn = [GPPSignIn sharedInstance]; signIn.clientID = kClientId; signIn.scopes = [NSArray arrayWithObjects: kGTLAuthScopePlusLogin, nil];

To call this method:

-(void)finishedWithAuth: (GTMOAuth2Authentication *)auth error: (NSError *)error
{
// Ensure we have no errors and we have a valid auth object
if (error.code == 0 && auth) {
[FuseSDK googlePlayLogin:@"TommyBoy" AccessToken:[auth accessToken]];
...
} else {
...
}
}

If required, a callback is sent to the <FuseDelegate> (if registered) indicating that the Fuse system has received the login information.

-(void) accountLoginComplete:(NSNumber*)_type Account:(NSString*)_account_id;
Parameters
_alias[NSString*] The alias or 'handle' of the user
_token[NSString*] The user's access token. Used to retrieve friends lists
See also
+ startSession:delegate:withOptions: to see how to register a <FuseDelegate> object to receive the optional callback
- accountLoginComplete:Account: (FuseDelegate-p) to see more information on the account complete callback
+ getFuseID for more information on retrieving the user's Fuse ID once signed in
Since
Fuse SDK version 1.29
+ (BOOL) isAdAvailableForZoneID: (NSString *)  _zoneID

This method returns if an ad was loaded in a particular zone.

This method is optional and can be used to test if an ad has been loaded and is known to be ready to show by the Fuse system before attempting to show an ad to the user. If an ad is shown without an ad unit available, the window will be dismissed.

if([FuseSDK isAdAvailableInZone:@"zoneID"])
{
[FuseSDK showAdForZoneID:@"zoneID" options:nil];
}
Parameters
_zoneID[NSString*] The name of the ad zone to display. You can configure different zones via the Fuse Dashboard. May be nil, will use default ad zone
+ (NSString*) libraryVersion

This method returns the Fuse SDK version.

Call this method if it is required to know the Fuse SDK version.

NSString *api_ver = [FuseSDK libraryVersion];
Return values
[NSString*]The API version of the form '2.0.0'
+ (void) migrateFriends: (NSString *)  _fuse_id

This method is used to migrate (one-way) friends from an existing account to the logged in user's friends list.

In the case where a user is transferring between two different account types, this method allows the users's friends to be added to the target account. If a <FuseDelegate> has been registered using startSession:delegate:withOptions:, a callback can be made once the friends are migrated (in case a notification is required by the application). Please use this function with caution as it is one-way. Friends from the previos account will be permanently moved and will not remain in the previous account.

To migrate friends:

[FuseSDK migrateFriends:@"012345678"];

The (optional) callback to the <FuseDelegate> is as follows:

-(void) friendsMigrated:(NSString*)_fuse_id Error:(NSError*)_error
{
// A friend has been added
// If [error intValue] != 0, an error has occurred
// Please see EFuseError for more information on all of the possible error codes
}
Parameters
_fuse_id[NSString*] This is the "Fuse ID" of the player whose friends are being migrated to the logged in account
See also
+ startSession:delegate:withOptions: for information on setting up the <FuseDelegate>
FuseDelegate::friendsMigrated:Error: for more information on the delegate method
Since
Fuse SDK version 1.34
+ (BOOL) notReadyToTerminate

This method indicates whether the Fuse SDK has concluded all necessary work before being able to be closed.

BOOL is_not_done = [FuseSDK notReadyToTerminate];
Return values
[BOOL]Indicates wether the Fuse SDK is still working on sending out final requests.
+ (void) preloadAdForZoneID: (NSString *)  _adZone

This method loads an ad and reports if it is available to be shown to the user for the specified ad zone.

This method is optional and can be used to load if an ad in the Fuse system before attempting to show an ad to the user. If an ad is shown (using showAdForZoneID:options:) without an ad unit available, the window will be dismissed. To call this method:

[FuseSDK preloadAdForZoneID:@"zoneID"];

The response to this method is sent using the <FuseDelegate> protocol method adAvailabilityResponse:Error. Note that a <FuseDelegate> object must be registered using startSession: to receive this callback.

Parameters
_adZone(NSString*) the zoneID to preload an ad for. May be nil, will use default ad zone.
See also
+ startSession:delegate:withOptions: to see how to register a <FuseDelegate> object to receive the optional callback
Since
Fuse SDK version 2.0.0
+ (void) registerAge: (int)  _age

This method registers an age for the user.

If an age is known for a user, call the following method to assign an age to the user:

[FuseSDK registerAge:24];
Parameters
_age[int] The age of the user, in years
+ (void) registerBirthday: (int)  _year
Month: (int)  _month
Day: (int)  _day 

This method registers a user's birthday.

If the birthday of a user in known for a user, call the following method to assign their birthday:

[FuseSDK registerBithday:1978 Month:7 Day:9];
Parameters
_year[int] The year in which the user was born
_month[int] The month in which the user was born
_day[int] The day on which the user was born
+ (void) registerCrash: (NSException *)  _exception

This method is used to catch crashes within an app.

The registerCrash method should be used within a declare exception handler to send information in the case of a crash. This method will only be able to catch certain types of failures, as it is dependent upon where the crash happens whether the application will use this handler.

Add the following line to register an uncaught exception listener in your application delegate:

-(void) applicationDidFinishLaunching:(UIApplication *)application
{
...
NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler);
...
}

Now create a method that corresponds to the registered uncaught exception listener and put it at the top of the application delegate (outside of the class declaration).

void uncaughtExceptionHandler(NSException *exception)
{
[FuseSDK registerCrash:exception];
}
Parameters
_exception[NSException *] The exception object passed to the exception handler method by the system.
+ (BOOL) registerCurrency: (int)  _currencyType
Balance: (int)  _balance 

Register a change in the current balances of the user's in-app currencies.

To better track the currency levels of your users, this method can be used to keep the system up-to-date as to the levels of currencies across your users.

[FuseSDK registerCurrency:2 Balance:115];
Parameters
_currencyType[int] Enter 1-4, representing up to four different in-app resources. These values can be set specific to the application.
_balance[int] The updated balance of the user
Return values
[BOOL]Returns YES if the _currencyType is within the valid range
Since
Fuse SDK version 1.25
+ (BOOL) registerCustomEvent: (int)  _eventNumber
withInt: (int)  _value 

Register an integer value for a custom event that was defined on the Fuse Dashboard.

Tracks integer values for custom events. Note: Custom events can only accept integer values or string values, but not both. If you pass an integer value to an event that only accepts strings, then the value will not be stored on the server.

BOOL succeeded = [FuseSDK registerCustomEvent:1 withInt:42];
Parameters
_eventNumber[int] The ID for the custom event as defined on the Fuse Dashboard
_value[int] The integer value to set for this custom event
Return values
[BOOL]Returns YES if the custom event accepts integer values
Since
Fuse SDK version 2.1.0
+ (BOOL) registerCustomEvent: (int)  _eventNumber
withString: (NSString *)  _value 

Register a string value for a custom event that was defined on the Fuse Dashboard.

Tracks string values for custom events. Note: Custom events can only accept integer values or string values, but not both. If you pass a string value to an event that only accepts integers, then the value will not be stored on the server.

BOOL succeeded = [FuseSDK registerCustomEvent:3 withString:@"This is a custom event"];
Parameters
_eventNumber[int] The ID for the custom event as defined on the Fuse Dashboard
_value[NSString*] A string value for the custom event. The string can have a maximum of 255 characters
Return values
[BOOL]Returns YES if the custom event accepts string values
Since
Fuse SDK version 2.1.0
+ (int) registerEvent: (NSString *)  _name
ParameterName: (NSString *)  _param_name
ParameterValue: (NSString *)  _param_value
VariableName: (NSString *)  _variable_name
VariableValue: ((deprecated))  __attribute__ 

This method will send a named event (with values) to the Fuse system for tracking.

Similar to the above method which sends named events to the Fuse system using a dictionary, this method only allows one variable name and value to be sent.

// with variables
[FuseSDK registerEvent:@"Levels" ParameterName:@"Level" ParameterValue:@"1" VariableName:@"Coins" VariableValue:256];
// with no variables
[FuseSDK registerEvent:@"System" ParameterName:@"Tutorial Level Reached" ParameterValue:@"2" VariableName:nil VariableValue:nil];
// with no parameters
[FuseSDK registerEvent:@"Tutorial Finished" ParameterName:nil ParameterValue:nil VariableName:nil VariableValue:nil];

The maximum length of a registered event is 256 characters, and each application is limited to a maximum 1,000 separate named events.

Parameters
_name[NSString*] The event group name (i.e. "Levels")
_param_name[NSString*] The event parameter name (i.e. "Level")
_param_value[NSString*] The event parameter value (i.e. "1")
_variable_name[NSString *] The name of the variable being logged (i.e. "Coins")
_variable_value[NSNumber*] The value of the event being logged (i.e. 10)
Return values
[int]Indicates whether the event information is valid. Corresponds to EFuseError.
See also
registerEvent:ParameterName:ParameterValue:Values: to see how to call the same method more efficiently with a dictionary (when calling multiple times with the same parameters)
Since
FuseSDK version 1.26
+ (int) registerEvent: (NSString *)  _name
ParameterName: (NSString *)  _param_name
ParameterValue: (NSString *)  _param_value
Variables: ((deprecated))  __attribute__ 

This method will send a named event (with values) to the Fuse system for tracking.

To log a named event in the fuse system, you can make the following method calls. Note that any variable value sent will be summed in the Fuse system, while the other parameters will be counted.

// with a dictionary
NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithInt:256], @"Coins",
[NSNumber numberWithInt:1000], @"XP",
[NSNumber numberWithFloat:20.5f], @"Frame Rate",
nil];
[FuseSDK registerEvent:@"Levels" ParameterName:@"Level" ParameterValue:@"1" Variables:dict];
// with no dictionary
[FuseSDK registerEvent:@"System" ParameterName:@"Tutorial Level Reached" ParameterValue:@"2" Variables:nil];
// with no parameters
[FuseSDK registerEvent:@"Tutorial Finished" ParameterName:nil ParameterValue:nil Variables:nil];

The maximum length of a registered event is 256 characters, and each application is limited to a maximum 1,000 separate named events.

Parameters
_name[NSString*] The event group name (i.e. "Levels")
_param_name[NSString*] The event parameter name (i.e. "Level")
_param_value[NSString*] The event parameter value (i.e. "1")
_variables[NSDictionary*] A list of key value pairs of variable names and values
Return values
[int]Indicates whether the event information is valid. Corresponds to EFuseError.
Since
FuseSDK version 1.26
+ (int) registerEvent: (NSString *)  _message
withDict: ((deprecated))  __attribute__ 

This method is used to register an named event in the Fuse system.

This method logs the time and frequency of an event within a given game session. The input string can be anything that is relevant to the design of the game but should be easily understandable when read by users in the Fuse system.

It is advisable to avoid recording events at a high rate as this could negatively impact both application and server performance. For example, a good practice would be to issue an event at the start of a level (i.e. 'Level 1') or when a purchase is made. It would be unadvisable to issue any event in each draw loop as this would create a tremendous amount of overhead and server traffic.

The maximum length of a registered event is 256 characters, and each application is limited to a maximum 1,000 separate named events.

An example call would be:

[FuseSDK registerEvent:@"Level 1 Started" withDict:myValues];
Parameters
_message[NSString*] The event name to be logged
_dict[NSDictionary*] A dictionary of values associated with the event
Return values
[int]Indicates whether the event information is valid. Corresponds to EFuseError.
+ (void) registerForPushToken

This method is used to manually register for a push notification device token.

This method should only be called if kFuseSDKOptionKey_RegisterForPush was set to during start session

NSDictionary* fuseOptions = @{kFuseSDKOptionKey_RegisterForPush : NO};
[FuseSDK startSession:@"YOUR_APP_ID" delegate:fuse_delegate withOptions:fuseOptions];
...
...
+ (void) registerForPushToken: (NSSet *)  _categories

This method is used to manually register for a push notification device token.

This method should only be called if kFuseSDKOptionKey_RegisterForPush was set to during start session

Parameters
_categories[NSSet*] Group of UIUserNotificationCategory objects for
NSDictionary* fuseOptions = @{kFuseSDKOptionKey_RegisterForPush : NO};
[FuseSDK startSession:@"YOUR_APP_ID" delegate:fuse_delegate withOptions:fuseOptions];
...
...
//Create your categories here
+ (void) registerGender: (int)  _gender

This method registers a gender for the user.

If a gender is known or suspected for a user, call the following method to assign a gender to the user:

[FuseSDK registerGender:FUSE_GENDER_FEMALE];
// The enumerated type definition is as follows:
enum kFuseGender
{
FUSE_GENDER_UNKNOWN = 0,
FUSE_GENDER_MALE,
FUSE_GENDER_FEMALE,
FUSE_GENDER_UNDECIDED,
FUSE_GENDER_WITHHELD
};
Parameters
_gender[int] The enumerated gender of the user
+ (void) registerInAppPurchase: (SKPaymentTransaction *)  _transaction

This method records in-app purchases in the Fuse system.

Call this method directly after an in-app purchase is made once it has been confirmed that the transaction has occurred successfully. Optimally, this should be done in the recordTransaction method in your SKPaymentTransactionObserver delegate. A callback is sent to the <FuseDelegate> delegate indicating whether the transaction was confirmed by Apple's in-app purchase system or whether it should be treated as suspect (optional).

-(void) recordTransaction:(SKPaymentTransaction *)transaction
{
[FuseSDK registerInAppPurchase:transaction];
...
}
Parameters
_transaction[SKPaymentTransaction *] The transaction object sent to the delegate once a purchase has been completed.
See also
- purchaseVerification:TransactionID:OriginalTransactionID: (FuseDelegate-p) for more information on the <FuseDelegate> callback indicating whether the transaction was verified by Apple's servers
+ (void) registerInAppPurchase: (NSData *)  _receipt_data
TxState: (NSInteger)  _tx_state
Price: (NSString *)  _price
Currency: (NSString *)  _currency
ProductID: ((deprecated))  __attribute__ 

This method records in-app purchases in the Fuse system without using the SKPaymentTransaction data type.

Call this method directly after an in-app purchase is made once it has been confirmed that the transaction has occurred successfully. Optimally, this should be done in the recordTransaction method in your SKPaymentTransactionObserver delegate. However, since this version does not use the SKPaymentTransaction object, call this at the appropriate point just after a transaction has been completed by the user. If SKPaymentTransaction is available, this function should use the registerInAppPurchase: method (that function is used in conjuntion with registerInAppPurchaseList: to automatically select the price and currency). A callback is sent to the <FuseDelegate> delegate indicating whether the transaction was confirmed by Apple's in-app purchase system or whether it should be treated as suspect (optional).

-(void) recordTransaction:(SKPaymentTransaction *)transaction
{
[FuseSDK registerInAppPurchase:transaction.transactionReceipt TxState:transaction.transactionState Price:@"10.99" Currency:@"USD" ProductID:transaction.payment.productIdentifier];
...
}
Parameters
_receipt_data[NSData *] The data payload associated with the purchase. This corresponds to the transactionReceipt member of the SKPaymentTransaction class.
_tx_state[NSInteger] The transaction state of the purchase. This corresponds to the transactionState member of the SKPaymentTransaction class.
_price[NSString *] The price, without the currency symbol. (i.e. "1.99")
_currency[NSString *] The currency of the transaction. This must be of the form "USD" or "CAD" (for example) which correspond to ISO 4217 specifications.
_product_id[NSString *] The product ID of the transaction. This corresponds to the payment.productIdentifier field of the SKPaymentTransaction class.
See also
- purchaseVerification:TransactionID:OriginalTransactionID: (FuseDelegate-p) for more information on the <FuseDelegate> callback indicating whether the transaction was verified by Apple's servers
http://en.wikipedia.org/wiki/ISO_4217 for more information on ISO 4217 currency codes.
+ registerInAppPurchase: for more information on calling this function with the SKPaymentTransaction object.
https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html For information how to collect Receipt Data
Since
Fuse SDK version 1.29
+ (void) registerInAppPurchase: (NSData *)  _receipt_data
TxState: (NSInteger)  _tx_state
Price: (NSString *)  _price
Currency: (NSString *)  _currency
ProductID: (NSString *)  _product_id
TransactionID: (NSString *)  _tx_id 

This method records in-app purchases in the Fuse system without using the SKPaymentTransaction data type.

Call this method directly after an in-app purchase is made once it has been confirmed that the transaction has occurred successfully. Optimally, this should be done in the recordTransaction method in your SKPaymentTransactionObserver delegate. However, since this version does not use the SKPaymentTransaction object, call this at the appropriate point just after a transaction has been completed by the user. If SKPaymentTransaction is available, this function should use the registerInAppPurchase: method (that function is used in conjuntion with registerInAppPurchaseList: to automatically select the price and currency). A callback is sent to the <FuseDelegate> delegate indicating whether the transaction was confirmed by Apple's in-app purchase system or whether it should be treated as suspect (optional).

-(void) recordTransaction:(SKPaymentTransaction *)transaction
{
[FuseSDK registerInAppPurchase:transaction.transactionReceipt TxState:transaction.transactionState Price:@"10.99" Currency:@"USD" ProductID:transaction.payment.productIdentifier];
...
}
Parameters
_receipt_data[NSData *] The data payload associated with the purchase. This corresponds to the transactionReceipt member of the SKPaymentTransaction class.
_tx_state[NSInteger] The transaction state of the purchase. This corresponds to the transactionState member of the SKPaymentTransaction class.
_price[NSString *] The price, without the currency symbol. (i.e. "1.99")
_currency[NSString *] The currency of the transaction. This must be of the form "USD" or "CAD" (for example) which correspond to ISO 4217 specifications.
_product_id[NSString *] The product ID of the transaction. This corresponds to the payment.productIdentifier field of the SKPaymentTransaction class.
_tx_id[NSString *] The transaction ID of the purchase. This corresponds to the transactionIdentifier member of the SKPaymentTransaction class.
See also
- purchaseVerification:TransactionID:OriginalTransactionID: (FuseDelegate-p) for more information on the <FuseDelegate> callback indicating whether the transaction was verified by Apple's servers
http://en.wikipedia.org/wiki/ISO_4217 for more information on ISO 4217 currency codes.
+ registerInAppPurchase: for more information on calling this function with the SKPaymentTransaction object.
https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html For information how to collect Receipt Data
Since
Fuse SDK version 1.29
+ (void) registerInAppPurchaseList: (SKProductsResponse *)  _response

This method is used to register the price and currency that a user is using to make an in-app purchase.

After receiving the list of in-app purchases from the Apple system, this method can be called to record the localized item information. To do this, place the following method call in productsRequest delegate method in your SKProducsRequestDelegate delegate:

- (void) productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
[FuseSDK registerInAppPurchaseList:response];
...
}
Parameters
_response[SKProductsResponse *] The response object from Apple's StoreKit request to get item availability and information.
+ (void) registerLevel: (int)  _level

Register a custom event with an integer value.

This method can specifically track user levels to more accurately measure application penetration

[FuseSDK registerLevel:5];
Parameters
_level[int] The player's new level
Since
Fuse SDK version 1.25
+ (void) registerParentalConsent: (BOOL)  _consent

Register the if the user has parental consent.

This method tracks if parental consent has been obtained

[FuseSDK registerParentalConsent:YES];
Parameters
_consent[BOOL] If the user has parental consent
Since
Fuse SDK version 2.1.0
+ (void) registerVirtualGoodsPurchase: (int)  _virtualGoodsID
Amount: (int)  _purchaseAmount
CurrencyID: (int)  _currencyID 

This method records purchases of virtual goods.

Call this method directly after a virtual good has been purchased successfully.

Parameters
_virtualGoodsID[int] The ID of the virtual good as defined in the Fuse Dashboard.
_purchaseAmount[int] The amount of currency spent on the virtual good.
_currencyID[int] The ID of the currency used as defined on the Fuse Dashboard.
Since
Fuse SDK version 2.1.0
+ (void) rejectFriend: (NSString *)  _fuse_id

This method is used to reject a friend request.

In the second half of the inviting a friend process, the user can optionally accept or reject a friend request. If this user decides that they do not want the source user as a friend, call this method to remove it from the list of pending requests. If a <FuseDelegate> has been registered using startSession:delegate:withOptions:, a callback can be made once the friend is accepted (in case a notification is required by the application). A friend is in the second phase of the process if it is indicated as 'pending' in the updateFriendsListFromServer callback friendsListUpdated:.

To reject a friend:

[FuseSDK rejectFriend:@"012345678"];

The (optional) callback to the <FuseDelegate> is as follows:

-(void) friendRejected:(NSString*)_fuse_id Error:(NSError*)_error
{
// A friend has been marked as rejected on the server
// If [error intValue] != 0, an error has occurred
// Please see EFuseError for more information on all of the possible error codes
}
Parameters
_fuse_id[NSString*] This is the "Fuse ID" of the player being rejected
See also
+ startSession:delegate:withOptions: for information on setting up the <FuseDelegate>
+ addFriend: for more information on adding a friend and the handshaking process
FuseDelegate::friendRejected:Error: for more information on the delegate method
Since
Fuse SDK version 1.22
+ (void) removeDelegate

Removes the callback Delegate the SDK current has a reference too.

The FuseSDK does not retain the application delegate, this function should be called before deallocating a the fuse delegate object

See also
+ startSession:delegate:withOptions: to see how to register a <FuseDelegate> object to receive the optional callback
+ (void) removeFriend: (NSString *)  _fuse_id

This method is used to delete a friend from the logged in user's friends list.

Once a friend is removed by a user, both the target and source user will not show in each other's friends list. If a <FuseDelegate> has been registered using startSession:delegate:withOptions:, a callback can be made once the friend is removed (in case a notification is required by the application).

To remove a friend:

[FuseSDK removeFriend:@"012345678"];

The (optional) callback to the <FuseDelegate> is as follows:

-(void) friendRemoved:(NSString*)_fuse_id Error:(NSError*)_error
{
// A friend has been removed
// If [error intValue] != 0, an error has occurred
// Please see EFuseError for more information on all of the possible error codes
}
Parameters
_fuse_id[NSString*] This is the "Fuse ID" of the player being deleted
See also
+ startSession:delegate:withOptions: for information on setting up the <FuseDelegate>
FuseDelegate::friendRemoved:Error: for more information on the delegate method
Since
Fuse SDK version 1.22
+ (void) respondToApplicationLaunchOptions: (NSDictionary *)  launchOptions
Application: (UIApplication *)  application 

This method is optional and can collect launch options.

This method is optional and should be called from your application delegate file application:didFinishLaunchingWithOptions method (if implemented):

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[FuseSDK respondToApplicationLaunchOptions:launchOptions Application:application];
}
Parameters
launchOptions[NSDictionary*] The dictionary of launch options passed to application:didFinishLaunchingWithOptions
application[UIApplication*] The initiating UIApplication instance
Deprecated:
This method is deprecated and will be removed
+ (void) setDelegate: (NSObject< FuseDelegate > *)  _delegate

Set the FuseSDK callback Delegate.

The FuseSDK does not retain the application delegate, passing in nil would have the same effect of calling removeDelegate

Parameters
_delegate[id] The <FuseDelegate> object to be registered to receive protocol callbacks (may be nil)
+ (void) setPlatform: (NSString *)  _game_Platform

This method is used to describe the platform the API is running on.

The setPlatform method is an optional start up call for setting the platform the game is running on.

An example call would be:

- (void)applicationDidFinishLaunching:(UIApplication *)application
{
...
[FuseSDK setPlatform: @"unity-ios"];
[FuseSDK startSession: @"YOUR APP ID" delegate:self withOptions:nil];
...
}
Parameters
_game_Platform[NSString*] platform string to identify the platform represented, - expected platforms unity , air , marmalade , native
+ (void) setRewardedVideoUserID: (NSString *)  _userID

This method sets the user ID string for rewarded video server verification.

To allow server side verificiation. A user id registered with this function is passed to the server when a rewarded video has been completed. The server then transmits this id to the 3rd Party server registered on the FusePowered Dashboard. The value is only cached for the duration of the session, and can be changed at any time.

Parameters
_userID[NSString *] String username to use for Rewarded verification, May be NULL
[FuseSDK setRewardedVideoUserID:@"bobSmith1994"];
+ (void) showAdForZoneID: (NSString *)  _zoneID
options: (NSDictionary *)  _options 

This method displays a Fuse interstitial ad for a given ad zone. Different ad zones can be configured via the Fuse Dashboard.

[FuseSDK showAdForZoneID:@"zoneID" options:nil];

In the implementation of the delegate object, add this delegate method:

@implementation YourAdObject
-(void) adWillClose
{
// Continue execution flow of your application
}
@end
Parameters
_zoneID(NSString*) The name of the ad zone to display. You can configure different zones via the Fuse Dashboard. May be nil, will use default ad zone
_options(NSDictionary*) Options for showing the ad, like showing the preroll and postroll for rewarded videos. Can be found in FuseSDKDefinitions.h, may be nil

Using Options for ShowAd

- (void)functionForShowingFuseAd
{
[FuseSDK showAdForZoneID:@"zoneID" options:
@{ kFuseRewardedAdOptionKey_ShowPreRoll: @YES
,kFuseRewardedAdOptionKey_ShowPostRoll: @NO
,kFuseRewardedOptionKey_PreRollYesButtonText: @"I want it!" }
];
}
See also
+ startSession:delegate:withOptions: to see how to register a <FuseDelegate> object to receive the optional callback
Since
Fuse SDK version 2.0.0
+ (void) startSession: (NSString *)  _app_id
delegate: (NSObject< FuseDelegate > *)  _delegate
withOptions: (NSDictionary *)  _options 

This method is used to initiate all communication with the Fuse system (and register a <FuseDelegate>)

The startSession method is used to bootstrap all communications with the Fuse system. This should be called early in the applicationDidFinishLaunching method in your application delegate. There is a second version of this method, startSession:delegate:withOptions: which performs the same operation as this method except it does not register a <FuseDelegate> delegate.

An example call would be:

- (void)applicationDidFinishLaunching:(UIApplication *)application
{
[FuseSDK startSession: @"YOUR APP ID" Delegate:self withOptions:nil];
...
}

Using Fuse SDK Options

- (void)applicationDidFinishLaunching:(UIApplication *)application
{
[FuseSDK startSession: @"YOUR APP ID" Delegate:self withOptions:@{kFuseSDKOptionRegisterForPush:@YES,kFuseSDKOptionKey_HandleAdURLs:@NO} ];
...
}

When a session has been established by Fuse system, a callback will be sent to the registered <FuseDelegate> object using the following method:

-(void) sessionStartReceived;

If An error occurs trying to start a session, a callback will be sent to the registered <FuseDelegate> object using the following method

-(void) sessionLoginError
Parameters
_app_id[NSString*] This is the 36-character APP ID assigned by the Fuse system. Your APP ID is generated when you add your App to the Fuse dashboard system. It can be found in the configuration tab in a specific game, or in the "Integrate API" section of the dashboard. The APP ID is a 36-digit unique ID of the form 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'.
_delegate[id] The <FuseDelegate> object to be registered to receive protocol callbacks (may be nil), object is not Retained
_options[NSDictionary*] list of options to apply to the SDK (may be nil)
See also
FuseSDKDefintions.h for a list of option keys
- sessionStartReceived (FuseDelegate-p) for more information on the delegate method
- sessionLoginError: (FuseDelegate-p) for more information on handling errors occurred when trying to start a session
Parameters
_options(NSDictionary*) set options, Like automated push notifications for the SDK, See FuseSDKDefintions.h
+ (void) twitterLogin: (NSString *)  _twitter_id

Twitter account registration.

Uniquely track a user across devices by passing Twitter login information of a user. This system can be used in conjunction with the 'set' and 'get' game data to persist per-user information across devices.

To call this method:

[FuseSDK twitterLogin:@"twit_id"];

If required, a callback is sent to the <FuseDelegate> (if registered) indicating that the Fuse system has received the login information.

-(void) accountLoginComplete:(NSNumber*)_type Account:(NSString*)_account_id;
Parameters
_twitter_id[NSString*] This is the account id of the user signed in to Twitter
Since
Fuse SDK version 1.14
See also
+ startSession:delegate:withOptions: to see how to register a <FuseDelegate> object to receive the optional callback
- accountLoginComplete:Account: (FuseDelegate-p) to see more information on the account complete callback
+ (void) twitterLogin: (NSString *)  _twitter_id
Alias: (NSString *)  _alias 

Twitter account registration with user name.

Uniquely track a user across devices by passing Twitter login information of a user. This system can be used in conjunction with the 'set' and 'get' game data to persist per-user information across devices.

To call this method:

[FuseSDK twitterLogin:@"twit_id" Name:@"JohnnyGoodUser"];

If required, a callback is sent to the <FuseDelegate> (if registered) indicating that the Fuse system has received the login information.

-(void) accountLoginComplete:(NSNumber*)_type Account:(NSString*)_account_id;
Parameters
_twitter_id[NSString*] This is the account id of the user signed in to Twitter
_alias[NSString*] This is the alias of the user
Since
Fuse SDK version 1.14
See also
+ startSession:delegate:withOptions: to see how to register a <FuseDelegate> object to receive the optional callback
- accountLoginComplete:Account: (FuseDelegate-p) to see more information on the account complete callback
+ (void) updateFriendsListFromServer

Get a the user's friends list.

Once a user has signed in with one of the supported account services (for instance Game Center using gameCenterLogin:), they will have a a friends list which is retrievable from the server. This list is composed of any friends that they have invited. This process is asynchronous in that it is required to go the the Fuse servers to retrieve the list. Therefore, the result is returned in a callback (friendsListUpdated: (FuseDelegate-p)) to the <FuseDelegate> delegate registered in startSession:delegate:withOptions:.

To request the list:

The result is returned to the <FuseDelegate> callback:

-(void) friendsListUpdated:(NSDictionary*)_friendsList
{
// The friends list has returned to the device
// sample code to parse the dictionary
NSArray *fuse_ids = [_friendsList allKeys];
for (int i = 0; i < [fuse_ids count]; i++)
{
NSString *fuse_id = [fuse_ids objectAtIndex:i];
NSDictionary *friendEntry = (NSDictionary*)[_friendsList objectForKey:fuse_id];
NSLog(@"Friend is Pending: %d", [[friendEntry objectForKey:@"pending"] intValue]);
NSLog(@"Friend Alias: %@", [friendEntry objectForKey:@"alias"]);
NSLog(@"Friend Fuse ID: %@", [friendEntry objectForKey:@"fuse_id"]);
}
}
-(void) friendsListError:(NSError*)_error
{
// An error has occurred in getting the friends list
// See EFuseError for more information on all of the possible error codes
}
See also
+ getFriendsList for more information on getting the local version of the friends list
+ startSession:delegate:withOptions: for information on setting up the <FuseDelegate>
- friendsListError: (FuseDelegate-p) for more information of the delegate method
Since
Fuse SDK version 1.22
+ (void) userPushNotification: (NSString *)  _fuse_id
Message: (NSString *)  _message 

Send an Apple push notification to another user.

Use this method to send a push notification to another user, using their Fuse ID to each of their devices that have logged in with that ID (and that have registered to receive notifications). This system is dependent upon both the sender and the recipient to have logged in with either a Game Center account (see gameCenterLogin:) or similar method. This system would most likely be used in conjunction with another social tool, such as the friend's list (see getFriendsList), where a list of users and their associated Fuse IDs would be known. Messages can be no longer than 256 characters in length.

To send a push notification:

[FuseSDK userPushNotification:@"012345678" Message:@"Test Push Message"];

Please ensure that your game is registered to collect device tokens and receive push notifications to be compatible with this feature. The can be up to a five minute delay or longer before a message is received by a user.

Parameters
_fuse_id[NSString*] This is the "Fuse ID" of the player to which the message will be sent
_message[NSString*] The message to be sent to the user (max 256 characters)
See also
+ gameCenterLogin: for more information on how to register a login with a Game Center ID
+ facebookLogin: for more information on how to register a login with a Facebook account ID
+ twitterLogin: for more information on how to register a login with a Twitter account ID
openFeintLogin: for more information on how to register a login with an OpenFeint account ID
+ fuseLogin:Alias: for more information on how to register a login with a Fuse ID
Since
Fuse SDK version 1.22
+ (void) utcTimeFromServer

This method gets the UTC time from the server.

To help determine the psuedo-accurate real-world time (i.e. not device time), this method can be called to get the UTC time from the Fuse servers. The date is returned in unix time format (i.e. seconds elapsed since January 1, 1970). The returned value is only psuedo-accurate in that it does not account for request time and delays - so it is the time on the server when the request was received but not the time when the value returns to the device. This is generally used to prevent time exploits in games where such situations could occur (by a user changing their device time).

To get the time, it is a two step process. First a request is made to the API:

Then, a callback is triggered in the <FuseDelegate> with the result:

-(void) timeUpdated:(NSNumber*)_utcTimeStamp
{
int server_time = [utcTimeStamp intValue];
}
See also
startSession: or + startSession:delegate:withOptions: to see how to register a <FuseDelegate>
- timeUpdated: (FuseDelegate-p) to understand more about the <FuseDelegate> callback
http://en.wikipedia.org/wiki/Unix_time for more information on Unix time
http://en.wikipedia.org/wiki/Coordinated_Universal_Time for more information on UTC time
+ (BOOL) zoneHasIAPOffer: (NSString *)  _zoneID

Use this method to query wether or not an ad zone has iap offer content in it;.

BOOL zoneRewarded = [FuseSDK zoneHasIAPOffer:@"zoneID"];
Parameters
_zoneID(NSString*)the name to the ad zone to test for iap offer content. May be nil, will use default ad zone.
Since
Fuse SDK version 2.0.0
+ (BOOL) zoneHasRewarded: (NSString *)  _zoneID

Use this method to query wether or not an ad zone has rewarded video content in it;.

BOOL zoneRewarded = [FuseSDK zoneHasRewarded:@"zoneID"];
Parameters
_zoneID(NSString*)the name to the ad zone to test for rewarded content. May be nil, will use default ad zone.
Since
Fuse SDK version 2.0.0
+ (BOOL) zoneHasVirtualGoodsOffer: (NSString *)  _zoneID

Use this method to query wether or not an ad zone has virtual goods content;.

BOOL zoneRewarded = [FuseSDK zoneHasVirtualGoodsOffer:@"zoneID"];
Parameters
_zoneID(NSString*)the name to the ad zone to test for virtual good offer content. May be nil, will use default ad zone.
Since
Fuse SDK version 2.0.0

The documentation for this class was generated from the following file: