lizhihui

更新190218版本2

Showing 58 changed files with 224 additions and 224 deletions
No preview for this file type
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface AlitaAllManager : NSObject
{
NSString* AlitaAPPID_;
NSString* AlitaAPPKEY_;
NSString* AlitaInviterCode_;
}
@property bool AlitaGeiWoHuaQianBa;
+ (AlitaAllManager *)AlitaInstance;
- (void)AlitaChuShiHua;
- (void)AlitaDengLu:(NSString *)AlitaAPPID : (NSString *)AlitaAPPKEY : (UIViewController *)controller;
- (void)AlitaYangShi:(NSString*)AlitaLeiXing;
- (void)AlitaQuery: (NSString *)AlitaFuWuQiID : (NSString *)AlitaNickName : (NSNumber *)AlitaAmount : (NSString *)AlitaCallBack : (UIViewController *)controller : (NSString *)AlitaServerName;
- (void)AlitaQueryOperation:(UIViewController*)controll AlitaHuoWuID:(NSString*)products AlitaJiaGe:(NSString*)amount AlitaHuoWuMing:(NSString*)productName AlitaDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const AlitaExitNotification;
extern NSString * const AlitaLoginNotification;
extern NSString * const AlitaErrorNotification;
@interface AlitaHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface AlitaIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* AlitaDingDanHao;
@property(nonatomic,strong) NSDictionary* AlitaHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* AlitaHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *AlitaHuoWuLieBiaoView;
- (void)AlitaHuaQianView:(UIViewController*)controller AlitaHuoWuD:(NSString*)products AlitaQian:(NSString*)amount AlitaHuoWuMing:(NSString*)productName AlitaDingDanHao:(NSString*)DingDanHao;
@end
#import <Foundation/Foundation.h>
@interface LanternFestivalInformation : NSObject
@interface AlitaInformation : NSObject
{
//
NSString *openId;
......@@ -12,5 +12,5 @@ NSString *timestamp;
@property(retain,nonatomic) NSString *openId;
@property(retain,nonatomic) NSString *token;
@property(retain,nonatomic) NSString *timestamp;
+ (LanternFestivalInformation *)getInstance;
+ (AlitaInformation *)getInstance;
@end
......
#import <Foundation/Foundation.h>
@interface LanternFestivalInformationJM : NSObject
@interface AlitaInformationJM : NSObject
+(NSString *)LanternFestivalJM:(NSString *)jm;
+(NSString *)AlitaJM:(NSString *)jm;
@end
......
#import <UIKit/UIKit.h>
@interface LanternFestivalLocation : NSObject
@interface AlitaLocation : NSObject
+ (NSString *)LanternFestivalSKCloudServiceSetupOptionsKey;
+ (NSString *)AlitaSKCloudServiceSetupOptionsKey;
@end
......
#import <UIKit/UIKit.h>
#import "LanternFestivalInformation.h"
#import "AlitaInformation.h"
#import <JavaScriptCore/JavaScriptCore.h>
@interface LanternFestivalMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
@interface AlitaMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
{
UIWebView *webLanternFestivalView_;
UIWebView *webAlitaView_;
UIActivityIndicatorView *activityIndicator;
}
@property(assign) BOOL LanternFestivalYouYuanJiao;
@property(assign) BOOL AlitaYouYuanJiao;
- (void)LanternFestivalSettingLanternFestivalView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)LanternFestivalInitWebView;
- (void)AlitaSettingAlitaView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)AlitaInitWebView;
- (void)loadWebPageWithString:(NSString *)url;
- (void)loadWebPageWithJs:(NSString *)content;
- (void)postNotification:(NSString *)name : (NSString *)code;
......
......@@ -8,7 +8,7 @@
/* Begin PBXBuildFile section */
269F653821B6613F006AEC88 /* HaiBaoJuheSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 269F653721B6613F006AEC88 /* HaiBaoJuheSDK.framework */; };
26ADA935221A9D310026400E /* LanternFestival.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26ADA934221A9D300026400E /* LanternFestival.framework */; };
26ADA937221AAD130026400E /* Alita.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26ADA936221AAD130026400E /* Alita.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>"; };
26ADA934221A9D300026400E /* LanternFestival.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = LanternFestival.framework; sourceTree = "<group>"; };
26ADA936221AAD130026400E /* Alita.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alita.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>"; };
......@@ -108,6 +108,7 @@
8484E5121EE7E2B800B402D1 /* libz.1.dylib in Frameworks */,
8484E5101EE7E29A00B402D1 /* libc++.1.dylib in Frameworks */,
8484E5001EE7E20C00B402D1 /* CFNetwork.framework in Frameworks */,
26ADA937221AAD130026400E /* Alita.framework in Frameworks */,
8484E5061EE7E24A00B402D1 /* CoreMotion.framework in Frameworks */,
8484E5021EE7E21F00B402D1 /* UIKit.framework in Frameworks */,
8484E50C1EE7E27100B402D1 /* CoreGraphics.framework in Frameworks */,
......@@ -116,7 +117,6 @@
8484E5141EE7E2DE00B402D1 /* Foundation.framework in Frameworks */,
8484E50A1EE7E26200B402D1 /* Security.framework in Frameworks */,
8484E5041EE7E24400B402D1 /* StoreKit.framework in Frameworks */,
26ADA935221A9D310026400E /* LanternFestival.framework in Frameworks */,
8484E4FE1EE7E1F700B402D1 /* CoreTelephony.framework in Frameworks */,
84A090AB1F160A69003D23FB /* TrackingIO.a in Frameworks */,
);
......@@ -143,7 +143,7 @@
8476DF641C4DD71D00EC42BA /* poolsdk */ = {
isa = PBXGroup;
children = (
26ADA934221A9D300026400E /* LanternFestival.framework */,
26ADA936221AAD130026400E /* Alita.framework */,
84A090AC1F174E21003D23FB /* TrackingIO.h */,
84A090AA1F160A69003D23FB /* TrackingIO.a */,
846BD21F1EE9342700E89A1D /* haibaoyouxi_config */,
......
#import <Foundation/Foundation.h>
#import "OtherSetting.h"
@interface LanternFestivalHaiBaoJuheBaseModel : NSObject
@interface AlitaHaiBaoJuheBaseModel : NSObject
- (NSString *)LanternFestivalHaiBaoJuheObjectToJsonString;
- (NSString *)AlitaHaiBaoJuheObjectToJsonString;
- (NSMutableString *)paramAddToString;
- (id)initWithDiction:(NSDictionary *)diction;
......
......@@ -11,7 +11,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel)
ELogError
};
@interface LanternFestivalHaiBaoJuheDGLogger : NSObject
@interface AlitaHaiBaoJuheDGLogger : NSObject
+ (void)showLog:(NSString *)fmt,...;
......
......@@ -15,11 +15,11 @@
- (void)initChecker;
- (void)startCheck:(HaiBaoJuheLoginInfo *)loginInfo;
- (void) createOrder:(HaiBaoJuheCreateOrderInfo *)gzyazfInfo;
- (void) LanternFestivalHaiBaoJuhereportOpen;
- (void) LanternFestivalHaiBaoJuhereportSDKOpen;
- (void)LanternFestivalHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) AlitaHaiBaoJuhereportOpen;
- (void) AlitaHaiBaoJuhereportSDKOpen;
- (void)AlitaHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) reportEnter:(HaiBaoJuheReportInfo *)reInfo;
- (void) LanternFestivalHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void) AlitaHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void)sendNotice:(HaiBaoJuheSDKNotificationType)notiType
notiName:(NSString *)notiName
statusCode:(int)nCode
......@@ -28,7 +28,7 @@
- (void)startCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo;
- (void)LanternFestivalHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
- (void)AlitaHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
/*
*初始化时调用
......
#import "HaiBaoJuheSDK/LanternFestivalHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : LanternFestivalHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/AlitaHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : AlitaHaiBaoJuheBaseModel
@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 *) LanternFestivalHaiBaoJuheGetTsign ;
- (NSString *) LanternFestivalHaiBaoJuheGetTimestamp ;
- (NSString *) AlitaHaiBaoJuheGetTsign ;
- (NSString *) AlitaHaiBaoJuheGetTimestamp ;
@end
......
#import "HaiBaoJuheSDK/LanternFestivalHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : LanternFestivalHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/AlitaHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : AlitaHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *queryId;
......
#import "HaiBaoJuheSDK/LanternFestivalHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : LanternFestivalHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/AlitaHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : AlitaHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *timestamp;
@property(nonatomic, strong)NSString *sign;
......
//
// LanternFestivalHaiBaoJuheReportInfo.h
// AlitaHaiBaoJuheReportInfo.h
// HaiBaoJuheSDK
//
// Created by winFan on 12/21/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "HaiBaoJuheSDK/LanternFestivalHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : LanternFestivalHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/AlitaHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : AlitaHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *reportType;//类型
@property(nonatomic, strong)NSString *playerId;//玩家ID
......
......@@ -4,7 +4,7 @@
@interface HaiBaoJuheUtils : NSObject
+(NSString *)md5:(NSString *)str;
+ (NSDictionary *)LanternFestivalHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+ (NSDictionary *)AlitaHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+(NSString *)createGzyazfOrderUrl;
//*充值回调地址
+(NSString *)createGzyazfUrl;
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface LanternFestivalAllManager : NSObject
{
NSString* LanternFestivalAPPID_;
NSString* LanternFestivalAPPKEY_;
NSString* LanternFestivalInviterCode_;
}
@property bool LanternFestivalGeiWoHuaQianBa;
+ (LanternFestivalAllManager *)LanternFestivalInstance;
- (void)LanternFestivalChuShiHua;
- (void)LanternFestivalDengLu:(NSString *)LanternFestivalAPPID : (NSString *)LanternFestivalAPPKEY : (UIViewController *)controller;
- (void)LanternFestivalYangShi:(NSString*)LanternFestivalLeiXing;
- (void)LanternFestivalQuery: (NSString *)LanternFestivalFuWuQiID : (NSString *)LanternFestivalNickName : (NSNumber *)LanternFestivalAmount : (NSString *)LanternFestivalCallBack : (UIViewController *)controller : (NSString *)LanternFestivalServerName;
- (void)LanternFestivalQueryOperation:(UIViewController*)controll LanternFestivalHuoWuID:(NSString*)products LanternFestivalJiaGe:(NSString*)amount LanternFestivalHuoWuMing:(NSString*)productName LanternFestivalDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const LanternFestivalExitNotification;
extern NSString * const LanternFestivalLoginNotification;
extern NSString * const LanternFestivalErrorNotification;
@interface LanternFestivalHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface LanternFestivalIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* LanternFestivalDingDanHao;
@property(nonatomic,strong) NSDictionary* LanternFestivalHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* LanternFestivalHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *LanternFestivalHuoWuLieBiaoView;
- (void)LanternFestivalHuaQianView:(UIViewController*)controller LanternFestivalHuoWuD:(NSString*)products LanternFestivalQian:(NSString*)amount LanternFestivalHuoWuMing:(NSString*)productName LanternFestivalDingDanHao:(NSString*)DingDanHao;
@end
#include "SDKInterface.h"
#import <UIKit/UIKit.h>
#import "LanternFestival/LanternFestivalAllManager.h"
#import "LanternFestival/LanternFestivalHuiTiaoNotification.h"
#import "LanternFestival/LanternFestivalInformation.h"
#import "Alita/AlitaAllManager.h"
#import "Alita/AlitaHuiTiaoNotification.h"
#import "Alita/AlitaInformation.h"
#import "TrackingIO.h"
@implementation SDKInterface : Interface
int mExchange;
NSString *LanternFestivalAppId;
NSString *LanternFestivalAppKey;
NSString *LanternFestivalLeakOrderUrl;
NSString *AlitaAppId;
NSString *AlitaAppKey;
NSString *AlitaLeakOrderUrl;
- (void)SDKinit:(UIViewController *) control
{
......@@ -20,10 +20,10 @@ NSString *LanternFestivalLeakOrderUrl;
[super SDKinit:control];
[HaiBaoJuheConfig getInstance];
[[LanternFestivalAllManager LanternFestivalInstance]LanternFestivalChuShiHua];
[[LanternFestivalAllManager LanternFestivalInstance]LanternFestivalYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:LanternFestivalLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"LanternFestivalToolCallBack" object:nil];
[[AlitaAllManager AlitaInstance]AlitaChuShiHua];
[[AlitaAllManager AlitaInstance]AlitaYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:AlitaLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"AlitaToolCallBack" object:nil];
[[HaiBaoJuheChecker getInstance] sendNotice:HaiBaoJuheSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"initSuccess" extendData:nil];
......@@ -40,9 +40,9 @@ NSString *LanternFestivalLeakOrderUrl;
- (void)SDKloginSDK
{
//APPID APPKEY
LanternFestivalAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
LanternFestivalAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[LanternFestivalAllManager LanternFestivalInstance]LanternFestivalDengLu:LanternFestivalAppId :LanternFestivalAppKey :self.controller];
AlitaAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
AlitaAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[AlitaAllManager AlitaInstance]AlitaDengLu:AlitaAppId :AlitaAppKey :self.controller];
}
......@@ -53,9 +53,9 @@ NSString *LanternFestivalLeakOrderUrl;
{
NSLog(@"loginchek");
HaiBaoJuheLoginInfo *loginInfo = [HaiBaoJuheLoginInfo alloc];
loginInfo.openId = [[LanternFestivalInformation getInstance]openId];
loginInfo.sign = [[LanternFestivalInformation getInstance] token];
loginInfo.timestamp = [[LanternFestivalInformation getInstance] timestamp];
loginInfo.openId = [[AlitaInformation getInstance]openId];
loginInfo.sign = [[AlitaInformation getInstance] token];
loginInfo.timestamp = [[AlitaInformation getInstance] timestamp];
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[[HaiBaoJuheChecker getInstance] startCheck:loginInfo];
......@@ -82,7 +82,7 @@ NSString *LanternFestivalLeakOrderUrl;
- (void)HCKAssetsToolCallBack:(NSNotification *)notification
{
NSDictionary* payResultDic = notification.object;
NSString* receiptStr = [payResultDic objectForKey:@"LanternFestivalToolResult"];
NSString* receiptStr = [payResultDic objectForKey:@"AlitaToolResult"];
NSString* queryId = [payResultDic objectForKey:@"query_id"];
//收到回调,保存queryid和data
......@@ -101,7 +101,7 @@ NSString *LanternFestivalLeakOrderUrl;
[userDefaults setObject:receiptStr forKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:LanternFestivalLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:AlitaLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
......@@ -121,11 +121,11 @@ NSString *LanternFestivalLeakOrderUrl;
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
NSString* lastqueryid = [userDefaults objectForKey:@"lastqueryid"];
LanternFestivalLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
AlitaLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
[userDefaults setObject:LanternFestivalLeakOrderUrl forKey:@"lastLanternFestivalLeakOrderUrl"];
[userDefaults setObject:AlitaLeakOrderUrl forKey:@"lastAlitaLeakOrderUrl"];
if (lastqueryid!=nil) {
//创建订单前进行补单
......@@ -135,7 +135,7 @@ NSString *LanternFestivalLeakOrderUrl;
receiptStr = [receiptStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
//如果不为空,进行最后一次补单
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",lastqueryid,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:LanternFestivalLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:AlitaLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
[userDefaults removeObjectForKey:@"lastqueryid"];
......@@ -145,7 +145,7 @@ NSString *LanternFestivalLeakOrderUrl;
mExchange = [payInfo exchange].intValue;
[super SDKgzyazfWithGzyazfmentInfo:payInfo];
LanternFestivalLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
AlitaLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
......@@ -212,10 +212,10 @@ NSString *LanternFestivalLeakOrderUrl;
for (NSString* queryId in queryIdArray) {
NSString* receiptStr = [userDefaults valueForKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* lastLanternFestivalLeakOrderUrl = [userDefaults objectForKey:@"lastLanternFestivalLeakOrderUrl"];
NSString* lastAlitaLeakOrderUrl = [userDefaults objectForKey:@"lastAlitaLeakOrderUrl"];
NSString* result;
if (lastLanternFestivalLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastLanternFestivalLeakOrderUrl :receiptDic];
if (lastAlitaLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastAlitaLeakOrderUrl :receiptDic];
}else{
result = [[NetCenter getInstance] httpPostSyn:[HaiBaoJuheUtils createGzyazfUrl] :receiptDic];
}
......@@ -253,14 +253,14 @@ NSString *LanternFestivalLeakOrderUrl;
NSString *other = [payInfo other];
if (other && [other length] > 0) {
[[LanternFestivalAllManager LanternFestivalInstance] LanternFestivalQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
[[AlitaAllManager AlitaInstance] AlitaQuery: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];
[[LanternFestivalAllManager LanternFestivalInstance] LanternFestivalQueryOperation:self.controller LanternFestivalHuoWuID:products LanternFestivalJiaGe:[payInfo postAmount] LanternFestivalHuoWuMing:[payInfo productName] LanternFestivalDingDanHao:queryId];
[[AlitaAllManager AlitaInstance] AlitaQueryOperation:self.controller AlitaHuoWuID:products AlitaJiaGe:[payInfo postAmount] AlitaHuoWuMing:[payInfo productName] AlitaDingDanHao:queryId];
}
}
......
......@@ -10,9 +10,9 @@
7、``` 所有接口PoolSdk 替换成 HaiBaoJuheSDK(如不理解可以参考demo或者详细文档) ``` <br>
已更新 海豹聚合SDK 2018年12月05日版本 快速更新到 2019年02月18日版本方法<br>
已更新 海豹聚合SDK 2018年12月05日版本 快速更新到 2019年02月18日版本2方法<br>
1、``` 删除poolsdk_file文件夹中原来framework ``` <br>
2、``` 引入poolsdk_file文件夹中LanternFestival.framework ``` <br>
2、``` 引入poolsdk_file文件夹中Alita.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
......
#import <Foundation/Foundation.h>
#import "OtherSetting.h"
@interface LanternFestivalHaiBaoJuheBaseModel : NSObject
@interface AlitaHaiBaoJuheBaseModel : NSObject
- (NSString *)LanternFestivalHaiBaoJuheObjectToJsonString;
- (NSString *)AlitaHaiBaoJuheObjectToJsonString;
- (NSMutableString *)paramAddToString;
- (id)initWithDiction:(NSDictionary *)diction;
......
......@@ -11,7 +11,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel)
ELogError
};
@interface LanternFestivalHaiBaoJuheDGLogger : NSObject
@interface AlitaHaiBaoJuheDGLogger : NSObject
+ (void)showLog:(NSString *)fmt,...;
......
......@@ -15,11 +15,11 @@
- (void)initChecker;
- (void)startCheck:(HaiBaoJuheLoginInfo *)loginInfo;
- (void) createOrder:(HaiBaoJuheCreateOrderInfo *)gzyazfInfo;
- (void) LanternFestivalHaiBaoJuhereportOpen;
- (void) LanternFestivalHaiBaoJuhereportSDKOpen;
- (void)LanternFestivalHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) AlitaHaiBaoJuhereportOpen;
- (void) AlitaHaiBaoJuhereportSDKOpen;
- (void)AlitaHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) reportEnter:(HaiBaoJuheReportInfo *)reInfo;
- (void) LanternFestivalHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void) AlitaHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void)sendNotice:(HaiBaoJuheSDKNotificationType)notiType
notiName:(NSString *)notiName
statusCode:(int)nCode
......@@ -28,7 +28,7 @@
- (void)startCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo;
- (void)LanternFestivalHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
- (void)AlitaHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
/*
*初始化时调用
......
#import "HaiBaoJuheSDK/LanternFestivalHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : LanternFestivalHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/AlitaHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : AlitaHaiBaoJuheBaseModel
@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 *) LanternFestivalHaiBaoJuheGetTsign ;
- (NSString *) LanternFestivalHaiBaoJuheGetTimestamp ;
- (NSString *) AlitaHaiBaoJuheGetTsign ;
- (NSString *) AlitaHaiBaoJuheGetTimestamp ;
@end
......
#import "HaiBaoJuheSDK/LanternFestivalHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : LanternFestivalHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/AlitaHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : AlitaHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *queryId;
......
#import "HaiBaoJuheSDK/LanternFestivalHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : LanternFestivalHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/AlitaHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : AlitaHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *timestamp;
@property(nonatomic, strong)NSString *sign;
......
//
// LanternFestivalHaiBaoJuheReportInfo.h
// AlitaHaiBaoJuheReportInfo.h
// HaiBaoJuheSDK
//
// Created by winFan on 12/21/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "HaiBaoJuheSDK/LanternFestivalHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : LanternFestivalHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/AlitaHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : AlitaHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *reportType;//类型
@property(nonatomic, strong)NSString *playerId;//玩家ID
......
......@@ -4,7 +4,7 @@
@interface HaiBaoJuheUtils : NSObject
+(NSString *)md5:(NSString *)str;
+ (NSDictionary *)LanternFestivalHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+ (NSDictionary *)AlitaHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+(NSString *)createGzyazfOrderUrl;
//*充值回调地址
+(NSString *)createGzyazfUrl;
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface AlitaAllManager : NSObject
{
NSString* AlitaAPPID_;
NSString* AlitaAPPKEY_;
NSString* AlitaInviterCode_;
}
@property bool AlitaGeiWoHuaQianBa;
+ (AlitaAllManager *)AlitaInstance;
- (void)AlitaChuShiHua;
- (void)AlitaDengLu:(NSString *)AlitaAPPID : (NSString *)AlitaAPPKEY : (UIViewController *)controller;
- (void)AlitaYangShi:(NSString*)AlitaLeiXing;
- (void)AlitaQuery: (NSString *)AlitaFuWuQiID : (NSString *)AlitaNickName : (NSNumber *)AlitaAmount : (NSString *)AlitaCallBack : (UIViewController *)controller : (NSString *)AlitaServerName;
- (void)AlitaQueryOperation:(UIViewController*)controll AlitaHuoWuID:(NSString*)products AlitaJiaGe:(NSString*)amount AlitaHuoWuMing:(NSString*)productName AlitaDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const AlitaExitNotification;
extern NSString * const AlitaLoginNotification;
extern NSString * const AlitaErrorNotification;
@interface AlitaHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface AlitaIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* AlitaDingDanHao;
@property(nonatomic,strong) NSDictionary* AlitaHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* AlitaHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *AlitaHuoWuLieBiaoView;
- (void)AlitaHuaQianView:(UIViewController*)controller AlitaHuoWuD:(NSString*)products AlitaQian:(NSString*)amount AlitaHuoWuMing:(NSString*)productName AlitaDingDanHao:(NSString*)DingDanHao;
@end
#import <Foundation/Foundation.h>
@interface LanternFestivalInformation : NSObject
@interface AlitaInformation : NSObject
{
//
NSString *openId;
......@@ -12,5 +12,5 @@ NSString *timestamp;
@property(retain,nonatomic) NSString *openId;
@property(retain,nonatomic) NSString *token;
@property(retain,nonatomic) NSString *timestamp;
+ (LanternFestivalInformation *)getInstance;
+ (AlitaInformation *)getInstance;
@end
......
#import <Foundation/Foundation.h>
@interface LanternFestivalInformationJM : NSObject
@interface AlitaInformationJM : NSObject
+(NSString *)LanternFestivalJM:(NSString *)jm;
+(NSString *)AlitaJM:(NSString *)jm;
@end
......
#import <UIKit/UIKit.h>
@interface LanternFestivalLocation : NSObject
@interface AlitaLocation : NSObject
+ (NSString *)LanternFestivalSKCloudServiceSetupOptionsKey;
+ (NSString *)AlitaSKCloudServiceSetupOptionsKey;
@end
......
#import <UIKit/UIKit.h>
#import "LanternFestivalInformation.h"
#import "AlitaInformation.h"
#import <JavaScriptCore/JavaScriptCore.h>
@interface LanternFestivalMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
@interface AlitaMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
{
UIWebView *webLanternFestivalView_;
UIWebView *webAlitaView_;
UIActivityIndicatorView *activityIndicator;
}
@property(assign) BOOL LanternFestivalYouYuanJiao;
@property(assign) BOOL AlitaYouYuanJiao;
- (void)LanternFestivalSettingLanternFestivalView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)LanternFestivalInitWebView;
- (void)AlitaSettingAlitaView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)AlitaInitWebView;
- (void)loadWebPageWithString:(NSString *)url;
- (void)loadWebPageWithJs:(NSString *)content;
- (void)postNotification:(NSString *)name : (NSString *)code;
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface LanternFestivalAllManager : NSObject
{
NSString* LanternFestivalAPPID_;
NSString* LanternFestivalAPPKEY_;
NSString* LanternFestivalInviterCode_;
}
@property bool LanternFestivalGeiWoHuaQianBa;
+ (LanternFestivalAllManager *)LanternFestivalInstance;
- (void)LanternFestivalChuShiHua;
- (void)LanternFestivalDengLu:(NSString *)LanternFestivalAPPID : (NSString *)LanternFestivalAPPKEY : (UIViewController *)controller;
- (void)LanternFestivalYangShi:(NSString*)LanternFestivalLeiXing;
- (void)LanternFestivalQuery: (NSString *)LanternFestivalFuWuQiID : (NSString *)LanternFestivalNickName : (NSNumber *)LanternFestivalAmount : (NSString *)LanternFestivalCallBack : (UIViewController *)controller : (NSString *)LanternFestivalServerName;
- (void)LanternFestivalQueryOperation:(UIViewController*)controll LanternFestivalHuoWuID:(NSString*)products LanternFestivalJiaGe:(NSString*)amount LanternFestivalHuoWuMing:(NSString*)productName LanternFestivalDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const LanternFestivalExitNotification;
extern NSString * const LanternFestivalLoginNotification;
extern NSString * const LanternFestivalErrorNotification;
@interface LanternFestivalHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface LanternFestivalIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* LanternFestivalDingDanHao;
@property(nonatomic,strong) NSDictionary* LanternFestivalHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* LanternFestivalHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *LanternFestivalHuoWuLieBiaoView;
- (void)LanternFestivalHuaQianView:(UIViewController*)controller LanternFestivalHuoWuD:(NSString*)products LanternFestivalQian:(NSString*)amount LanternFestivalHuoWuMing:(NSString*)productName LanternFestivalDingDanHao:(NSString*)DingDanHao;
@end
#include "SDKInterface.h"
#import <UIKit/UIKit.h>
#import "LanternFestival/LanternFestivalAllManager.h"
#import "LanternFestival/LanternFestivalHuiTiaoNotification.h"
#import "LanternFestival/LanternFestivalInformation.h"
#import "Alita/AlitaAllManager.h"
#import "Alita/AlitaHuiTiaoNotification.h"
#import "Alita/AlitaInformation.h"
#import "TrackingIO.h"
@implementation SDKInterface : Interface
int mExchange;
NSString *LanternFestivalAppId;
NSString *LanternFestivalAppKey;
NSString *LanternFestivalLeakOrderUrl;
NSString *AlitaAppId;
NSString *AlitaAppKey;
NSString *AlitaLeakOrderUrl;
- (void)SDKinit:(UIViewController *) control
{
......@@ -20,10 +20,10 @@ NSString *LanternFestivalLeakOrderUrl;
[super SDKinit:control];
[HaiBaoJuheConfig getInstance];
[[LanternFestivalAllManager LanternFestivalInstance]LanternFestivalChuShiHua];
[[LanternFestivalAllManager LanternFestivalInstance]LanternFestivalYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:LanternFestivalLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"LanternFestivalToolCallBack" object:nil];
[[AlitaAllManager AlitaInstance]AlitaChuShiHua];
[[AlitaAllManager AlitaInstance]AlitaYangShi:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:AlitaLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"AlitaToolCallBack" object:nil];
[[HaiBaoJuheChecker getInstance] sendNotice:HaiBaoJuheSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"initSuccess" extendData:nil];
......@@ -40,9 +40,9 @@ NSString *LanternFestivalLeakOrderUrl;
- (void)SDKloginSDK
{
//APPID APPKEY
LanternFestivalAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
LanternFestivalAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[LanternFestivalAllManager LanternFestivalInstance]LanternFestivalDengLu:LanternFestivalAppId :LanternFestivalAppKey :self.controller];
AlitaAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
AlitaAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[AlitaAllManager AlitaInstance]AlitaDengLu:AlitaAppId :AlitaAppKey :self.controller];
}
......@@ -53,9 +53,9 @@ NSString *LanternFestivalLeakOrderUrl;
{
NSLog(@"loginchek");
HaiBaoJuheLoginInfo *loginInfo = [HaiBaoJuheLoginInfo alloc];
loginInfo.openId = [[LanternFestivalInformation getInstance]openId];
loginInfo.sign = [[LanternFestivalInformation getInstance] token];
loginInfo.timestamp = [[LanternFestivalInformation getInstance] timestamp];
loginInfo.openId = [[AlitaInformation getInstance]openId];
loginInfo.sign = [[AlitaInformation getInstance] token];
loginInfo.timestamp = [[AlitaInformation getInstance] timestamp];
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[[HaiBaoJuheChecker getInstance] startCheck:loginInfo];
......@@ -82,7 +82,7 @@ NSString *LanternFestivalLeakOrderUrl;
- (void)HCKAssetsToolCallBack:(NSNotification *)notification
{
NSDictionary* payResultDic = notification.object;
NSString* receiptStr = [payResultDic objectForKey:@"LanternFestivalToolResult"];
NSString* receiptStr = [payResultDic objectForKey:@"AlitaToolResult"];
NSString* queryId = [payResultDic objectForKey:@"query_id"];
//收到回调,保存queryid和data
......@@ -101,7 +101,7 @@ NSString *LanternFestivalLeakOrderUrl;
[userDefaults setObject:receiptStr forKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:LanternFestivalLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:AlitaLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
......@@ -121,11 +121,11 @@ NSString *LanternFestivalLeakOrderUrl;
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
NSString* lastqueryid = [userDefaults objectForKey:@"lastqueryid"];
LanternFestivalLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
AlitaLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
[userDefaults setObject:LanternFestivalLeakOrderUrl forKey:@"lastLanternFestivalLeakOrderUrl"];
[userDefaults setObject:AlitaLeakOrderUrl forKey:@"lastAlitaLeakOrderUrl"];
if (lastqueryid!=nil) {
//创建订单前进行补单
......@@ -135,7 +135,7 @@ NSString *LanternFestivalLeakOrderUrl;
receiptStr = [receiptStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
//如果不为空,进行最后一次补单
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",lastqueryid,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:LanternFestivalLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:AlitaLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
[userDefaults removeObjectForKey:@"lastqueryid"];
......@@ -145,7 +145,7 @@ NSString *LanternFestivalLeakOrderUrl;
mExchange = [payInfo exchange].intValue;
[super SDKgzyazfWithGzyazfmentInfo:payInfo];
LanternFestivalLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
AlitaLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
......@@ -212,10 +212,10 @@ NSString *LanternFestivalLeakOrderUrl;
for (NSString* queryId in queryIdArray) {
NSString* receiptStr = [userDefaults valueForKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* lastLanternFestivalLeakOrderUrl = [userDefaults objectForKey:@"lastLanternFestivalLeakOrderUrl"];
NSString* lastAlitaLeakOrderUrl = [userDefaults objectForKey:@"lastAlitaLeakOrderUrl"];
NSString* result;
if (lastLanternFestivalLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastLanternFestivalLeakOrderUrl :receiptDic];
if (lastAlitaLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastAlitaLeakOrderUrl :receiptDic];
}else{
result = [[NetCenter getInstance] httpPostSyn:[HaiBaoJuheUtils createGzyazfUrl] :receiptDic];
}
......@@ -253,14 +253,14 @@ NSString *LanternFestivalLeakOrderUrl;
NSString *other = [payInfo other];
if (other && [other length] > 0) {
[[LanternFestivalAllManager LanternFestivalInstance] LanternFestivalQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
[[AlitaAllManager AlitaInstance] AlitaQuery: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];
[[LanternFestivalAllManager LanternFestivalInstance] LanternFestivalQueryOperation:self.controller LanternFestivalHuoWuID:products LanternFestivalJiaGe:[payInfo postAmount] LanternFestivalHuoWuMing:[payInfo productName] LanternFestivalDingDanHao:queryId];
[[AlitaAllManager AlitaInstance] AlitaQueryOperation:self.controller AlitaHuoWuID:products AlitaJiaGe:[payInfo postAmount] AlitaHuoWuMing:[payInfo productName] AlitaDingDanHao:queryId];
}
}
......