lizhihui

更新190321版本1

Showing 70 changed files with 352 additions and 223 deletions
......@@ -15,11 +15,11 @@
- (void)initChecker;
- (void)startCheck:(HaiBaoJuheLoginInfo *)loginInfo;
- (void) createOrder:(HaiBaoJuheCreateOrderInfo *)gzyazfInfo;
- (void) SisleyHaiBaoJuhereportOpen;
- (void) SisleyHaiBaoJuhereportSDKOpen;
- (void)SisleyHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) OdysseyHaiBaoJuhereportOpen;
- (void) OdysseyHaiBaoJuhereportSDKOpen;
- (void)OdysseyHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) reportEnter:(HaiBaoJuheReportInfo *)reInfo;
- (void) SisleyHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void) OdysseyHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void)sendNotice:(HaiBaoJuheSDKNotificationType)notiType
notiName:(NSString *)notiName
statusCode:(int)nCode
......@@ -28,7 +28,7 @@
- (void)startCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo;
- (void)SisleyHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
- (void)OdysseyHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
/*
*初始化时调用
......
#import "HaiBaoJuheSDK/SisleyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : SisleyHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/OdysseyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : OdysseyHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *serverId;//服务器ID
@property(nonatomic, strong)NSString *serverName;//服务器名称
......@@ -16,7 +16,7 @@
@property(nonatomic, strong)NSString *userId;//用户ID
@property(nonatomic, strong)NSString *timestamp;//时间戳
- (NSString *) SisleyHaiBaoJuheGetTsign ;
- (NSString *) SisleyHaiBaoJuheGetTimestamp ;
- (NSString *) OdysseyHaiBaoJuheGetTsign ;
- (NSString *) OdysseyHaiBaoJuheGetTimestamp ;
@end
......
#import "HaiBaoJuheSDK/SisleyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : SisleyHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/OdysseyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : OdysseyHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *queryId;
......
#import "HaiBaoJuheSDK/SisleyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : SisleyHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/OdysseyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : OdysseyHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *timestamp;
@property(nonatomic, strong)NSString *sign;
......
//
// SisleyHaiBaoJuheReportInfo.h
// OdysseyHaiBaoJuheReportInfo.h
// HaiBaoJuheSDK
//
// Created by winFan on 12/21/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "HaiBaoJuheSDK/SisleyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : SisleyHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/OdysseyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : OdysseyHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *reportType;//类型
@property(nonatomic, strong)NSString *playerId;//玩家ID
......
......@@ -10,7 +10,7 @@
@property(nonatomic, strong)NSString *urlSchemes;
@property(strong) NSMutableArray* SisleyList;
@property(strong) NSMutableArray* OdysseyList;
@property BOOL isAppleGzyazfing;
......
......@@ -4,7 +4,7 @@
@interface HaiBaoJuheUtils : NSObject
+(NSString *)md5:(NSString *)str;
+ (NSDictionary *)SisleyHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+ (NSDictionary *)OdysseyHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+(NSString *)createGzyazfOrderUrl;
//*充值回调地址
+(NSString *)createGzyazfUrl;
......
#import <Foundation/Foundation.h>
@interface OdysseyControl : NSObject
- (void)initOdysseyInstance;
- (void)OdysseyStartGo;
@property(strong) NSMutableArray* myarray;
@end
#import <Foundation/Foundation.h>
@interface OdysseyControl1 : NSObject
- (void)initOdysseyInstance;
- (void)OdysseyStartGo;
@property(strong) NSMutableArray* myarray;
@end
#import <Foundation/Foundation.h>
@interface OdysseyControl2 : NSObject
- (void)initOdysseyInstance;
- (void)OdysseyStartGo;
@property(strong) NSMutableArray* myarray;
@end
#import <Foundation/Foundation.h>
@interface OdysseyControl3 : NSObject
- (void)initOdysseyInstance;
- (void)OdysseyStartGo;
@property(strong) NSMutableArray* myarray;
@end
#import <Foundation/Foundation.h>
@interface OdysseyControl4 : NSObject
- (void)initOdysseyInstance;
- (void)OdysseyStartGo;
@property(strong) NSMutableArray* myarray;
@end
#import <Foundation/Foundation.h>
#import "OtherSetting.h"
@interface SisleyHaiBaoJuheBaseModel : NSObject
@interface OdysseyHaiBaoJuheBaseModel : NSObject
- (NSString *)SisleyHaiBaoJuheObjectToJsonString;
- (NSString *)OdysseyHaiBaoJuheObjectToJsonString;
- (NSMutableString *)paramAddToString;
- (id)initWithDiction:(NSDictionary *)diction;
......
......@@ -11,7 +11,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel)
ELogError
};
@interface SisleyHaiBaoJuheDGLogger : NSObject
@interface OdysseyHaiBaoJuheDGLogger : NSObject
+ (void)showLog:(NSString *)fmt,...;
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface OdysseyAllManager : NSObject
{
NSString* OdysseyAPPID_;
NSString* OdysseyAPPKEY_;
NSString* OdysseyInviterCode_;
}
@property bool OdysseyGeiWoHuaQianBa;
+ (OdysseyAllManager *)OdysseyInstance;
- (void)OdysseyChuShiHua;
- (void)OdysseyDengLu:(NSString *)OdysseyAPPID : (NSString *)OdysseyAPPKEY : (UIViewController *)controller;
- (void)OdysseyYangShi:(NSString*)OdysseyLeiXing;
- (void)OdysseyQuery: (NSString *)OdysseyFuWuQiID : (NSString *)OdysseyNickName : (NSNumber *)OdysseyAmount : (NSString *)OdysseyCallBack : (UIViewController *)controller : (NSString *)OdysseyServerName;
- (void)OdysseyQueryOperation:(UIViewController*)controll OdysseyHuoWuID:(NSString*)products OdysseyJiaGe:(NSString*)amount OdysseyHuoWuMing:(NSString*)productName OdysseyDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const OdysseyExitNotification;
extern NSString * const OdysseyLoginNotification;
extern NSString * const OdysseyErrorNotification;
@interface OdysseyHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface OdysseyIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* OdysseyDingDanHao;
@property(nonatomic,strong) NSDictionary* OdysseyHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* OdysseyHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *OdysseyHuoWuLieBiaoView;
- (void)OdysseyHuaQianView:(UIViewController*)controller OdysseyHuoWuD:(NSString*)products OdysseyQian:(NSString*)amount OdysseyHuoWuMing:(NSString*)productName OdysseyDingDanHao:(NSString*)DingDanHao;
@end
#import <Foundation/Foundation.h>
@interface SisleyInformation : NSObject
@interface OdysseyInformation : NSObject
{
//
NSString *openId;
......@@ -12,5 +12,5 @@ NSString *timestamp;
@property(retain,nonatomic) NSString *openId;
@property(retain,nonatomic) NSString *token;
@property(retain,nonatomic) NSString *timestamp;
+ (SisleyInformation *)getInstance;
+ (OdysseyInformation *)getInstance;
@end
......
#import <Foundation/Foundation.h>
@interface SisleyInformationJM : NSObject
@interface OdysseyInformationJM : NSObject
+(NSString *)SisleyJM:(NSString *)jm;
+(NSString *)OdysseyJM:(NSString *)jm;
@end
......
#import <UIKit/UIKit.h>
@interface SisleyLocation : NSObject
@interface OdysseyLocation : NSObject
+ (NSString *)SisleySKCloudServiceSetupOptionsKey;
+ (NSString *)OdysseySKCloudServiceSetupOptionsKey;
@end
......
#import <UIKit/UIKit.h>
#import "SisleyInformation.h"
#import "OdysseyInformation.h"
#import <JavaScriptCore/JavaScriptCore.h>
@interface SisleyMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
@interface OdysseyMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
{
UIWebView *webSisleyView_;
UIWebView *webOdysseyView_;
UIActivityIndicatorView *activityIndicator;
}
@property(assign) BOOL SisleyYouYuanJiao;
@property(assign) BOOL OdysseyYouYuanJiao;
- (void)SisleySettingSisleyView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)SisleyInitWebView;
- (void)OdysseySettingOdysseyView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)OdysseyInitWebView;
- (void)loadWebPageWithString:(NSString *)url;
- (void)loadWebPageWithJs:(NSString *)content;
- (void)postNotification:(NSString *)name : (NSString *)code;
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface SisleyAllManager : NSObject
{
NSString* SisleyAPPID_;
NSString* SisleyAPPKEY_;
NSString* SisleyInviterCode_;
}
@property bool SisleyGeiWoHuaQianBa;
+ (SisleyAllManager *)SisleyInstance;
- (void)SisleyChuShiHua;
- (void)SisleyDengLu:(NSString *)SisleyAPPID : (NSString *)SisleyAPPKEY : (UIViewController *)controller;
- (void)SisleyYangShi:(NSString*)SisleyLeiXing;
- (void)SisleyQuery: (NSString *)SisleyFuWuQiID : (NSString *)SisleyNickName : (NSNumber *)SisleyAmount : (NSString *)SisleyCallBack : (UIViewController *)controller : (NSString *)SisleyServerName;
- (void)SisleyQueryOperation:(UIViewController*)controll SisleyHuoWuID:(NSString*)products SisleyJiaGe:(NSString*)amount SisleyHuoWuMing:(NSString*)productName SisleyDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const SisleyExitNotification;
extern NSString * const SisleyLoginNotification;
extern NSString * const SisleyErrorNotification;
@interface SisleyHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface SisleyIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* SisleyDingDanHao;
@property(nonatomic,strong) NSDictionary* SisleyHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* SisleyHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *SisleyHuoWuLieBiaoView;
- (void)SisleyHuaQianView:(UIViewController*)controller SisleyHuoWuD:(NSString*)products SisleyQian:(NSString*)amount SisleyHuoWuMing:(NSString*)productName SisleyDingDanHao:(NSString*)DingDanHao;
@end
#include "SDKInterface.h"
#import <UIKit/UIKit.h>
#import "Sisley/SisleyAllManager.h"
#import "Sisley/SisleyHuiTiaoNotification.h"
#import "Sisley/SisleyInformation.h"
#import "Odyssey/OdysseyAllManager.h"
#import "Odyssey/OdysseyHuiTiaoNotification.h"
#import "Odyssey/OdysseyInformation.h"
#import "TrackingIO.h"
@implementation SDKInterface : Interface
int mExchange;
NSString *SisleyAppId;
NSString *SisleyAppKey;
NSString *SisleyLeakOrderUrl;
NSString *OdysseyAppId;
NSString *OdysseyAppKey;
NSString *OdysseyLeakOrderUrl;
- (void)SDKinit:(UIViewController *) control
{
......@@ -20,10 +20,10 @@ NSString *SisleyLeakOrderUrl;
[super SDKinit:control];
[HaiBaoJuheConfig getInstance];
[[SisleyAllManager SisleyInstance]SisleyChuShiHua];
[[SisleyAllManager SisleyInstance]SisleyYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:SisleyLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"SisleyToolCallBack" object:nil];
[[OdysseyAllManager OdysseyInstance]OdysseyChuShiHua];
[[OdysseyAllManager OdysseyInstance]OdysseyYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:OdysseyLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"OdysseyToolCallBack" object:nil];
[[HaiBaoJuheChecker getInstance] sendNotice:HaiBaoJuheSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"initSuccess" extendData:nil];
......@@ -40,9 +40,9 @@ NSString *SisleyLeakOrderUrl;
- (void)SDKloginSDK
{
//APPID APPKEY
SisleyAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
SisleyAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[SisleyAllManager SisleyInstance]SisleyDengLu:SisleyAppId :SisleyAppKey :self.controller];
OdysseyAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
OdysseyAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[OdysseyAllManager OdysseyInstance]OdysseyDengLu:OdysseyAppId :OdysseyAppKey :self.controller];
}
......@@ -53,9 +53,9 @@ NSString *SisleyLeakOrderUrl;
{
NSLog(@"loginchek");
HaiBaoJuheLoginInfo *loginInfo = [HaiBaoJuheLoginInfo alloc];
loginInfo.openId = [[SisleyInformation getInstance]openId];
loginInfo.sign = [[SisleyInformation getInstance] token];
loginInfo.timestamp = [[SisleyInformation getInstance] timestamp];
loginInfo.openId = [[OdysseyInformation getInstance]openId];
loginInfo.sign = [[OdysseyInformation getInstance] token];
loginInfo.timestamp = [[OdysseyInformation getInstance] timestamp];
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[[HaiBaoJuheChecker getInstance] startCheck:loginInfo];
......@@ -82,7 +82,7 @@ NSString *SisleyLeakOrderUrl;
- (void)HCKAssetsToolCallBack:(NSNotification *)notification
{
NSDictionary* payResultDic = notification.object;
NSString* receiptStr = [payResultDic objectForKey:@"SisleyToolResult"];
NSString* receiptStr = [payResultDic objectForKey:@"OdysseyToolResult"];
NSString* queryId = [payResultDic objectForKey:@"query_id"];
//收到回调,保存queryid和data
......@@ -101,7 +101,7 @@ NSString *SisleyLeakOrderUrl;
[userDefaults setObject:receiptStr forKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:SisleyLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:OdysseyLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
......@@ -121,11 +121,11 @@ NSString *SisleyLeakOrderUrl;
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
NSString* lastqueryid = [userDefaults objectForKey:@"lastqueryid"];
SisleyLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
OdysseyLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
[userDefaults setObject:SisleyLeakOrderUrl forKey:@"lastSisleyLeakOrderUrl"];
[userDefaults setObject:OdysseyLeakOrderUrl forKey:@"lastOdysseyLeakOrderUrl"];
if (lastqueryid!=nil) {
//创建订单前进行补单
......@@ -135,7 +135,7 @@ NSString *SisleyLeakOrderUrl;
receiptStr = [receiptStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
//如果不为空,进行最后一次补单
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",lastqueryid,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:SisleyLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:OdysseyLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
[userDefaults removeObjectForKey:@"lastqueryid"];
......@@ -145,7 +145,7 @@ NSString *SisleyLeakOrderUrl;
mExchange = [payInfo exchange].intValue;
[super SDKgzyazfWithGzyazfmentInfo:payInfo];
SisleyLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
OdysseyLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
......@@ -212,10 +212,10 @@ NSString *SisleyLeakOrderUrl;
for (NSString* queryId in queryIdArray) {
NSString* receiptStr = [userDefaults valueForKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* lastSisleyLeakOrderUrl = [userDefaults objectForKey:@"lastSisleyLeakOrderUrl"];
NSString* lastOdysseyLeakOrderUrl = [userDefaults objectForKey:@"lastOdysseyLeakOrderUrl"];
NSString* result;
if (lastSisleyLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastSisleyLeakOrderUrl :receiptDic];
if (lastOdysseyLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastOdysseyLeakOrderUrl :receiptDic];
}else{
result = [[NetCenter getInstance] httpPostSyn:[HaiBaoJuheUtils createGzyazfUrl] :receiptDic];
}
......@@ -253,14 +253,14 @@ NSString *SisleyLeakOrderUrl;
NSString *other = [payInfo other];
if (other && [other length] > 0) {
[[SisleyAllManager SisleyInstance] SisleyQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
[[OdysseyAllManager OdysseyInstance] OdysseyQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
}else{
NSString* products = [payInfo products];
//保存订单号到本地
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
[userDefaults setObject:queryId forKey:@"lastqueryid"];
[userDefaults synchronize];
[[SisleyAllManager SisleyInstance] SisleyQueryOperation:self.controller SisleyHuoWuID:products SisleyJiaGe:[payInfo postAmount] SisleyHuoWuMing:[payInfo productName] SisleyDingDanHao:queryId];
[[OdysseyAllManager OdysseyInstance] OdysseyQueryOperation:self.controller OdysseyHuoWuID:products OdysseyJiaGe:[payInfo postAmount] OdysseyHuoWuMing:[payInfo productName] OdysseyDingDanHao:queryId];
}
}
......
......@@ -10,9 +10,8 @@
7、``` 所有接口PoolSdk 替换成 HaiBaoJuheSDK(如不理解可以参考demo或者详细文档) ``` <br>
已更新 海豹聚合SDK 2018年12月05日版本 快速更新到 2019年03月20日版本<br>
## 已更新 海豹聚合SDK 2018年12月05日版本 快速更新到 2019年03月21日版本<br>
1、``` 删除poolsdk_file文件夹中原来framework ``` <br>
2、``` 引入poolsdk_file文件夹中Sisley.framework ``` <br>
2、``` 引入poolsdk_file文件夹中Odyssey.framework ``` <br>
3、``` 替换SDKInterface.m文件 ``` <br>
4、``` 替换HaiBaoJuheSDK.framework ``` <br>
\ No newline at end of file
5、``` 原 URL Schemes 中的 i9133public 改为 sdk.uuufish.com (可参考demo中info设置) ``` <br>
\ No newline at end of file
......
......@@ -15,11 +15,11 @@
- (void)initChecker;
- (void)startCheck:(HaiBaoJuheLoginInfo *)loginInfo;
- (void) createOrder:(HaiBaoJuheCreateOrderInfo *)gzyazfInfo;
- (void) SisleyHaiBaoJuhereportOpen;
- (void) SisleyHaiBaoJuhereportSDKOpen;
- (void)SisleyHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) OdysseyHaiBaoJuhereportOpen;
- (void) OdysseyHaiBaoJuhereportSDKOpen;
- (void)OdysseyHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) reportEnter:(HaiBaoJuheReportInfo *)reInfo;
- (void) SisleyHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void) OdysseyHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void)sendNotice:(HaiBaoJuheSDKNotificationType)notiType
notiName:(NSString *)notiName
statusCode:(int)nCode
......@@ -28,7 +28,7 @@
- (void)startCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo;
- (void)SisleyHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
- (void)OdysseyHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
/*
*初始化时调用
......
#import "HaiBaoJuheSDK/SisleyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : SisleyHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/OdysseyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : OdysseyHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *serverId;//服务器ID
@property(nonatomic, strong)NSString *serverName;//服务器名称
......@@ -16,7 +16,7 @@
@property(nonatomic, strong)NSString *userId;//用户ID
@property(nonatomic, strong)NSString *timestamp;//时间戳
- (NSString *) SisleyHaiBaoJuheGetTsign ;
- (NSString *) SisleyHaiBaoJuheGetTimestamp ;
- (NSString *) OdysseyHaiBaoJuheGetTsign ;
- (NSString *) OdysseyHaiBaoJuheGetTimestamp ;
@end
......
#import "HaiBaoJuheSDK/SisleyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : SisleyHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/OdysseyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : OdysseyHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *queryId;
......
#import "HaiBaoJuheSDK/SisleyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : SisleyHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/OdysseyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : OdysseyHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *timestamp;
@property(nonatomic, strong)NSString *sign;
......
//
// SisleyHaiBaoJuheReportInfo.h
// OdysseyHaiBaoJuheReportInfo.h
// HaiBaoJuheSDK
//
// Created by winFan on 12/21/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "HaiBaoJuheSDK/SisleyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : SisleyHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/OdysseyHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : OdysseyHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *reportType;//类型
@property(nonatomic, strong)NSString *playerId;//玩家ID
......
......@@ -10,7 +10,7 @@
@property(nonatomic, strong)NSString *urlSchemes;
@property(strong) NSMutableArray* SisleyList;
@property(strong) NSMutableArray* OdysseyList;
@property BOOL isAppleGzyazfing;
......
......@@ -4,7 +4,7 @@
@interface HaiBaoJuheUtils : NSObject
+(NSString *)md5:(NSString *)str;
+ (NSDictionary *)SisleyHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+ (NSDictionary *)OdysseyHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+(NSString *)createGzyazfOrderUrl;
//*充值回调地址
+(NSString *)createGzyazfUrl;
......
#import <Foundation/Foundation.h>
@interface OdysseyControl : NSObject
- (void)initOdysseyInstance;
- (void)OdysseyStartGo;
@property(strong) NSMutableArray* myarray;
@end
#import <Foundation/Foundation.h>
@interface OdysseyControl1 : NSObject
- (void)initOdysseyInstance;
- (void)OdysseyStartGo;
@property(strong) NSMutableArray* myarray;
@end
#import <Foundation/Foundation.h>
@interface OdysseyControl2 : NSObject
- (void)initOdysseyInstance;
- (void)OdysseyStartGo;
@property(strong) NSMutableArray* myarray;
@end
#import <Foundation/Foundation.h>
@interface OdysseyControl3 : NSObject
- (void)initOdysseyInstance;
- (void)OdysseyStartGo;
@property(strong) NSMutableArray* myarray;
@end
#import <Foundation/Foundation.h>
@interface OdysseyControl4 : NSObject
- (void)initOdysseyInstance;
- (void)OdysseyStartGo;
@property(strong) NSMutableArray* myarray;
@end
#import <Foundation/Foundation.h>
#import "OtherSetting.h"
@interface SisleyHaiBaoJuheBaseModel : NSObject
@interface OdysseyHaiBaoJuheBaseModel : NSObject
- (NSString *)SisleyHaiBaoJuheObjectToJsonString;
- (NSString *)OdysseyHaiBaoJuheObjectToJsonString;
- (NSMutableString *)paramAddToString;
- (id)initWithDiction:(NSDictionary *)diction;
......
......@@ -11,7 +11,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel)
ELogError
};
@interface SisleyHaiBaoJuheDGLogger : NSObject
@interface OdysseyHaiBaoJuheDGLogger : NSObject
+ (void)showLog:(NSString *)fmt,...;
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface OdysseyAllManager : NSObject
{
NSString* OdysseyAPPID_;
NSString* OdysseyAPPKEY_;
NSString* OdysseyInviterCode_;
}
@property bool OdysseyGeiWoHuaQianBa;
+ (OdysseyAllManager *)OdysseyInstance;
- (void)OdysseyChuShiHua;
- (void)OdysseyDengLu:(NSString *)OdysseyAPPID : (NSString *)OdysseyAPPKEY : (UIViewController *)controller;
- (void)OdysseyYangShi:(NSString*)OdysseyLeiXing;
- (void)OdysseyQuery: (NSString *)OdysseyFuWuQiID : (NSString *)OdysseyNickName : (NSNumber *)OdysseyAmount : (NSString *)OdysseyCallBack : (UIViewController *)controller : (NSString *)OdysseyServerName;
- (void)OdysseyQueryOperation:(UIViewController*)controll OdysseyHuoWuID:(NSString*)products OdysseyJiaGe:(NSString*)amount OdysseyHuoWuMing:(NSString*)productName OdysseyDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const OdysseyExitNotification;
extern NSString * const OdysseyLoginNotification;
extern NSString * const OdysseyErrorNotification;
@interface OdysseyHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface OdysseyIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* OdysseyDingDanHao;
@property(nonatomic,strong) NSDictionary* OdysseyHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* OdysseyHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *OdysseyHuoWuLieBiaoView;
- (void)OdysseyHuaQianView:(UIViewController*)controller OdysseyHuoWuD:(NSString*)products OdysseyQian:(NSString*)amount OdysseyHuoWuMing:(NSString*)productName OdysseyDingDanHao:(NSString*)DingDanHao;
@end
#import <Foundation/Foundation.h>
@interface SisleyInformation : NSObject
@interface OdysseyInformation : NSObject
{
//
NSString *openId;
......@@ -12,5 +12,5 @@ NSString *timestamp;
@property(retain,nonatomic) NSString *openId;
@property(retain,nonatomic) NSString *token;
@property(retain,nonatomic) NSString *timestamp;
+ (SisleyInformation *)getInstance;
+ (OdysseyInformation *)getInstance;
@end
......
#import <Foundation/Foundation.h>
@interface SisleyInformationJM : NSObject
@interface OdysseyInformationJM : NSObject
+(NSString *)SisleyJM:(NSString *)jm;
+(NSString *)OdysseyJM:(NSString *)jm;
@end
......
#import <UIKit/UIKit.h>
@interface SisleyLocation : NSObject
@interface OdysseyLocation : NSObject
+ (NSString *)SisleySKCloudServiceSetupOptionsKey;
+ (NSString *)OdysseySKCloudServiceSetupOptionsKey;
@end
......
#import <UIKit/UIKit.h>
#import "SisleyInformation.h"
#import "OdysseyInformation.h"
#import <JavaScriptCore/JavaScriptCore.h>
@interface SisleyMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
@interface OdysseyMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
{
UIWebView *webSisleyView_;
UIWebView *webOdysseyView_;
UIActivityIndicatorView *activityIndicator;
}
@property(assign) BOOL SisleyYouYuanJiao;
@property(assign) BOOL OdysseyYouYuanJiao;
- (void)SisleySettingSisleyView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)SisleyInitWebView;
- (void)OdysseySettingOdysseyView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)OdysseyInitWebView;
- (void)loadWebPageWithString:(NSString *)url;
- (void)loadWebPageWithJs:(NSString *)content;
- (void)postNotification:(NSString *)name : (NSString *)code;
......
#include "SDKInterface.h"
#import <UIKit/UIKit.h>
#import "Sisley/SisleyAllManager.h"
#import "Sisley/SisleyHuiTiaoNotification.h"
#import "Sisley/SisleyInformation.h"
#import "Odyssey/OdysseyAllManager.h"
#import "Odyssey/OdysseyHuiTiaoNotification.h"
#import "Odyssey/OdysseyInformation.h"
#import "TrackingIO.h"
@implementation SDKInterface : Interface
int mExchange;
NSString *SisleyAppId;
NSString *SisleyAppKey;
NSString *SisleyLeakOrderUrl;
NSString *OdysseyAppId;
NSString *OdysseyAppKey;
NSString *OdysseyLeakOrderUrl;
- (void)SDKinit:(UIViewController *) control
{
......@@ -20,10 +20,10 @@ NSString *SisleyLeakOrderUrl;
[super SDKinit:control];
[HaiBaoJuheConfig getInstance];
[[SisleyAllManager SisleyInstance]SisleyChuShiHua];
[[SisleyAllManager SisleyInstance]SisleyYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:SisleyLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"SisleyToolCallBack" object:nil];
[[OdysseyAllManager OdysseyInstance]OdysseyChuShiHua];
[[OdysseyAllManager OdysseyInstance]OdysseyYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:OdysseyLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"OdysseyToolCallBack" object:nil];
[[HaiBaoJuheChecker getInstance] sendNotice:HaiBaoJuheSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"initSuccess" extendData:nil];
......@@ -40,9 +40,9 @@ NSString *SisleyLeakOrderUrl;
- (void)SDKloginSDK
{
//APPID APPKEY
SisleyAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
SisleyAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[SisleyAllManager SisleyInstance]SisleyDengLu:SisleyAppId :SisleyAppKey :self.controller];
OdysseyAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
OdysseyAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[OdysseyAllManager OdysseyInstance]OdysseyDengLu:OdysseyAppId :OdysseyAppKey :self.controller];
}
......@@ -53,9 +53,9 @@ NSString *SisleyLeakOrderUrl;
{
NSLog(@"loginchek");
HaiBaoJuheLoginInfo *loginInfo = [HaiBaoJuheLoginInfo alloc];
loginInfo.openId = [[SisleyInformation getInstance]openId];
loginInfo.sign = [[SisleyInformation getInstance] token];
loginInfo.timestamp = [[SisleyInformation getInstance] timestamp];
loginInfo.openId = [[OdysseyInformation getInstance]openId];
loginInfo.sign = [[OdysseyInformation getInstance] token];
loginInfo.timestamp = [[OdysseyInformation getInstance] timestamp];
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[[HaiBaoJuheChecker getInstance] startCheck:loginInfo];
......@@ -82,7 +82,7 @@ NSString *SisleyLeakOrderUrl;
- (void)HCKAssetsToolCallBack:(NSNotification *)notification
{
NSDictionary* payResultDic = notification.object;
NSString* receiptStr = [payResultDic objectForKey:@"SisleyToolResult"];
NSString* receiptStr = [payResultDic objectForKey:@"OdysseyToolResult"];
NSString* queryId = [payResultDic objectForKey:@"query_id"];
//收到回调,保存queryid和data
......@@ -101,7 +101,7 @@ NSString *SisleyLeakOrderUrl;
[userDefaults setObject:receiptStr forKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:SisleyLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:OdysseyLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
......@@ -121,11 +121,11 @@ NSString *SisleyLeakOrderUrl;
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
NSString* lastqueryid = [userDefaults objectForKey:@"lastqueryid"];
SisleyLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
OdysseyLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
[userDefaults setObject:SisleyLeakOrderUrl forKey:@"lastSisleyLeakOrderUrl"];
[userDefaults setObject:OdysseyLeakOrderUrl forKey:@"lastOdysseyLeakOrderUrl"];
if (lastqueryid!=nil) {
//创建订单前进行补单
......@@ -135,7 +135,7 @@ NSString *SisleyLeakOrderUrl;
receiptStr = [receiptStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
//如果不为空,进行最后一次补单
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",lastqueryid,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:SisleyLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:OdysseyLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
[userDefaults removeObjectForKey:@"lastqueryid"];
......@@ -145,7 +145,7 @@ NSString *SisleyLeakOrderUrl;
mExchange = [payInfo exchange].intValue;
[super SDKgzyazfWithGzyazfmentInfo:payInfo];
SisleyLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
OdysseyLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
......@@ -212,10 +212,10 @@ NSString *SisleyLeakOrderUrl;
for (NSString* queryId in queryIdArray) {
NSString* receiptStr = [userDefaults valueForKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* lastSisleyLeakOrderUrl = [userDefaults objectForKey:@"lastSisleyLeakOrderUrl"];
NSString* lastOdysseyLeakOrderUrl = [userDefaults objectForKey:@"lastOdysseyLeakOrderUrl"];
NSString* result;
if (lastSisleyLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastSisleyLeakOrderUrl :receiptDic];
if (lastOdysseyLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastOdysseyLeakOrderUrl :receiptDic];
}else{
result = [[NetCenter getInstance] httpPostSyn:[HaiBaoJuheUtils createGzyazfUrl] :receiptDic];
}
......@@ -253,14 +253,14 @@ NSString *SisleyLeakOrderUrl;
NSString *other = [payInfo other];
if (other && [other length] > 0) {
[[SisleyAllManager SisleyInstance] SisleyQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
[[OdysseyAllManager OdysseyInstance] OdysseyQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
}else{
NSString* products = [payInfo products];
//保存订单号到本地
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
[userDefaults setObject:queryId forKey:@"lastqueryid"];
[userDefaults synchronize];
[[SisleyAllManager SisleyInstance] SisleyQueryOperation:self.controller SisleyHuoWuID:products SisleyJiaGe:[payInfo postAmount] SisleyHuoWuMing:[payInfo productName] SisleyDingDanHao:queryId];
[[OdysseyAllManager OdysseyInstance] OdysseyQueryOperation:self.controller OdysseyHuoWuID:products OdysseyJiaGe:[payInfo postAmount] OdysseyHuoWuMing:[payInfo productName] OdysseyDingDanHao:queryId];
}
}
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface SisleyAllManager : NSObject
{
NSString* SisleyAPPID_;
NSString* SisleyAPPKEY_;
NSString* SisleyInviterCode_;
}
@property bool SisleyGeiWoHuaQianBa;
+ (SisleyAllManager *)SisleyInstance;
- (void)SisleyChuShiHua;
- (void)SisleyDengLu:(NSString *)SisleyAPPID : (NSString *)SisleyAPPKEY : (UIViewController *)controller;
- (void)SisleyYangShi:(NSString*)SisleyLeiXing;
- (void)SisleyQuery: (NSString *)SisleyFuWuQiID : (NSString *)SisleyNickName : (NSNumber *)SisleyAmount : (NSString *)SisleyCallBack : (UIViewController *)controller : (NSString *)SisleyServerName;
- (void)SisleyQueryOperation:(UIViewController*)controll SisleyHuoWuID:(NSString*)products SisleyJiaGe:(NSString*)amount SisleyHuoWuMing:(NSString*)productName SisleyDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const SisleyExitNotification;
extern NSString * const SisleyLoginNotification;
extern NSString * const SisleyErrorNotification;
@interface SisleyHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface SisleyIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* SisleyDingDanHao;
@property(nonatomic,strong) NSDictionary* SisleyHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* SisleyHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *SisleyHuoWuLieBiaoView;
- (void)SisleyHuaQianView:(UIViewController*)controller SisleyHuoWuD:(NSString*)products SisleyQian:(NSString*)amount SisleyHuoWuMing:(NSString*)productName SisleyDingDanHao:(NSString*)DingDanHao;
@end