xuguohong

清空之前版本

Showing 104 changed files with 0 additions and 2663 deletions
No preview for this file type
No preview for this file type
No preview for this file type
//
// APAuthInfo.h
// AliSDKDemo
//
// Created by 方彬 on 14-7-18.
// Copyright (c) 2014年 Alipay.com. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface APayAuthInfo : NSObject
@property(nonatomic, copy)NSString *appID;
@property(nonatomic, copy)NSString *pid;
@property(nonatomic, copy)NSString *redirectUri;
/**
* 初始化AuthInfo
*
* @param appIDStr 应用ID
* @param productIDStr 产品码 该商户在aboss签约的产品,用户获取pid获取的参数
* @param pidStr 商户ID 可不填
* @param uriStr 授权的应用回调地址 比如:alidemo://auth
*
* @return authinfo实例
*/
- (id)initWithAppID:(NSString *)appIDStr
pid:(NSString *)pidStr
redirectUri:(NSString *)uriStr;
- (NSString *)description;
- (NSString *)wapDescription;
@end
//
// AlipaySDK.h
// AlipaySDK
//
// Created by 方彬 on 14-4-28.
// Copyright (c) 2014年 Alipay. All rights reserved.
//
////////////////////////////////////////////////////////
////////////////version:2.1 motify:2014.12.24//////////
///////////////////Merry Christmas=。=//////////////////
////////////////////////////////////////////////////////
#import "APayAuthInfo.h"
typedef enum {
ALIPAY_TIDFACTOR_IMEI,
ALIPAY_TIDFACTOR_IMSI,
ALIPAY_TIDFACTOR_TID,
ALIPAY_TIDFACTOR_CLIENTKEY,
ALIPAY_TIDFACTOR_VIMEI,
ALIPAY_TIDFACTOR_VIMSI,
ALIPAY_TIDFACTOR_CLIENTID,
ALIPAY_TIDFACTOR_APDID,
ALIPAY_TIDFACTOR_MAX
} AlipayTidFactor;
typedef void(^CompletionBlock)(NSDictionary *resultDic);
@interface AlipaySDK : NSObject
/**
* 创建支付单例服务
*
* @return 返回单例对象
*/
+ (AlipaySDK *)defaultService;
/**
* 支付接口
*
* @param orderStr 订单信息
* @param schemeStr 调用支付的app注册在info.plist中的scheme
* @param compltionBlock 支付结果回调Block
*/
- (void)payOrder:(NSString *)orderStr
fromScheme:(NSString *)schemeStr
callback:(CompletionBlock)completionBlock;
/**
* 处理钱包或者独立快捷app支付跳回商户app携带的支付结果Url
*
* @param resultUrl 支付结果url,传入后由SDK解析,统一在上面的pay方法的callback中回调
* @param completionBlock 跳钱包支付结果回调,保证跳转钱包支付过程中,即使调用方app被系统kill时,能通过这个回调取到支付结果。
*/
- (void)processOrderWithPaymentResult:(NSURL *)resultUrl
standbyCallback:(CompletionBlock)completionBlock;
/**
* 是否已经使用过
*
* @return YES为已经使用过,NO反之
*/
- (BOOL)isLogined;
/**
* 当前版本号
*
* @return 当前版本字符串
*/
- (NSString *)currentVersion;
/**
* 当前版本号
*
* @return tid相关信息
*/
- (NSString*)queryTidFactor:(AlipayTidFactor)factor;
/**
* 測試所用,realse包无效
*
* @param url 测试环境
*/
- (void)setUrl:(NSString *)url;
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////h5 拦截支付入口///////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
/**
* url order 获取接口
*
* @param urlStr 拦截的 url string
*
* @return 获取到的url order info
*/
- (NSString*)fetchOrderInfoFromH5PayUrl:(NSString*)urlStr;
/**
* url支付接口
*
* @param orderStr 订单信息
* @param schemeStr 调用支付的app注册在info.plist中的scheme
* @param compltionBlock 支付结果回调Block
*/
- (void)payUrlOrder:(NSString *)orderStr
fromScheme:(NSString *)schemeStr
callback:(CompletionBlock)completionBlock;
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////授权1.0//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
/**
* 快登授权
* @param authInfo 需授权信息
* @param completionBlock 授权结果回调
*/
- (void)authWithInfo:(APayAuthInfo *)authInfo
callback:(CompletionBlock)completionBlock;
/**
* 处理授权信息Url
*
* @param resultUrl 钱包返回的授权结果url
* @param completionBlock 跳授权结果回调,保证跳转钱包授权过程中,即使调用方app被系统kill时,能通过这个回调取到支付结果。
*/
- (void)processAuthResult:(NSURL *)resultUrl
standbyCallback:(CompletionBlock)completionBlock;
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////授权2.0//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
/**
* 快登授权2.0
*
* @param infoStr 授权请求信息字符串
* @param schemeStr 调用授权的app注册在info.plist中的scheme
* @param completionBlock 授权结果回调
*/
- (void)auth_V2WithInfo:(NSString *)infoStr
fromScheme:(NSString *)schemeStr
callback:(CompletionBlock)completionBlock;
/**
* 处理授权信息Url
*
* @param resultUrl 钱包返回的授权结果url
* @param completionBlock 跳授权结果回调,保证跳转钱包授权过程中,即使调用方app被系统kill时,能通过这个回调取到支付结果。
*/
- (void)processAuth_V2Result:(NSURL *)resultUrl
standbyCallback:(CompletionBlock)completionBlock;
@end
//
// AppDelegate.h
// publiDemo
//
// Created by winFan on 11/30/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
//
// AppDelegate.m
// publiDemo
//
// Created by winFan on 11/30/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "AppDelegate.h"
#import "ViewController.h"
#import "PoolSdk/PoolSdk.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
ViewController *rootController = [[ViewController alloc] init];
self.window.rootViewController = rootController;
[[PoolSdk shareSDK] initSDK:rootController];
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url{
NSLog(@"hanldeOpenURL%@",url.path );
[[PoolSdk shareSDK] handleOpenurl:url];
return true;
}
@end
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 winFan. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="PoolSdk_i9133_Demo" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController id="vXZ-lx-hvc" customClass="ViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.mango.ios.fytx</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>i9133public</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
//
// PGLogger.h
// PanguCommonLib
//
// Created by ouyanghua on 14-2-22.
// Copyright (c) 2014年 pangu. All rights reserved.
//
#import <Foundation/Foundation.h>
void DGLog(NSString *fmt, ...);
typedef NS_ENUM(NSInteger, DGLoggerLevel)
{
ELogVerbose = 1,
ELogDebug,
ELogInfo,
ELogWarn,
ELogError
};
@interface DGLogger : NSObject
+ (void)showLog:(NSString *)fmt,...;
+ (void)showLog:(DGLoggerLevel)level log:(NSString *)fmt,...;
+ (void)isShowLog:(BOOL)flag;
@end
//
// Interface.h
// PoolSdk
//
// Created by winFan on 12/10/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#include "UnionInterface.h"
#import <SafariServices/SafariServices.h>
@interface Interface : NSObject <UnionInterface,SFSafariViewControllerDelegate>
@property(nonatomic, strong)UIViewController *controller;
@end
\ No newline at end of file
//
// NetCenter.h
// public_i9133
//
// Created by winFan on 12/2/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NetCenter : NSObject
@property(nonatomic,retain) NSMutableData *receiveData;
@property(nonatomic,assign)int dataPackSerialNo;
+ (NetCenter *)getInstance;
- (NSString *)httpGetSyn:(NSString *) getUrl;
- (NSString *)httpPostSyn:(NSString *) postUrl : (NSDictionary *) postData;
- (void)httpGetNoSyn;
- (void)httpPostNoSyn:(NSString *) postUrl :(NSDictionary *)postDict;
- (NSString *)dicToString:(NSDictionary *) dict;
@end
//
// OtherSetting.h
// PoolSdk
//
// Created by winFan on 11/23/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#ifndef __PoolSdk__OtherSetting__
#define __PoolSdk__OtherSetting__
/**
应用支持的方向
*/
typedef NS_ENUM(NSUInteger, ESDKOrientation) {
ESDKOrientationPortrait = 1,//竖
ESDKOrientationLandscape,//横
ESDKOrientationNone//自动旋转
};
/**
应用支持的方向
*/
typedef NS_ENUM(NSUInteger, REPORT_TYPE) {
REPORT_TYPE_OPEN = 1,//竖
REPORT_TYPE_ENTER,//横
REPORT_TYPE_DEFINE//自动旋转
};
#endif /* defined(__PoolSdk__OtherSetting__) */
//
// PoolBaseModel.h
// public_i9133
//
// Created by winFan on 12/2/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "OtherSetting.h"
@interface PoolBaseModel : NSObject
- (NSString *)objectToJsonString;
- (NSMutableString *)paramAddToString;
- (id)initWithDiction:(NSDictionary *)diction;
@end
\ No newline at end of file
//
// PoolLoginChecker.h
// public_i9133
//
// Created by winFan on 12/1/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PoolSdk/PoolLoginInfo.h"
#import "PoolSdk/PoolNotification.h"
#import "PoolSdk/PoolCreateOrderInfo.h"
#import "PoolSdk/PoolPayInfo.h"
#import "PoolReportInfo.h"
@interface PoolChecker : NSObject
@property(nonatomic, strong)NSString *userId;
+ (PoolChecker *)getInstance;
- (void)initChecker;
- (void)startCheck:(PoolLoginInfo *)loginInfo;
- (void) createOrder:(PoolCreateOrderInfo *)payInfo;
- (void) reportOpen;
- (void)handleFirstOpenApp:(NSString*) path;
- (void) reportEnter:(PoolReportInfo *)reInfo;
- (void) report:(NSString *)_action :(PoolReportInfo *)reInfo;
- (void)sendNotice:(PoolSDKNotificationType)notiType
notiName:(NSString *)notiName
statusCode:(int)nCode
description:(NSString *)szDescripton
extendData:(NSObject *)extendData;
@end
\ No newline at end of file
//
// PoolConfig.h
// PoolSdk
//
// Created by winFan on 12/11/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface PoolConfig : NSObject
@property(nonatomic, strong)NSString *gameSimpleName;
@property(nonatomic, strong)NSString *sdkSimpleName;
@property(nonatomic, strong)NSString *sdkVersionCode;
@property(nonatomic, strong)NSString *loginCheckUrl;
@property(nonatomic, strong)NSString *payOrderUrl;
@property(nonatomic, strong)NSString *payCheckUrl;
@property(nonatomic, strong)NSString *c1;
@property(nonatomic, strong)NSString *c2;
@property(nonatomic, strong)NSString *custom;
+ (PoolConfig *)getInstance;
- (void) loadFile:(NSString *) fileName;
- (NSString *)getValueByKey:(NSString *) key;
- (void) updateC1C2Value:(NSString *)c1 c2:(NSString *)c2;
@end
\ No newline at end of file
//
// PayInfo.h
// public_i9133
//
// Created by winFan on 12/3/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "PoolSdk/PoolBaseModel.h"
@interface PoolCreateOrderInfo : PoolBaseModel
@property(nonatomic,strong)NSString *serverId;
@property(nonatomic, strong)NSString *serverName;//角色名称
@property(nonatomic, strong)NSString *playerId;//所在服务器名称
@property(nonatomic, strong)NSString *playerName;//所在服务器id
@property(nonatomic, strong)NSString *playerLevel;//所在服务器id
@property(nonatomic, strong)NSString *postAmount;//所在服务器id
@property(nonatomic, strong)NSString *productId;//所在服务器id
@property(nonatomic, strong)NSString *productName;//所在服务器id
@property(nonatomic, strong)NSString *productDesc;//所在服务器id
@property(nonatomic, strong)NSString *custom;//所在服务器id
@property(nonatomic, strong)NSString *exchange;//所在服务器id
@property(nonatomic, strong)NSString *otherInfo;//所在服务器id
@property(nonatomic, strong)NSString *userId;//所在服务器id
@property(nonatomic, strong)NSString *timestamp;//所在服务器id
- (NSString *) getTsign ;
- (NSString *) getTimestamp ;
@end
\ No newline at end of file
//
// PoolLoginInfo.h
// public_i9133
//
// Created by winFan on 12/1/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "PoolSdk/PoolBaseModel.h"
@interface PoolLoginInfo : PoolBaseModel
@property(nonatomic,strong)NSString *timestamp;
@property(nonatomic, strong)NSString *sign;//角色名称
@property(nonatomic, strong)NSString *other;//所在服务器名称
@property(nonatomic, strong)NSString *openId;//所在服务器id
@property(nonatomic, strong)NSString *userType;//所在服务器id
@end
\ No newline at end of file
//
// PoolNotification.h
// public_i9133
//
// Created by winFan on 12/1/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
extern NSString * const poolSDK_Notification; /**< */
extern NSString * const _create_order_notification; /**< */
/**
应用支持的方向
*/
typedef NS_ENUM(int, PoolSDKNotificationType) {
PoolSDKNotificationLogin = 1,//登录
PoolSDKNotificationLogout,//注销
PoolSDKNotificationPay,//支付完成
PoolSDKNotificationPause,//暂停退出
PoolSDKNotificationRole,//创建角色
PoolSDKNotificationInitSDK//初始化SDK
};
@interface PoolNotification : NSObject
@end
//////////////////////////////////////////////////////////////////////
@interface PoolSDKResult : NSObject
@property(nonatomic, assign)int statusCode;//请参照此文件下面状态标识
@property(nonatomic, strong)NSString *resultDescription;
@property(nonatomic, strong)NSObject *extendData;
//V1.2.0新增
@property(nonatomic, assign)PoolSDKNotificationType notiType;//消息类型
@property(nonatomic, strong)NSString *notiName;//消息名称
@end
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
/* 状态标识 */
#define POOLSDK_NO_ERROR 0 /*操作成功*/
#define POOLSDK_ERROR_LOGIN_FAILED -100 /*登录失败*/
#define POOLSDK_ERROR_LOGIN_CANCEL -101 /*登录取消*/
#define POOLSDK_ERROR_LOGIN_GAMGEACCOUNT -102 /*游戏帐号登录,非平台账号*/
#define POOLSDK_ERROR_PAY_FAILED -200 /*支付失败*/
#define POOLSDK_ERROR_PAY_CANCEL -201 /*支付取消*/
#define POOLSDK_ERROR_PAY_VERSIGN -202 /*支付验签失败*/
#define POOLSDK_ERROR_CREATE_ORDER_FAILED -203 /*支付验签失败*/
#define POOLSDK_ERROR_ROLE_CREATE_FAILED -300 /*角色创建失败*/
#define POOLSDK_ERROR_INIT_FAILED -400 /*初始化失败*/
//////////////////////////////////////////////////////////////////////
//
// PoolPayInfo.h
// public_i9133
//
// Created by winFan on 12/3/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "PoolSdk/PoolBaseModel.h"
@interface PoolPayInfo : PoolBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *queryId;
@property(nonatomic, strong)NSString *playerId;
@property(nonatomic, strong)NSString *playerName;//所在服务器id
@property(nonatomic, strong)NSString *postAmount;
@property(nonatomic, strong)NSString *productId;
@property(nonatomic, strong)NSString *products;
@property(nonatomic, strong)NSString *custom;
@property(nonatomic, strong)NSString *postTime;
@property(nonatomic, strong)NSString *other;
@end
\ No newline at end of file
//
// PoolReportInfo.h
// PoolSdk
//
// Created by winFan on 12/21/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "PoolSdk/PoolBaseModel.h"
@interface PoolReportInfo : PoolBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *serverName;
@property(nonatomic, strong)NSString *playerId;
@property(nonatomic, strong)NSString *playerName;//所在服务器id
@property(nonatomic, strong)NSString *playerLevel;
@property(nonatomic, strong)NSString *custom;
@property(nonatomic, strong)NSString *reportType;
@property(nonatomic, strong)NSString *openId;
#define REPORT_URL @"http://public.sdk.gzyouai.com:9030/sdk/statistic"//@"http://10.200.201.230:9001/sdk/statistic"
#define REPORT_OPEN @"open"
#define REPORT_ENTER @"enter"
#define REPORT_CREATEROLE @"createrole"
#define REPORT_ROLEUPGRADE @"roleupgrade"
@end
//
// PoolSdk.h
// PoolSdk
//
// Created by winFan on 11/23/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <PoolSdk/PoolSdk2.h>
#import <UIKit/UIKit.h>
@interface PoolSdk : NSObject
/**
* 当前SDK的版本
*/
@property(nonatomic, strong, readonly)NSString *sdkVersion;
/**
* 用于设置url types schemes 默认为工程名
*/
@property(nonatomic, strong)NSString *urlSchemes;
/**
获取SDK实例对象
*/
+ (PoolSdk *)shareSDK;
/**
初始化SDK
*/
- (void)initSDK:(UIViewController *) control;
-(void)viewDidAppear;
/**
登录SDK
*/
- (void)loginSDK;
/**
进行支付
*/
- (void)payWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
/**
用户中心
*/
- (void)gotoUserCenter;
/**
report
*/
- (void)reportSDK:(PoolReportInfo *)reportInfo;
/**
注销
*/
- (void)logoutSDK;
/**
退出
*/
- (void)exitSDK;
/**
显示/隐藏浮标
*/
//- (void)showFloatIcon:(BOOL)bFlag;
/**
// called in - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
*/
- (void)handleOpenurl:(NSURL *)url;
- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
/**
应用 appid
*/
/**
应用支持的方向 默认为 EDreamSDKOrientationLandscape
*/
@property(nonatomic, assign)ESDKOrientation sdkOrientation;
/**
浮标是否已经显示,默认为NO
*/
@property(nonatomic, assign)BOOL bShowedFloat;
/**
serverId
*/
@property(nonatomic, assign)int serverId;
/**
获取gamechannelid
*/
-(NSString *) getGameChannelId;
/**
获取Custom
*/
- (NSString *) getCustomValue;
/**
获取ChannelParameter1
*/
- (NSString *) getChannelParameter1;
/**
获取ChannelParameter2
*/
- (NSString *) getChannelParameter2;
@end
//
// PoolSdk.h
// PoolSdk
//
// Created by 许 on 16/1/15.
// Copyright © 2016年 许. All rights reserved.
//
// In this header, you should import all the public headers of your framework using statements like #import <PoolSdk/PublicHeader.h>
#import <UIKit/UIKit.h>
#import "PoolChecker.h"
#import "Interface.h"
#import "PoolReportInfo.h"
#import "PoolLoginInfo.h"
#import "PoolNotification.h"
#import "PoolPayInfo.h"
#import "UnionInterface.h"
#import "PoolCreateOrderInfo.h"
#import "PoolConfig.h"
//
// PoolUtils.h
// public_i9133
//
// Created by winFan on 12/3/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface PoolUtils : NSObject
+(NSString *)md5:(NSString *)str;
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
+(NSString *)createPayOrderUrl;
//*充值回调地址
+(NSString *)createPayUrl;
@end
\ No newline at end of file
//
// UnionInterface.h
// PoolSdk
//
// Created by winFan on 11/23/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "PoolCreateOrderInfo.h"
#import "PoolReportInfo.h"
@protocol UnionInterface
/**
初始化SDK
*/
//[[PoolChecker getInstance] sendNotice:PoolSDKNotificationPay notiName:@"" statusCode:POOLSDK_NO_ERROR description:@"" extendData:order_id];
- (void)SDKinit:(UIViewController *) control;
/**
登录SDK
*/
- (void)SDKloginSDK;
/**
注销
*/
- (void)SDKlogoutSDK;
/**
退出
*/
- (void)SDKexitSDK;
/**
用户中心
*/
- (void)SDKgotoUserCenter;
- (void)viewDidAppear;
/**
提交数据
*/
- (void)SDKreport:(PoolReportInfo *) reportInfo;
/**
进行支付
*/
- (void)SDKpayWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
- (void)receiveCreateOrder: (NSNotification *)notification;
- (void)handleOpenurl:(NSURL *)url;
- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
@end
\ No newline at end of file
//
// ViewController.h
// publiDemo
//
// Created by winFan on 11/30/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
- (void)receiveSDKMessage : (NSNotification *)notification;
@end
//
// ViewController.m
// publiDemo
//
// Created by winFan on 11/30/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "ViewController.h"
#import "PoolSdk/PoolSdk.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
[button1 setTitle:@"登陆" forState:UIControlStateNormal];
button1.frame = CGRectMake(50.0f, 100.0f, 50.0f, 40.0f);
button1.tag = 1;
[button1 addTarget:self action:@selector(toggleButton:) forControlEvents: UIControlEventTouchUpInside];
[self.view addSubview:button1];
UIButton *button2 = [UIButton buttonWithType:UIButtonTypeCustom];
[button2 setTitle:@"数据" forState:UIControlStateNormal];
button2.frame = CGRectMake(150.0f, 100.0f, 50.0f, 40.0f);
button2.tag = 2;
[button2 addTarget:self action:@selector(toggleButton:) forControlEvents: UIControlEventTouchUpInside];
[self.view addSubview:button2];
UIButton *button4 = [UIButton buttonWithType:UIButtonTypeCustom];
[button4 setTitle:@"充值" forState:UIControlStateNormal];
button4.frame = CGRectMake(150.0f, 50.0f, 50.0f, 40.0f);
button4.tag = 4;
[button4 addTarget:self action:@selector(toggleButton:) forControlEvents: UIControlEventTouchUpInside];
[self.view addSubview:button4];
UIButton *button6 = [UIButton buttonWithType:UIButtonTypeCustom];
[button6 setTitle:@"获取配置参数" forState:UIControlStateNormal];
button6.frame = CGRectMake(10.0f, 50.0f, 150.0f, 40.0f);
button6.tag = 6;
[button6 addTarget:self action:@selector(toggleButton:) forControlEvents: UIControlEventTouchUpInside];
[self.view addSubview:button6];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveSDKMessage:) name:poolSDK_Notification object:nil];
}
-(void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
[[PoolSdk shareSDK] viewDidAppear];
}
- (void) toggleButton: (UIButton *) button
{
// if (isOn = !isOn)
//
// {
int tag = (int)button.tag;
if (tag == 1) {
[[PoolSdk shareSDK] loginSDK];
}
else if (tag == 2)
{
NSLog(@"数据接口");
PoolReportInfo *reportInfo = [[PoolReportInfo alloc]init];
[reportInfo setReportType:@"ENTER"];
[reportInfo setServerId:@"9133"];
[reportInfo setPlayerId:@"pserverName"];
[[PoolSdk shareSDK] reportSDK:reportInfo];
}
else if (tag == 4)
{
PoolCreateOrderInfo *payInfo = [[PoolCreateOrderInfo alloc]init];
[payInfo setServerId:@"111"];
[payInfo setPostAmount:@"10"];
[payInfo setPlayerId:@"1231241234"];
[payInfo setTimestamp:@"1232134"];
[[PoolSdk shareSDK] payWithPaymentInfo:payInfo];
// [[YouaiSDKMgr getInstance] openPay:@"11" :@"你好" : nil : self];
}
else if(tag == 6){
PoolSdk *poolSdk = [PoolSdk shareSDK];
NSLog(@"channelId:%@parame1:%@parame2:%@custom:%@",[poolSdk getGameChannelId],[poolSdk getChannelParameter1],[poolSdk getChannelParameter2],[poolSdk getCustomValue]);
}
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (void)receiveSDKMessage:(NSNotification *)notification
{
[[PoolConfig getInstance] getValueByKey:@"gamechannelid"];
PoolSDKResult *result = [notification object];
if (result == nil ) {
return;
}
switch (result.notiType) {
case PoolSDKNotificationInitSDK:
{
NSLog(@"收到PoolSDKNotificationInitSDK");
}
break;
case PoolSDKNotificationLogin:
{
if (result.statusCode == POOLSDK_NO_ERROR) {
PoolLoginInfo *loginInfo = result.extendData;
NSLog(@"收到登陆信息public openid:%@", [loginInfo openId]);
NSLog(@"收到登陆信息public token:%@", [loginInfo sign]);
NSLog(@"收到登陆信息public timestamp:%@", [loginInfo timestamp]);
}else{
NSLog(@"%@",[result description]);
}
}
break;
case PoolSDKNotificationPay:
{
NSLog(@"收到登陆信息PoolSDKNotificationPay");
}
break;
default:
break;
}
}
@end
//
// IapController.h
// mangosanguo
//
// Created by Gino on 12-11-6.
// Copyright (c) 2012年 private. All rights reserved.
//
#if applepay
#import <Foundation/Foundation.h>
#import "StoreKit/StoreKit.h"
@interface IapController : NSObject<SKProductsRequestDelegate,SKPaymentTransactionObserver>
{
bool isRequestedBuy;
SKPaymentTransaction *PayTransaction;
NSMutableArray *payArray;
SKPaymentTransaction *curTransaction;
}
+ (IapController *)sharedController;
- (id)init;
- (void)removeIt;
- (void)requestProductData;
- (void)requestBuyProduct:(NSString *)identifier;
- (void)requestProductInfoById:(NSString *)str;
- (void)comfireTransactions:(bool)isSuessPosted;
- (void)checkReceiptIsFail;
- (void)addItemToPayArray:(SKPaymentTransaction *)transaction;
- (bool)checkPayArrayIsEmpty;
- (void)checkReceiptForArray;
- (void)setAppleCallBack: (NSString*)url;
@end
#endif
\ No newline at end of file
//
// GetWifiMac.h
// mangosanguo
//
// Created by 莫 on 12-9-28.
// Copyright (c) 2012年 private. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface YouaiGetWifiMac : NSObject
+ (NSString *)macaddress;
@end
//
// YouaiLoginInfo.h
// YouaiSDK
//
// Created by 莫 东荣 on 13-4-10.
// Copyright (c) 2013年 莫 东荣. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface YouaiLoginInfo : NSObject //用户uid
{
//
NSString *openId;
//token
NSString *token;
//时间戳
NSString *timestamp;
}
@property(retain,nonatomic) NSString *openId;
@property(retain,nonatomic) NSString *token;
@property(retain,nonatomic) NSString *timestamp;
+ (YouaiLoginInfo *)getInstance;
@end
\ No newline at end of file
//
// YouaiNotifications.h
// YouaiSDK
//
// Created by 莫 东荣 on 13-4-10.
// Copyright (c) 2013年 莫 东荣. All rights reserved.
//
#import <Foundation/Foundation.h>
extern NSString * const youaiExitNotification; /**< 退出 */
extern NSString * const youaiLoginNotification; /**< 登录完成的通知*/
extern NSString * const youaiPaytNotification; /**< 支付通知 */
extern NSString * const youaiShareNotification; /**< 分享通知 */
extern NSString * const youaiCenterNotification; /**< 用户中心通知 */
extern NSString * const youaiErrorNotification; /**< 出错 */
@interface YouaiNotifications : NSObject
@end
//
// YouaiSDKMgr.h
// YouaiSDK
//
// Created by 莫 东荣 on 13-4-9.
// Copyright (c) 2013年 莫 东荣. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface YouaiSDKMgr : NSObject
{
NSString* appId_;
NSString* appKey_;
NSString* inviterCode_;
// NSString* openId;
// NSString* loginKey;
}
+ (YouaiSDKMgr *)getInstance;
- (void)initSDK;
- (void)initSDK:(NSString *)weixinId;
- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller;
- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *) inviterCode;
- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *) inviterCode : (NSString *)userName : (NSString *)passWord;
- (void)setStyleName:(NSString*)styleName;
- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *)userName : (NSString *)passWord;
- (void)openCenter: (UIViewController *)controller;
- (void)openPay: (NSString *)serverId : (NSString *)nickName : (NSString *)callBack : (UIViewController *)controller;
- (void)openPay: (NSString *)serverId : (NSString *)nickName : (NSNumber *)payAmount : (NSString *)callBack : (UIViewController *)controller;
- (void)openShare: (UIViewController *)controller;
- (void)log: (NSString*)log_key : (NSInteger)log_data: (NSString*)log_remark;
- (void)checkAilpay: (NSURL *)url : (UIViewController *)controller;
- (void)applePayCallBack:(NSString *)url :(SKPaymentTransaction *)transaction :(NSString *)resultStr;
@end
//
// YouaiViewController.h
// newYouaiSDK
//
// Created by Mog90 on 14-9-28.
// Copyright (c) 2014年 东荣 莫. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "YouaiLoginInfo.h"
@interface YouaiViewController : UIViewController<UIWebViewDelegate>
{
UIWebView *webView_;
UIActivityIndicatorView *activityIndicator;
}
//@property(assign) int webViewWidth;
//@property(assign) int webViewHeight;
//@property(assign) int screenwidth;
//@property(assign) int screenHeight;
@property(assign) BOOL hasCorner;
-(void)setView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)initWebView;
- (void)loadWebPageWithString:(NSString *)url;
- (void)loadWebPageWithJs:(NSString *)content;
- (void)postNotification:(NSString *)name : (NSString *)code;
- (void)receiveIap:(NSNotification *)notification;
@end
//
// main.m
// Demo
//
// Created by winFan on 12/9/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
{
"APP_ID": "58abba4954c21d1275766755",
"APP_KEY":"28ed3cfdcd40d081a5e8dd761f7e344b",
"appScheme": "com.xingchen.ksws.xyios.alipay",
"gameSimpleName": "fytx_test",
"sdkSimpleName": "i9133_ios",
"sdkVersionCode":"V1_0",
"gamechannelid": "channelId",
"custom": "custom",
"c2": "12356",
"c1": "65321",
"loginCheckUrl": "http://183.57.76.181:9010/logincheck/check",
"payorderurl": "http://183.57.76.181:9020/paycheck/create",
"paycheckurl": "http://183.57.76.181:9020/paycheck/confirm"
}
\ No newline at end of file
No preview for this file type
//
// DemoTests.m
// DemoTests
//
// Created by winFan on 12/9/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
@interface DemoTests : XCTestCase
@end
@implementation DemoTests
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
- (void)testExample {
// This is an example of a functional test case.
XCTAssert(YES, @"Pass");
}
- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{
// Put the code you want to measure the time of here.
}];
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.mango.ios.fytx.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:/Users/xuguohong/Documents/pool_sdk/public_sdk/youai_foolsdk_ios/channel_demo/PoolSdk_i9133_Demo/PoolSdk_i9133_Demo.xcodeproj">
</FileRef>
</Workspace>
{
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "5b13317c-0110-4367-8746-06bc6aadd3cd++2397",
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
"5b13317c-0110-4367-8746-06bc6aadd3cd++2397" : {
}
},
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
"5b13317c-0110-4367-8746-06bc6aadd3cd++2397" : 0
},
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "8119CC7B-EDC1-4646-9378-8ECAC2EEB94B",
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
"5b13317c-0110-4367-8746-06bc6aadd3cd++2397" : "youai_foolsdk_ios\/"
},
"DVTSourceControlWorkspaceBlueprintNameKey" : "Demo",
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "PoolSdk_Demo\/Demo.xcodeproj",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "svn:\/\/10.21.210.99",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Subversion",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "5b13317c-0110-4367-8746-06bc6aadd3cd++2397"
}
]
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../PoolSdk/PoolSdk/SDKInterface.m"
timestampString = "471440051.171901"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "77"
endingLineNumber = "77"
landmarkName = "-receiveLoginMessage:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../PoolSdk/PoolSdk/SDKInterface.m"
timestampString = "471440051.171901"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "43"
endingLineNumber = "43"
landmarkName = "-SDKloginSDK"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0640"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
BuildableName = "Demo.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BB5F3CA01C1811BC00DA339D"
BuildableName = "DemoTests.xctest"
BlueprintName = "DemoTests"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BB5F3CA01C1811BC00DA339D"
BuildableName = "DemoTests.xctest"
BlueprintName = "DemoTests"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
BuildableName = "Demo.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
BuildableName = "Demo.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
BuildableName = "Demo.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Demo.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>BB5F3C871C1811BC00DA339D</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>BB5F3CA01C1811BC00DA339D</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Demo/SDKInterface.h"
timestampString = "474775745.083759"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "9"
endingLineNumber = "9"
landmarkName = "@interface SDKInterface"
landmarkType = "2">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
BuildableName = "PoolSdk_i9133_Demo.app"
BlueprintName = "PoolSdk_i9133_Demo"
ReferencedContainer = "container:PoolSdk_i9133_Demo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BB5F3CA01C1811BC00DA339D"
BuildableName = "PoolSdk_i9133_Demo.xctest"
BlueprintName = "PoolSdk_i9133_DemoTests"
ReferencedContainer = "container:PoolSdk_i9133_Demo.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
BuildableName = "PoolSdk_i9133_Demo.app"
BlueprintName = "PoolSdk_i9133_Demo"
ReferencedContainer = "container:PoolSdk_i9133_Demo.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
BuildableName = "PoolSdk_i9133_Demo.app"
BlueprintName = "PoolSdk_i9133_Demo"
ReferencedContainer = "container:PoolSdk_i9133_Demo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
BuildableName = "PoolSdk_i9133_Demo.app"
BlueprintName = "PoolSdk_i9133_Demo"
ReferencedContainer = "container:PoolSdk_i9133_Demo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Demo.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>BB5F3C871C1811BC00DA339D</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>BB5F3CA01C1811BC00DA339D</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
### 2017-02-27
添加ios公共SDK接入资料
\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
//
// APAuthInfo.h
// AliSDKDemo
//
// Created by 方彬 on 14-7-18.
// Copyright (c) 2014年 Alipay.com. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface APayAuthInfo : NSObject
@property(nonatomic, copy)NSString *appID;
@property(nonatomic, copy)NSString *pid;
@property(nonatomic, copy)NSString *redirectUri;
/**
* 初始化AuthInfo
*
* @param appIDStr 应用ID
* @param productIDStr 产品码 该商户在aboss签约的产品,用户获取pid获取的参数
* @param pidStr 商户ID 可不填
* @param uriStr 授权的应用回调地址 比如:alidemo://auth
*
* @return authinfo实例
*/
- (id)initWithAppID:(NSString *)appIDStr
pid:(NSString *)pidStr
redirectUri:(NSString *)uriStr;
- (NSString *)description;
- (NSString *)wapDescription;
@end
//
// AlipaySDK.h
// AlipaySDK
//
// Created by 方彬 on 14-4-28.
// Copyright (c) 2014年 Alipay. All rights reserved.
//
////////////////////////////////////////////////////////
////////////////version:2.1 motify:2014.12.24//////////
///////////////////Merry Christmas=。=//////////////////
////////////////////////////////////////////////////////
#import "APayAuthInfo.h"
typedef enum {
ALIPAY_TIDFACTOR_IMEI,
ALIPAY_TIDFACTOR_IMSI,
ALIPAY_TIDFACTOR_TID,
ALIPAY_TIDFACTOR_CLIENTKEY,
ALIPAY_TIDFACTOR_VIMEI,
ALIPAY_TIDFACTOR_VIMSI,
ALIPAY_TIDFACTOR_CLIENTID,
ALIPAY_TIDFACTOR_APDID,
ALIPAY_TIDFACTOR_MAX
} AlipayTidFactor;
typedef void(^CompletionBlock)(NSDictionary *resultDic);
@interface AlipaySDK : NSObject
/**
* 创建支付单例服务
*
* @return 返回单例对象
*/
+ (AlipaySDK *)defaultService;
/**
* 支付接口
*
* @param orderStr 订单信息
* @param schemeStr 调用支付的app注册在info.plist中的scheme
* @param compltionBlock 支付结果回调Block
*/
- (void)payOrder:(NSString *)orderStr
fromScheme:(NSString *)schemeStr
callback:(CompletionBlock)completionBlock;
/**
* 处理钱包或者独立快捷app支付跳回商户app携带的支付结果Url
*
* @param resultUrl 支付结果url,传入后由SDK解析,统一在上面的pay方法的callback中回调
* @param completionBlock 跳钱包支付结果回调,保证跳转钱包支付过程中,即使调用方app被系统kill时,能通过这个回调取到支付结果。
*/
- (void)processOrderWithPaymentResult:(NSURL *)resultUrl
standbyCallback:(CompletionBlock)completionBlock;
/**
* 是否已经使用过
*
* @return YES为已经使用过,NO反之
*/
- (BOOL)isLogined;
/**
* 当前版本号
*
* @return 当前版本字符串
*/
- (NSString *)currentVersion;
/**
* 当前版本号
*
* @return tid相关信息
*/
- (NSString*)queryTidFactor:(AlipayTidFactor)factor;
/**
* 測試所用,realse包无效
*
* @param url 测试环境
*/
- (void)setUrl:(NSString *)url;
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////h5 拦截支付入口///////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
/**
* url order 获取接口
*
* @param urlStr 拦截的 url string
*
* @return 获取到的url order info
*/
- (NSString*)fetchOrderInfoFromH5PayUrl:(NSString*)urlStr;
/**
* url支付接口
*
* @param orderStr 订单信息
* @param schemeStr 调用支付的app注册在info.plist中的scheme
* @param compltionBlock 支付结果回调Block
*/
- (void)payUrlOrder:(NSString *)orderStr
fromScheme:(NSString *)schemeStr
callback:(CompletionBlock)completionBlock;
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////授权1.0//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
/**
* 快登授权
* @param authInfo 需授权信息
* @param completionBlock 授权结果回调
*/
- (void)authWithInfo:(APayAuthInfo *)authInfo
callback:(CompletionBlock)completionBlock;
/**
* 处理授权信息Url
*
* @param resultUrl 钱包返回的授权结果url
* @param completionBlock 跳授权结果回调,保证跳转钱包授权过程中,即使调用方app被系统kill时,能通过这个回调取到支付结果。
*/
- (void)processAuthResult:(NSURL *)resultUrl
standbyCallback:(CompletionBlock)completionBlock;
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////授权2.0//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
/**
* 快登授权2.0
*
* @param infoStr 授权请求信息字符串
* @param schemeStr 调用授权的app注册在info.plist中的scheme
* @param completionBlock 授权结果回调
*/
- (void)auth_V2WithInfo:(NSString *)infoStr
fromScheme:(NSString *)schemeStr
callback:(CompletionBlock)completionBlock;
/**
* 处理授权信息Url
*
* @param resultUrl 钱包返回的授权结果url
* @param completionBlock 跳授权结果回调,保证跳转钱包授权过程中,即使调用方app被系统kill时,能通过这个回调取到支付结果。
*/
- (void)processAuth_V2Result:(NSURL *)resultUrl
standbyCallback:(CompletionBlock)completionBlock;
@end
//
// PGLogger.h
// PanguCommonLib
//
// Created by ouyanghua on 14-2-22.
// Copyright (c) 2014年 pangu. All rights reserved.
//
#import <Foundation/Foundation.h>
void DGLog(NSString *fmt, ...);
typedef NS_ENUM(NSInteger, DGLoggerLevel)
{
ELogVerbose = 1,
ELogDebug,
ELogInfo,
ELogWarn,
ELogError
};
@interface DGLogger : NSObject
+ (void)showLog:(NSString *)fmt,...;
+ (void)showLog:(DGLoggerLevel)level log:(NSString *)fmt,...;
+ (void)isShowLog:(BOOL)flag;
@end
//
// Interface.h
// PoolSdk
//
// Created by winFan on 12/10/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#include "UnionInterface.h"
#import <SafariServices/SafariServices.h>
@interface Interface : NSObject <UnionInterface,SFSafariViewControllerDelegate>
@property(nonatomic, strong)UIViewController *controller;
@end
\ No newline at end of file
//
// NetCenter.h
// public_i9133
//
// Created by winFan on 12/2/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NetCenter : NSObject
@property(nonatomic,retain) NSMutableData *receiveData;
@property(nonatomic,assign)int dataPackSerialNo;
+ (NetCenter *)getInstance;
- (NSString *)httpGetSyn:(NSString *) getUrl;
- (NSString *)httpPostSyn:(NSString *) postUrl : (NSDictionary *) postData;
- (void)httpGetNoSyn;
- (void)httpPostNoSyn:(NSString *) postUrl :(NSDictionary *)postDict;
- (NSString *)dicToString:(NSDictionary *) dict;
@end
//
// OtherSetting.h
// PoolSdk
//
// Created by winFan on 11/23/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#ifndef __PoolSdk__OtherSetting__
#define __PoolSdk__OtherSetting__
/**
应用支持的方向
*/
typedef NS_ENUM(NSUInteger, ESDKOrientation) {
ESDKOrientationPortrait = 1,//竖
ESDKOrientationLandscape,//横
ESDKOrientationNone//自动旋转
};
/**
应用支持的方向
*/
typedef NS_ENUM(NSUInteger, REPORT_TYPE) {
REPORT_TYPE_OPEN = 1,//竖
REPORT_TYPE_ENTER,//横
REPORT_TYPE_DEFINE//自动旋转
};
#endif /* defined(__PoolSdk__OtherSetting__) */
//
// PoolBaseModel.h
// public_i9133
//
// Created by winFan on 12/2/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "OtherSetting.h"
@interface PoolBaseModel : NSObject
- (NSString *)objectToJsonString;
- (NSMutableString *)paramAddToString;
- (id)initWithDiction:(NSDictionary *)diction;
@end
\ No newline at end of file
//
// PoolLoginChecker.h
// public_i9133
//
// Created by winFan on 12/1/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PoolSdk/PoolLoginInfo.h"
#import "PoolSdk/PoolNotification.h"
#import "PoolSdk/PoolCreateOrderInfo.h"
#import "PoolSdk/PoolPayInfo.h"
#import "PoolReportInfo.h"
@interface PoolChecker : NSObject
@property(nonatomic, strong)NSString *userId;
+ (PoolChecker *)getInstance;
- (void)initChecker;
- (void)startCheck:(PoolLoginInfo *)loginInfo;
- (void) createOrder:(PoolCreateOrderInfo *)payInfo;
- (void) reportOpen;
- (void)handleFirstOpenApp:(NSString*) path;
- (void) reportEnter:(PoolReportInfo *)reInfo;
- (void) report:(NSString *)_action :(PoolReportInfo *)reInfo;
- (void)sendNotice:(PoolSDKNotificationType)notiType
notiName:(NSString *)notiName
statusCode:(int)nCode
description:(NSString *)szDescripton
extendData:(NSObject *)extendData;
@end
\ No newline at end of file
//
// PoolConfig.h
// PoolSdk
//
// Created by winFan on 12/11/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface PoolConfig : NSObject
@property(nonatomic, strong)NSString *gameSimpleName;
@property(nonatomic, strong)NSString *sdkSimpleName;
@property(nonatomic, strong)NSString *sdkVersionCode;
@property(nonatomic, strong)NSString *loginCheckUrl;
@property(nonatomic, strong)NSString *payOrderUrl;
@property(nonatomic, strong)NSString *payCheckUrl;
@property(nonatomic, strong)NSString *c1;
@property(nonatomic, strong)NSString *c2;
@property(nonatomic, strong)NSString *custom;
+ (PoolConfig *)getInstance;
- (void) loadFile:(NSString *) fileName;
- (NSString *)getValueByKey:(NSString *) key;
- (void) updateC1C2Value:(NSString *)c1 c2:(NSString *)c2;
@end
\ No newline at end of file
//
// PayInfo.h
// public_i9133
//
// Created by winFan on 12/3/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "PoolSdk/PoolBaseModel.h"
@interface PoolCreateOrderInfo : PoolBaseModel
@property(nonatomic,strong)NSString *serverId;
@property(nonatomic, strong)NSString *serverName;//角色名称
@property(nonatomic, strong)NSString *playerId;//所在服务器名称
@property(nonatomic, strong)NSString *playerName;//所在服务器id
@property(nonatomic, strong)NSString *playerLevel;//所在服务器id
@property(nonatomic, strong)NSString *postAmount;//所在服务器id
@property(nonatomic, strong)NSString *productId;//所在服务器id
@property(nonatomic, strong)NSString *productName;//所在服务器id
@property(nonatomic, strong)NSString *productDesc;//所在服务器id
@property(nonatomic, strong)NSString *custom;//所在服务器id
@property(nonatomic, strong)NSString *exchange;//所在服务器id
@property(nonatomic, strong)NSString *otherInfo;//所在服务器id
@property(nonatomic, strong)NSString *userId;//所在服务器id
@property(nonatomic, strong)NSString *timestamp;//所在服务器id
- (NSString *) getTsign ;
- (NSString *) getTimestamp ;
@end
\ No newline at end of file
//
// PoolLoginInfo.h
// public_i9133
//
// Created by winFan on 12/1/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "PoolSdk/PoolBaseModel.h"
@interface PoolLoginInfo : PoolBaseModel
@property(nonatomic,strong)NSString *timestamp;
@property(nonatomic, strong)NSString *sign;//角色名称
@property(nonatomic, strong)NSString *other;//所在服务器名称
@property(nonatomic, strong)NSString *openId;//所在服务器id
@property(nonatomic, strong)NSString *userType;//所在服务器id
@end
\ No newline at end of file
//
// PoolNotification.h
// public_i9133
//
// Created by winFan on 12/1/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
extern NSString * const poolSDK_Notification; /**< */
extern NSString * const _create_order_notification; /**< */
/**
应用支持的方向
*/
typedef NS_ENUM(int, PoolSDKNotificationType) {
PoolSDKNotificationLogin = 1,//登录
PoolSDKNotificationLogout,//注销
PoolSDKNotificationPay,//支付完成
PoolSDKNotificationPause,//暂停退出
PoolSDKNotificationRole,//创建角色
PoolSDKNotificationInitSDK//初始化SDK
};
@interface PoolNotification : NSObject
@end
//////////////////////////////////////////////////////////////////////
@interface PoolSDKResult : NSObject
@property(nonatomic, assign)int statusCode;//请参照此文件下面状态标识
@property(nonatomic, strong)NSString *resultDescription;
@property(nonatomic, strong)NSObject *extendData;
//V1.2.0新增
@property(nonatomic, assign)PoolSDKNotificationType notiType;//消息类型
@property(nonatomic, strong)NSString *notiName;//消息名称
@end
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
/* 状态标识 */
#define POOLSDK_NO_ERROR 0 /*操作成功*/
#define POOLSDK_ERROR_LOGIN_FAILED -100 /*登录失败*/
#define POOLSDK_ERROR_LOGIN_CANCEL -101 /*登录取消*/
#define POOLSDK_ERROR_LOGIN_GAMGEACCOUNT -102 /*游戏帐号登录,非平台账号*/
#define POOLSDK_ERROR_PAY_FAILED -200 /*支付失败*/
#define POOLSDK_ERROR_PAY_CANCEL -201 /*支付取消*/
#define POOLSDK_ERROR_PAY_VERSIGN -202 /*支付验签失败*/
#define POOLSDK_ERROR_CREATE_ORDER_FAILED -203 /*支付验签失败*/
#define POOLSDK_ERROR_ROLE_CREATE_FAILED -300 /*角色创建失败*/
#define POOLSDK_ERROR_INIT_FAILED -400 /*初始化失败*/
//////////////////////////////////////////////////////////////////////
//
// PoolPayInfo.h
// public_i9133
//
// Created by winFan on 12/3/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "PoolSdk/PoolBaseModel.h"
@interface PoolPayInfo : PoolBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *queryId;
@property(nonatomic, strong)NSString *playerId;
@property(nonatomic, strong)NSString *playerName;//所在服务器id
@property(nonatomic, strong)NSString *postAmount;
@property(nonatomic, strong)NSString *productId;
@property(nonatomic, strong)NSString *products;
@property(nonatomic, strong)NSString *custom;
@property(nonatomic, strong)NSString *postTime;
@property(nonatomic, strong)NSString *other;
@end
\ No newline at end of file
//
// PoolReportInfo.h
// PoolSdk
//
// Created by winFan on 12/21/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "PoolSdk/PoolBaseModel.h"
@interface PoolReportInfo : PoolBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *serverName;
@property(nonatomic, strong)NSString *playerId;
@property(nonatomic, strong)NSString *playerName;//所在服务器id
@property(nonatomic, strong)NSString *playerLevel;
@property(nonatomic, strong)NSString *custom;
@property(nonatomic, strong)NSString *reportType;
@property(nonatomic, strong)NSString *openId;
#define REPORT_URL @"http://public.sdk.gzyouai.com:9030/sdk/statistic"//@"http://10.200.201.230:9001/sdk/statistic"
#define REPORT_OPEN @"open"
#define REPORT_ENTER @"enter"
#define REPORT_CREATEROLE @"createrole"
#define REPORT_ROLEUPGRADE @"roleupgrade"
@end
//
// PoolSdk.h
// PoolSdk
//
// Created by winFan on 11/23/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <PoolSdk/PoolSdk2.h>
#import <UIKit/UIKit.h>
@interface PoolSdk : NSObject
/**
* 当前SDK的版本
*/
@property(nonatomic, strong, readonly)NSString *sdkVersion;
/**
* 用于设置url types schemes 默认为工程名
*/
@property(nonatomic, strong)NSString *urlSchemes;
/**
获取SDK实例对象
*/
+ (PoolSdk *)shareSDK;
/**
初始化SDK
*/
- (void)initSDK:(UIViewController *) control;
-(void)viewDidAppear;
/**
登录SDK
*/
- (void)loginSDK;
/**
进行支付
*/
- (void)payWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
/**
用户中心
*/
- (void)gotoUserCenter;
/**
report
*/
- (void)reportSDK:(PoolReportInfo *)reportInfo;
/**
注销
*/
- (void)logoutSDK;
/**
退出
*/
- (void)exitSDK;
/**
显示/隐藏浮标
*/
//- (void)showFloatIcon:(BOOL)bFlag;
/**
// called in - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
*/
- (void)handleOpenurl:(NSURL *)url;
- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
/**
应用 appid
*/
/**
应用支持的方向 默认为 EDreamSDKOrientationLandscape
*/
@property(nonatomic, assign)ESDKOrientation sdkOrientation;
/**
浮标是否已经显示,默认为NO
*/
@property(nonatomic, assign)BOOL bShowedFloat;
/**
serverId
*/
@property(nonatomic, assign)int serverId;
/**
获取gamechannelid
*/
-(NSString *) getGameChannelId;
/**
获取Custom
*/
- (NSString *) getCustomValue;
/**
获取ChannelParameter1
*/
- (NSString *) getChannelParameter1;
/**
获取ChannelParameter2
*/
- (NSString *) getChannelParameter2;
@end
//
// PoolSdk.h
// PoolSdk
//
// Created by 许 on 16/1/15.
// Copyright © 2016年 许. All rights reserved.
//
// In this header, you should import all the public headers of your framework using statements like #import <PoolSdk/PublicHeader.h>
#import <UIKit/UIKit.h>
#import "PoolChecker.h"
#import "Interface.h"
#import "PoolReportInfo.h"
#import "PoolLoginInfo.h"
#import "PoolNotification.h"
#import "PoolPayInfo.h"
#import "UnionInterface.h"
#import "PoolCreateOrderInfo.h"
#import "PoolConfig.h"
//
// PoolUtils.h
// public_i9133
//
// Created by winFan on 12/3/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface PoolUtils : NSObject
+(NSString *)md5:(NSString *)str;
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
+(NSString *)createPayOrderUrl;
//*充值回调地址
+(NSString *)createPayUrl;
@end
\ No newline at end of file
//
// UnionInterface.h
// PoolSdk
//
// Created by winFan on 11/23/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "PoolCreateOrderInfo.h"
#import "PoolReportInfo.h"
@protocol UnionInterface
/**
初始化SDK
*/
//[[PoolChecker getInstance] sendNotice:PoolSDKNotificationPay notiName:@"" statusCode:POOLSDK_NO_ERROR description:@"" extendData:order_id];
- (void)SDKinit:(UIViewController *) control;
/**
登录SDK
*/
- (void)SDKloginSDK;
/**
注销
*/
- (void)SDKlogoutSDK;
/**
退出
*/
- (void)SDKexitSDK;
/**
用户中心
*/
- (void)SDKgotoUserCenter;
- (void)viewDidAppear;
/**
提交数据
*/
- (void)SDKreport:(PoolReportInfo *) reportInfo;
/**
进行支付
*/
- (void)SDKpayWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
- (void)receiveCreateOrder: (NSNotification *)notification;
- (void)handleOpenurl:(NSURL *)url;
- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
@end
\ No newline at end of file
No preview for this file type
No preview for this file type
//
// IapController.h
// mangosanguo
//
// Created by Gino on 12-11-6.
// Copyright (c) 2012年 private. All rights reserved.
//
#if applepay
#import <Foundation/Foundation.h>
#import "StoreKit/StoreKit.h"
@interface IapController : NSObject<SKProductsRequestDelegate,SKPaymentTransactionObserver>
{
bool isRequestedBuy;
SKPaymentTransaction *PayTransaction;
NSMutableArray *payArray;
SKPaymentTransaction *curTransaction;
}
+ (IapController *)sharedController;
- (id)init;
- (void)removeIt;
- (void)requestProductData;
- (void)requestBuyProduct:(NSString *)identifier;
- (void)requestProductInfoById:(NSString *)str;
- (void)comfireTransactions:(bool)isSuessPosted;
- (void)checkReceiptIsFail;
- (void)addItemToPayArray:(SKPaymentTransaction *)transaction;
- (bool)checkPayArrayIsEmpty;
- (void)checkReceiptForArray;
- (void)setAppleCallBack: (NSString*)url;
@end
#endif
\ No newline at end of file
//
// GetWifiMac.h
// mangosanguo
//
// Created by 莫 on 12-9-28.
// Copyright (c) 2012年 private. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface YouaiGetWifiMac : NSObject
+ (NSString *)macaddress;
@end
//
// YouaiLoginInfo.h
// YouaiSDK
//
// Created by 莫 东荣 on 13-4-10.
// Copyright (c) 2013年 莫 东荣. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface YouaiLoginInfo : NSObject //用户uid
{
//
NSString *openId;
//token
NSString *token;
//时间戳
NSString *timestamp;
}
@property(retain,nonatomic) NSString *openId;
@property(retain,nonatomic) NSString *token;
@property(retain,nonatomic) NSString *timestamp;
+ (YouaiLoginInfo *)getInstance;
@end
\ No newline at end of file
//
// YouaiNotifications.h
// YouaiSDK
//
// Created by 莫 东荣 on 13-4-10.
// Copyright (c) 2013年 莫 东荣. All rights reserved.
//
#import <Foundation/Foundation.h>
extern NSString * const youaiExitNotification; /**< 退出 */
extern NSString * const youaiLoginNotification; /**< 登录完成的通知*/
extern NSString * const youaiPaytNotification; /**< 支付通知 */
extern NSString * const youaiShareNotification; /**< 分享通知 */
extern NSString * const youaiCenterNotification; /**< 用户中心通知 */
extern NSString * const youaiErrorNotification; /**< 出错 */
@interface YouaiNotifications : NSObject
@end
//
// YouaiSDKMgr.h
// YouaiSDK
//
// Created by 莫 东荣 on 13-4-9.
// Copyright (c) 2013年 莫 东荣. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface YouaiSDKMgr : NSObject
{
NSString* appId_;
NSString* appKey_;
NSString* inviterCode_;
// NSString* openId;
// NSString* loginKey;
}
+ (YouaiSDKMgr *)getInstance;
- (void)initSDK;
- (void)initSDK:(NSString *)weixinId;
- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller;
- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *) inviterCode;
- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *) inviterCode : (NSString *)userName : (NSString *)passWord;
- (void)setStyleName:(NSString*)styleName;
- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *)userName : (NSString *)passWord;
- (void)openCenter: (UIViewController *)controller;
- (void)openPay: (NSString *)serverId : (NSString *)nickName : (NSString *)callBack : (UIViewController *)controller;
- (void)openPay: (NSString *)serverId : (NSString *)nickName : (NSNumber *)payAmount : (NSString *)callBack : (UIViewController *)controller;
- (void)openShare: (UIViewController *)controller;
- (void)log: (NSString*)log_key : (NSInteger)log_data: (NSString*)log_remark;
- (void)checkAilpay: (NSURL *)url : (UIViewController *)controller;
- (void)applePayCallBack:(NSString *)url :(SKPaymentTransaction *)transaction :(NSString *)resultStr;
@end
No preview for this file type
This diff is collapsed. Click to expand it.