API Reference/API Documentation

ULManger

Brief Description:

ULU SDK core management class

definition: @ interface ULManager:NSObject

Overview:

Use ULManager to access the SDK interface.

  • Login and Logout
  • Payment
  • User Center and Customer Service Center

Important: Use only one ULManager; multiple instances can cause weird bugs.

content

ULManagerDelegate

SDK callback method protocol

ULManager

SDK core management class

Instance variables:

delegate ULmanager callback object, used to receive interface callback information

Class methods:

+ initWithGameID:gameVersion:delegate

Initialize the SDK and obtain the ULManager object.

AppDelegate lifecycle methods:
- application:didFinishLaunchingWithOptions:

Required, pass in initialization parameters

- application:openURL:options:

Must be answered, used for App jump.

-application:didRegisterForRemoteNotificationithDeviceToken

Select and notify the registration logic.

User Part:
- loginInViewController:

Login entry method, if you are not logged in, the login window will be displayed, if you are already logged in, you will be logged in automatically.

- openUserCenterfromViewController:

Open the User Center.

-openCustomerServiceInViewController:withRoleInfo:

Open the Customer Service Center.

Payment
- getProductListsWithProductIdentifiers:

Get product information

- payWithULUOrder:andRole:

Payment interface

Log management:
- logEventWithName:andValues

Log events. Remark

For more returned error codes, please see the error code description on the home page.

ULGameUser

Brief Description:

ULU user

definition: @interface ULGameUser : NSObject

Overview:

Get user information

  • token: Used to verify user information
  • uid: Youlu user ID is used to identify a unique user

    content

@property (nonatomic, strong, readonly) NSString *token; //User Password
@property (nonatomic, strong, readonly) NSString *uid; // ulu User ID

ULUOrder

Brief Description:

Youlu payment information

definition: @interface ULUOrder : NSObject

Overview:

Property Value

Fields type null default Notes
gameVersion NSString no Game version number
productid NSString no ulu Product ID
uid NSString no ulu User ID
quantity NSUInteger yes Purchase quantity
extraData NSString no 0 Transparent parameters
@property (copy, nonatomic) NSString *gameVersion;
@property (copy, nonatomic) NSString *productid;
@property (copy, nonatomic) NSString *uid;
@property (nonatomic) NSUInteger quantity;
@property (strong, nonatomic) NSString *extraData;

ULURole

Brief Description:

ulu user information

definition: @interface ULURole : NSObject

Overview:

Use this class to pass game character information

Fields type null default Notes
roleId NSString no Role ID
serverid NSString no Server ID
servername NSString no Server Name
playername NSString yes Character Name
roleLevel NSString no User Level
vipLevel NSUInteger no VIP Level
@property (copy, nonatomic) NSString *roleId;
@property (copy, nonatomic) NSString *serverid;
@property (copy, nonatomic) NSString *servername;
@property (copy, nonatomic) NSString *playername;

ULCode

ulu Error Code

  • UL_CODE_SUCCESS: Login successful
  • UL_CODE_FAIL: Login Failed
  • UL_CODE_INTERNAL_ERROR: Internal Error
  • UL_CODE_NETWORK_TIMEOUT: time out
  • UL_CODE_SERVER_REJECTED: Server Rejection
  • UL_CODE_INVALID_IDENTIFIERS: There is no such product ID in the background

    ULUProduct

    Brief Description:

    Youlu payment information

    definition: @interface ULUProduct : NSObject

    Overview:

    Property Value

Fields type null default Notes
uluProductId NSString no Game version number
uluProductName NSString no ulu Product ID
storeProductId NSString no ulu User ID
storeProductName NSString yes Purchase quantity
storeTier NSString no 0 Transparent parameters

method

Get the localized price string (eg. $0.99) - (NSString *)localizedPrice

content

@property (copy, nonatomic) NSString *uluProductId;
@property (copy, nonatomic) NSString *uluProductName;
@property (copy, nonatomic) NSString *storeProductId;
@property (copy, nonatomic) NSString *storeProductName;
@property (copy, nonatomic) NSString *storeTier;
@property (strong, nonatomic) SKProduct *storeProduct;

- (NSString *)localizedPrice;

results matching ""

    No results matching ""