lizhihui

更新190321版本

Showing 64 changed files with 230 additions and 224 deletions
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -7,8 +7,8 @@
objects = {
/* Begin PBXBuildFile section */
2606305D22432E3700019981 /* Sorrow.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2606305C22432E3700019981 /* Sorrow.framework */; };
269F653821B6613F006AEC88 /* HaiBaoJuheSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 269F653721B6613F006AEC88 /* HaiBaoJuheSDK.framework */; };
26C152BB2224F4030020B711 /* Siberian.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26C152BA2224F4030020B711 /* Siberian.framework */; };
845D18221C8D778400F27EB9 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 845D181B1C8D778400F27EB9 /* Images.xcassets */; };
846BD2241EE9342700E89A1D /* hnyouai_config in Resources */ = {isa = PBXBuildFile; fileRef = 846BD21F1EE9342700E89A1D /* hnyouai_config */; };
846BD2261EE9342700E89A1D /* SDKInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 846BD2231EE9342700E89A1D /* SDKInterface.m */; };
......@@ -59,8 +59,8 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
2606305C22432E3700019981 /* Sorrow.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sorrow.framework; sourceTree = "<group>"; };
269F653721B6613F006AEC88 /* HaiBaoJuheSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HaiBaoJuheSDK.framework; sourceTree = "<group>"; };
26C152BA2224F4030020B711 /* Siberian.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Siberian.framework; sourceTree = "<group>"; };
845D181B1C8D778400F27EB9 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = poolsdk_file/poolsdk/Images.xcassets; sourceTree = "<group>"; };
845D181C1C8D778400F27EB9 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = poolsdk_file/poolsdk/Info.plist; sourceTree = "<group>"; };
846BD21F1EE9342700E89A1D /* hnyouai_config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = hnyouai_config; path = poolsdk_file/poolsdk/hnyouai_config; sourceTree = "<group>"; };
......@@ -106,7 +106,6 @@
269F653821B6613F006AEC88 /* HaiBaoJuheSDK.framework in Frameworks */,
8484E4FC1EE7E1D800B402D1 /* libsqlite3.dylib in Frameworks */,
8484E5121EE7E2B800B402D1 /* libz.1.dylib in Frameworks */,
26C152BB2224F4030020B711 /* Siberian.framework in Frameworks */,
8484E5101EE7E29A00B402D1 /* libc++.1.dylib in Frameworks */,
8484E5001EE7E20C00B402D1 /* CFNetwork.framework in Frameworks */,
8484E5061EE7E24A00B402D1 /* CoreMotion.framework in Frameworks */,
......@@ -118,6 +117,7 @@
8484E50A1EE7E26200B402D1 /* Security.framework in Frameworks */,
8484E5041EE7E24400B402D1 /* StoreKit.framework in Frameworks */,
8484E4FE1EE7E1F700B402D1 /* CoreTelephony.framework in Frameworks */,
2606305D22432E3700019981 /* Sorrow.framework in Frameworks */,
84A090AB1F160A69003D23FB /* TrackingIO.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -143,7 +143,7 @@
8476DF641C4DD71D00EC42BA /* poolsdk */ = {
isa = PBXGroup;
children = (
26C152BA2224F4030020B711 /* Siberian.framework */,
2606305C22432E3700019981 /* Sorrow.framework */,
84A090AC1F174E21003D23FB /* TrackingIO.h */,
84A090AA1F160A69003D23FB /* TrackingIO.a */,
846BD21F1EE9342700E89A1D /* hnyouai_config */,
......
......@@ -15,11 +15,11 @@
- (void)initChecker;
- (void)startCheck:(HaiBaoJuheLoginInfo *)loginInfo;
- (void) createOrder:(HaiBaoJuheCreateOrderInfo *)gzyazfInfo;
- (void) SiberianHaiBaoJuhereportOpen;
- (void) SiberianHaiBaoJuhereportSDKOpen;
- (void)SiberianHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) SorrowHaiBaoJuhereportOpen;
- (void) SorrowHaiBaoJuhereportSDKOpen;
- (void)SorrowHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) reportEnter:(HaiBaoJuheReportInfo *)reInfo;
- (void) SiberianHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void) SorrowHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void)sendNotice:(HaiBaoJuheSDKNotificationType)notiType
notiName:(NSString *)notiName
statusCode:(int)nCode
......@@ -28,7 +28,7 @@
- (void)startCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo;
- (void)SiberianHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
- (void)SorrowHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
/*
*初始化时调用
......
#import "HaiBaoJuheSDK/SiberianHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : SiberianHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/SorrowHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : SorrowHaiBaoJuheBaseModel
@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 *) SiberianHaiBaoJuheGetTsign ;
- (NSString *) SiberianHaiBaoJuheGetTimestamp ;
- (NSString *) SorrowHaiBaoJuheGetTsign ;
- (NSString *) SorrowHaiBaoJuheGetTimestamp ;
@end
......
#import "HaiBaoJuheSDK/SiberianHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : SiberianHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/SorrowHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : SorrowHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *queryId;
......
#import "HaiBaoJuheSDK/SiberianHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : SiberianHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/SorrowHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : SorrowHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *timestamp;
@property(nonatomic, strong)NSString *sign;
......
//
// SiberianHaiBaoJuheReportInfo.h
// SorrowHaiBaoJuheReportInfo.h
// HaiBaoJuheSDK
//
// Created by winFan on 12/21/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "HaiBaoJuheSDK/SiberianHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : SiberianHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/SorrowHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : SorrowHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *reportType;//类型
@property(nonatomic, strong)NSString *playerId;//玩家ID
......
......@@ -10,6 +10,8 @@
@property(nonatomic, strong)NSString *urlSchemes;
@property(strong) NSMutableArray* SorrowList;
@property BOOL isAppleGzyazfing;
+ (HaiBaoJuheSDK *)shareSDK;
......
......@@ -4,7 +4,7 @@
@interface HaiBaoJuheUtils : NSObject
+(NSString *)md5:(NSString *)str;
+ (NSDictionary *)SiberianHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+ (NSDictionary *)SorrowHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+(NSString *)createGzyazfOrderUrl;
//*充值回调地址
+(NSString *)createGzyazfUrl;
......
#import <Foundation/Foundation.h>
#import "OtherSetting.h"
@interface SiberianHaiBaoJuheBaseModel : NSObject
@interface SorrowHaiBaoJuheBaseModel : NSObject
- (NSString *)SiberianHaiBaoJuheObjectToJsonString;
- (NSString *)SorrowHaiBaoJuheObjectToJsonString;
- (NSMutableString *)paramAddToString;
- (id)initWithDiction:(NSDictionary *)diction;
......
......@@ -11,7 +11,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel)
ELogError
};
@interface SiberianHaiBaoJuheDGLogger : NSObject
@interface SorrowHaiBaoJuheDGLogger : NSObject
+ (void)showLog:(NSString *)fmt,...;
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface SiberianAllManager : NSObject
{
NSString* SiberianAPPID_;
NSString* SiberianAPPKEY_;
NSString* SiberianInviterCode_;
}
@property bool SiberianGeiWoHuaQianBa;
+ (SiberianAllManager *)SiberianInstance;
- (void)SiberianChuShiHua;
- (void)SiberianDengLu:(NSString *)SiberianAPPID : (NSString *)SiberianAPPKEY : (UIViewController *)controller;
- (void)SiberianYangShi:(NSString*)SiberianLeiXing;
- (void)SiberianQuery: (NSString *)SiberianFuWuQiID : (NSString *)SiberianNickName : (NSNumber *)SiberianAmount : (NSString *)SiberianCallBack : (UIViewController *)controller : (NSString *)SiberianServerName;
- (void)SiberianQueryOperation:(UIViewController*)controll SiberianHuoWuID:(NSString*)products SiberianJiaGe:(NSString*)amount SiberianHuoWuMing:(NSString*)productName SiberianDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const SiberianExitNotification;
extern NSString * const SiberianLoginNotification;
extern NSString * const SiberianErrorNotification;
@interface SiberianHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface SiberianIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* SiberianDingDanHao;
@property(nonatomic,strong) NSDictionary* SiberianHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* SiberianHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *SiberianHuoWuLieBiaoView;
- (void)SiberianHuaQianView:(UIViewController*)controller SiberianHuoWuD:(NSString*)products SiberianQian:(NSString*)amount SiberianHuoWuMing:(NSString*)productName SiberianDingDanHao:(NSString*)DingDanHao;
@end
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface SorrowAllManager : NSObject
{
NSString* SorrowAPPID_;
NSString* SorrowAPPKEY_;
NSString* SorrowInviterCode_;
}
@property(strong) NSMutableArray* SorrowList;
@property bool SorrowGeiWoHuaQianBa;
+ (SorrowAllManager *)SorrowInstance;
- (void)SorrowChuShiHua;
- (void)SorrowDengLu:(NSString *)SorrowAPPID : (NSString *)SorrowAPPKEY : (UIViewController *)controller;
- (void)SorrowYangShi:(NSString*)SorrowLeiXing;
- (void)SorrowQuery: (NSString *)SorrowFuWuQiID : (NSString *)SorrowNickName : (NSNumber *)SorrowAmount : (NSString *)SorrowCallBack : (UIViewController *)controller : (NSString *)SorrowServerName;
- (void)SorrowQueryOperation:(UIViewController*)controll SorrowHuoWuID:(NSString*)products SorrowJiaGe:(NSString*)amount SorrowHuoWuMing:(NSString*)productName SorrowDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const SorrowExitNotification;
extern NSString * const SorrowLoginNotification;
extern NSString * const SorrowErrorNotification;
@interface SorrowHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface SorrowIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* SorrowDingDanHao;
@property(nonatomic,strong) NSDictionary* SorrowHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* SorrowHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *SorrowHuoWuLieBiaoView;
- (void)SorrowHuaQianView:(UIViewController*)controller SorrowHuoWuD:(NSString*)products SorrowQian:(NSString*)amount SorrowHuoWuMing:(NSString*)productName SorrowDingDanHao:(NSString*)DingDanHao;
@end
#import <Foundation/Foundation.h>
@interface SiberianInformation : NSObject
@interface SorrowInformation : NSObject
{
//
NSString *openId;
......@@ -12,5 +12,5 @@ NSString *timestamp;
@property(retain,nonatomic) NSString *openId;
@property(retain,nonatomic) NSString *token;
@property(retain,nonatomic) NSString *timestamp;
+ (SiberianInformation *)getInstance;
+ (SorrowInformation *)getInstance;
@end
......
#import <Foundation/Foundation.h>
@interface SiberianInformationJM : NSObject
@interface SorrowInformationJM : NSObject
+(NSString *)SiberianJM:(NSString *)jm;
+(NSString *)SorrowJM:(NSString *)jm;
@end
......
#import <UIKit/UIKit.h>
@interface SiberianLocation : NSObject
@interface SorrowLocation : NSObject
+ (NSString *)SiberianSKCloudServiceSetupOptionsKey;
+ (NSString *)SorrowSKCloudServiceSetupOptionsKey;
@end
......
#import <UIKit/UIKit.h>
#import "SiberianInformation.h"
#import "SorrowInformation.h"
#import <JavaScriptCore/JavaScriptCore.h>
@interface SiberianMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
@interface SorrowMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
{
UIWebView *webSiberianView_;
UIWebView *webSorrowView_;
UIActivityIndicatorView *activityIndicator;
}
@property(assign) BOOL SiberianYouYuanJiao;
@property(assign) BOOL SorrowYouYuanJiao;
- (void)SiberianSettingSiberianView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)SiberianInitWebView;
- (void)SorrowSettingSorrowView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)SorrowInitWebView;
- (void)loadWebPageWithString:(NSString *)url;
- (void)loadWebPageWithJs:(NSString *)content;
- (void)postNotification:(NSString *)name : (NSString *)code;
......
#include "SDKInterface.h"
#import <UIKit/UIKit.h>
#import "Siberian/SiberianAllManager.h"
#import "Siberian/SiberianHuiTiaoNotification.h"
#import "Siberian/SiberianInformation.h"
#import "Sorrow/SorrowAllManager.h"
#import "Sorrow/SorrowHuiTiaoNotification.h"
#import "Sorrow/SorrowInformation.h"
#import "TrackingIO.h"
@implementation SDKInterface : Interface
int mExchange;
NSString *SiberianAppId;
NSString *SiberianAppKey;
NSString *SiberianLeakOrderUrl;
NSString *SorrowAppId;
NSString *SorrowAppKey;
NSString *SorrowLeakOrderUrl;
- (void)SDKinit:(UIViewController *) control
{
......@@ -20,10 +20,10 @@ NSString *SiberianLeakOrderUrl;
[super SDKinit:control];
[HaiBaoJuheConfig getInstance];
[[SiberianAllManager SiberianInstance]SiberianChuShiHua];
[[SiberianAllManager SiberianInstance]SiberianYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:SiberianLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"SiberianToolCallBack" object:nil];
[[SorrowAllManager SorrowInstance]SorrowChuShiHua];
[[SorrowAllManager SorrowInstance]SorrowYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:SorrowLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"SorrowToolCallBack" object:nil];
[[HaiBaoJuheChecker getInstance] sendNotice:HaiBaoJuheSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"initSuccess" extendData:nil];
......@@ -40,9 +40,9 @@ NSString *SiberianLeakOrderUrl;
- (void)SDKloginSDK
{
//APPID APPKEY
SiberianAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
SiberianAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[SiberianAllManager SiberianInstance]SiberianDengLu:SiberianAppId :SiberianAppKey :self.controller];
SorrowAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
SorrowAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[SorrowAllManager SorrowInstance]SorrowDengLu:SorrowAppId :SorrowAppKey :self.controller];
}
......@@ -53,9 +53,9 @@ NSString *SiberianLeakOrderUrl;
{
NSLog(@"loginchek");
HaiBaoJuheLoginInfo *loginInfo = [HaiBaoJuheLoginInfo alloc];
loginInfo.openId = [[SiberianInformation getInstance]openId];
loginInfo.sign = [[SiberianInformation getInstance] token];
loginInfo.timestamp = [[SiberianInformation getInstance] timestamp];
loginInfo.openId = [[SorrowInformation getInstance]openId];
loginInfo.sign = [[SorrowInformation getInstance] token];
loginInfo.timestamp = [[SorrowInformation getInstance] timestamp];
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[[HaiBaoJuheChecker getInstance] startCheck:loginInfo];
......@@ -82,7 +82,7 @@ NSString *SiberianLeakOrderUrl;
- (void)HCKAssetsToolCallBack:(NSNotification *)notification
{
NSDictionary* payResultDic = notification.object;
NSString* receiptStr = [payResultDic objectForKey:@"SiberianToolResult"];
NSString* receiptStr = [payResultDic objectForKey:@"SorrowToolResult"];
NSString* queryId = [payResultDic objectForKey:@"query_id"];
//收到回调,保存queryid和data
......@@ -101,7 +101,7 @@ NSString *SiberianLeakOrderUrl;
[userDefaults setObject:receiptStr forKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:SiberianLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:SorrowLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
......@@ -121,11 +121,11 @@ NSString *SiberianLeakOrderUrl;
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
NSString* lastqueryid = [userDefaults objectForKey:@"lastqueryid"];
SiberianLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
SorrowLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
[userDefaults setObject:SiberianLeakOrderUrl forKey:@"lastSiberianLeakOrderUrl"];
[userDefaults setObject:SorrowLeakOrderUrl forKey:@"lastSorrowLeakOrderUrl"];
if (lastqueryid!=nil) {
//创建订单前进行补单
......@@ -135,7 +135,7 @@ NSString *SiberianLeakOrderUrl;
receiptStr = [receiptStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
//如果不为空,进行最后一次补单
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",lastqueryid,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:SiberianLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:SorrowLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
[userDefaults removeObjectForKey:@"lastqueryid"];
......@@ -145,7 +145,7 @@ NSString *SiberianLeakOrderUrl;
mExchange = [payInfo exchange].intValue;
[super SDKgzyazfWithGzyazfmentInfo:payInfo];
SiberianLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
SorrowLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
......@@ -212,10 +212,10 @@ NSString *SiberianLeakOrderUrl;
for (NSString* queryId in queryIdArray) {
NSString* receiptStr = [userDefaults valueForKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* lastSiberianLeakOrderUrl = [userDefaults objectForKey:@"lastSiberianLeakOrderUrl"];
NSString* lastSorrowLeakOrderUrl = [userDefaults objectForKey:@"lastSorrowLeakOrderUrl"];
NSString* result;
if (lastSiberianLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastSiberianLeakOrderUrl :receiptDic];
if (lastSorrowLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastSorrowLeakOrderUrl :receiptDic];
}else{
result = [[NetCenter getInstance] httpPostSyn:[HaiBaoJuheUtils createGzyazfUrl] :receiptDic];
}
......@@ -253,14 +253,14 @@ NSString *SiberianLeakOrderUrl;
NSString *other = [payInfo other];
if (other && [other length] > 0) {
[[SiberianAllManager SiberianInstance] SiberianQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
[[SorrowAllManager SorrowInstance] SorrowQuery: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];
[[SiberianAllManager SiberianInstance] SiberianQueryOperation:self.controller SiberianHuoWuID:products SiberianJiaGe:[payInfo postAmount] SiberianHuoWuMing:[payInfo productName] SiberianDingDanHao:queryId];
[[SorrowAllManager SorrowInstance] SorrowQueryOperation:self.controller SorrowHuoWuID:products SorrowJiaGe:[payInfo postAmount] SorrowHuoWuMing:[payInfo productName] SorrowDingDanHao:queryId];
}
}
......
......@@ -10,9 +10,9 @@
7、``` 所有接口PoolSdk 替换成 HaiBaoJuheSDK(如不理解可以参考demo或者详细文档) ``` <br>
已更新 海豹聚合SDK 2018年12月05日版本 快速更新到 2019年02月26日版本2方法<br>
已更新 海豹聚合SDK 2018年12月05日版本 快速更新到 2019年03月21日版本<br>
1、``` 删除poolsdk_file文件夹中原来framework ``` <br>
2、``` 引入poolsdk_file文件夹中Siberian.framework ``` <br>
2、``` 引入poolsdk_file文件夹中Sorrow.framework ``` <br>
3、``` 替换SDKInterface.m文件 ``` <br>
4、``` 替换HaiBaoJuheSDK.framework ``` <br>
5、``` 原 URL Schemes 中的 i9133public 改为 sdk.uuufish.com (可参考demo中info设置) ``` <br>
......
......@@ -15,11 +15,11 @@
- (void)initChecker;
- (void)startCheck:(HaiBaoJuheLoginInfo *)loginInfo;
- (void) createOrder:(HaiBaoJuheCreateOrderInfo *)gzyazfInfo;
- (void) SiberianHaiBaoJuhereportOpen;
- (void) SiberianHaiBaoJuhereportSDKOpen;
- (void)SiberianHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) SorrowHaiBaoJuhereportOpen;
- (void) SorrowHaiBaoJuhereportSDKOpen;
- (void)SorrowHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) reportEnter:(HaiBaoJuheReportInfo *)reInfo;
- (void) SiberianHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void) SorrowHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void)sendNotice:(HaiBaoJuheSDKNotificationType)notiType
notiName:(NSString *)notiName
statusCode:(int)nCode
......@@ -28,7 +28,7 @@
- (void)startCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo;
- (void)SiberianHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
- (void)SorrowHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
/*
*初始化时调用
......
#import "HaiBaoJuheSDK/SiberianHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : SiberianHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/SorrowHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : SorrowHaiBaoJuheBaseModel
@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 *) SiberianHaiBaoJuheGetTsign ;
- (NSString *) SiberianHaiBaoJuheGetTimestamp ;
- (NSString *) SorrowHaiBaoJuheGetTsign ;
- (NSString *) SorrowHaiBaoJuheGetTimestamp ;
@end
......
#import "HaiBaoJuheSDK/SiberianHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : SiberianHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/SorrowHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : SorrowHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *queryId;
......
#import "HaiBaoJuheSDK/SiberianHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : SiberianHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/SorrowHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : SorrowHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *timestamp;
@property(nonatomic, strong)NSString *sign;
......
//
// SiberianHaiBaoJuheReportInfo.h
// SorrowHaiBaoJuheReportInfo.h
// HaiBaoJuheSDK
//
// Created by winFan on 12/21/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "HaiBaoJuheSDK/SiberianHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : SiberianHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/SorrowHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : SorrowHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *reportType;//类型
@property(nonatomic, strong)NSString *playerId;//玩家ID
......
......@@ -10,6 +10,8 @@
@property(nonatomic, strong)NSString *urlSchemes;
@property(strong) NSMutableArray* SorrowList;
@property BOOL isAppleGzyazfing;
+ (HaiBaoJuheSDK *)shareSDK;
......
......@@ -4,7 +4,7 @@
@interface HaiBaoJuheUtils : NSObject
+(NSString *)md5:(NSString *)str;
+ (NSDictionary *)SiberianHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+ (NSDictionary *)SorrowHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+(NSString *)createGzyazfOrderUrl;
//*充值回调地址
+(NSString *)createGzyazfUrl;
......
#import <Foundation/Foundation.h>
#import "OtherSetting.h"
@interface SiberianHaiBaoJuheBaseModel : NSObject
@interface SorrowHaiBaoJuheBaseModel : NSObject
- (NSString *)SiberianHaiBaoJuheObjectToJsonString;
- (NSString *)SorrowHaiBaoJuheObjectToJsonString;
- (NSMutableString *)paramAddToString;
- (id)initWithDiction:(NSDictionary *)diction;
......
......@@ -11,7 +11,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel)
ELogError
};
@interface SiberianHaiBaoJuheDGLogger : NSObject
@interface SorrowHaiBaoJuheDGLogger : NSObject
+ (void)showLog:(NSString *)fmt,...;
......
#include "SDKInterface.h"
#import <UIKit/UIKit.h>
#import "Siberian/SiberianAllManager.h"
#import "Siberian/SiberianHuiTiaoNotification.h"
#import "Siberian/SiberianInformation.h"
#import "Sorrow/SorrowAllManager.h"
#import "Sorrow/SorrowHuiTiaoNotification.h"
#import "Sorrow/SorrowInformation.h"
#import "TrackingIO.h"
@implementation SDKInterface : Interface
int mExchange;
NSString *SiberianAppId;
NSString *SiberianAppKey;
NSString *SiberianLeakOrderUrl;
NSString *SorrowAppId;
NSString *SorrowAppKey;
NSString *SorrowLeakOrderUrl;
- (void)SDKinit:(UIViewController *) control
{
......@@ -20,10 +20,10 @@ NSString *SiberianLeakOrderUrl;
[super SDKinit:control];
[HaiBaoJuheConfig getInstance];
[[SiberianAllManager SiberianInstance]SiberianChuShiHua];
[[SiberianAllManager SiberianInstance]SiberianYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:SiberianLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"SiberianToolCallBack" object:nil];
[[SorrowAllManager SorrowInstance]SorrowChuShiHua];
[[SorrowAllManager SorrowInstance]SorrowYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:SorrowLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"SorrowToolCallBack" object:nil];
[[HaiBaoJuheChecker getInstance] sendNotice:HaiBaoJuheSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"initSuccess" extendData:nil];
......@@ -40,9 +40,9 @@ NSString *SiberianLeakOrderUrl;
- (void)SDKloginSDK
{
//APPID APPKEY
SiberianAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
SiberianAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[SiberianAllManager SiberianInstance]SiberianDengLu:SiberianAppId :SiberianAppKey :self.controller];
SorrowAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
SorrowAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[SorrowAllManager SorrowInstance]SorrowDengLu:SorrowAppId :SorrowAppKey :self.controller];
}
......@@ -53,9 +53,9 @@ NSString *SiberianLeakOrderUrl;
{
NSLog(@"loginchek");
HaiBaoJuheLoginInfo *loginInfo = [HaiBaoJuheLoginInfo alloc];
loginInfo.openId = [[SiberianInformation getInstance]openId];
loginInfo.sign = [[SiberianInformation getInstance] token];
loginInfo.timestamp = [[SiberianInformation getInstance] timestamp];
loginInfo.openId = [[SorrowInformation getInstance]openId];
loginInfo.sign = [[SorrowInformation getInstance] token];
loginInfo.timestamp = [[SorrowInformation getInstance] timestamp];
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[[HaiBaoJuheChecker getInstance] startCheck:loginInfo];
......@@ -82,7 +82,7 @@ NSString *SiberianLeakOrderUrl;
- (void)HCKAssetsToolCallBack:(NSNotification *)notification
{
NSDictionary* payResultDic = notification.object;
NSString* receiptStr = [payResultDic objectForKey:@"SiberianToolResult"];
NSString* receiptStr = [payResultDic objectForKey:@"SorrowToolResult"];
NSString* queryId = [payResultDic objectForKey:@"query_id"];
//收到回调,保存queryid和data
......@@ -101,7 +101,7 @@ NSString *SiberianLeakOrderUrl;
[userDefaults setObject:receiptStr forKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:SiberianLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:SorrowLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
......@@ -121,11 +121,11 @@ NSString *SiberianLeakOrderUrl;
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
NSString* lastqueryid = [userDefaults objectForKey:@"lastqueryid"];
SiberianLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
SorrowLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
[userDefaults setObject:SiberianLeakOrderUrl forKey:@"lastSiberianLeakOrderUrl"];
[userDefaults setObject:SorrowLeakOrderUrl forKey:@"lastSorrowLeakOrderUrl"];
if (lastqueryid!=nil) {
//创建订单前进行补单
......@@ -135,7 +135,7 @@ NSString *SiberianLeakOrderUrl;
receiptStr = [receiptStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
//如果不为空,进行最后一次补单
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",lastqueryid,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:SiberianLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:SorrowLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
[userDefaults removeObjectForKey:@"lastqueryid"];
......@@ -145,7 +145,7 @@ NSString *SiberianLeakOrderUrl;
mExchange = [payInfo exchange].intValue;
[super SDKgzyazfWithGzyazfmentInfo:payInfo];
SiberianLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
SorrowLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
......@@ -212,10 +212,10 @@ NSString *SiberianLeakOrderUrl;
for (NSString* queryId in queryIdArray) {
NSString* receiptStr = [userDefaults valueForKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* lastSiberianLeakOrderUrl = [userDefaults objectForKey:@"lastSiberianLeakOrderUrl"];
NSString* lastSorrowLeakOrderUrl = [userDefaults objectForKey:@"lastSorrowLeakOrderUrl"];
NSString* result;
if (lastSiberianLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastSiberianLeakOrderUrl :receiptDic];
if (lastSorrowLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastSorrowLeakOrderUrl :receiptDic];
}else{
result = [[NetCenter getInstance] httpPostSyn:[HaiBaoJuheUtils createGzyazfUrl] :receiptDic];
}
......@@ -253,14 +253,14 @@ NSString *SiberianLeakOrderUrl;
NSString *other = [payInfo other];
if (other && [other length] > 0) {
[[SiberianAllManager SiberianInstance] SiberianQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
[[SorrowAllManager SorrowInstance] SorrowQuery: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];
[[SiberianAllManager SiberianInstance] SiberianQueryOperation:self.controller SiberianHuoWuID:products SiberianJiaGe:[payInfo postAmount] SiberianHuoWuMing:[payInfo productName] SiberianDingDanHao:queryId];
[[SorrowAllManager SorrowInstance] SorrowQueryOperation:self.controller SorrowHuoWuID:products SorrowJiaGe:[payInfo postAmount] SorrowHuoWuMing:[payInfo productName] SorrowDingDanHao:queryId];
}
}
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface SiberianAllManager : NSObject
{
NSString* SiberianAPPID_;
NSString* SiberianAPPKEY_;
NSString* SiberianInviterCode_;
}
@property bool SiberianGeiWoHuaQianBa;
+ (SiberianAllManager *)SiberianInstance;
- (void)SiberianChuShiHua;
- (void)SiberianDengLu:(NSString *)SiberianAPPID : (NSString *)SiberianAPPKEY : (UIViewController *)controller;
- (void)SiberianYangShi:(NSString*)SiberianLeiXing;
- (void)SiberianQuery: (NSString *)SiberianFuWuQiID : (NSString *)SiberianNickName : (NSNumber *)SiberianAmount : (NSString *)SiberianCallBack : (UIViewController *)controller : (NSString *)SiberianServerName;
- (void)SiberianQueryOperation:(UIViewController*)controll SiberianHuoWuID:(NSString*)products SiberianJiaGe:(NSString*)amount SiberianHuoWuMing:(NSString*)productName SiberianDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const SiberianExitNotification;
extern NSString * const SiberianLoginNotification;
extern NSString * const SiberianErrorNotification;
@interface SiberianHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface SiberianIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* SiberianDingDanHao;
@property(nonatomic,strong) NSDictionary* SiberianHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* SiberianHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *SiberianHuoWuLieBiaoView;
- (void)SiberianHuaQianView:(UIViewController*)controller SiberianHuoWuD:(NSString*)products SiberianQian:(NSString*)amount SiberianHuoWuMing:(NSString*)productName SiberianDingDanHao:(NSString*)DingDanHao;
@end
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface SorrowAllManager : NSObject
{
NSString* SorrowAPPID_;
NSString* SorrowAPPKEY_;
NSString* SorrowInviterCode_;
}
@property(strong) NSMutableArray* SorrowList;
@property bool SorrowGeiWoHuaQianBa;
+ (SorrowAllManager *)SorrowInstance;
- (void)SorrowChuShiHua;
- (void)SorrowDengLu:(NSString *)SorrowAPPID : (NSString *)SorrowAPPKEY : (UIViewController *)controller;
- (void)SorrowYangShi:(NSString*)SorrowLeiXing;
- (void)SorrowQuery: (NSString *)SorrowFuWuQiID : (NSString *)SorrowNickName : (NSNumber *)SorrowAmount : (NSString *)SorrowCallBack : (UIViewController *)controller : (NSString *)SorrowServerName;
- (void)SorrowQueryOperation:(UIViewController*)controll SorrowHuoWuID:(NSString*)products SorrowJiaGe:(NSString*)amount SorrowHuoWuMing:(NSString*)productName SorrowDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const SorrowExitNotification;
extern NSString * const SorrowLoginNotification;
extern NSString * const SorrowErrorNotification;
@interface SorrowHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface SorrowIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* SorrowDingDanHao;
@property(nonatomic,strong) NSDictionary* SorrowHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* SorrowHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *SorrowHuoWuLieBiaoView;
- (void)SorrowHuaQianView:(UIViewController*)controller SorrowHuoWuD:(NSString*)products SorrowQian:(NSString*)amount SorrowHuoWuMing:(NSString*)productName SorrowDingDanHao:(NSString*)DingDanHao;
@end
#import <Foundation/Foundation.h>
@interface SiberianInformation : NSObject
@interface SorrowInformation : NSObject
{
//
NSString *openId;
......@@ -12,5 +12,5 @@ NSString *timestamp;
@property(retain,nonatomic) NSString *openId;
@property(retain,nonatomic) NSString *token;
@property(retain,nonatomic) NSString *timestamp;
+ (SiberianInformation *)getInstance;
+ (SorrowInformation *)getInstance;
@end
......
#import <Foundation/Foundation.h>
@interface SiberianInformationJM : NSObject
@interface SorrowInformationJM : NSObject
+(NSString *)SiberianJM:(NSString *)jm;
+(NSString *)SorrowJM:(NSString *)jm;
@end
......
#import <UIKit/UIKit.h>
@interface SiberianLocation : NSObject
@interface SorrowLocation : NSObject
+ (NSString *)SiberianSKCloudServiceSetupOptionsKey;
+ (NSString *)SorrowSKCloudServiceSetupOptionsKey;
@end
......
#import <UIKit/UIKit.h>
#import "SiberianInformation.h"
#import "SorrowInformation.h"
#import <JavaScriptCore/JavaScriptCore.h>
@interface SiberianMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
@interface SorrowMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
{
UIWebView *webSiberianView_;
UIWebView *webSorrowView_;
UIActivityIndicatorView *activityIndicator;
}
@property(assign) BOOL SiberianYouYuanJiao;
@property(assign) BOOL SorrowYouYuanJiao;
- (void)SiberianSettingSiberianView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)SiberianInitWebView;
- (void)SorrowSettingSorrowView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)SorrowInitWebView;
- (void)loadWebPageWithString:(NSString *)url;
- (void)loadWebPageWithJs:(NSString *)content;
- (void)postNotification:(NSString *)name : (NSString *)code;
......