lizhihui

xcode7版本framework

Showing 27 changed files with 964 additions and 0 deletions
1 +//
2 +// PGLogger.h
3 +// PanguCommonLib
4 +//
5 +// Created by ouyanghua on 14-2-22.
6 +// Copyright (c) 2014年 pangu. All rights reserved.
7 +//
8 +
9 +#import <Foundation/Foundation.h>
10 +
11 +void DGLog(NSString *fmt, ...);
12 +
13 +typedef NS_ENUM(NSInteger, DGLoggerLevel)
14 +{
15 + ELogVerbose = 1,
16 + ELogDebug,
17 + ELogInfo,
18 + ELogWarn,
19 + ELogError
20 +};
21 +
22 +@interface DGLogger : NSObject
23 +
24 ++ (void)showLog:(NSString *)fmt,...;
25 +
26 ++ (void)showLog:(DGLoggerLevel)level log:(NSString *)fmt,...;
27 +
28 ++ (void)isShowLog:(BOOL)flag;
29 +
30 +@end
1 +//
2 +// Interface.h
3 +// PoolSdk
4 +//
5 +// Created by winFan on 12/10/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +
10 +#include "UnionInterface.h"
11 +#import <SafariServices/SafariServices.h>
12 +@interface Interface : NSObject <UnionInterface>
13 +@property(nonatomic, strong)UIViewController *controller;
14 +
15 +
16 +@end
...\ No newline at end of file ...\ No newline at end of file
1 +//
2 +// NetCenter.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/2/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +#import <Foundation/Foundation.h>
10 +
11 +@interface NetCenter : NSObject
12 +
13 +@property(nonatomic,retain) NSMutableData *receiveData;
14 +
15 +@property(nonatomic,assign)int dataPackSerialNo;
16 +
17 +
18 ++ (NetCenter *)getInstance;
19 +
20 +- (NSString *)httpGetSyn:(NSString *) getUrl;
21 +
22 +- (NSString *)httpPostSyn:(NSString *) postUrl : (NSDictionary *) postData;
23 +
24 +- (void)httpGetNoSyn;
25 +
26 +- (void)httpPostNoSyn:(NSString *) postUrl :(NSDictionary *)postDict;
27 +
28 +- (void)httpPostAsync:(NSString*)postUrl :(NSDictionary*)postDict;
29 +
30 +- (void)httpPostAsyncOpen:(NSString*)postUrl :(NSDictionary*)postDict;
31 +
32 +-(void)httpGetAsync:(NSString *)url completionHandler:(void (^ __nullable)(NSURLResponse* __nullable response, NSData* __nullable data, NSError* __nullable connectionError)) handler;
33 +
34 +- (NSString * __nullable)dicToString:(NSDictionary * __nullable) dict;
35 +@end
1 +//
2 +// OtherSetting.h
3 +// PoolSdk
4 +//
5 +// Created by winFan on 11/23/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +#ifndef __PoolSdk__OtherSetting__
10 +#define __PoolSdk__OtherSetting__
11 +
12 +
13 +/**
14 + 应用支持的方向
15 + */
16 +typedef NS_ENUM(NSUInteger, ESDKOrientation) {
17 + ESDKOrientationPortrait = 1,//竖
18 + ESDKOrientationLandscape,//横
19 + ESDKOrientationNone//自动旋转
20 +};
21 +
22 +/**
23 + 应用支持的方向
24 + */
25 +typedef NS_ENUM(NSUInteger, REPORT_TYPE) {
26 + REPORT_TYPE_OPEN = 1,//竖
27 + REPORT_TYPE_ENTER,//横
28 + REPORT_TYPE_DEFINE//自动旋转
29 +};
30 +
31 +#endif /* defined(__PoolSdk__OtherSetting__) */
1 +//
2 +// PoolBaseModel.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/2/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +
10 +#import <Foundation/Foundation.h>
11 +#import "OtherSetting.h"
12 +@interface PoolBaseModel : NSObject
13 +
14 +- (NSString *)objectToJsonString;
15 +- (NSMutableString *)paramAddToString;
16 +- (id)initWithDiction:(NSDictionary *)diction;
17 +
18 +@end
...\ No newline at end of file ...\ No newline at end of file
1 +//
2 +// PoolLoginChecker.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/1/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +#import <Foundation/Foundation.h>
9 +#import "PoolSdk/PoolLoginInfo.h"
10 +#import "PoolSdk/PoolNotification.h"
11 +#import "PoolSdk/PoolCreateOrderInfo.h"
12 +#import "PoolSdk/PoolPayInfo.h"
13 +#import "PoolReportInfo.h"
14 +#import "PoolSdkDelegate.h"
15 +
16 +@interface PoolChecker : NSObject<PoolSdkDelegate>
17 +@property(nonatomic, strong)NSString *userId;
18 +@property(nonatomic, strong)id<PoolSdkDelegate> mPoolSdkDelegate;
19 +
20 +@property bool onlyOneTimePay;
21 ++ (PoolChecker *)getInstance;
22 +- (void)initChecker;
23 +- (void)startCheck:(PoolLoginInfo *)loginInfo;
24 +- (void) createOrder:(PoolCreateOrderInfo *)payInfo;
25 +- (void) reportOpen;
26 +- (void) reportSDKOpen;
27 +- (void)handleFirstOpenApp:(NSString*) path;
28 +- (void) reportEnter:(PoolReportInfo *)reInfo;
29 +- (void) report:(NSString *)_action :(PoolReportInfo *)reInfo;
30 +- (void)sendNotice:(PoolSDKNotificationType)notiType
31 + notiName:(NSString *)notiName
32 + statusCode:(int)nCode
33 + description:(NSString *)szDescripton
34 + extendData:(NSObject *)extendData;
35 +
36 +- (void)startCheckDelegate:(PoolLoginInfo *)loginInfo;
37 +
38 +/**
39 + *type PoolSDKNotificationLogin 为登录验证 PoolSDKNotificationSwitchAccount 为切换账号成功验证
40 + */
41 +- (void)startCheckDelegate:(PoolLoginInfo *)loginInfo type:(int)type;
42 +
43 +/*
44 + *初始化时调用
45 + */
46 +- (void)setPoolSdkDelegate:(nullable id<PoolSdkDelegate>)poolSdkDeletate;
47 +@end
48 +
49 +
50 +
51 +
1 +//
2 +// PoolConfig.h
3 +// PoolSdk
4 +//
5 +// Created by winFan on 12/11/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +#import <Foundation/Foundation.h>
10 +
11 +@interface PoolConfig : NSObject
12 +
13 +@property(nonatomic, strong)NSString *gameSimpleName;
14 +@property(nonatomic, strong)NSString *sdkSimpleName;
15 +@property(nonatomic, strong)NSString *sdkVersionCode;
16 +@property(nonatomic, strong)NSString *loginCheckUrl;
17 +@property(nonatomic, strong)NSString *payOrderUrl;
18 +@property(nonatomic, strong)NSString *payCheckUrl;
19 +@property(nonatomic, strong)NSString *c1;
20 +@property(nonatomic, strong)NSString *c2;
21 +@property(nonatomic, strong)NSString *custom;
22 +
23 ++ (PoolConfig *)getInstance;
24 +
25 +- (void) loadFile:(NSString *) fileName;
26 +
27 +- (NSString *)getValueByKey:(NSString *) key;
28 +
29 +- (void) updateC1C2Value:(NSString *)c1 c2:(NSString *)c2;
30 +
31 +@end
...\ No newline at end of file ...\ No newline at end of file
1 +//
2 +// PayInfo.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/3/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +
10 +#import "PoolSdk/PoolBaseModel.h"
11 +@interface PoolCreateOrderInfo : PoolBaseModel
12 +
13 +@property(nonatomic,strong)NSString *serverId;//服务器ID
14 +@property(nonatomic, strong)NSString *serverName;//服务器名称
15 +@property(nonatomic, strong)NSString *playerId;//玩家ID
16 +@property(nonatomic, strong)NSString *playerName;//玩家名称
17 +@property(nonatomic, strong)NSString *playerLevel;//玩家等级
18 +@property(nonatomic, strong)NSString *postAmount;//金额
19 +@property(nonatomic, strong)NSString *productId;//产品ID
20 +@property(nonatomic, strong)NSString *productName;//产品名称
21 +@property(nonatomic, strong)NSString *productDesc;//产品描述
22 +@property(nonatomic, strong)NSString *custom;//透传参数
23 +@property(nonatomic, strong)NSString *exchange;//兑换比例
24 +@property(nonatomic, strong)NSString *otherInfo;//扩展参数
25 +@property(nonatomic, strong)NSString *userId;//用户ID
26 +@property(nonatomic, strong)NSString *timestamp;//时间戳
27 +
28 +- (NSString *) getTsign ;
29 +- (NSString *) getTimestamp ;
30 +
31 +@end
...\ No newline at end of file ...\ No newline at end of file
1 +//
2 +// PoolLoginInfo.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/1/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +#import "PoolSdk/PoolBaseModel.h"
10 +@interface PoolLoginInfo : PoolBaseModel
11 +
12 +@property(nonatomic,strong)NSString *timestamp;
13 +@property(nonatomic, strong)NSString *sign;//serverSign
14 +@property(nonatomic, strong)NSString *other;//透传
15 +@property(nonatomic, strong)NSString *openId;
16 +@property(nonatomic, strong)NSString *userType;
17 +
18 +
19 +@end
...\ No newline at end of file ...\ No newline at end of file
1 +//
2 +// PoolNotification.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/1/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +#import <Foundation/Foundation.h>
10 +
11 +extern NSString * const poolSDK_Notification; /**< */
12 +extern NSString * const _create_order_notification; /**< */
13 +
14 +
15 +/**
16 + 应用支持的方向
17 + */
18 +typedef NS_ENUM(int, PoolSDKNotificationType) {
19 + PoolSDKNotificationLogin = 1,//登录
20 + PoolSDKNotificationLogout,//注销
21 + PoolSDKNotificationPay,//支付完成
22 + PoolSDKNotificationPause,//暂停退出
23 + PoolSDKNotificationRole,//创建角色
24 + PoolSDKNotificationInitSDK,//初始化SDK
25 + PoolSDKNotificationSwitchAccount,//切换账号
26 + PoolSDKNotificationExit//退出游戏
27 +};
28 +
29 +
30 +
31 +@interface PoolNotification : NSObject
32 +
33 +@end
34 +
35 +
36 +//////////////////////////////////////////////////////////////////////
37 +@interface PoolSDKResult : NSObject
38 +@property(nonatomic, assign)int statusCode;//请参照此文件下面状态标识
39 +@property(nonatomic, strong)NSString *resultDescription;
40 +@property(nonatomic, strong)NSObject *extendData;
41 +//V1.2.0新增
42 +@property(nonatomic, assign)PoolSDKNotificationType notiType;//消息类型
43 +@property(nonatomic, strong)NSString *notiName;//消息名称
44 +@end
45 +//////////////////////////////////////////////////////////////////////
46 +
47 +//////////////////////////////////////////////////////////////////////
48 +/* 状态标识 */
49 +#define POOLSDK_NO_ERROR 0 /*操作成功*/
50 +
51 +#define POOLSDK_ERROR_LOGIN_FAILED -100 /*登录失败*/
52 +#define POOLSDK_ERROR_LOGIN_CANCEL -101 /*登录取消*/
53 +#define POOLSDK_ERROR_LOGIN_GAMGEACCOUNT -102 /*游戏帐号登录,非平台账号*/
54 +
55 +#define POOLSDK_ERROR_PAY_FAILED -200 /*支付失败*/
56 +#define POOLSDK_ERROR_PAY_CANCEL -201 /*支付取消*/
57 +#define POOLSDK_ERROR_PAY_VERSIGN -202 /*支付验签失败*/
58 +#define POOLSDK_ERROR_CREATE_ORDER_FAILED -203 /*支付验签失败*/
59 +
60 +#define POOLSDK_ERROR_ROLE_CREATE_FAILED -300 /*角色创建失败*/
61 +
62 +#define POOLSDK_ERROR_INIT_FAILED -400 /*初始化失败*/
63 +
64 +#define POOLSDK_ERROR_SWICHT_ACCOUNT_FAILED -500 /*切换账号失败*/
65 +
66 +#define POOLSDK_ERROR_EXIT_CANCEL -600 /*退出取消*/
67 +
68 +//////////////////////////////////////////////////////////////////////
1 +//
2 +// PoolPayInfo.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/3/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +
10 +#import "PoolSdk/PoolBaseModel.h"
11 +@interface PoolPayInfo : PoolBaseModel
12 +
13 +@property(nonatomic, strong)NSString *serverId;
14 +@property(nonatomic, strong)NSString *queryId;
15 +@property(nonatomic, strong)NSString *playerId;
16 +@property(nonatomic, strong)NSString *playerName;
17 +@property(nonatomic, strong)NSString *postAmount;
18 +@property(nonatomic, strong)NSString *productId;
19 +@property(nonatomic, strong)NSString *products;
20 +@property(nonatomic, strong)NSString *custom;
21 +@property(nonatomic, strong)NSString *postTime;
22 +@property(nonatomic, strong)NSString *other;
23 +
24 +//游戏传递过来的原值
25 +@property(nonatomic, strong)NSString *serverName;//服务器名称
26 +@property(nonatomic, strong)NSString *playerLevel;//玩家等级
27 +@property(nonatomic, strong)NSString *productName;//产品名称
28 +@property(nonatomic, strong)NSString *productDesc;//产品描述
29 +@property(nonatomic, strong)NSString *exchange;//兑换比例
30 +
31 +@end
...\ No newline at end of file ...\ No newline at end of file
1 +//
2 +// PoolReportInfo.h
3 +// PoolSdk
4 +//
5 +// Created by winFan on 12/21/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +#import "PoolSdk/PoolBaseModel.h"
10 +@interface PoolReportInfo : PoolBaseModel
11 +
12 +@property(nonatomic, strong)NSString *reportType;//类型
13 +@property(nonatomic, strong)NSString *playerId;//玩家ID
14 +@property(nonatomic, strong)NSString *playerName;//玩家名称
15 +@property(nonatomic, strong)NSString *playerLevel;//玩家等级
16 +@property(nonatomic, strong)NSString *roleSex;//角色性别(1男0女)
17 +
18 +@property(nonatomic, strong)NSString *serverId;//服务器ID
19 +@property(nonatomic, strong)NSString *serverName;//服务器名称
20 +@property(nonatomic, strong)NSNumber *roleCTime;//创建角色时间(秒)
21 +@property(nonatomic, strong)NSString *partyName;//工会名称
22 +@property(nonatomic, strong)NSString *roleType;//角色类型
23 +@property(nonatomic, strong)NSNumber *roleChangeTime;//角色等级更新时间(秒)
24 +@property(nonatomic, strong)NSString *vipLevel;//vip等级
25 +@property(nonatomic, strong)NSNumber *diamond;//余额
26 +@property(nonatomic, strong)NSString *moneyType;//商品单位(元宝,金币)
27 +
28 +@property(nonatomic, strong)NSString *custom;//透传参数
29 +
30 +
31 +@property(nonatomic, strong)NSString *openId;
32 +
33 +#define REPORT_URL @"https://statistic.public.sdk.gzyouai.com/sdk/statistic" //http://183.57.76.181:9030/sdk/statistic
34 +
35 +#define REPORT_IDFA_URL @"https://statistic.public.sdk.gzyouai.com/sdk/last_channel?idfa=%@&sdkSimpleName=%@&gameSimpleName=%@" //@"http://183.57.76.181:9030/sdk/last_channel?idfa="//
36 +
37 +#define REPORT_OPEN @"open"
38 +#define REPORT_ENTER @"enter"
39 +#define REPORT_CREATEROLE @"createrole"
40 +#define REPORT_ROLEUPGRADE @"roleupgrade"
41 +#define REPORT_SDK_OPEN @"opensdk"
42 +
43 +@end
1 +//
2 +// PoolSdk.h
3 +// PoolSdk
4 +//
5 +// Created by winFan on 11/23/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +#import <Foundation/Foundation.h>
10 +#import "PoolSdk2.h"
11 +#import <UIKit/UIKit.h>
12 +
13 +@interface PoolSdk : NSObject
14 +/**
15 + * 当前SDK的版本
16 + */
17 +@property(nonatomic, strong, readonly)NSString *sdkVersion;
18 +
19 +/**
20 + * 用于设置url types schemes 默认为工程名
21 + */
22 +@property(nonatomic, strong)NSString *urlSchemes;
23 +
24 +@property BOOL isApplePaying;
25 +/**
26 + 获取SDK实例对象
27 + */
28 ++ (PoolSdk *)shareSDK;
29 +
30 +/**
31 + 初始化SDK
32 + */
33 +- (void)initSDK:(UIViewController *) control;
34 +
35 +
36 +-(void)viewDidAppear;
37 +
38 +- (void)setViewController:(UIViewController *)viewController;
39 +
40 +/**
41 + 登录SDK
42 + */
43 +- (void)loginSDK;
44 +
45 +- (void)loginSDK:(UIViewController *)viewController;
46 +
47 +/**
48 + 进行支付
49 + */
50 +- (void)payWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
51 +
52 +
53 +/**
54 + *是否含有用户中心接口
55 + **/
56 +- (BOOL)hasUserCenter;
57 +
58 +/**
59 + 用户中心
60 + */
61 +- (void)gotoUserCenter;
62 +
63 +/**
64 + report
65 + */
66 +- (void)reportSDK:(PoolReportInfo *)reportInfo;
67 +
68 +/**
69 + *是否含有注销接口
70 + */
71 +- (BOOL)hasLogout;
72 +
73 +/**
74 + 注销
75 + */
76 +- (void)logoutSDK;
77 +
78 +/**
79 + *是否含有切换账号接口
80 + **/
81 +- (BOOL)hasSwitchAccount;
82 +
83 +/**
84 + *切换账号
85 + **/
86 +- (void)switchAccount;
87 +
88 +
89 +/**
90 + *是否含有退出接口
91 + **/
92 +- (BOOL)hasExit;
93 +
94 +/**
95 + 退出
96 + */
97 +- (void)exitSDK;
98 +
99 +/**
100 + *SDK销毁操作(游戏退出时调用)
101 + */
102 +- (void)destroySDK;
103 +
104 +/**
105 + 显示/隐藏浮标
106 + */
107 +//- (void)showFloatIcon:(BOOL)bFlag;
108 +
109 +
110 +/**
111 + // called in - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
112 + */
113 +
114 +/**
115 + 应用 appid
116 + */
117 +
118 +/**
119 + 应用支持的方向 默认为 EDreamSDKOrientationLandscape
120 + */
121 +@property(nonatomic, assign)ESDKOrientation sdkOrientation;
122 +
123 +/**
124 + 浮标是否已经显示,默认为NO
125 + */
126 +@property(nonatomic, assign)BOOL bShowedFloat;
127 +
128 +
129 +/**
130 + serverId
131 + */
132 +@property(nonatomic, assign)int serverId;
133 +
134 +/**
135 + 获取gamechannelid
136 + */
137 +-(NSString *) getGameChannelId;
138 +
139 +/**
140 + 获取Custom
141 + */
142 +- (NSString *) getCustomValue;
143 +
144 +/**
145 + 获取ChannelParameter1
146 + */
147 +- (NSString *) getChannelParameter1;
148 +
149 +/**
150 + 获取ChannelParameter2
151 + */
152 +- (NSString *) getChannelParameter2;
153 +
154 +
155 +/**
156 + *充值统计参数
157 + *accountId 账号ID,必填项, 和登陆、注册使用的accountId保持一致即可。
158 + *orderId 订单Id,必填项,请保证该值的全局唯一,系统会使用订单Id进行付费订单排重。
159 + *currencyAmount 货币金额,单位为元,支持小数
160 + *currencyType 货币类型
161 + *payType 支付类型(渠道)
162 + *custom 自定义扩展参数
163 + */
164 +-(void)paymentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType payType:(NSString*)payType custom:(NSArray*)customArray;
165 +
166 +
167 +- (void)handleOpenurl:(NSURL *)url;
168 +
169 +- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
170 +
171 +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
172 +
173 +- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
174 +
175 +//推送
176 +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo ;
177 +//推送
178 +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
179 +
180 +
181 +- (void)applicationDidEnterBackground:(UIApplication *)application;
182 +
183 +- (void)applicationDidBecomeActive:(UIApplication *)application;
184 +
185 +- (void)applicationWillEnterForeground:(UIApplication *)application;
186 +
187 +- (void)applicationWillResignActive:(UIApplication *)application;
188 +
189 +-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options;
190 +
191 +- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
192 +
193 +@end
1 +//
2 +// PoolSdk.h
3 +// PoolSdk
4 +//
5 +// Created by 许 on 16/1/15.
6 +// Copyright © 2016年 许. All rights reserved.
7 +//
8 +// In this header, you should import all the public headers of your framework using statements like #import <PoolSdk/PublicHeader.h>
9 +
10 +#import <UIKit/UIKit.h>
11 +#import "PoolChecker.h"
12 +#import "Interface.h"
13 +#import "PoolReportInfo.h"
14 +#import "PoolLoginInfo.h"
15 +#import "PoolNotification.h"
16 +#import "PoolPayInfo.h"
17 +#import "UnionInterface.h"
18 +#import "PoolCreateOrderInfo.h"
19 +#import "PoolConfig.h"
20 +#import "PoolUtils.h"
21 +#import "NetCenter.h"
22 +#import "PoolSdk.h"
23 +#import "PoolSdkDelegate.h"
24 +
1 +//
2 +// PoolSdkDelegate.h
3 +// PoolSdk_i9133
4 +//
5 +// Created by 许 on 17/6/30.
6 +// Copyright © 2017年 许. All rights reserved.
7 +//
8 +
9 +#import <Foundation/Foundation.h>
10 +
11 +@protocol PoolSdkDelegate <NSObject>
12 +@optional
13 +-(void)PoolSdkLoginSuccess:(PoolLoginInfo*)loginInfo;
14 +-(void)PoolSdkLoginFail:(NSString*)msg;
15 +
16 +-(void)PoolSdkSwitchAccountSuccess:(PoolLoginInfo*)loginInfo;
17 +-(void)PoolSdkSwitchAccountFail:(NSString*)msg;
18 +@end
1 +//
2 +// PoolUtils.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/3/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +
10 +#import <Foundation/Foundation.h>
11 +#import <UIKit/UIKit.h>
12 +
13 +@interface PoolUtils : NSObject
14 +
15 ++(NSString *)md5:(NSString *)str;
16 ++ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
17 ++(NSString *)createPayOrderUrl;
18 +//*充值回调地址
19 ++(NSString *)createPayUrl;
20 +
21 ++(UIActivityIndicatorView *)showLoadingDialog:(UIView*)parentView;
22 ++(void)dismissLoadingDialog:(UIActivityIndicatorView*)indicatorView;
23 +
24 +@end
...\ No newline at end of file ...\ No newline at end of file
1 +//
2 +// NewTtack.h
3 +// NewTtack
4 +//
5 +// Created by yun on 16/1/11.
6 +// Copyright © 2016年 yun. All rights reserved.
7 +//
8 +#define TRACK_VERSION @"1.0.1"
9 +
10 +#import <Foundation/Foundation.h>
11 +#import <UIKit/UIKit.h>
12 +
13 +
14 +/*
15 + 热云移动广告效果监测 平台 api 请选择对应的api进行使用
16 + */
17 +NS_ASSUME_NONNULL_BEGIN
18 +@interface TrackingIO : NSObject
19 +//开启打印日志 正式上线包请关掉
20 ++(void) setPrintLog :(BOOL)print;
21 +// 开启数据统计
22 ++ (void)initWithappKey:(NSString *)appKey withChannelId:(NSString *)channelId;
23 +//注册成功后调用
24 ++ (void)setRegisterWithAccountID:(NSString *)account;
25 +//登陆成功后调用
26 ++ (void)setLoginWithAccountID:(NSString *)account;
27 +//开始付费时 调用(人民币单位是元)
28 ++(void)setPaymentStart:(NSString *)transactionId paymentType:(NSString*)paymentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
29 +// 支付完成,付费分析,记录玩家充值的金额(人民币单位是元)
30 ++(void)setPayment:(NSString *)transactionId paymentType:(NSString*)paymentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
31 +//自定义事件
32 ++(void)setEvent:(NSString *)eventName andExtra:(nullable NSDictionary *)extra;
33 +//标准接口
34 ++(void)setProfile:(NSDictionary *)dataDic;
35 +//获取设备信息
36 ++(NSString*)getDeviceId;
37 +@end
38 +NS_ASSUME_NONNULL_END
1 +//
2 +// UnionInterface.h
3 +// PoolSdk
4 +//
5 +// Created by winFan on 11/23/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +#import <Foundation/Foundation.h>
9 +#import <UIKit/UIKit.h>
10 +#import "PoolCreateOrderInfo.h"
11 +#import "PoolReportInfo.h"
12 +
13 +@protocol UnionInterface
14 +/**
15 + 初始化SDK
16 + */
17 +
18 +//[[PoolChecker getInstance] sendNotice:PoolSDKNotificationPay notiName:@"" statusCode:POOLSDK_NO_ERROR description:@"" extendData:order_id];
19 +
20 +- (void)SDKinit:(UIViewController *) control;
21 +
22 +
23 +- (void)setViewController:(UIViewController *) viewController;
24 +
25 +/**
26 + 登录SDK
27 + */
28 +- (void)SDKloginSDK;
29 +
30 +
31 +- (void)SDKloginSDK:(UIViewController *) control;
32 +
33 +/**
34 + *是否含有注销接口
35 + */
36 +- (BOOL)hasLogout;
37 +
38 +/**
39 + 注销
40 + */
41 +- (void)SDKlogoutSDK;
42 +
43 +
44 +/**
45 + *是否含有退出接口
46 + **/
47 +- (BOOL)hasExit;
48 +
49 +/**
50 + 退出接口
51 + */
52 +- (void)SDKexitSDK;
53 +
54 +
55 +/**
56 + *SDK销毁操作(游戏退出时调用)
57 + */
58 +
59 +- (void)destroySDK;
60 +
61 +
62 +/**
63 + *是否含有用户中心接口
64 + **/
65 +- (BOOL)hasUserCenter;
66 +
67 +/**
68 + 用户中心
69 + */
70 +- (void)SDKgotoUserCenter;
71 +
72 +/**
73 + *是否含有切换账号接口
74 + **/
75 +- (BOOL)hasSwitchAccount;
76 +
77 +/**
78 + *切换账号
79 + **/
80 +- (void)switchAccount;
81 +
82 +
83 +- (void)viewDidAppear;
84 +
85 +/**
86 + 提交数据
87 + */
88 +- (void)SDKreport:(PoolReportInfo *) reportInfo;
89 +
90 +/**
91 + 进行支付
92 + */
93 +
94 +- (void)SDKpayWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
95 +- (void)receiveCreateOrder: (NSNotification *)notification;
96 +
97 +/**
98 + *充值统计参数
99 + *accountId 账号ID,必填项, 和登陆、注册使用的accountId保持一致即可。
100 + *orderId 订单Id,必填项,请保证该值的全局唯一,系统会使用订单Id进行付费订单排重。
101 + *currencyAmount 货币金额,单位为元,支持小数
102 + *currencyType 货币类型
103 + *payType 支付类型(渠道)
104 + */
105 +-(void)paymentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType payType:(NSString*)payType custom:(NSArray *)customArray;
106 +
107 +- (void)handleOpenurl:(NSURL *)url;
108 +- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
109 +
110 +
111 +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
112 +
113 +- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
114 +
115 +//推送
116 +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo ;
117 +//推送
118 +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
119 +
120 +
121 +- (void)applicationDidEnterBackground:(UIApplication *)application;
122 +
123 +- (void)applicationDidBecomeActive:(UIApplication *)application;
124 +
125 +- (void)applicationWillEnterForeground:(UIApplication *)application;
126 +
127 +- (void)applicationWillResignActive:(UIApplication *)application;
128 +
129 +-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options;
130 +
131 +- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
132 +@end
...\ No newline at end of file ...\ No newline at end of file
1 +//
2 +// GetWifiMac.h
3 +// mangosanguo
4 +//
5 +// Created by 莫 on 12-9-28.
6 +// Copyright (c) 2012年 private. All rights reserved.
7 +//
8 +
9 +#import <UIKit/UIKit.h>
10 +
11 +@interface YouaiGetWifiMac : NSObject
12 +
13 ++ (NSString *)macaddress;
14 +@end
1 +//
2 +// YouaiLoginInfo.h
3 +// YouaiSDK
4 +//
5 +// Created by 莫 东荣 on 13-4-10.
6 +// Copyright (c) 2013年 莫 东荣. All rights reserved.
7 +//
8 +
9 +#import <Foundation/Foundation.h>
10 +
11 +@interface YouaiLoginInfo : NSObject //用户uid
12 +{
13 +//
14 +NSString *openId;
15 +//token
16 +NSString *token;
17 +//时间戳
18 +NSString *timestamp;
19 +
20 +}
21 +
22 +@property(retain,nonatomic) NSString *openId;
23 +@property(retain,nonatomic) NSString *token;
24 +@property(retain,nonatomic) NSString *timestamp;
25 ++ (YouaiLoginInfo *)getInstance;
26 +@end
...\ No newline at end of file ...\ No newline at end of file
1 +//
2 +// YouaiNotifications.h
3 +// YouaiSDK
4 +//
5 +// Created by 莫 东荣 on 13-4-10.
6 +// Copyright (c) 2013年 莫 东荣. All rights reserved.
7 +//
8 +
9 +#import <Foundation/Foundation.h>
10 +
11 +extern NSString * const youaiExitNotification; /**< 退出 */
12 +extern NSString * const youaiLoginNotification; /**< 登录完成的通知*/
13 +extern NSString * const youaiErrorNotification; /**< 出错 */
14 +
15 +
16 +@interface YouaiNotifications : NSObject
17 +
18 +@end
1 +//
2 +// YouaiSDKMgr.h
3 +// YouaiSDK
4 +//
5 +// Created by 莫 东荣 on 13-4-9.
6 +// Copyright (c) 2013年 莫 东荣. All rights reserved.
7 +//
8 +
9 +#import <UIKit/UIKit.h>
10 +#import "StoreKit/StoreKit.h"
11 +
12 +@interface YouaiSDKMgr : NSObject
13 +{
14 + NSString* appId_;
15 + NSString* appKey_;
16 +
17 + NSString* inviterCode_;
18 +}
19 +
20 +@property bool appleing;
21 +
22 ++ (YouaiSDKMgr *)getInstance;
23 +- (void)initSDK;
24 +- (void)setServerUrl:(NSString *)serverUrl;
25 +
26 +- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller;
27 +- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *) inviterCode;
28 +
29 +- (void)setStyleName:(NSString*)styleName;
30 +
31 +
32 +- (void)openUtil: (NSString *)serverId : (NSString *)nickName : (NSString *)callBack : (UIViewController *)controller;
33 +- (void)openUtil: (NSString *)serverId : (NSString *)nickName : (NSNumber *)amount : (NSString *)callBack : (UIViewController *)controller;
34 +
35 +- (void)openWithUtil:(UIViewController*)controll products:(NSString*)products amount:(NSString*)amount productName:(NSString*)productName queryId:(NSString*) queryId;
36 +
37 +
38 +
39 +@end
1 +//
2 +// YouaiViewController.h
3 +// newYouaiSDK
4 +//
5 +// Created by Mog90 on 14-9-28.
6 +// Copyright (c) 2014年 东荣 莫. All rights reserved.
7 +//
8 +
9 +#import <UIKit/UIKit.h>
10 +#import "YouaiLoginInfo.h"
11 +#import <JavaScriptCore/JavaScriptCore.h>
12 +
13 +@interface YouaiViewController : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
14 +{
15 + UIWebView *webView_;
16 + UIActivityIndicatorView *activityIndicator;
17 +}
18 +
19 +
20 +//@property(assign) int webViewWidth;
21 +//@property(assign) int webViewHeight;
22 +//@property(assign) int screenwidth;
23 +//@property(assign) int screenHeight;
24 +
25 +@property(assign) BOOL hasCorner;
26 +
27 +-(void)setView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
28 +- (void)initWebView;
29 +- (void)loadWebPageWithString:(NSString *)url;
30 +- (void)loadWebPageWithJs:(NSString *)content;
31 +- (void)postNotification:(NSString *)name : (NSString *)code;
32 +- (void)receiveIap:(NSNotification *)notification;
33 +
34 +@end