查看并运行 FDSDKDemo/FDSDKDemo.xcodeproj
- 下载 FDSDKDemo 文件夹内的所有内容。
- 将 Frameworks 内的FDSDK.framework和SDK添加(拖放)到你的工程目录中。
- 在对应项目Targets下找到General,在Embedded Binaries链接 frameworks:
- 导入
<FDSDK/FDSDK.h>
。 - 初始化SDK。并更改对应的参数
- 配置对应渠道SDK设置
渠道列表 | 支持真机 | 支持模拟器 | 未支持原因 |
---|---|---|---|
升游 | 支持 | 支持 | |
乐嗨嗨 | 支持 | 支持 | |
玄藏 | 支持 | 支持 | |
游龙 | 支持 | 支持 | |
94玩 | 支持 | 支持 | |
PP助手 | 支持 | 支持 | |
互冠 | 支持 | 支持 | |
爱思 | 支持 | 支持 | |
XY | 支持 | 支持 | |
麟游 | 支持 | 支持 | |
银狐 | 支持 | 支持 | |
乐玩 | 支持 | 支持 | |
果盘 | 支持 | 不支持 | 合并库过大 |
乐游 | 支持 | 不支持 | |
应天 | 支持 | 不支持 | |
久久 | 支持 | 不支持 |
参数名 | 参数类型 | 说明 |
---|---|---|
appId | NSString | 聚合SDK游戏标识 |
appKey | NSString | 聚合SDK游戏Key |
logData | BOOL | 渠道SDK并集参数。是否打印日志 |
debug | BOOL | 渠道SDK并集参数。是否为测试模式 |
fdPlatformType | NS_ENUM | 设置当前编译链接渠道 |
参数名 | 参数类型 | 说明 |
---|---|---|
name | NSString | 升游游戏名 |
shortName | NSString | 升游游戏名缩写 |
direction | NSString | 游戏屏幕方向 |
参数名 | 参数类型 | 说明 |
---|---|---|
pid | NSString | 乐嗨嗨SDK pid |
AppKey | NSString | 乐嗨嗨SDK AppKey |
AppScheme | NSString | 乐嗨嗨SDK AppScheme |
参数名 | 参数类型 | 说明 |
---|---|---|
AppID | NSString | 玄藏SDKAppId |
AppKey | NSString | 玄藏SDKAppKey |
AppScheme | NSString | 玄藏SDK AppScheme |
参数名 | 参数类型 | 说明 |
---|---|---|
pid | NSString | 游龙SDK pid |
appKey | NSString | 游龙SDK appKey |
参数名 | 参数类型 | 说明 |
---|---|---|
AppID | NSString | DockSDK(94玩)AppId |
AppKey | NSString | DockSDK(94玩)AppKey |
参数名 | 参数类型 | 说明 |
---|---|---|
AppID | NSString | PP助手AppId |
AppKey | NSString | PP助手AppKey |
参数名 | 参数类型 | 说明 |
---|---|---|
AppID | NSString | 乐玩SDK游戏标识 |
LoginKey | NSString | 乐玩SDK登陆key |
ChanelID | NSString | 乐玩channelID |
GameName | NSString | 游戏名称 |
GameID | NSString | 乐玩游戏id |
参数名 | 参数类型 | 说明 |
---|---|---|
appId | NSString | 银狐SDK游戏标识 |
appKey | NSString | 银狐SDK游戏密钥 |
channelID | NSString | 银狐channelID |
RYappKey | NSString | 银狐SDK热云广告跟踪appkey |
参数名 | 参数类型 | 说明 |
---|---|---|
productId | NSString | LYSDK游戏标识 |
linnyouKey | NSString | LYSDK游戏密钥 |
参数名 | 参数类型 | 说明 |
---|---|---|
appId | NSString | XYSDK游戏标识 |
appKey | NSString | XYSDK游戏密钥 |
appScheme | NSString | 支付回调标识 |
参数名 | 参数类型 | 说明 |
---|---|---|
appId | int | 爱思SDK游戏标识 |
appKey | NSString | 爱思SDK游戏密钥 |
参数名 | 参数类型 | 说明 |
---|---|---|
gameId | NSString | 互冠SDK游戏标识 |
secretKey | NSString | 互冠SDK游戏密钥 |
cpId | NSString | 互冠cpid |
channelId | NSString | 互冠channelId |
wxAppId | NSString | 微信AppId(可能为空) |
参数名 | 参数类型 | 说明 |
---|---|---|
appID | NSString | 乐游appID |
gameID | NSString | 乐游gameID |
参数名 | 参数类型 | 说明 |
---|---|---|
appID | NSString | 久久appID |
URLScheme | NSString | 久久URLScheme |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[self.window makeKeyAndVisible];
[[FDSDKParameters sharedHGSDKParameters] setAppId:@"23"];
[[FDSDKParameters sharedHGSDKParameters] setAppKey:@"ea718a569b4a828e5481acc695rr2abb"];
[[FDSDKParameters sharedHGSDKParameters] setLogData:NO];
[[FDSDKParameters sharedHGSDKParameters] setDebug:NO];
//设置升游sdk参数
FDSYSDKInitModel *sySDKInitModel = [FDSYSDKInitModel new];
[sySDKInitModel setName:@"烈哈哈天"];
[sySDKInitModel setShortName:@"letrgt"];
[sySDKInitModel setDirection:@"1"];
[[FDSDKParameters sharedHGSDKParameters] setSySDKInitModel:sySDKInitModel];
//设置乐嗨嗨sdk参数
FDLHHSDKInitModel *lhhSDKInitModel = [FDLHHSDKInitModel new];
[lhhSDKInitModel setPid:@"23456"];
[lhhSDKInitModel setAppKey:@"91538b441ccc1d8a3dsfsddfdwdf"];
[lhhSDKInitModel setAppScheme:@"FDLHH"];
[[FDSDKParameters sharedHGSDKParameters] setLhhSDKInitModel:lhhSDKInitModel];
//设置玄藏SDK参数
FDXZSDKInitModel *xzSDKInitModel = [FDXZSDKInitModel new];
[xzSDKInitModel setAppID:@"1043432"];
[xzSDKInitModel setAppKey:@"acd0552604dfsegfvs7dc6wefds7"];
[xzSDKInitModel setAppScheme:@"XZshengshizhuzai"];
[[FDSDKParameters sharedHGSDKParameters] setXzSDKInitModel:xzSDKInitModel];
//设置游龙SDK参数
//请在YLinfo.plist中填写相关参数
//设置94玩SDK参数
FDDockSDKInitModel *dockSDKInitModel = [FDDockSDKInitModel new];
[dockSDKInitModel setAppID:@"324"];
[dockSDKInitModel setAppKey:@"fewsdf8e25a8b14ewfdsrg0a1609f2834e"];
[[FDSDKParameters sharedHGSDKParameters] setDockSDKInitModel:dockSDKInitModel];
//设置pp助手SDK参数
FDPPSDKInitModel *ppSDKInitModel = [FDPPSDKInitModel new];
[ppSDKInitModel setAppID:@"3043"];
[ppSDKInitModel setAppKey:@"07ng4beec493edg718fa9a40142980ee"];
[[FDSDKParameters sharedHGSDKParameters] setPpSDKInitModel:ppSDKInitModel];
//设置乐玩SDK参数
FDQdSDKInitModel *qdSDKInitModel = [FDQdSDKInitModel new];
[qdSDKInitModel setGameID:@"1434"];
[qdSDKInitModel setChanelID:@"52"];
[qdSDKInitModel setLoginKey:@"d6rg4r7d"];
[qdSDKInitModel setAppID:@"345653455"];
[[FDSDKParameters sharedHGSDKParameters] setQdSDKInitModel:qdSDKInitModel];
//设置银狐SDK参数
//请在YHInfo.plist中填写相关参数
//设置麟游SDK参数
FDLySDKInitModel *lySDKInitModel = [FDLySDKInitModel new];
[lySDKInitModel setProductId:@"diogern"];
[lySDKInitModel setLinnyouKey:@"cdsfdsjlkfjds"];
[[FDSDKParameters sharedHGSDKParameters] setLySDKInitModel:lySDKInitModel];
// 设置爱思SDK参数
FDAsSDKInitModel *asSDKInitModel = [FDAsSDKInitModel new];
[asSDKInitModel setAppId:634];
[asSDKInitModel setAppKey:@"11234bb4332dn6576565654"];
[[FDSDKParameters sharedHGSDKParameters] setAsSDKInitModel:asSDKInitModel];
// 设置XYSDK参数
FDXySDKInitModel *xySDKInitModel = [FDXySDKInitModel new];
[xySDKInitModel setAppScheme:@"com.XX.XXX.pay"];
[xySDKInitModel setAppId:@"123421"];
[xySDKInitModel setAppKey:@"Drkdgsdkfgndslkjfnfawejrfglsdjls"];
[[FDSDKParameters sharedHGSDKParameters] setXySDKInitModel:xySDKInitModel];
// 设置互冠SDK参数
FDHgSDKInitModel *hgSDKInitModel = [FDHgSDKInitModel new];
[hgSDKInitModel setGameId:@"56"];
[hgSDKInitModel setSecretKey:@"4gslkdslknvi42k34ln523l3k2j423k"];
[hgSDKInitModel setChannelId:@"5"];
[hgSDKInitModel setCpId:@"2344"];
[hgSDKInitModel setWxAppId:@"wx439c5855ea4dghd3"];
[[FDSDKParameters sharedHGSDKParameters] setHgSDKInitModel:hgSDKInitModel];
// 设置果盘SDK参数
FDGpSDKInitModel *gpSDKInitModel = [FDGpSDKInitModel new];
[gpSDKInitModel setAppId:@"101101"];
[gpSDKInitModel setSecretKey:@"GuopanSDK8^(Llad"];
[[FDSDKParameters sharedHGSDKParameters] setGpSDKInitModel:gpSDKInitModel];
// 设置乐游SDK参数
FDLeYouSDKInitModel *leYouSDKInitModel = [FDLeYouSDKInitModel new];
[leYouSDKInitModel setAppID:@"1643"];
[leYouSDKInitModel setGameID:@"1643"];
[[FDSDKParameters sharedHGSDKParameters] setLeYouSDKInitModel:leYouSDKInitModel];
// 设置久久SDK参数
FDJiuJiuSDKInitModel *jiuJiuSDKInitModel = [FDJiuJiuSDKInitModel new];
jiuJiuSDKInitModel.appid = @"cqryios";
jiuJiuSDKInitModel.URLScheme = @"Tracelesscom.com.syzr.hg.FDJiuJiuSDKDemo";
[[FDSDKParameters sharedHGSDKParameters] setJiuJiuSDKInitModel:jiuJiuSDKInitModel];
// 设置应天SDK参数
//请在mchannelinfos.plist中填写相关参数
//选取需要初始化的sdk(银狐sdk只需要执行该代码)
[[FDSDKParameters sharedHGSDKParameters] setFdPlatformType:FDQDPlatform];
//初始化SDK
[[FDSDK sharedInstance] fdInitWithSDKParameters:[FDSDKParameters sharedHGSDKParameters]];
[[FDSDK sharedInstance] fdApplication:application didFinishLaunchingWithOptions:launchOptions];
return YES;
}
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
{
[[FDSDK sharedInstance] fdPayResult:application openURL:url options:nil];
return YES;
}
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options{
[[FDSDK sharedInstance] fdPayResult:app openURL:url options:options];
return YES;
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
[[FDSDK sharedInstance] fdPayResult:application openURL:url sourceApplication:sourceApplication];
return YES;
}
- (void)fdApplicationDidBecomeActive:(UIApplication *)application;
- (void)fdWillEnterForeground:(UIApplication *)application;
- (void)fdApplication:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
- (void)fdApplication:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo;
- (void)fdApplication:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
- (void)fdApplication:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification;
- (void)fdApplicationWillResignActive:(UIApplication *)application;
- (void)fdApplicationDidEnterBackground:(UIApplication *)application;
- (void)fdApplicationWillTerminate:(UIApplication *)application;
- (void)fdApplication:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
注意:需要在项目实现UIApplicationDelegate的类中调用上述接口。
如下:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[FDSDK sharedInstance] fdApplication:application didFinishLaunchingWithOptions:launchOptions];
return YES;
}
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
[[FDSDK sharedInstance] fdPayResult:application openURL:url options:nil];
return YES;
}
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options {
[[FDSDK sharedInstance] fdPayResult:app openURL:url options:options];
[[FDSDK sharedInstance] fdShareResult:app openURL:url options:options];
return YES;
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
[[FDSDK sharedInstance] fdPayResult:application openURL:url sourceApplication:sourceApplication annotation:annotation];
return YES;
}
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[[FDSDK sharedInstance] fdApplication:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
[[FDSDK sharedInstance] fdApplication:application didReceiveRemoteNotification:userInfo];
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler {
[[FDSDK sharedInstance] fdApplication:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
[[FDSDK sharedInstance] fdApplication:application didReceiveLocalNotification:notification];
}
- (void)applicationWillResignActive:(UIApplication *)application {
[[FDSDK sharedInstance] fdApplicationWillResignActive:application];
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
[[FDSDK sharedInstance] fdApplicationDidEnterBackground:application];
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
[[FDSDK sharedInstance] fdWillEnterForeground:application];
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
[[FDSDK sharedInstance] fdApplicationDidBecomeActive:application];
}
- (void)applicationWillTerminate:(UIApplication *)application {
[[FDSDK sharedInstance] fdApplicationWillTerminate:application];
}
参数名 | 参数类型 | 说明 |
---|---|---|
userId | NSString | 聚合SDK用户标识 |
token | NSString | 聚合SDK用户登陆令牌 |
sdkUserId | NSString | 渠道SDK用户标识(可能为空) |
sdkUserName | NSString | 渠道SDK用户名(可能为空) |
extension | NSString | 拓展参数(可能为空) |
- (void)loginButtonClick
{
[[FDSDK sharedInstance] fdLogin:self.view complete:^(FDUserModel *userModel) {
}];
}
参数名 | 参数类型 | 说明 |
---|---|---|
productsId | NSArry | 商品信息列表 |
[[FDSDK sharedInstance] fdUpdateProducts:@[@"com.rxgs.600",@"com.rxgs.3000",@"com.rxgs.6800",@"com.rxgs.12800",@"com.rxgs.32800",@"com.rxgs.64800"]];
参数名 | 参数类型 | 说明 |
---|---|---|
serverId | NSString | 区服 |
[[FDSDK sharedInstance] fdInitServer:@"1"];
- (void)centerButtonClick
{
[[FDSDK sharedInstance] fdCenter];
}
参数名 | 参数类型 | 说明 |
---|---|---|
orderId | NSString | 订单编号 |
price | int | 订单金额(大于等于1的整数) |
productId | NSString | 商品标识 |
productName | NSString | 商品名称 |
productDesc | NSString | 商品描述 |
roleId | NSString | 角色标识 |
roleName | NSString | 角色名称 |
roleLevel | NSString | 角色等级 |
serverId | NSString | 区服标识 |
serverName | NSString | 区服名称 |
extension | NSString | 拓展参数(不能包含中文字符) |
- (void)payButtonClick
{
FDPayParamsModel *payParamsModel = [FDPayParamsModel new];
[payParamsModel setPrice:6];
[payParamsModel setServerId:@"1"];
[payParamsModel setServerName:@"蜀山传奇"];
[payParamsModel setRoleId:@"1"];
[payParamsModel setRoleName:@"GG20思密达"];
[payParamsModel setRoleLevel:@"20"];
[payParamsModel setOrderId:[self getOrderStringByTime]];
[payParamsModel setProductId:@"com.qjtl.6"];
[payParamsModel setProductName:@"元宝"];
[payParamsModel setProductDesc:@"花费6人民币购买600元宝"];
[payParamsModel setExtension:@"拓展参数,不能包含中文字符"];
[[FDSDK sharedInstance] fdPay:payParamsModel complete:^(FDPayResultCode payResultCode) {
if (payResultCode == FDPayResultCodeSucceed)
{
NSLog(@"支付成功");
}
}];
}
- (void)logoutButtonClick
{
[[FDSDK sharedInstance] fdLogout];
}
[[FDSDK sharedInstance] setFdLogoutBlock:^{
NSLog(@"注销回调");
}];
参数名 | 参数类型 | 说明 |
---|---|---|
roleName | NSString | 角色名称 |
roleLever | int | 角色等级 |
serverName | NSString | 角色所在区服 |
roleMoney | int | 角色剩余游戏币 |
roleId | NSString | 角色Id |
serverId | NSString | 区服id |
payLevel | NSString | 充值等级 |
extar | NSString | 扩展信息(可不传) |
FDRoleModel *roleModel = [FDRoleModel new];
[roleModel setRoleName:@"GG20思密达"];
[roleModel setRoleLever:999];
[roleModel setRoleMoney:10000];
[roleModel setServerName:@"蜀山传奇"];
[roleModel setRoleId:@"1"];
[roleModel setServerId:@"1"];
[roleModel setPayLevel:@"v15"];
[roleModel setExtar:@"扩展信息"];
[[FDSDK sharedInstance] updateRoleInfo: roleModel];
1、选择项目,新建Target。并且删除新建项目的所有模板文件。只保留项目的info.plist文件
2、选择新建的Target。选择Build Phases。引用公共项目的代码和资源
3、选择新建的Target。选择Build Settings 搜索Other Linker,在Other Linker Falgs加入-ObjC
以上三部为公共配置。每新增一个渠道SDK都是如此。不同之处在后面列出来
##升游SDK所需要配置
###51wan渠道
1、渠道所需要的sdk如下
2、链接库如下
- libz.tbd
- WanAppStoreSDK.framework
- libc++.tbd
- libHN688SDK_51Wan.a
- libsqlite3.tbd
- WebKit.framwork
- JavaScriptCore.framework
- Foundation.framework
- CoreGraphics.framework
- UIKit.framework
- CoreMotion.framework
- Security.framework
- CoreTelephony.framework
- CFNetwork.framework
- SystemConfiguration.framework
- SPluginPlatform.framework
- SYSDK.framework
- HN669SDKCore.framework
- FDSDK.framework
- SCorePluginPlatform.framework
- Score.framework
3、资源文件如下
- WanAppStoreSDKBundle.bundle
- SResources.bundle
4.info.plist配置
选择项目下的info.plist
5.Enable Bitcode设置 选择Build Settings 搜索Enable Bitcode,将Enable Bitcode设置为NO:
6.在工程的Build Settings中找info,设置URL Types,添加自定义URL Scheme。URL Scheme在回调结果使用,用来支持完成支付返回App。(需在这里配置为App的Bundle ID,才能在App支付后完成跳转)
升游SDK 在应用加载完成的代理方法中,初始化window之前调用下面的2个接口:
项目中需要接入demo里面AppDelegate文件内展示的所有方法。
2、链接库如下
- libz.tbd
- libc++.tbd
- libsqlite3.tbd
- WebKit.framwork
- JavaScriptCore.framework
- Foundation.framework
- CoreGraphics.framework
- UIKit.framework
- CoreMotion.framework
- Security.framework
- CoreTelephony.framework
- CFNetwork.framework
- SystemConfiguration.framework
- HN669SDKCore.framework
- AlipaySDK.framework
- XYSDK.framework.
- SPluginPlatform.framework
- SYSDK.framework
- libHN699SDK_XYSDK.a
- SCorePluginPlatform.framework
- HeePay.framework
- Score.framework
- FDSDK.framework
3、资源文件如下
- AlipaySDK.bundle
- XYSDKResources.bundle
- heepayImage.bundle
- SResources.bundle
4.info.plist配置
选择项目下的info.plist
5.Enable Bitcode设置 选择Build Settings 搜索Enable Bitcode,将Enable Bitcode设置为NO:
6.在工程的Build Settings中找info,设置URL Types,添加自定义URL Scheme。URL Scheme在回调结果使用,用来支持完成支付返回App。(需在这里配置为App的Bundle ID,才能在App支付后完成跳转)
升游SDK 在应用加载完成的代理方法中,初始化window之前调用下面的2个接口:
项目中需要接入demo里面AppDelegate文件内展示的所有方法。
##乐嗨嗨SDK所需要配置
1、链接库如下
- ZQSDK.framework
2、资源文件如下
- Image.bundle
- AlipaySDK.bundle
3.Embed Binaries 里面添加sdk框架库,如下图:
4.添加URL Scheme
选择Info ->URL Types 点击添加(与初始化中appScheme参数保持一致)
5.info.plist配置
选择项目下的info.plist
Xcode7以上需要手动打开网络请求:
添加第三方应用的白名单设置(如图):
在工程里面点击主 .plist 文件,右键"Open As" -> "Source Code"
在打开的源码中添加:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>alipay</string>
<string>weixin</string>
<string>ZQHYSYT</string>
</array>
6.Enable Bitcode设置 选择Build Settings 搜索Enable Bitcode,将Enable Bitcode设置为NO:
7.在target->Capabilities中打开Keychain Sharing
会得到XXX.entitlements文件,打开文件设置为$(AppIdentifierPrefix)com.lhh,如下图所示
##玄藏SDK所需要配置
1、链接库如下
- libz.1.tbd
- libsdc++.6.0.9.tbd
- Security.framework
- libc++.tbd
- libz.tbd
- CoreMotion.framework
- CoreTelephony.framework
- AudioToolbox.framework
- StoreKit.framework
- WebKit.framework
- FDSDK.framework
- YLPlatformSDK.framework
2、资源文件如下
- YLPlatformSDK.bundle
- SIPKeyboardBundleForiPhone.bundle
3.info.plist配置
选择项目下的info.plist
添加微信白名单 LSApplicationQueriesSchemes
4.在URL Types中添加对应的URL Schemes(格式:XZ+游戏拼音全称,与初始化sdk的APPScheme保持相同)
5.Enable Bitcode设置 选择Build Settings 搜索Enable Bitcode,将Enable Bitcode设置为NO:
##游龙SDK所需要配置
1、链接库如下
- libz.1.tbd
- libsdc++.6.0.9.tbd
- Security.framework
- libc++.tbd
- libz.tbd
- CoreMotion.framework
- CoreTelephony.framework
- AudioToolbox.framework
- StoreKit.framework
- WebKit.framework
- FDSDK.framework
- YLPlatformSDK.framework
2、资源文件如下
- YLPlatformSDK.bundle
3.info.plist配置
选择项目下的info.plist
4.在URL Types中添加对应的URL Schemes(格式:YL+游戏拼音全称)
5.Enable Bitcode设置 选择Build Settings 搜索Enable Bitcode,将Enable Bitcode设置为NO:
##94玩SDK所需要配置
1、链接库如下
- libc.tbd
- libz.tbd
- CoreMotion.framework
- Foundation.framework
- UIKit.framework
- SystemConfiguration.framework
2、资源文件如下
- DockSDK.framework
- Alipay.bundle
- SDKBundle.bundle
3.Embed Frameworks 里面添加sdk框架库,如下图:
5.info.plist配置
选择项目下的info.plist
Xcode7以上需要手动打开网络请求:
添加微信支付宝的白名单设置(如图):
在工程里面点击主 .plist 文件,右键"Open As" -> "Source Code"
在打开的源码中添加:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>jingdong</string>
<string>alipay</string>
<string>alipays</string>
<string>alipayshare</string>
<string>wechat</string>
<string>weixin</string>
</array>
6.Enable Bitcode设置 选择Build Settings 搜索Enable Bitcode,将Enable Bitcode设置为NO:
##PP助手SDK所需要配置
1、链接库如下
- libc++.tbd
- libz.tbd
- CoreGraphics.framework
- Foundation.framework
- libMobileGestalt.framework
- AdSupport.framework
- Security.framework
- SystemConfiguration.framework
- CFNetwork.framework
- MobileCoreServices.framework
- CoreText.framework
- UIKit.framework
2、资源文件如下
1.PPAppPlatformKit.bundle
3、info.plist配置
选择项目下的info.plist
4.设置URL Schemes
因为PP助手充值系统集成了支付宝快捷支付充值方式,该充值方式需要跳转 App,所以需要增加 以下配置,否则充值过程中跳出游戏之后无法返回.值设置为 teiron+ PP助手appid
5、Enable Bitcode设置 选择Build Settings 搜索Enable Bitcode,将Enable Bitcode设置为NO:
6.由于银联只支持竖屏,如果游戏只支持横屏,需要将工程的 info.plist 文件中 supported interface orientations( 和 supported interface orientations(iPad))设置成支持 4 个方向,而游戏的横屏在代码中控制即可。
7.添加启动图片
启动图尺寸及命名规则如下所示,直接按照下面的尺寸和命名作图添加到项目中即可
将对应工程的Launch Screen勾选去掉
选择对应的target->General->App Icons and Launch Images配置如下
关于充值:购买物品价格小于现有PP币的时候,直接提示购买,成功后会回调码payResultCode=FDPayResultCodeSucceedk;购买物品价格大于现有PP币的时候,这时候会回调码payResultCode=FDPayResultCodeUnknown,然后发起购买,这时候购买成功了,客户端不会再有任何的回调,服务端会收到通知,要向的服务端查询订单情况。
打包方式:不要用 xcode 的 archive 出包,要用 itunes 导出 ipa 的方式出包:xcode 连接设备,运行 build,得到 xxx.app - 搜索 xxx.app,把它拖到 itunes - 再从 itunes 拖出来
##乐玩SDK所需要配置
1、链接库如下
- libz.tbd
- libsqlite3.tbd
- Foundation.framework
- UIKit.framework
- CoreGraphics.framework
- Security.framework
- SystemConfiguration.framework
- AdSupport.framework
2、资源文件如下
1.qdSdkRes.bundle
3、info.plist配置
选择乐玩项目下的info.plist
4、Enable Bitcode设置 选择Build Settings 搜索Enable Bitcode,将Enable Bitcode设置为NO:
##银狐SDK所需要配置
1、链接库如下
- MobileCoreServices.framework
- UIKit.framework
- AudioToolbox.framework
- AVFoundation.framework
- OpenAL.framework
- QuartzCore.framework
- libz.tbd
- OpenGLES.framework
- CoreGraphics.framework
- Foundation.framework
- CoreMotion.framework
- Security.framework
- libsqlite3
- SystemConfiguration.framework
- AdSupport.framework
- CoreTelephony.framework
- MediaPlayer.framework
- GameController.framework
2、资源文件如下
1.YinHu.bundle
2.YHInfo.plist
3、info.plist配置
选择银狐项目下的info.plist
在工程的info.plist添加(如果游戏内已经添加了该字段则不需要额外添加,如果没有则必须添加)
4、Enable Bitcode设置 选择Build Settings 搜索Enable Bitcode,将Enable Bitcode设置为NO:
##麟游SDK所需要配置
1、链接库如下
- libc++.tbd
- libz.tbd
- libsqlite3.tbd
- CFNetwork.framework
- CoreMotion.framework
- CoreText.framework
- StoreKit.framework
- AdSupport.framework
- SystemConfiguration.framework
- QuartzCore.framework
- Security.framework
- CoreTelephony.framework
2、资源文件如下
1.LYGame.bundle
3、info.plist配置
选择麟游项目下的info.plist
4、Keychain Sharing设置
如果使用Xcode8 进行SDK接入,请在Capabilities 中将Keychain Sharing 设置为 ON:
5、Enable Bitcode设置 选择Build Settings 搜索Enable Bitcode,将Enable Bitcode设置为NO:
##爱思SDK所需要配置
1、链接库如下
- libc++.tbd
- libz.tbd
- libsqlite3.tbd
- AdSupport.framework
- AudioToolbox.framework
- AVFoundation.framework
- CoreGraphics.framework
- CoreTelephony.framework
- Security.framework
- MobileCoreServices.framework
- CoreMotion.framework
- FDSDK.framework
- AsSdkFMWK.framework
2、资源文件如下
- AlipaySDK.bundle
- AsImage.bundle
3、info.plist配置 选择爱思项目下的info.plist右键选择Open As -> Source Code 在最下面添加如下代码
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>需要使用相册</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>需要读取媒体资料库</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>i4Tool4008227229</string>
<string>mqqapiwallet</string>
<string>weixin</string>
<string>alipay</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>As2</string>
</array>
</dict>
</array>
CFBundleURLSchemes 为As + 渠道appid
##XYSDK所需要配置
- 链接库如下
- libz.tbd
- libsqlite3.tbd
- AdSupport.framework
- AVFoundation.framework
- CoreGraphics.framework
- CoreTelephony.framework
- Security.framework
- MobileCoreServices.framework
- FDSDK.framework
- XYPlatform.framework
2、资源文件如下
- XYPlatformResources.bundle
3、info.plist配置 选择XY项目下的info.plist右键选择Open As -> Source Code 在最下面添加如下代码
<key>LSApplicationQueriesSchemes</key>
<array>
<string>alipay</string>
<string>aliminipayauth2222</string>
<string>wechat</string>
<string>weixin</string>
<string>xyzsapp</string>
<string>alipayauth</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.hg.sdk.alipay</string>
</array>
</dict>
</array>
CFBundleURLSchemes 为自定义。最好为游戏bundle id 以alipay结尾 如com.xxx.xxx.alipay
<<<<<<< HEAD
##果盘SDK所需要配置
- 链接库如下
- FDSDK.framework 需要也加到Embed Framework 下
- libsqlite3.tbd
- AdSupport.framework
- AVFoundation.framework
- AlipaySDK.framework
- CoreTelephony.framework
- Security.framework
- GuoPanGroup.framework
- libz.tbd
- HeePay.framework
- IOKit.framework
- IOMobileFramebuffer.framework
- IOSurface.framework
- libcrypto.a
- libGPGameSDK.a
- libprotobuf_64.a
- libssl.a
- JavaScriptCore.framework
- CoreLocation.framework
- AssetsLibrary.framework
- CoreMotion.framework
- AVFoundation.framework
- SystemConfiguration.framework
- CFNetwork.framework
- CoreMotion.framework
2、资源文件如下
- AlipaySDK.bundle
- GPGameResource.bundle
- heepayImage.bundle
- ipaynow.bundle
- walletResources.bundle
3、info.plist配置 选择GP项目下的info.plist右键选择Open As -> Source Code 在最下面添加如下代码
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.huguan.FDGPSDKDemo</string>
</array>
</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>xxassistantsdkV2</string>
<string>XXAppstore</string>
<string>cydia</string>
<string>xxassistant</string>
<string>xxassistantsdk</string>
<string>alipay</string>
<string>weixin</string>
<string>wechat</string>
</array>
<key>NSLocationAlwaysUsageDescription</key>
<string>需要使用地理位置信息</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>需要使用地理位置信息</string>
<key>NSMicrophoneUsageDescription</key>
<string>需要使用麦克风</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>需要读取媒体资料库</string>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
CFBundleURLSchemes 为自定义。最好为游戏bundle id
=======
##互冠SDK所需要配置
1、链接库如下
1 .FDSDK.framework
2. HGSDK.framework
其中也要加到Embed Framework
2、资源文件如下
- HGSDK.xcassets
3、info.plist配置 选择互冠项目下的info.plist右键选择Open As -> Source Code 在最下面添加如下代码
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>需要使用相机</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>需要使用相册</string>
互冠SDK 支付订单时的productId字段需要与apple后台支付参数productId对应上。
控制屏幕方向需要在项目的AppDelegate.m中实现下面方法
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
return [[FDSDK sharedInstance] supportedInterface];
}
在Build Phases下加入Run Script如下代码
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
EXTRACTED_ARCHS=()
for ARCH in $ARCHS
do
echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done
echo "Merging extracted architectures: ${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
rm "${EXTRACTED_ARCHS[@]}"
echo "Replacing original executable with thinned version"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"
done
如果使用微信分享功能,请在URL Types中添加对应的URL Schemes
并且在AppDelegate.m中实现下面方法:
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options{
[[FDSDK sharedInstance] fdShareResult:app openURL:url options:options];
return YES;
}
##乐游SDK所需要配置
####1.添加乐游SDK资源
将sdk内的
LYSDK.bundle
LYSDK.framework
WXApi.h
WebchatAutSDK.h
WXApiObject.h
libWebChatSDK.a
AlipaySDK.bundle
AlipaySDK.framework
ChannelId.plist
拖入游戏项目,记得勾上“Copy items if needed”;(若已存在请忽略)
####2.添加链接库
由于加入支付宝和微信的支付SDK,所以需要添加如下静态库文件:
在Build Phases选项卡的Link Binary With Libraries中,增加以下依赖:(若已存在请忽略)
libc++.tbd
libz.tbd
libsqlite3.0.tbd
Security.framework
coreMotion.framework
CFNetwork.framework
Foundation.framework
UIKit.framework
CoreGraphics.framework
CoreText.framework
QuartzCore.framework
CoreTelephony.framework
SystemConfiguration.framework
####3. 项目Targets设置
Build Setting
-> Header Search Paths
增加 LYSDK.framework/Headers
;
注意:Headers的路径以具体乐游SDK导入的路径为准
Build Setting
-> Other Linker Flags
添加 -all_load
;
####4. info.plist配置(若已存在请忽略)
Http网络配置:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
以及乐游渠道号:(需在ChannelId.plist和info.plist两处配置)
<key>LYChannel</key>
<string>4470</string>
####5.添加微信、支付宝白名单
具体方法:
1.在项目的info.plist中添加一LSApplicationQueriesSchemes,类型为Array。
2.然后给它添加一个需要支持的项目,类型为字符串类型;请添加以下四个:
URL Types配置(为了支付完成之后能跳转回游戏)
具体方法:
TARGETS ----> info ----> URL TYPES 添加如下两个:
支付宝:identifier:alipay
URL Schemes:com.ios.moge.alipay
微信: identifier:weixin
URL Schemes:wxa3d58c25d7ec5c62
##YingTianSDK所需要配置
####1.相关依赖库如下
红色框住部分为系统库
####2.在Build Settings 里搜索Enable Bitcode 将Yes改为No
####4.第三方平台参数配置的设置(只需要设置需要的参数,不需要的可以删除或者为空
在项目根目录下创建mchinfo.plist文件,键值内容如下图:
####5.APP跳转的时候需要配置URLSchame和白名单,所以在应用程序的info.plist文件中设置一下内容,如图所示:
配置白名单:
####6.渠道分包的设置:在项目根目录下创建mchannelinfos.plist文件,键值内容如下:
##JiuJiuSDK所需要配置
####1、添加系统依赖库和 Framework文件如下
####2、添加bundle文件如下
####3、修改 Other Linker Flags
VS81Sdk 内部使用了 Objective-C 的 Category,所以开发者需要在工程的 Targets -> Build Settings -> Linking –> Other Linker Flags 中添加–ObjC 选项,以 保证这些 Category 能够正常使用。
注意:区分-ObjC 的大小写,如果您没有添加–ObjC 编译选项,sdk 不能使用
####4、修改 ATS,支持 HTTPS 请求
####5、添加白名单
####6、添加 URL Types
####7、iOS10兼容,在Xcode8中添加一下设置
该项目最低支持 iOS 8.0
和 Xcode 7.0
。
HGSDK 使用 MIT 许可证,详情见 LICENSE 文件。