12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- //
- // TomGameSdk.h
- // TomGameSdk
- //
- // Created by SAGESSE on 2019/1/20.
- // Copyright © 2019 SAGESSE. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- ///
- /// Game SDK
- ///
- __attribute__((objc_runtime_name("_TtC10TomGameSdk10TomGameSdk"))) @interface TomGameSdk : NSObject
- ///
- /// A sington instance of SDK.
- ///
- + (instancetype)sharedSDK;
- ///
- /// Init the sdk with application code.
- /// \param parameter The parameter provided by the platform.
- ///
- /// \param complete This closure called when init complete.
- ///
- - (void)initWithParameter:(NSString*)parameter complete:(void (^)(NSError* error))complete;
- ///
- /// Login the sdk.
- /// \param complete This closure called when login complete.
- ///
- - (void)loginWithComplete:(void (^)(id user, NSError* error))complete;
- ///
- /// Logout the sdk.
- /// \param complete This closure called when logout complete.
- ///
- - (void)logoutWithComplete:(void (^)(void))complete;
- ///
- /// Logout the game and sdk.
- /// \param handler This closure called when user logout in web view.
- /// \note Warning this handler will retain in until next call this method.
- ///
- - (void)logoutWhenNotification:(void (^)(void))handler;
- ///
- /// Buy a product.
- /// \param parameters Payment request parameters.
- /// \param complete Payment result of the callback, if the apple payment is completed before the callback, other payments will be the official launch of the callback
- ///
- - (void)buy:(NSDictionary*)parameters complete:(void (^)(id order, NSError* error))complete;
- ///
- /// User Center.
- ///
- - (void)center;
- /// Report role info.
- /// \param roleName This role name.
- ///
- /// \param level This role current level.
- ///
- /// \param serverId This role current server.
- ///
- - (void)reportWithRoleName:(NSString*)roleName level:(NSInteger)level serverId:(NSString*)serverId;
- @end
|