|
@@ -16,7 +16,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
//实例化sdk
|
|
//实例化sdk
|
|
-- (void)iosInitWithDigitMap:(NSString *)gameId ring:(NSString *)adId shouldLog:(BOOL)shouldLog{
|
|
|
|
|
|
+- (void)InitWithDigitMap:(NSString *)gameId ring:(NSString *)adId shouldLog:(BOOL)shouldLog{
|
|
if (shouldLog != self.shouldLog) {
|
|
if (shouldLog != self.shouldLog) {
|
|
self.shouldLog = shouldLog;
|
|
self.shouldLog = shouldLog;
|
|
}
|
|
}
|
|
@@ -34,7 +34,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
//调起登陆
|
|
//调起登陆
|
|
-- (void)iosLogin {
|
|
|
|
|
|
+- (void)Login {
|
|
[[PullInter bringInstance] zipBannerBlock:^(NSDictionary *params) {
|
|
[[PullInter bringInstance] zipBannerBlock:^(NSDictionary *params) {
|
|
if (self.shouldLog) {
|
|
if (self.shouldLog) {
|
|
NSLog(@"登录成功:%@", params);
|
|
NSLog(@"登录成功:%@", params);
|
|
@@ -54,7 +54,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
//退出登陆
|
|
//退出登陆
|
|
-- (void)iosLogout {
|
|
|
|
|
|
+- (void)Logout {
|
|
[[PullInter bringInstance] sortWetTipBlock:^(NSDictionary *params) {
|
|
[[PullInter bringInstance] sortWetTipBlock:^(NSDictionary *params) {
|
|
if (self.shouldLog) {
|
|
if (self.shouldLog) {
|
|
NSLog(@"登出成功%@", params);
|
|
NSLog(@"登出成功%@", params);
|
|
@@ -69,7 +69,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
// 调起支付
|
|
// 调起支付
|
|
-- (void)iosPaymentWithJson:(NSString *)paymentJson {
|
|
|
|
|
|
+- (void)PaymentWithJson:(NSString *)paymentJson {
|
|
NSData *jsonData = [paymentJson dataUsingEncoding:NSUTF8StringEncoding];
|
|
NSData *jsonData = [paymentJson dataUsingEncoding:NSUTF8StringEncoding];
|
|
NSError *jsonError;
|
|
NSError *jsonError;
|
|
NSDictionary *paymentInfo = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&jsonError];
|
|
NSDictionary *paymentInfo = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&jsonError];
|
|
@@ -94,7 +94,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
// 角色升级上报
|
|
// 角色升级上报
|
|
-- (void)iosRoleInfoWithJson:(NSString *)roleJson {
|
|
|
|
|
|
+- (void)RoleInfoWithJson:(NSString *)roleJson {
|
|
NSData *jsonData = [roleJson dataUsingEncoding:NSUTF8StringEncoding];
|
|
NSData *jsonData = [roleJson dataUsingEncoding:NSUTF8StringEncoding];
|
|
NSError *jsonError;
|
|
NSError *jsonError;
|
|
NSDictionary *roleInfo = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&jsonError];
|
|
NSDictionary *roleInfo = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&jsonError];
|
|
@@ -158,30 +158,5 @@
|
|
|
|
|
|
UnitySendMessage(gameObject, methodName, jsonStringC);
|
|
UnitySendMessage(gameObject, methodName, jsonStringC);
|
|
}
|
|
}
|
|
-
|
|
|
|
-// C-style function declarations
|
|
|
|
-extern "C" void __ImportInitWithDigitMap(const char *gameId, const char *adId, bool shouldLog) {
|
|
|
|
- NSString *gameIdStr = [NSString stringWithUTF8String:gameId];
|
|
|
|
- NSString *adIdStr = [NSString stringWithUTF8String:adId];
|
|
|
|
- [[SDKManager sharedInstance] iosInitWithDigitMap:gameIdStr ring:adIdStr shouldLog:shouldLog];
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-extern "C" void __ImportLogin() {
|
|
|
|
- [[SDKManager sharedInstance] iosLogin];
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-extern "C" void __ImportLogout() {
|
|
|
|
- [[SDKManager sharedInstance] iosLogout];
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-extern "C" void __ImportPaymentWithJson(const char *paymentJson) {
|
|
|
|
- NSString *paymentJsonStr = [NSString stringWithUTF8String:paymentJson];
|
|
|
|
- [[SDKManager sharedInstance] iosPaymentWithJson:paymentJsonStr];
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-extern "C" void __ImportRoleInfoWithJson(const char *roleJson) {
|
|
|
|
- NSString *roleJsonStr = [NSString stringWithUTF8String:roleJson];
|
|
|
|
- [[SDKManager sharedInstance] iosRoleInfoWithJson:roleJsonStr];
|
|
|
|
-}
|
|
|
|
@end
|
|
@end
|
|
|
|
|