lizhihui

更新190226版本3

Showing 59 changed files with 224 additions and 224 deletions
......@@ -8,7 +8,7 @@
/* Begin PBXBuildFile section */
269F653821B6613F006AEC88 /* HaiBaoJuheSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 269F653721B6613F006AEC88 /* HaiBaoJuheSDK.framework */; };
26C1534D22253A140020B711 /* Lovelink.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26C1534C22253A130020B711 /* Lovelink.framework */; };
26C1534F22253B750020B711 /* Willingness.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26C1534E22253B750020B711 /* Willingness.framework */; };
845D18221C8D778400F27EB9 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 845D181B1C8D778400F27EB9 /* Images.xcassets */; };
846BD2241EE9342700E89A1D /* haibaoyouxi_config in Resources */ = {isa = PBXBuildFile; fileRef = 846BD21F1EE9342700E89A1D /* haibaoyouxi_config */; };
846BD2261EE9342700E89A1D /* SDKInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 846BD2231EE9342700E89A1D /* SDKInterface.m */; };
......@@ -60,7 +60,7 @@
/* Begin PBXFileReference section */
269F653721B6613F006AEC88 /* HaiBaoJuheSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HaiBaoJuheSDK.framework; sourceTree = "<group>"; };
26C1534C22253A130020B711 /* Lovelink.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Lovelink.framework; sourceTree = "<group>"; };
26C1534E22253B750020B711 /* Willingness.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Willingness.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 /* haibaoyouxi_config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = haibaoyouxi_config; path = poolsdk_file/poolsdk/haibaoyouxi_config; sourceTree = "<group>"; };
......@@ -106,7 +106,7 @@
269F653821B6613F006AEC88 /* HaiBaoJuheSDK.framework in Frameworks */,
8484E4FC1EE7E1D800B402D1 /* libsqlite3.dylib in Frameworks */,
8484E5121EE7E2B800B402D1 /* libz.1.dylib in Frameworks */,
26C1534D22253A140020B711 /* Lovelink.framework in Frameworks */,
26C1534F22253B750020B711 /* Willingness.framework in Frameworks */,
8484E5101EE7E29A00B402D1 /* libc++.1.dylib in Frameworks */,
8484E5001EE7E20C00B402D1 /* CFNetwork.framework in Frameworks */,
8484E5061EE7E24A00B402D1 /* CoreMotion.framework in Frameworks */,
......@@ -143,7 +143,7 @@
8476DF641C4DD71D00EC42BA /* poolsdk */ = {
isa = PBXGroup;
children = (
26C1534C22253A130020B711 /* Lovelink.framework */,
26C1534E22253B750020B711 /* Willingness.framework */,
84A090AC1F174E21003D23FB /* TrackingIO.h */,
84A090AA1F160A69003D23FB /* TrackingIO.a */,
846BD21F1EE9342700E89A1D /* haibaoyouxi_config */,
......
......@@ -15,11 +15,11 @@
- (void)initChecker;
- (void)startCheck:(HaiBaoJuheLoginInfo *)loginInfo;
- (void) createOrder:(HaiBaoJuheCreateOrderInfo *)gzyazfInfo;
- (void) LovelinkHaiBaoJuhereportOpen;
- (void) LovelinkHaiBaoJuhereportSDKOpen;
- (void)LovelinkHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) WillingnessHaiBaoJuhereportOpen;
- (void) WillingnessHaiBaoJuhereportSDKOpen;
- (void)WillingnessHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) reportEnter:(HaiBaoJuheReportInfo *)reInfo;
- (void) LovelinkHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void) WillingnessHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void)sendNotice:(HaiBaoJuheSDKNotificationType)notiType
notiName:(NSString *)notiName
statusCode:(int)nCode
......@@ -28,7 +28,7 @@
- (void)startCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo;
- (void)LovelinkHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
- (void)WillingnessHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
/*
*初始化时调用
......
#import "HaiBaoJuheSDK/LovelinkHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : LovelinkHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/WillingnessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : WillingnessHaiBaoJuheBaseModel
@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 *) LovelinkHaiBaoJuheGetTsign ;
- (NSString *) LovelinkHaiBaoJuheGetTimestamp ;
- (NSString *) WillingnessHaiBaoJuheGetTsign ;
- (NSString *) WillingnessHaiBaoJuheGetTimestamp ;
@end
......
#import "HaiBaoJuheSDK/LovelinkHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : LovelinkHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/WillingnessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : WillingnessHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *queryId;
......
#import "HaiBaoJuheSDK/LovelinkHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : LovelinkHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/WillingnessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : WillingnessHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *timestamp;
@property(nonatomic, strong)NSString *sign;
......
//
// LovelinkHaiBaoJuheReportInfo.h
// WillingnessHaiBaoJuheReportInfo.h
// HaiBaoJuheSDK
//
// Created by winFan on 12/21/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "HaiBaoJuheSDK/LovelinkHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : LovelinkHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/WillingnessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : WillingnessHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *reportType;//类型
@property(nonatomic, strong)NSString *playerId;//玩家ID
......
......@@ -4,7 +4,7 @@
@interface HaiBaoJuheUtils : NSObject
+(NSString *)md5:(NSString *)str;
+ (NSDictionary *)LovelinkHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+ (NSDictionary *)WillingnessHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+(NSString *)createGzyazfOrderUrl;
//*充值回调地址
+(NSString *)createGzyazfUrl;
......
#import <Foundation/Foundation.h>
#import "OtherSetting.h"
@interface LovelinkHaiBaoJuheBaseModel : NSObject
@interface WillingnessHaiBaoJuheBaseModel : NSObject
- (NSString *)LovelinkHaiBaoJuheObjectToJsonString;
- (NSString *)WillingnessHaiBaoJuheObjectToJsonString;
- (NSMutableString *)paramAddToString;
- (id)initWithDiction:(NSDictionary *)diction;
......
......@@ -11,7 +11,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel)
ELogError
};
@interface LovelinkHaiBaoJuheDGLogger : NSObject
@interface WillingnessHaiBaoJuheDGLogger : NSObject
+ (void)showLog:(NSString *)fmt,...;
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface LovelinkAllManager : NSObject
{
NSString* LovelinkAPPID_;
NSString* LovelinkAPPKEY_;
NSString* LovelinkInviterCode_;
}
@property bool LovelinkGeiWoHuaQianBa;
+ (LovelinkAllManager *)LovelinkInstance;
- (void)LovelinkChuShiHua;
- (void)LovelinkDengLu:(NSString *)LovelinkAPPID : (NSString *)LovelinkAPPKEY : (UIViewController *)controller;
- (void)LovelinkYangShi:(NSString*)LovelinkLeiXing;
- (void)LovelinkQuery: (NSString *)LovelinkFuWuQiID : (NSString *)LovelinkNickName : (NSNumber *)LovelinkAmount : (NSString *)LovelinkCallBack : (UIViewController *)controller : (NSString *)LovelinkServerName;
- (void)LovelinkQueryOperation:(UIViewController*)controll LovelinkHuoWuID:(NSString*)products LovelinkJiaGe:(NSString*)amount LovelinkHuoWuMing:(NSString*)productName LovelinkDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const LovelinkExitNotification;
extern NSString * const LovelinkLoginNotification;
extern NSString * const LovelinkErrorNotification;
@interface LovelinkHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface LovelinkIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* LovelinkDingDanHao;
@property(nonatomic,strong) NSDictionary* LovelinkHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* LovelinkHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *LovelinkHuoWuLieBiaoView;
- (void)LovelinkHuaQianView:(UIViewController*)controller LovelinkHuoWuD:(NSString*)products LovelinkQian:(NSString*)amount LovelinkHuoWuMing:(NSString*)productName LovelinkDingDanHao:(NSString*)DingDanHao;
@end
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface WillingnessAllManager : NSObject
{
NSString* WillingnessAPPID_;
NSString* WillingnessAPPKEY_;
NSString* WillingnessInviterCode_;
}
@property bool WillingnessGeiWoHuaQianBa;
+ (WillingnessAllManager *)WillingnessInstance;
- (void)WillingnessChuShiHua;
- (void)WillingnessDengLu:(NSString *)WillingnessAPPID : (NSString *)WillingnessAPPKEY : (UIViewController *)controller;
- (void)WillingnessYangShi:(NSString*)WillingnessLeiXing;
- (void)WillingnessQuery: (NSString *)WillingnessFuWuQiID : (NSString *)WillingnessNickName : (NSNumber *)WillingnessAmount : (NSString *)WillingnessCallBack : (UIViewController *)controller : (NSString *)WillingnessServerName;
- (void)WillingnessQueryOperation:(UIViewController*)controll WillingnessHuoWuID:(NSString*)products WillingnessJiaGe:(NSString*)amount WillingnessHuoWuMing:(NSString*)productName WillingnessDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const WillingnessExitNotification;
extern NSString * const WillingnessLoginNotification;
extern NSString * const WillingnessErrorNotification;
@interface WillingnessHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface WillingnessIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* WillingnessDingDanHao;
@property(nonatomic,strong) NSDictionary* WillingnessHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* WillingnessHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *WillingnessHuoWuLieBiaoView;
- (void)WillingnessHuaQianView:(UIViewController*)controller WillingnessHuoWuD:(NSString*)products WillingnessQian:(NSString*)amount WillingnessHuoWuMing:(NSString*)productName WillingnessDingDanHao:(NSString*)DingDanHao;
@end
#import <Foundation/Foundation.h>
@interface LovelinkInformation : NSObject
@interface WillingnessInformation : NSObject
{
//
NSString *openId;
......@@ -12,5 +12,5 @@ NSString *timestamp;
@property(retain,nonatomic) NSString *openId;
@property(retain,nonatomic) NSString *token;
@property(retain,nonatomic) NSString *timestamp;
+ (LovelinkInformation *)getInstance;
+ (WillingnessInformation *)getInstance;
@end
......
#import <Foundation/Foundation.h>
@interface LovelinkInformationJM : NSObject
@interface WillingnessInformationJM : NSObject
+(NSString *)LovelinkJM:(NSString *)jm;
+(NSString *)WillingnessJM:(NSString *)jm;
@end
......
#import <UIKit/UIKit.h>
@interface LovelinkLocation : NSObject
@interface WillingnessLocation : NSObject
+ (NSString *)LovelinkSKCloudServiceSetupOptionsKey;
+ (NSString *)WillingnessSKCloudServiceSetupOptionsKey;
@end
......
#import <UIKit/UIKit.h>
#import "LovelinkInformation.h"
#import "WillingnessInformation.h"
#import <JavaScriptCore/JavaScriptCore.h>
@interface LovelinkMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
@interface WillingnessMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
{
UIWebView *webLovelinkView_;
UIWebView *webWillingnessView_;
UIActivityIndicatorView *activityIndicator;
}
@property(assign) BOOL LovelinkYouYuanJiao;
@property(assign) BOOL WillingnessYouYuanJiao;
- (void)LovelinkSettingLovelinkView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)LovelinkInitWebView;
- (void)WillingnessSettingWillingnessView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)WillingnessInitWebView;
- (void)loadWebPageWithString:(NSString *)url;
- (void)loadWebPageWithJs:(NSString *)content;
- (void)postNotification:(NSString *)name : (NSString *)code;
......
#include "SDKInterface.h"
#import <UIKit/UIKit.h>
#import "Lovelink/LovelinkAllManager.h"
#import "Lovelink/LovelinkHuiTiaoNotification.h"
#import "Lovelink/LovelinkInformation.h"
#import "Willingness/WillingnessAllManager.h"
#import "Willingness/WillingnessHuiTiaoNotification.h"
#import "Willingness/WillingnessInformation.h"
#import "TrackingIO.h"
@implementation SDKInterface : Interface
int mExchange;
NSString *LovelinkAppId;
NSString *LovelinkAppKey;
NSString *LovelinkLeakOrderUrl;
NSString *WillingnessAppId;
NSString *WillingnessAppKey;
NSString *WillingnessLeakOrderUrl;
- (void)SDKinit:(UIViewController *) control
{
......@@ -20,10 +20,10 @@ NSString *LovelinkLeakOrderUrl;
[super SDKinit:control];
[HaiBaoJuheConfig getInstance];
[[LovelinkAllManager LovelinkInstance]LovelinkChuShiHua];
[[LovelinkAllManager LovelinkInstance]LovelinkYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:LovelinkLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"LovelinkToolCallBack" object:nil];
[[WillingnessAllManager WillingnessInstance]WillingnessChuShiHua];
[[WillingnessAllManager WillingnessInstance]WillingnessYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:WillingnessLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"WillingnessToolCallBack" object:nil];
[[HaiBaoJuheChecker getInstance] sendNotice:HaiBaoJuheSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"initSuccess" extendData:nil];
......@@ -40,9 +40,9 @@ NSString *LovelinkLeakOrderUrl;
- (void)SDKloginSDK
{
//APPID APPKEY
LovelinkAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
LovelinkAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[LovelinkAllManager LovelinkInstance]LovelinkDengLu:LovelinkAppId :LovelinkAppKey :self.controller];
WillingnessAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
WillingnessAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[WillingnessAllManager WillingnessInstance]WillingnessDengLu:WillingnessAppId :WillingnessAppKey :self.controller];
}
......@@ -53,9 +53,9 @@ NSString *LovelinkLeakOrderUrl;
{
NSLog(@"loginchek");
HaiBaoJuheLoginInfo *loginInfo = [HaiBaoJuheLoginInfo alloc];
loginInfo.openId = [[LovelinkInformation getInstance]openId];
loginInfo.sign = [[LovelinkInformation getInstance] token];
loginInfo.timestamp = [[LovelinkInformation getInstance] timestamp];
loginInfo.openId = [[WillingnessInformation getInstance]openId];
loginInfo.sign = [[WillingnessInformation getInstance] token];
loginInfo.timestamp = [[WillingnessInformation getInstance] timestamp];
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[[HaiBaoJuheChecker getInstance] startCheck:loginInfo];
......@@ -82,7 +82,7 @@ NSString *LovelinkLeakOrderUrl;
- (void)HCKAssetsToolCallBack:(NSNotification *)notification
{
NSDictionary* payResultDic = notification.object;
NSString* receiptStr = [payResultDic objectForKey:@"LovelinkToolResult"];
NSString* receiptStr = [payResultDic objectForKey:@"WillingnessToolResult"];
NSString* queryId = [payResultDic objectForKey:@"query_id"];
//收到回调,保存queryid和data
......@@ -101,7 +101,7 @@ NSString *LovelinkLeakOrderUrl;
[userDefaults setObject:receiptStr forKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:LovelinkLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:WillingnessLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
......@@ -121,11 +121,11 @@ NSString *LovelinkLeakOrderUrl;
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
NSString* lastqueryid = [userDefaults objectForKey:@"lastqueryid"];
LovelinkLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
WillingnessLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
[userDefaults setObject:LovelinkLeakOrderUrl forKey:@"lastLovelinkLeakOrderUrl"];
[userDefaults setObject:WillingnessLeakOrderUrl forKey:@"lastWillingnessLeakOrderUrl"];
if (lastqueryid!=nil) {
//创建订单前进行补单
......@@ -135,7 +135,7 @@ NSString *LovelinkLeakOrderUrl;
receiptStr = [receiptStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
//如果不为空,进行最后一次补单
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",lastqueryid,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:LovelinkLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:WillingnessLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
[userDefaults removeObjectForKey:@"lastqueryid"];
......@@ -145,7 +145,7 @@ NSString *LovelinkLeakOrderUrl;
mExchange = [payInfo exchange].intValue;
[super SDKgzyazfWithGzyazfmentInfo:payInfo];
LovelinkLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
WillingnessLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
......@@ -212,10 +212,10 @@ NSString *LovelinkLeakOrderUrl;
for (NSString* queryId in queryIdArray) {
NSString* receiptStr = [userDefaults valueForKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* lastLovelinkLeakOrderUrl = [userDefaults objectForKey:@"lastLovelinkLeakOrderUrl"];
NSString* lastWillingnessLeakOrderUrl = [userDefaults objectForKey:@"lastWillingnessLeakOrderUrl"];
NSString* result;
if (lastLovelinkLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastLovelinkLeakOrderUrl :receiptDic];
if (lastWillingnessLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastWillingnessLeakOrderUrl :receiptDic];
}else{
result = [[NetCenter getInstance] httpPostSyn:[HaiBaoJuheUtils createGzyazfUrl] :receiptDic];
}
......@@ -253,14 +253,14 @@ NSString *LovelinkLeakOrderUrl;
NSString *other = [payInfo other];
if (other && [other length] > 0) {
[[LovelinkAllManager LovelinkInstance] LovelinkQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
[[WillingnessAllManager WillingnessInstance] WillingnessQuery: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];
[[LovelinkAllManager LovelinkInstance] LovelinkQueryOperation:self.controller LovelinkHuoWuID:products LovelinkJiaGe:[payInfo postAmount] LovelinkHuoWuMing:[payInfo productName] LovelinkDingDanHao:queryId];
[[WillingnessAllManager WillingnessInstance] WillingnessQueryOperation:self.controller WillingnessHuoWuID:products WillingnessJiaGe:[payInfo postAmount] WillingnessHuoWuMing:[payInfo productName] WillingnessDingDanHao:queryId];
}
}
......
......@@ -10,9 +10,9 @@
7、``` 所有接口PoolSdk 替换成 HaiBaoJuheSDK(如不理解可以参考demo或者详细文档) ``` <br>
已更新 海豹聚合SDK 2018年12月05日版本 快速更新到 2019年02月26日版本2方法<br>
已更新 海豹聚合SDK 2018年12月05日版本 快速更新到 2019年02月26日版本3方法<br>
1、``` 删除poolsdk_file文件夹中原来framework ``` <br>
2、``` 引入poolsdk_file文件夹中Lovelink.framework ``` <br>
2、``` 引入poolsdk_file文件夹中Willingness.framework ``` <br>
3、``` 替换SDKInterface.m文件 ``` <br>
4、``` 替换HaiBaoJuheSDK.framework ``` <br>
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) LovelinkHaiBaoJuhereportOpen;
- (void) LovelinkHaiBaoJuhereportSDKOpen;
- (void)LovelinkHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) WillingnessHaiBaoJuhereportOpen;
- (void) WillingnessHaiBaoJuhereportSDKOpen;
- (void)WillingnessHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) reportEnter:(HaiBaoJuheReportInfo *)reInfo;
- (void) LovelinkHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void) WillingnessHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void)sendNotice:(HaiBaoJuheSDKNotificationType)notiType
notiName:(NSString *)notiName
statusCode:(int)nCode
......@@ -28,7 +28,7 @@
- (void)startCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo;
- (void)LovelinkHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
- (void)WillingnessHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
/*
*初始化时调用
......
#import "HaiBaoJuheSDK/LovelinkHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : LovelinkHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/WillingnessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : WillingnessHaiBaoJuheBaseModel
@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 *) LovelinkHaiBaoJuheGetTsign ;
- (NSString *) LovelinkHaiBaoJuheGetTimestamp ;
- (NSString *) WillingnessHaiBaoJuheGetTsign ;
- (NSString *) WillingnessHaiBaoJuheGetTimestamp ;
@end
......
#import "HaiBaoJuheSDK/LovelinkHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : LovelinkHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/WillingnessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : WillingnessHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *queryId;
......
#import "HaiBaoJuheSDK/LovelinkHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : LovelinkHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/WillingnessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : WillingnessHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *timestamp;
@property(nonatomic, strong)NSString *sign;
......
//
// LovelinkHaiBaoJuheReportInfo.h
// WillingnessHaiBaoJuheReportInfo.h
// HaiBaoJuheSDK
//
// Created by winFan on 12/21/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "HaiBaoJuheSDK/LovelinkHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : LovelinkHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/WillingnessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : WillingnessHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *reportType;//类型
@property(nonatomic, strong)NSString *playerId;//玩家ID
......
......@@ -4,7 +4,7 @@
@interface HaiBaoJuheUtils : NSObject
+(NSString *)md5:(NSString *)str;
+ (NSDictionary *)LovelinkHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+ (NSDictionary *)WillingnessHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+(NSString *)createGzyazfOrderUrl;
//*充值回调地址
+(NSString *)createGzyazfUrl;
......
#import <Foundation/Foundation.h>
#import "OtherSetting.h"
@interface LovelinkHaiBaoJuheBaseModel : NSObject
@interface WillingnessHaiBaoJuheBaseModel : NSObject
- (NSString *)LovelinkHaiBaoJuheObjectToJsonString;
- (NSString *)WillingnessHaiBaoJuheObjectToJsonString;
- (NSMutableString *)paramAddToString;
- (id)initWithDiction:(NSDictionary *)diction;
......
......@@ -11,7 +11,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel)
ELogError
};
@interface LovelinkHaiBaoJuheDGLogger : NSObject
@interface WillingnessHaiBaoJuheDGLogger : NSObject
+ (void)showLog:(NSString *)fmt,...;
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface LovelinkAllManager : NSObject
{
NSString* LovelinkAPPID_;
NSString* LovelinkAPPKEY_;
NSString* LovelinkInviterCode_;
}
@property bool LovelinkGeiWoHuaQianBa;
+ (LovelinkAllManager *)LovelinkInstance;
- (void)LovelinkChuShiHua;
- (void)LovelinkDengLu:(NSString *)LovelinkAPPID : (NSString *)LovelinkAPPKEY : (UIViewController *)controller;
- (void)LovelinkYangShi:(NSString*)LovelinkLeiXing;
- (void)LovelinkQuery: (NSString *)LovelinkFuWuQiID : (NSString *)LovelinkNickName : (NSNumber *)LovelinkAmount : (NSString *)LovelinkCallBack : (UIViewController *)controller : (NSString *)LovelinkServerName;
- (void)LovelinkQueryOperation:(UIViewController*)controll LovelinkHuoWuID:(NSString*)products LovelinkJiaGe:(NSString*)amount LovelinkHuoWuMing:(NSString*)productName LovelinkDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const LovelinkExitNotification;
extern NSString * const LovelinkLoginNotification;
extern NSString * const LovelinkErrorNotification;
@interface LovelinkHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface LovelinkIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* LovelinkDingDanHao;
@property(nonatomic,strong) NSDictionary* LovelinkHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* LovelinkHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *LovelinkHuoWuLieBiaoView;
- (void)LovelinkHuaQianView:(UIViewController*)controller LovelinkHuoWuD:(NSString*)products LovelinkQian:(NSString*)amount LovelinkHuoWuMing:(NSString*)productName LovelinkDingDanHao:(NSString*)DingDanHao;
@end
#include "SDKInterface.h"
#import <UIKit/UIKit.h>
#import "Lovelink/LovelinkAllManager.h"
#import "Lovelink/LovelinkHuiTiaoNotification.h"
#import "Lovelink/LovelinkInformation.h"
#import "Willingness/WillingnessAllManager.h"
#import "Willingness/WillingnessHuiTiaoNotification.h"
#import "Willingness/WillingnessInformation.h"
#import "TrackingIO.h"
@implementation SDKInterface : Interface
int mExchange;
NSString *LovelinkAppId;
NSString *LovelinkAppKey;
NSString *LovelinkLeakOrderUrl;
NSString *WillingnessAppId;
NSString *WillingnessAppKey;
NSString *WillingnessLeakOrderUrl;
- (void)SDKinit:(UIViewController *) control
{
......@@ -20,10 +20,10 @@ NSString *LovelinkLeakOrderUrl;
[super SDKinit:control];
[HaiBaoJuheConfig getInstance];
[[LovelinkAllManager LovelinkInstance]LovelinkChuShiHua];
[[LovelinkAllManager LovelinkInstance]LovelinkYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:LovelinkLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"LovelinkToolCallBack" object:nil];
[[WillingnessAllManager WillingnessInstance]WillingnessChuShiHua];
[[WillingnessAllManager WillingnessInstance]WillingnessYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:WillingnessLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"WillingnessToolCallBack" object:nil];
[[HaiBaoJuheChecker getInstance] sendNotice:HaiBaoJuheSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"initSuccess" extendData:nil];
......@@ -40,9 +40,9 @@ NSString *LovelinkLeakOrderUrl;
- (void)SDKloginSDK
{
//APPID APPKEY
LovelinkAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
LovelinkAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[LovelinkAllManager LovelinkInstance]LovelinkDengLu:LovelinkAppId :LovelinkAppKey :self.controller];
WillingnessAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
WillingnessAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[WillingnessAllManager WillingnessInstance]WillingnessDengLu:WillingnessAppId :WillingnessAppKey :self.controller];
}
......@@ -53,9 +53,9 @@ NSString *LovelinkLeakOrderUrl;
{
NSLog(@"loginchek");
HaiBaoJuheLoginInfo *loginInfo = [HaiBaoJuheLoginInfo alloc];
loginInfo.openId = [[LovelinkInformation getInstance]openId];
loginInfo.sign = [[LovelinkInformation getInstance] token];
loginInfo.timestamp = [[LovelinkInformation getInstance] timestamp];
loginInfo.openId = [[WillingnessInformation getInstance]openId];
loginInfo.sign = [[WillingnessInformation getInstance] token];
loginInfo.timestamp = [[WillingnessInformation getInstance] timestamp];
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[[HaiBaoJuheChecker getInstance] startCheck:loginInfo];
......@@ -82,7 +82,7 @@ NSString *LovelinkLeakOrderUrl;
- (void)HCKAssetsToolCallBack:(NSNotification *)notification
{
NSDictionary* payResultDic = notification.object;
NSString* receiptStr = [payResultDic objectForKey:@"LovelinkToolResult"];
NSString* receiptStr = [payResultDic objectForKey:@"WillingnessToolResult"];
NSString* queryId = [payResultDic objectForKey:@"query_id"];
//收到回调,保存queryid和data
......@@ -101,7 +101,7 @@ NSString *LovelinkLeakOrderUrl;
[userDefaults setObject:receiptStr forKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:LovelinkLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:WillingnessLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
......@@ -121,11 +121,11 @@ NSString *LovelinkLeakOrderUrl;
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
NSString* lastqueryid = [userDefaults objectForKey:@"lastqueryid"];
LovelinkLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
WillingnessLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
[userDefaults setObject:LovelinkLeakOrderUrl forKey:@"lastLovelinkLeakOrderUrl"];
[userDefaults setObject:WillingnessLeakOrderUrl forKey:@"lastWillingnessLeakOrderUrl"];
if (lastqueryid!=nil) {
//创建订单前进行补单
......@@ -135,7 +135,7 @@ NSString *LovelinkLeakOrderUrl;
receiptStr = [receiptStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
//如果不为空,进行最后一次补单
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",lastqueryid,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:LovelinkLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:WillingnessLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
[userDefaults removeObjectForKey:@"lastqueryid"];
......@@ -145,7 +145,7 @@ NSString *LovelinkLeakOrderUrl;
mExchange = [payInfo exchange].intValue;
[super SDKgzyazfWithGzyazfmentInfo:payInfo];
LovelinkLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
WillingnessLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
......@@ -212,10 +212,10 @@ NSString *LovelinkLeakOrderUrl;
for (NSString* queryId in queryIdArray) {
NSString* receiptStr = [userDefaults valueForKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* lastLovelinkLeakOrderUrl = [userDefaults objectForKey:@"lastLovelinkLeakOrderUrl"];
NSString* lastWillingnessLeakOrderUrl = [userDefaults objectForKey:@"lastWillingnessLeakOrderUrl"];
NSString* result;
if (lastLovelinkLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastLovelinkLeakOrderUrl :receiptDic];
if (lastWillingnessLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastWillingnessLeakOrderUrl :receiptDic];
}else{
result = [[NetCenter getInstance] httpPostSyn:[HaiBaoJuheUtils createGzyazfUrl] :receiptDic];
}
......@@ -253,14 +253,14 @@ NSString *LovelinkLeakOrderUrl;
NSString *other = [payInfo other];
if (other && [other length] > 0) {
[[LovelinkAllManager LovelinkInstance] LovelinkQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
[[WillingnessAllManager WillingnessInstance] WillingnessQuery: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];
[[LovelinkAllManager LovelinkInstance] LovelinkQueryOperation:self.controller LovelinkHuoWuID:products LovelinkJiaGe:[payInfo postAmount] LovelinkHuoWuMing:[payInfo productName] LovelinkDingDanHao:queryId];
[[WillingnessAllManager WillingnessInstance] WillingnessQueryOperation:self.controller WillingnessHuoWuID:products WillingnessJiaGe:[payInfo postAmount] WillingnessHuoWuMing:[payInfo productName] WillingnessDingDanHao:queryId];
}
}
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface WillingnessAllManager : NSObject
{
NSString* WillingnessAPPID_;
NSString* WillingnessAPPKEY_;
NSString* WillingnessInviterCode_;
}
@property bool WillingnessGeiWoHuaQianBa;
+ (WillingnessAllManager *)WillingnessInstance;
- (void)WillingnessChuShiHua;
- (void)WillingnessDengLu:(NSString *)WillingnessAPPID : (NSString *)WillingnessAPPKEY : (UIViewController *)controller;
- (void)WillingnessYangShi:(NSString*)WillingnessLeiXing;
- (void)WillingnessQuery: (NSString *)WillingnessFuWuQiID : (NSString *)WillingnessNickName : (NSNumber *)WillingnessAmount : (NSString *)WillingnessCallBack : (UIViewController *)controller : (NSString *)WillingnessServerName;
- (void)WillingnessQueryOperation:(UIViewController*)controll WillingnessHuoWuID:(NSString*)products WillingnessJiaGe:(NSString*)amount WillingnessHuoWuMing:(NSString*)productName WillingnessDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const WillingnessExitNotification;
extern NSString * const WillingnessLoginNotification;
extern NSString * const WillingnessErrorNotification;
@interface WillingnessHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface WillingnessIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* WillingnessDingDanHao;
@property(nonatomic,strong) NSDictionary* WillingnessHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* WillingnessHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *WillingnessHuoWuLieBiaoView;
- (void)WillingnessHuaQianView:(UIViewController*)controller WillingnessHuoWuD:(NSString*)products WillingnessQian:(NSString*)amount WillingnessHuoWuMing:(NSString*)productName WillingnessDingDanHao:(NSString*)DingDanHao;
@end
#import <Foundation/Foundation.h>
@interface LovelinkInformation : NSObject
@interface WillingnessInformation : NSObject
{
//
NSString *openId;
......@@ -12,5 +12,5 @@ NSString *timestamp;
@property(retain,nonatomic) NSString *openId;
@property(retain,nonatomic) NSString *token;
@property(retain,nonatomic) NSString *timestamp;
+ (LovelinkInformation *)getInstance;
+ (WillingnessInformation *)getInstance;
@end
......
#import <Foundation/Foundation.h>
@interface LovelinkInformationJM : NSObject
@interface WillingnessInformationJM : NSObject
+(NSString *)LovelinkJM:(NSString *)jm;
+(NSString *)WillingnessJM:(NSString *)jm;
@end
......
#import <UIKit/UIKit.h>
@interface LovelinkLocation : NSObject
@interface WillingnessLocation : NSObject
+ (NSString *)LovelinkSKCloudServiceSetupOptionsKey;
+ (NSString *)WillingnessSKCloudServiceSetupOptionsKey;
@end
......
#import <UIKit/UIKit.h>
#import "LovelinkInformation.h"
#import "WillingnessInformation.h"
#import <JavaScriptCore/JavaScriptCore.h>
@interface LovelinkMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
@interface WillingnessMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
{
UIWebView *webLovelinkView_;
UIWebView *webWillingnessView_;
UIActivityIndicatorView *activityIndicator;
}
@property(assign) BOOL LovelinkYouYuanJiao;
@property(assign) BOOL WillingnessYouYuanJiao;
- (void)LovelinkSettingLovelinkView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)LovelinkInitWebView;
- (void)WillingnessSettingWillingnessView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)WillingnessInitWebView;
- (void)loadWebPageWithString:(NSString *)url;
- (void)loadWebPageWithJs:(NSString *)content;
- (void)postNotification:(NSString *)name : (NSString *)code;
......