xuguohong

3.1.1

Showing 29 changed files with 49 additions and 144 deletions
No preview for this file type
......@@ -7,14 +7,14 @@
objects = {
/* Begin PBXBuildFile section */
8425EC1A1F0E3CBD00B0D868 /* PoolSdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8425EC191F0E3CBD00B0D868 /* PoolSdk.framework */; settings = {ASSET_TAGS = (); }; };
844544B81EFA5EE7004BDC50 /* YouaiSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 844544B71EFA5EE7004BDC50 /* YouaiSDK.framework */; settings = {ASSET_TAGS = (); }; };
845D18221C8D778400F27EB9 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 845D181B1C8D778400F27EB9 /* Images.xcassets */; settings = {ASSET_TAGS = (); }; };
846BD2241EE9342700E89A1D /* pool_setting in Resources */ = {isa = PBXBuildFile; fileRef = 846BD21F1EE9342700E89A1D /* pool_setting */; settings = {ASSET_TAGS = (); }; };
846BD2261EE9342700E89A1D /* SDKInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 846BD2231EE9342700E89A1D /* SDKInterface.m */; settings = {ASSET_TAGS = (); }; };
847EE5E21EE9007E003A4B7B /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 847EE5E11EE9007E003A4B7B /* MainViewController.m */; settings = {ASSET_TAGS = (); }; };
8484E4F51EE7E0DC00B402D1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F21EE7E0DC00B402D1 /* AppDelegate.m */; settings = {ASSET_TAGS = (); }; };
8484E4F61EE7E0DC00B402D1 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F41EE7E0DC00B402D1 /* ViewController.m */; settings = {ASSET_TAGS = (); }; };
8425EC1A1F0E3CBD00B0D868 /* PoolSdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8425EC191F0E3CBD00B0D868 /* PoolSdk.framework */; };
844544B81EFA5EE7004BDC50 /* YouaiSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 844544B71EFA5EE7004BDC50 /* YouaiSDK.framework */; };
845D18221C8D778400F27EB9 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 845D181B1C8D778400F27EB9 /* Images.xcassets */; };
846BD2241EE9342700E89A1D /* pool_setting in Resources */ = {isa = PBXBuildFile; fileRef = 846BD21F1EE9342700E89A1D /* pool_setting */; };
846BD2261EE9342700E89A1D /* SDKInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 846BD2231EE9342700E89A1D /* SDKInterface.m */; };
847EE5E21EE9007E003A4B7B /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 847EE5E11EE9007E003A4B7B /* MainViewController.m */; };
8484E4F51EE7E0DC00B402D1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F21EE7E0DC00B402D1 /* AppDelegate.m */; };
8484E4F61EE7E0DC00B402D1 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F41EE7E0DC00B402D1 /* ViewController.m */; };
8484E4FC1EE7E1D800B402D1 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E4FB1EE7E1D800B402D1 /* libsqlite3.dylib */; };
8484E4FE1EE7E1F700B402D1 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E4FD1EE7E1F700B402D1 /* CoreTelephony.framework */; };
8484E5001EE7E20C00B402D1 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E4FF1EE7E20C00B402D1 /* CFNetwork.framework */; };
......@@ -29,7 +29,7 @@
8484E5121EE7E2B800B402D1 /* libz.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E5111EE7E2B800B402D1 /* libz.1.dylib */; };
8484E5141EE7E2DE00B402D1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E5131EE7E2DE00B402D1 /* Foundation.framework */; };
8484E5161EE7E36800B402D1 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E5151EE7E36800B402D1 /* SystemConfiguration.framework */; };
84A090AB1F160A69003D23FB /* TrackingIO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84A090AA1F160A69003D23FB /* TrackingIO.a */; settings = {ASSET_TAGS = (); }; };
84A090AB1F160A69003D23FB /* TrackingIO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84A090AA1F160A69003D23FB /* TrackingIO.a */; };
BB5F3C8E1C1811BC00DA339D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BB5F3C8D1C1811BC00DA339D /* main.m */; };
BB5F3C971C1811BC00DA339D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BB5F3C951C1811BC00DA339D /* Main.storyboard */; };
BB5F3C9C1C1811BC00DA339D /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB5F3C9A1C1811BC00DA339D /* LaunchScreen.xib */; };
......@@ -281,6 +281,7 @@
TargetAttributes = {
BB5F3C871C1811BC00DA339D = {
CreatedOnToolsVersion = 6.4;
DevelopmentTeam = A5YL2H95JD;
};
BB5F3CA01C1811BC00DA339D = {
CreatedOnToolsVersion = 6.4;
......@@ -466,8 +467,9 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer: Feng Zhang (4LYC35G22K)";
CODE_SIGN_IDENTITY = "iPhone Developer";
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = A5YL2H95JD;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
......@@ -484,9 +486,10 @@
);
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = yhjy.mhtx.ios;
PRODUCT_BUNDLE_IDENTIFIER = com.gujianqingyuan.gjqy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "f746a8a9-526c-4114-b2d6-c8fa351e323a";
PROVISIONING_PROFILE = "6653f971-4123-405a-b29c-ed42e0281dc7";
PROVISIONING_PROFILE_SPECIFIER = Gjqy1120_dev;
TARGETED_DEVICE_FAMILY = 2;
VALID_ARCHS = "arm64 armv7s";
};
......@@ -496,8 +499,9 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer: Feng Zhang (4LYC35G22K)";
CODE_SIGN_IDENTITY = "iPhone Developer";
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = A5YL2H95JD;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
......@@ -514,9 +518,10 @@
);
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = yhjy.mhtx.ios;
PRODUCT_BUNDLE_IDENTIFIER = com.gujianqingyuan.gjqy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "f746a8a9-526c-4114-b2d6-c8fa351e323a";
PROVISIONING_PROFILE = "6653f971-4123-405a-b29c-ed42e0281dc7";
PROVISIONING_PROFILE_SPECIFIER = Gjqy1120_dev;
TARGETED_DEVICE_FAMILY = 2;
VALID_ARCHS = "arm64 armv7s";
};
......
......@@ -20,7 +20,6 @@
@property(nonatomic, strong)NSString *custom;
@property(nonatomic, strong)NSString *postTime;
@property(nonatomic, strong)NSString *other;
@property(nonatomic, strong)NSString *isOpenThirdPay;//是否开启第三方充值
//游戏传递过来的原值
@property(nonatomic, strong)NSString *serverName;//服务器名称
......
......@@ -21,7 +21,7 @@
*/
@property(nonatomic, strong)NSString *urlSchemes;
@property BOOL isApplePaying;
/**
获取SDK实例对象
......
......@@ -34,7 +34,7 @@ int mExchange;
[[YouaiSDKMgr getInstance]initSDK];
[[YouaiSDKMgr getInstance]setStyleName:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:youaiLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applePayCallBack:) name:@"applePayCallBack" object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youaiToolCallBack:) name:@"youaiToolCallBack" object:nil];
[[PoolChecker getInstance] sendNotice:PoolSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:POOLSDK_NO_ERROR description:@"initSuccess" extendData:nil];
......@@ -90,11 +90,11 @@ int mExchange;
苹果支付结果回调
*/
- (void)applePayCallBack:(NSNotification *)notification
- (void)youaiToolCallBack:(NSNotification *)notification
{
NSDictionary* payResultDic = notification.object;
NSString* receiptStr = [payResultDic objectForKey:@"payResult"];
NSString* receiptStr = [payResultDic objectForKey:@"youaiToolResult"];
NSString* queryId = [payResultDic objectForKey:@"query_id"];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
......@@ -201,7 +201,6 @@ int mExchange;
}
}
NSLog(@"order count:%lu",(unsigned long)[failQueryIdArray count]);
if([failQueryIdArray count] > 0){//含有补单失败项
[userDefaults setObject:failQueryIdArray forKey:@"queryIds"];
}else{//全部补单成功
......@@ -226,15 +225,13 @@ int mExchange;
[self handlerLeakOrder];
});
//NSString *isOpenThirdPay = [payInfo isOpenThirdPay];
NSString *other = [payInfo other];
if (other && [other length] > 0) {
[[YouaiSDKMgr getInstance] openPay:serverId :roleName :amount :[payInfo queryId] :self.controller];
[[YouaiSDKMgr getInstance] openUtil:serverId :roleName :amount :[payInfo queryId] :self.controller];
}else{
NSString* products = [payInfo products];
[[YouaiSDKMgr getInstance] openApplePay:self.controller products:products amount:[payInfo postAmount] productName:[payInfo productName] queryId:queryId];
[[YouaiSDKMgr getInstance] openWithUtil:self.controller products:products amount:[payInfo postAmount] productName:[payInfo productName] queryId:queryId];
}
}
......@@ -243,4 +240,4 @@ int mExchange;
[TrackingIO setPayment:orderId paymentType:payType currentType:currencyType currencyAmount:amount];
}
@end
\ No newline at end of file
@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
......@@ -10,9 +10,6 @@
extern NSString * const youaiExitNotification; /**< 退出 */
extern NSString * const youaiLoginNotification; /**< 登录完成的通知*/
extern NSString * const youaiPaytNotification; /**< 支付通知 */
extern NSString * const youaiShareNotification; /**< 分享通知 */
extern NSString * const youaiCenterNotification; /**< 用户中心通知 */
extern NSString * const youaiErrorNotification; /**< 出错 */
......
......@@ -15,32 +15,24 @@
NSString* appKey_;
NSString* inviterCode_;
// NSString* openId;
// NSString* loginKey;
}
@property bool isApplePaying;
@property bool appleing;
+ (YouaiSDKMgr *)getInstance;
- (void)initSDK;
- (void)initSDK:(NSString *)weixinId;
- (void)setServerUrl:(NSString *)serverUrl;
- (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)openApplePay:(UIViewController*)controll products:(NSString*)products amount:(NSString*)amount productName:(NSString*)productName queryId:(NSString*) queryId;
- (void)openUtil: (NSString *)serverId : (NSString *)nickName : (NSString *)callBack : (UIViewController *)controller;
- (void)openUtil: (NSString *)serverId : (NSString *)nickName : (NSNumber *)amount : (NSString *)callBack : (UIViewController *)controller;
- (void)applePayCallBack:(NSString *)url :(SKPaymentTransaction *)transaction :(NSString *)resultStr;
- (void)openWithUtil:(UIViewController*)controll products:(NSString*)products amount:(NSString*)amount productName:(NSString*)productName queryId:(NSString*) queryId;
......
......@@ -8,6 +8,7 @@
#import <UIKit/UIKit.h>
#import "YouaiLoginInfo.h"
#import <JavaScriptCore/JavaScriptCore.h>
@interface YouaiViewController : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
{
......
......@@ -20,7 +20,6 @@
@property(nonatomic, strong)NSString *custom;
@property(nonatomic, strong)NSString *postTime;
@property(nonatomic, strong)NSString *other;
@property(nonatomic, strong)NSString *isOpenThirdPay;//是否开启第三方充值
//游戏传递过来的原值
@property(nonatomic, strong)NSString *serverName;//服务器名称
......
......@@ -21,7 +21,7 @@
*/
@property(nonatomic, strong)NSString *urlSchemes;
@property BOOL isApplePaying;
/**
获取SDK实例对象
......
......@@ -34,7 +34,7 @@ int mExchange;
[[YouaiSDKMgr getInstance]initSDK];
[[YouaiSDKMgr getInstance]setStyleName:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:youaiLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applePayCallBack:) name:@"applePayCallBack" object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youaiToolCallBack:) name:@"youaiToolCallBack" object:nil];
[[PoolChecker getInstance] sendNotice:PoolSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:POOLSDK_NO_ERROR description:@"initSuccess" extendData:nil];
......@@ -90,11 +90,11 @@ int mExchange;
苹果支付结果回调
*/
- (void)applePayCallBack:(NSNotification *)notification
- (void)youaiToolCallBack:(NSNotification *)notification
{
NSDictionary* payResultDic = notification.object;
NSString* receiptStr = [payResultDic objectForKey:@"payResult"];
NSString* receiptStr = [payResultDic objectForKey:@"youaiToolResult"];
NSString* queryId = [payResultDic objectForKey:@"query_id"];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
......@@ -201,7 +201,6 @@ int mExchange;
}
}
NSLog(@"order count:%lu",(unsigned long)[failQueryIdArray count]);
if([failQueryIdArray count] > 0){//含有补单失败项
[userDefaults setObject:failQueryIdArray forKey:@"queryIds"];
}else{//全部补单成功
......@@ -226,15 +225,13 @@ int mExchange;
[self handlerLeakOrder];
});
//NSString *isOpenThirdPay = [payInfo isOpenThirdPay];
NSString *other = [payInfo other];
if (other && [other length] > 0) {
[[YouaiSDKMgr getInstance] openPay:serverId :roleName :amount :[payInfo queryId] :self.controller];
[[YouaiSDKMgr getInstance] openUtil:serverId :roleName :amount :[payInfo queryId] :self.controller];
}else{
NSString* products = [payInfo products];
[[YouaiSDKMgr getInstance] openApplePay:self.controller products:products amount:[payInfo postAmount] productName:[payInfo productName] queryId:queryId];
[[YouaiSDKMgr getInstance] openWithUtil:self.controller products:products amount:[payInfo postAmount] productName:[payInfo productName] queryId:queryId];
}
}
......@@ -243,4 +240,4 @@ int mExchange;
[TrackingIO setPayment:orderId paymentType:payType currentType:currencyType currencyAmount:amount];
}
@end
\ No newline at end of file
@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
......@@ -10,9 +10,6 @@
extern NSString * const youaiExitNotification; /**< 退出 */
extern NSString * const youaiLoginNotification; /**< 登录完成的通知*/
extern NSString * const youaiPaytNotification; /**< 支付通知 */
extern NSString * const youaiShareNotification; /**< 分享通知 */
extern NSString * const youaiCenterNotification; /**< 用户中心通知 */
extern NSString * const youaiErrorNotification; /**< 出错 */
......
......@@ -15,32 +15,24 @@
NSString* appKey_;
NSString* inviterCode_;
// NSString* openId;
// NSString* loginKey;
}
@property bool isApplePaying;
@property bool appleing;
+ (YouaiSDKMgr *)getInstance;
- (void)initSDK;
- (void)initSDK:(NSString *)weixinId;
- (void)setServerUrl:(NSString *)serverUrl;
- (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)openApplePay:(UIViewController*)controll products:(NSString*)products amount:(NSString*)amount productName:(NSString*)productName queryId:(NSString*) queryId;
- (void)openUtil: (NSString *)serverId : (NSString *)nickName : (NSString *)callBack : (UIViewController *)controller;
- (void)openUtil: (NSString *)serverId : (NSString *)nickName : (NSNumber *)amount : (NSString *)callBack : (UIViewController *)controller;
- (void)applePayCallBack:(NSString *)url :(SKPaymentTransaction *)transaction :(NSString *)resultStr;
- (void)openWithUtil:(UIViewController*)controll products:(NSString*)products amount:(NSString*)amount productName:(NSString*)productName queryId:(NSString*) queryId;
......
......@@ -8,6 +8,7 @@
#import <UIKit/UIKit.h>
#import "YouaiLoginInfo.h"
#import <JavaScriptCore/JavaScriptCore.h>
@interface YouaiViewController : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
{
......
2017-11-23:<br>
1、更新3.1.1被拒问题
2017-11-07:<br>
1、修复iphone x状态栏获取网络类型崩溃bug
......@@ -18,4 +20,4 @@
1、完善接口,生命周期接口添加,添加登录代理回调,订单创建回调字段添加,角色数据提交字段添加
2017-06-21: <br>
版本1
\ No newline at end of file
版本1
......