hch
2025-01-15 a362c05188af60b78c4ac0ab4687d694aadd198f
0312 小7买断版
1个文件已修改
38个文件已添加
2206 ■■■■■ 已修改文件
Channel/Android/btmdb/AndroidManifest.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/Android/btmdb/LauncherManifest.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/Android/btmdb/baseProjectTemplate.gradle 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/Android/btmdb/debug/libs/library-debug-btmdb.aar 补丁 | 查看 | 原始文档 | blame | 历史
Channel/Android/btmdb/deps.gradle 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/Android/btmdb/google-services.json 补丁 | 查看 | 原始文档 | blame | 历史
Channel/Android/btmdb/gradleTemplate.properties 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/Android/btmdb/launcherTemplate.gradle 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/Android/btmdb/mainTemplate.gradle 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/Android/btmdb/release/libs/library-release-btmdb.aar 补丁 | 查看 | 原始文档 | blame | 历史
Channel/Android/btmdb/settingsTemplate.gradle 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/Headers/SMPCQuickChannel.h 268 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/Headers/SMPCQuickChannelDefines.h 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/Headers/SMPCQuickChannelShareInfo.h 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/Headers/SMPCQuickProductInfo.h 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/Headers/SMPCQuickRoleInfo.h 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/Info.plist 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/QuickChannel 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/_CodeSignature/CodeResources 177 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/SMPCQuickSDK.framework/Headers/SMPCQuickSDK.h 250 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/SMPCQuickSDK.framework/Headers/SMPCQuickSDKDefines.h 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/SMPCQuickSDK.framework/Headers/SMPCQuickSDKGameRoleInfo.h 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/SMPCQuickSDK.framework/Headers/SMPCQuickSDKInitConfigure.h 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/SMPCQuickSDK.framework/Headers/SMPCQuickSDKPayOrderInfo.h 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/SMPCQuickSDK.framework/Headers/SMPCQuickSDKShareInfo.h 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/QuickSDK/SMPCQuickSDK.framework/SMPCQuickSDK 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/The2thWorldSDK/The2thWorldRES.bundle/TY_AN_34.png 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/The2thWorldSDK/The2thWorldRES.bundle/The2thWorldSDKConfig.plist 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/The2thWorldSDK/UniversalSDK.h 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/IOS/btmdb/Plugins/The2thWorldSDK/UniversalSDK.mm 587 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SdkProject/channel/btmdb/AndroidManifest.xml 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SdkProject/channel/btmdb/build.gradle 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SdkProject/channel/btmdb/config.properties 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SdkProject/channel/btmdb/deps.gradle 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SdkProject/channel/btmdb/java/com/secondworld/sdk/BtGameApp.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SdkProject/channel/btmdb/java/com/secondworld/sdk/BtGameMain.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SdkProject/channel/btmdb/java/com/secondworld/sdk/BtGamePlatform.java 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SdkProject/gradle.properties 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/Android/btmdb/AndroidManifest.xml
New file
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN-->
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.unity3d.player"
    xmlns:tools="http://schemas.android.com/tools">
    <application>
        <activity android:name="com.secondworld.sdk.SplashActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
         <activity android:name="com.secondworld.sdk.GameActivity"
                  android:theme="@style/UnityThemeSelector">
            <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
         </activity>
    </application>
</manifest>
Channel/Android/btmdb/LauncherManifest.xml
New file
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.unity3d.player"
    xmlns:tools="http://schemas.android.com/tools"
    android:installLocation="preferExternal">
    <supports-screens
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"
        android:anyDensity="true"/>
    <application android:label="@string/app_name"
                 android:icon="@mipmap/app_icon"/>
</manifest>
Channel/Android/btmdb/baseProjectTemplate.gradle
New file
@@ -0,0 +1,13 @@
plugins {
    // If you are changing the Android Gradle Plugin version, make sure it is compatible with the Gradle version preinstalled with Unity
    // See which Gradle version is preinstalled with Unity here https://docs.unity3d.com/Manual/android-gradle-overview.html
    // See official Gradle and Android Gradle Plugin compatibility table here https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
    // To specify a custom Gradle version in Unity, go do "Preferences > External Tools", uncheck "Gradle Installed with Unity (recommended)" and specify a path to a custom Gradle version
    id 'com.android.application' version '7.1.2' apply false
    id 'com.android.library' version '7.1.2' apply false
    **BUILD_SCRIPT_DEPS**
}
task clean(type: Delete) {
    delete rootProject.buildDir
}
Channel/Android/btmdb/debug/libs/library-debug-btmdb.aar
Binary files differ
Channel/Android/btmdb/deps.gradle
New file
@@ -0,0 +1,4 @@
//此脚本为渠道的第三方远程依赖库配置,会复制到unity中用于构建
dependencies {
}
Channel/Android/btmdb/google-services.json
Channel/Android/btmdb/gradleTemplate.properties
New file
@@ -0,0 +1,7 @@
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
android.useAndroidX=false
## Automatically convert third-party libraries to use AndroidX
android.enableJetifier=false
unityStreamingAssets=.unity3d
**ADDITIONAL_PROPERTIES**
Channel/Android/btmdb/launcherTemplate.gradle
New file
@@ -0,0 +1,64 @@
apply plugin: 'com.android.application'
dependencies {
    implementation project(':unityLibrary')
    }
android {
    ndkPath "**NDKPATH**"
    compileSdkVersion 30
    buildToolsVersion '30.0.0'
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
    }
    packagingOptions {exclude 'META-INF/rxjava.properties'}
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 28
        applicationId '**APPLICATIONID**'
        ndk {
            abiFilters **ABIFILTERS**
        }
        versionCode **VERSIONCODE**
        versionName '**VERSIONNAME**'
    }
    aaptOptions {
        noCompress = ['.unity3d', '.ress', '.resource', '.obb'] + unityStreamingAssets.tokenize(', ')
        ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
    }**SIGN**
    lintOptions {
        abortOnError false
        checkReleaseBuilds false
    }
    buildTypes {
        debug {
            minifyEnabled **MINIFY_DEBUG**
            proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
            jniDebuggable true
        }
        release {
            minifyEnabled **MINIFY_RELEASE**
            proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
        }
    }**PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS**
**BUILT_APK_LOCATION**
    bundle {
        language {
            enableSplit = false
        }
        density {
            enableSplit = false
        }
        abi {
            enableSplit = true
        }
    }
}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP**
Channel/Android/btmdb/mainTemplate.gradle
New file
@@ -0,0 +1,44 @@
apply plugin: 'com.android.library'
**APPLY_PLUGINS**
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
**DEPS**}
android {
    ndkPath "**NDKPATH**"
    compileSdkVersion 30
    buildToolsVersion '30.0.0'
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
    }
    packagingOptions {exclude 'META-INF/rxjava.properties'}
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 28
        ndk {
            abiFilters **ABIFILTERS**
        }
        versionCode **VERSIONCODE**
        versionName '**VERSIONNAME**'
        consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
    }
    lintOptions {
        abortOnError false
        checkReleaseBuilds false
    }
    aaptOptions {
        noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
        ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
    }**PACKAGING_OPTIONS**
}
**IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**
Channel/Android/btmdb/release/libs/library-release-btmdb.aar
Binary files differ
Channel/Android/btmdb/settingsTemplate.gradle
New file
@@ -0,0 +1,25 @@
pluginManagement {
    repositories {
        **ARTIFACTORYREPOSITORY**
        maven { url "https://jitpack.io" }
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}
include ':launcher', ':unityLibrary'
**INCLUDES**
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        **ARTIFACTORYREPOSITORY**
        maven { url "https://jitpack.io" }
        google()
        mavenCentral()
        flatDir {
            dirs "${project(':unityLibrary').projectDir}/libs"
        }
    }
}
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/.DS_Store
Binary files differ
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/Headers/SMPCQuickChannel.h
New file
@@ -0,0 +1,268 @@
//
//  SMPCQuickPlatform.h
//  QuickPlatforms
//
//  Created by C.Maverick on 14/11/26.
//
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
//#import <QuickChannel/SMPCQuickChannelDefines.h>
//#import <QuickChannel/SMPCQuickChannelShareInfo.h>
//#import <QuickChannel/SMPCQuickRoleInfo.h>
#import "SMPCQuickChannelDefines.h"
#import "SMPCQuickRoleInfo.h"
#import "SMPCQuickChannelShareInfo.h"
#pragma mark 基本信息
@interface SMPCQuickChannel : NSObject {
    NSArray *unsupportedFunctionList;
}
+ (SMPCQuickChannel *)defaultChannel;
- (NSString *)channelName;
- (NSString *)channelVersion;
- (NSString *)channelCode;
- (NSString *)cpsChannelId;
- (NSString *)frameworkVersion;
- (int)callFunction:(int)type args:(va_list)list;
-(NSString *)getPaayParams;//QuickSDK的充值额外参数获取发给QuickSDK服务器端
@end
#pragma mark 初始化 接入产品信息
@interface SMPCQuickChannel(Base)
#pragma mark 初始化
/**
 @brief 应用初始化 完成后会发送kSmpcQPInitDidFinishedNotification
 @param dictionary 读取的配置文件值Channel.plist
 @result 错误码
 */
- (SMPC_CHANNEL_RESULT_CODE)initWithDictionary:(NSDictionary *)dictionary;
- (SMPC_CHANNEL_RESULT_CODE)initWithDictionary:(NSDictionary *)dictionary application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
//调用插件功能
- (int)callPlug:(NSString *)name params:(NSArray *)args;
// 进入暂停页
- (SMPC_CHANNEL_RESULT_CODE)pause;
#pragma mark 是否打开调试模式
- (SMPC_CHANNEL_RESULT_CODE)setDebugMode;
@end
#pragma mark 用户部分 登录 注册 登出
@interface SMPCQuickChannel(Account)
#pragma mark 登陆
/**
 @brief 登录平台,默认自动登陆,支持游客账号登陆 登陆后会发送kSmpcQPLoginNotification
 @result 错误码
 */
- (SMPC_CHANNEL_RESULT_CODE)login;
#pragma mark 注销
/**
 @brief 注销
 @result 错误码
 */
- (SMPC_CHANNEL_RESULT_CODE)logout;
#pragma mark 登陆用户信息
- (NSString *)userId;
- (NSString *)userNick;
- (NSString *)sessionId;
- (NSDictionary *)realNameInfo;
- (int)realAuth;
- (int)userType;
- (NSDictionary *)userExtInfo;
- (void)updateUserId:(NSString *)userId; //如果渠道本地有uid就不用使用服务器端的更新
- (void)updateUserNick:(NSString *)userNick; //如果渠道本地有用户名就不用使用服务器端的更新
- (void)updateUserDict:(NSDictionary *)dict;
#pragma mark 更新角色信息
- (void)updateRoleInfoWith:(SMPCQuickRoleInfo *)info;
- (void)updateRoleInfoWith:(SMPCQuickRoleInfo *)info isCreate:(BOOL)isCreate;
// 登录校验等级
- (SMPC_CHANNEL_LOGINCHECK_LEVEL)loginCheckLevel;
/**
 * 是否开启第三方登录
 */
-(void)openThirdLogin:(BOOL)thirdLogin;
/**
 *  获取当前用户的ID
 *
 *  @return 获取当前用户的ID,如未登录则返回空
 */
- (NSString *)getIdCode;
/**
 *  是否游客账号
 *
 *  @return 获取当前用户的ID,如未登录则返回空
 */
-(BOOL)isGuester;
/**
 * 绑定身份证
 */
-(void)ShowCertification;
/**
 * 游客绑定并绑定身份证
 */
-(void) BindCertification;
@end
#pragma mark -
#pragma mark 各种中心
@interface SMPCQuickChannel(Centers)
/**
 @brief 进入用户中心 如用户注销登录会发送kSmpcQPLogoutNotification(可多次触发)
 @result 错误码
 //渠道支持才去实现这个接口
 */
- (SMPC_CHANNEL_RESULT_CODE)enterUserCenter;
- (SMPC_CHANNEL_RESULT_CODE)callSpecifyFunction:(NSInteger)functionName parameters:(NSDictionary *)parameterDict;
//打开渠道SDK的BBS,渠道支持才去实现这个接口
- (SMPC_CHANNEL_RESULT_CODE)enterBBS;
//打开渠道SDK的客服界面,渠道支持才去实现这个接口
- (SMPC_CHANNEL_RESULT_CODE)enterCustomerServiceCenter;
//分享
- (SMPC_CHANNEL_RESULT_CODE)callSDKShare:(SMPCQuickChannelShareInfo *)shareInfo;
//隐私弹窗
- (void)showPrivacyView:(void (^)(BOOL isAgreed))isAgreed;
/*  facebook分享连接
 *  @param url  分享网址
 *  @param quote  网页说明
 */
-(void)FBShareLink:(NSString*)url quote:(NSString*)quote;
/*  facebook分享图片
 *  @param filePath  图片路径
 */
-(void)FBShareImage:(NSString*)filePath;
/*  微信分享文本
 *  @param test  分享文本
 *  @param scene 发送场景:0 聊天界面,1 朋友圈,2 收藏
 */
-(void)WXShareText:(NSString*)test sencetype:(int) scene;
/*  微信分享图片
 *  @param filePath  图片路径
 *  @param width  缩略图宽
 *  @param height  缩略图高
 *  @param scene 发送场景:0 聊天界面,1 朋友圈,2 收藏
 */
-(void)WXShareImage:(NSString*)filePath thumbWidth:(float) width thumbHeight:(float) height sencetype:(int) scene;
@end
#pragma mark 充值、 支付
@class SMPCQuickProductInfo;
@class SMPCQuickRoleInfo;
@interface SMPCQuickChannel(Pay)
#pragma mark 代币充值
//基础库向QuickChannel传递从服务器下单回来的数据。
- (void)updatePayDict:(NSDictionary *)dict;
/**
 @brief 进入虚拟币充值界面 如果渠道没有充值回调,就模拟一个QuickChannel充值回调,实际充值结果以服务器同步为准
 @result 错误码 通常为0,也不必关心
 */
- (SMPC_CHANNEL_RESULT_CODE)buyOrderId:(NSString *)orderId
      productInfo:(SMPCQuickProductInfo *)product
         roleInfo:(SMPCQuickRoleInfo *)role;
//2017.7.25 add begin
- (NSString *)getProductDescFromProduct:(SMPCQuickProductInfo *)product;
//
//探娱海外获取商品信息APi:传入的时候是productId如果多个用,分割,如:vol01,chips01,chips02,返回值监听kSmpcQCGetLocalizedNotification
//
-(void)Getlocalized:(NSString *)productIds;
@end
#pragma mark 界面控制
@interface SMPCQuickChannel(UISetting)
#pragma mark 方向控制
/**
 //deprecated
 @brief 设定平台为横屏或者竖屏
 @note  1、其中设置的方向需要在 app plist文件Supported interface orientations 中支持
 */
- (SMPC_CHANNEL_RESULT_CODE)setChannelOrientation:(UIInterfaceOrientationMask)orientation;
/**
 //deprecated
 @brief 设置是否自动旋转。
 @note  1、设置NO后,平台页面使用setPlatformOrientation设置的方向
 2、设置Yes后,平台页面自适应旋转。
 */
- (SMPC_CHANNEL_RESULT_CODE)setAutoRotation:(BOOL)isAutoRotate;
#pragma mark 浮动条
//显示浮动菜单
- (SMPC_CHANNEL_RESULT_CODE)showToolBar:(SMPC_CHANNEL_TOOLBAR_PLACE)place;
//隐藏浮动菜单
- (SMPC_CHANNEL_RESULT_CODE)hideToolBar;
@end
#pragma mark 回调处理
@interface SMPCQuickChannel (URL)
- (SMPC_CHANNEL_RESULT_CODE)openURL:(NSURL *)url sourceApplication:(NSString *)sourceApp application:(UIApplication *)application annotation:(id)annotation;
// add
- (SMPC_CHANNEL_RESULT_CODE)openURL:(NSURL *)url application:(UIApplication *)application;
- (SMPC_CHANNEL_RESULT_CODE)openURL:(NSURL *)url application:(UIApplication *)app options:(NSDictionary <NSString *, id> *)options;
//推送
- (SMPC_CHANNEL_RESULT_CODE)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken;
- (SMPC_CHANNEL_RESULT_CODE)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error;
- (SMPC_CHANNEL_RESULT_CODE)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo;
//AppDelegate事件
- (SMPC_CHANNEL_RESULT_CODE)applicationWillResignActive:(UIApplication *)application;
- (SMPC_CHANNEL_RESULT_CODE)applicationDidEnterBackground:(UIApplication *)application;
- (SMPC_CHANNEL_RESULT_CODE)applicationWillEnterForeground:(UIApplication *)application;
- (SMPC_CHANNEL_RESULT_CODE)applicationDidBecomeActive:(UIApplication *)application;
- (SMPC_CHANNEL_RESULT_CODE)applicationWillTerminate:(UIApplication *)application;
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray * restorableObjects))restorationHandler;
@end
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/Headers/SMPCQuickChannelDefines.h
New file
@@ -0,0 +1,111 @@
//
//  SMPCQuickPlatformDefines.h
//  QuickPlatforms
//
//  Created by C.Maverick on 14/11/26.
//
//
#ifndef QuickChannel_SMPCQuickChannelDefines_h
#define QuickChannel_SMPCQuickChannelDefines_h
#pragma mark - Notification Name
// 初始化通知
#define kSmpcQCInitDidFinishedNotification      @"kSmpcQCInitDidFinishedNotification"
//取消登陆
#define kSmpcQCLogCancelNotification               @"kSmpcQCLogCancelNotification"
// 登录通知
#define kSmpcQCLoginNotification                @"kSmpcQCLoginNotification"
// 登出通知
#define kSmpcQCLogoutNotification               @"kSmpcQCLogoutNotification"
/** 实名认证结果通知 */
#define kSmpcQCRealAuthNotification               @"kSmpcQCRealAuthNotification"
// 退出暂停页
#define kSmpcQCPauseDidExitNotification         @"kSmpcQCPauseDidExitNotification"
// 充值结果通知
#define kSmpcQCRechargeResultNotification       @"kSmpcQCRechargeResultNotification"
// 查询接商品信息的通知
//#define kSmpcQCGetLocalizedNotification       @"kSmpcQCGetLocalizedNotification"
// 离开平台页面通知
#define kSmpcQCLeavedNotification               @"kSmpcQCLeavedNotification"
/** 特殊方法结果回调通知 */
#define kSmpcQCExtrNotification               @"kSmpcQCExtraNotification"
#define QUICK_CHANNEL_TO_CP_NOTIFICATON_KEY @"quick_channel_to_cp_notification_key" //QUICK_CHANNEL_TO_CP_NOTIFICATON_KEY这个键定义了QuickSDK标准接口不能提供更多的信息给cp那边时的传输方案,这个通知带上渠道SDK需要传递到cp的信息.通常不需要,遇到了再讨论
#pragma mark - Notification UserInfo Key
// 错误编码
#define kSmpcQCNotificationErrorKey             @"error"
// 错误描述
#define kSmpcQCNotificationErrorMsg             @"msg"
// QuickSDK 的订单号
#define kSmpcQCNotificationOrderId              @"orderId"
// 游戏开发商给的订单号
#define kSmpcQCNotificationCpOrderId            @"cpOrderId"
// 第3方渠道sdk给的订单号
#define kSmpcQCNotificationSdkOrderId           @"sdkOrderId"
// 透传参数
#define kSmpcQCNotificationExtraParams          @"extraParams"
// 用户id
#define kSmpcQCNotificationUserId               @"userId"
// sessionID
#define kSmpcQCNotificationSessionId            @"sessionId"
// token
#define kSmpcQCNotificationToken                @"token"
// 二次验证时sdk方提供的数据
#define kSmpcQCNotificationSdkData              @"sdkData"
/** 实名认证回调是否已实名 */
#define kSmpcQCNotificationSdkRealName              @"realName"
/** 实名认证后年龄 */
#define kSmpcQCNotificationSdkRealAge              @"age"
/** 实名认证失败是否可以继续游戏 */
#define kSmpcQCNotificationSdkRealResumeGame              @"realResumeGame"
/** 预留字段 */
#define kSmpcQCNotificationSdkRealOther              @"other"
#pragma mark - Enum
// 版本检测类型
typedef NS_ENUM(NSInteger, SMPC_CHANNEL_VERSION_CHECK_LEVEL) {
    SMPC_CHANNEL_VERSION_CHECK_LEVEL_NORMAL = 0,    // 正常等级
    SMPC_CHANNEL_VERSION_CHECK_LEVEL_STRICT,        // 严格等级
};
// 浮动条位置
typedef NS_ENUM(NSInteger, SMPC_CHANNEL_TOOLBAR_PLACE) {
    SMPC_CHANNEL_TOOLBAR_PLACE_TOP_LEFT = 1,    // 左上
    SMPC_CHANNEL_TOOLBAR_PLACE_TOP_RIGHT,       // 右上
    SMPC_CHANNEL_TOOLBAR_PLACE_MID_LEFT,        // 左中
    SMPC_CHANNEL_TOOLBAR_PLACE_MID_RIGHT,       // 右中
    SMPC_CHANNEL_TOOLBAR_PLACE_BOT_LEFT,        // 左下
    SMPC_CHANNEL_TOOLBAR_PLACE_BOT_RIGHT,       // 右下
};
// 错误编码
typedef NS_ENUM(NSInteger, SMPC_CHANNEL_RESULT_CODE) {
    SMPC_CHANNEL_RESULT_ERROR_NONE                      = 0,    /**< 没有错误 */
    SMPC_CHANNEL_RESULT_ERROR_INIT_FAILED               = -1,   /**< 初始化失败 */
    SMPC_CHANNEL_RESULT_ERROR_CONFIG                    = -2,   /**< 配置文件错误 */
    SMPC_CHANNEL_RESULT_ERROR_NETWORK                   = -3,   /**< 网络连接错误 */
    SMPC_CHANNEL_RESULT_ERROR_PARAM                     = -4,   /**< 参数错误 */
    SMPC_CHANNEL_RESULT_ERROR_UNSUPPORTED               = -10,  /**< 功能不被支持 */
    SMPC_CHANNEL_RESULT_ERROR_NOT_INIT                  = -20,  /**< 没有初始化 */
    SMPC_CHANNEL_RESULT_ERROR_NOT_LOGIN                 = -21,  /**< 没有登录用户 */
    SMPC_CHANNEL_RESULT_ERROR_HAD_LOGIN                 = -22,  /**< 已有登录用户 */
    SMPC_CHANNEL_RESULT_ERROR_RECHARGE_INVALID          = -30,  /**< 支付信息无效 */
    SMPC_CHANNEL_RESULT_ERROR_RECHARGE_FAILED           = -31,  /**< 充值失败 */
    SMPC_CHANNEL_RESULT_ERROR_RECHARGE_CANCELLED        = -32,  /**< 充值取消 */
    SMPC_CHANNEL_RESULT_ERROR_UNKNOWN                   = -200, /**< 未知错误 */
};
// 登录校验类型
typedef NS_ENUM(NSInteger, SMPC_CHANNEL_LOGINCHECK_LEVEL) {
    SMPC_CHANNEL_LOGINCHECK_LEVEL_NONE      = 0,    // 没有登录校验
    SMPC_CHANNEL_LOGINCHECK_LEVEL_OPTIONAL,         // 登录校验可选
    SMPC_CHANNEL_LOGINCHECK_LEVEL_REQUEST,          // 登录校验必选
};
#endif
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/Headers/SMPCQuickChannelShareInfo.h
New file
@@ -0,0 +1,30 @@
//
//  SMPCQuickChannelShareInfo.h
//  SMPCQuickChannel
//
//  Created by xiaoxiao on 2019/2/19.
//  Copyright © 2019年 HanDong. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface SMPCQuickChannelShareInfo : NSObject
@property (nonatomic, strong) NSString *type;       //分享类型 1.facebook分享连接 2.facebook分享图片 3.微信分享文本 4.微信分享图片
@property (nonatomic, strong) NSString *title;      //分享标题
@property (nonatomic, strong) NSString *content;    //分享内容
@property (nonatomic, strong) NSString *imgPath;    //分享图片本地地址
@property (nonatomic, strong) NSString *filePath;   //分享文件路径
@property (nonatomic, strong) NSString *imgUrl;     //分享图片网络地址
@property (nonatomic, strong) NSString *sencetype;  //发送场景 0 聊天界面,1 朋友圈,2 收藏
@property (nonatomic, strong) NSString *url;        //分享链接
@property (nonatomic, strong) NSString *shareTo;    //分享到哪里
@property (nonatomic, strong) NSString *extenal;    //额外备注
@property (nonatomic, assign) float     width;      //缩略图宽
@property (nonatomic, assign) float     height;     //缩略图高
@end
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/Headers/SMPCQuickProductInfo.h
New file
@@ -0,0 +1,26 @@
//
//  SMPCQuickProductInfo.h
//  QuickChannel
//
//  Created by IOS-Developer on 14/12/24.
//
#import <Foundation/Foundation.h>
@interface SMPCQuickProductInfo : NSObject
@property(copy, nonatomic) NSString *goodsID;    //商品ID
@property(copy, nonatomic) NSString *productName;  //商品名称
@property(copy, nonatomic) NSString *productOrderID;  //商品订单ID
@property(assign, nonatomic) NSUInteger  count;            //商品数量
@property(assign, nonatomic) float amount;         //商品总价
@property(copy, nonatomic) NSString *callbackUrl;  //购买回调地址
@property(copy, nonatomic) NSString *extrasParams; //扩展参数,一般是服务器回调原样回传
//在QuickSDK中对应的属性已经暂停使用,但是QuickChannel使用不变。
//QuickSDK在转换参数时,仍然会使用到这些属性,QuickChannel中使用到这些属性
//在客户使用的旧版QuickSDK中仍然用到了这些属性,所以暂时不能删掉
@property(assign, nonatomic) float price;          //商品单价
@property(nonatomic,copy) NSString *quantifier;     //商品量词  停用的
@property(copy, nonatomic) NSString *productDesc;   //商品描述
@end
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/Headers/SMPCQuickRoleInfo.h
New file
@@ -0,0 +1,28 @@
//
//  SMPCQuickRoleInfo.h
//  QuickChannel
//
//  Created by IOS-Developer on 14/12/24.
//  Copyright (c) 2014年 HanDong. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface SMPCQuickRoleInfo : NSObject
@property (copy, nonatomic) NSString *serverId;         //服务器Id
@property (copy, nonatomic) NSString *serverName;       //服务器名称
@property (copy, nonatomic) NSString *gameRoleName;     //角色名
@property (copy, nonatomic) NSString *gameRoleID;       //角色ID
@property (copy, nonatomic) NSString *gameUserBalance;  //玩家虚拟货币余额
@property (copy, nonatomic) NSString *roleCreatTime;        //角色创建时间
@property (nonatomic,copy) NSString * _Nullable vipLevel;         //玩家vip等级,选填,默认值0
@property (nonatomic,copy) NSString * _Nullable gameUserLevel;    //玩家等级,选填,默认值0
@property (nonatomic,copy) NSString * _Nullable partyName;        //公会名称,选填,默认空字符串
@property (nonatomic,copy) NSString * _Nullable partyId;        //公会id,选填,默认空字符串
@property (nonatomic, copy) NSString * _Nullable fightPower;     //战力,选填,默认值0
@property (nonatomic, copy) NSString * _Nullable professionId;     //角色职业id, 选填,默认值,空字符串
@property (nonatomic, copy) NSString * _Nullable profession;     //角色职业, 选填,默认值,空字符串
@property (nonatomic,copy) NSString * _Nullable roleGender;        //角色性别,选填,默认值男
@property (nonatomic,copy) NSString * _Nullable partyRoleId;        //公会角色id,选填,默认空字符串
@property (nonatomic,copy) NSString * _Nullable partyRoleName;        //公会角色名,选填,默认空字符串
@end
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/Info.plist
Binary files differ
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/QuickChannel
Binary files differ
Channel/IOS/btmdb/Plugins/QuickSDK/QuickChannel.framework/_CodeSignature/CodeResources
New file
@@ -0,0 +1,177 @@
<?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>files</key>
    <dict>
        <key>Headers/SMPCQuickChannel.h</key>
        <data>
        GPDKBzkIuCwRBHvCHwAwrDJea0Y=
        </data>
        <key>Headers/SMPCQuickChannelDefines.h</key>
        <data>
        PNRrALd3V4NpQq8bqfEJuCNbKBY=
        </data>
        <key>Headers/SMPCQuickChannelShareInfo.h</key>
        <data>
        w33Pnwshbnfpn4iQn6JKmNZ99BQ=
        </data>
        <key>Headers/SMPCQuickProductInfo.h</key>
        <data>
        q0cs1VoZ9V0t60Na19KY2X/9n5E=
        </data>
        <key>Headers/SMPCQuickRoleInfo.h</key>
        <data>
        7r/VBL6Y5ifjt6LJlAEQ5uMVGg8=
        </data>
        <key>Info.plist</key>
        <data>
        +M/hee+GQuccZnLqLk12dh1MD2k=
        </data>
    </dict>
    <key>files2</key>
    <dict>
        <key>Headers/SMPCQuickChannel.h</key>
        <dict>
            <key>hash</key>
            <data>
            GPDKBzkIuCwRBHvCHwAwrDJea0Y=
            </data>
            <key>hash2</key>
            <data>
            RP9PwedwhyvZ1ukdP285jJUKEf7yk5sKYWAlt/VvbdI=
            </data>
        </dict>
        <key>Headers/SMPCQuickChannelDefines.h</key>
        <dict>
            <key>hash</key>
            <data>
            PNRrALd3V4NpQq8bqfEJuCNbKBY=
            </data>
            <key>hash2</key>
            <data>
            Kose592SBCTagKpc5TcZ7ZWChD/Ha2xeKdN7PwQIDPc=
            </data>
        </dict>
        <key>Headers/SMPCQuickChannelShareInfo.h</key>
        <dict>
            <key>hash</key>
            <data>
            w33Pnwshbnfpn4iQn6JKmNZ99BQ=
            </data>
            <key>hash2</key>
            <data>
            jqAupycvDTECKiaY5b4YHdh4cZmq+ApdvcniA1nFp30=
            </data>
        </dict>
        <key>Headers/SMPCQuickProductInfo.h</key>
        <dict>
            <key>hash</key>
            <data>
            q0cs1VoZ9V0t60Na19KY2X/9n5E=
            </data>
            <key>hash2</key>
            <data>
            jqcgeJRfwex25YXHKTi8rwOa8WkisxdltiTKNZfLNM8=
            </data>
        </dict>
        <key>Headers/SMPCQuickRoleInfo.h</key>
        <dict>
            <key>hash</key>
            <data>
            7r/VBL6Y5ifjt6LJlAEQ5uMVGg8=
            </data>
            <key>hash2</key>
            <data>
            seO35ZxgN7ISscH9J/19AVJvdSvMI2ZbGmTwj0C8/HE=
            </data>
        </dict>
    </dict>
    <key>rules</key>
    <dict>
        <key>^.*</key>
        <true/>
        <key>^.*\.lproj/</key>
        <dict>
            <key>optional</key>
            <true/>
            <key>weight</key>
            <real>1000</real>
        </dict>
        <key>^.*\.lproj/locversion.plist$</key>
        <dict>
            <key>omit</key>
            <true/>
            <key>weight</key>
            <real>1100</real>
        </dict>
        <key>^Base\.lproj/</key>
        <dict>
            <key>weight</key>
            <real>1010</real>
        </dict>
        <key>^version.plist$</key>
        <true/>
    </dict>
    <key>rules2</key>
    <dict>
        <key>.*\.dSYM($|/)</key>
        <dict>
            <key>weight</key>
            <real>11</real>
        </dict>
        <key>^(.*/)?\.DS_Store$</key>
        <dict>
            <key>omit</key>
            <true/>
            <key>weight</key>
            <real>2000</real>
        </dict>
        <key>^.*</key>
        <true/>
        <key>^.*\.lproj/</key>
        <dict>
            <key>optional</key>
            <true/>
            <key>weight</key>
            <real>1000</real>
        </dict>
        <key>^.*\.lproj/locversion.plist$</key>
        <dict>
            <key>omit</key>
            <true/>
            <key>weight</key>
            <real>1100</real>
        </dict>
        <key>^Base\.lproj/</key>
        <dict>
            <key>weight</key>
            <real>1010</real>
        </dict>
        <key>^Info\.plist$</key>
        <dict>
            <key>omit</key>
            <true/>
            <key>weight</key>
            <real>20</real>
        </dict>
        <key>^PkgInfo$</key>
        <dict>
            <key>omit</key>
            <true/>
            <key>weight</key>
            <real>20</real>
        </dict>
        <key>^embedded\.provisionprofile$</key>
        <dict>
            <key>weight</key>
            <real>20</real>
        </dict>
        <key>^version\.plist$</key>
        <dict>
            <key>weight</key>
            <real>20</real>
        </dict>
    </dict>
</dict>
</plist>
Channel/IOS/btmdb/Plugins/QuickSDK/SMPCQuickSDK.framework/Headers/SMPCQuickSDK.h
New file
@@ -0,0 +1,250 @@
//
//  SMPCQuickSDK.h
//
//
//
//
#define SMPC_QUICK_SDK_VERSION @"2.6.3" //QuickSDK基础库版本
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "SMPCQuickSDKDefines.h"
#import "SMPCQuickSDKInitConfigure.h"
#import "SMPCQuickSDKPayOrderInfo.h"
#import "SMPCQuickSDKGameRoleInfo.h"
#import "SMPCQuickSDKShareInfo.h"
typedef enum {
    QuickSDKUserTYPE_UNKnow        = 0,//未知的未定义的
    QuickSDKUserTYPE_Account       = 1,//账号
    QuickSDKUserTYPE_Phone         = 2,//手机号
    QuickSDKUserTYPE_Guest         = 3,//游客登录
    QuickSDKUserTYPE_WX            = 4,//微信
    QuickSDKUserTYPE_QQ            = 5,//手Q
    QuickSDKUserTYPE_WeiBo         = 6,//微博
    QuickSDKUserTYPE_GameCenter    = 7,//GameCenter
    QuickSDKUserTYPE_Apple         = 16,//苹果
    QuickSDKUserTYPE_OneKey        = 18,//阿里云一键登录
} QuickSDKUserTYPE;
#pragma mark 基本信息
@interface SMPCQuickSDK : NSObject
#pragma mark 单例对象
+ (SMPCQuickSDK *)defaultInstance;
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
#pragma mark 获取渠道基本信息
//获取渠道唯一标识,与服务器端channelID一致,任何时刻都可调用
- (int)channelType;
/**
 * 获取QuickGame渠道cps包的渠道号
 */
- (NSString *)cpsChannelId;
@end
#pragma mark - 初始化 接入产品信息
@interface SMPCQuickSDK(Base)
#pragma mark 初始化
/**
 @brief 应用初始化 完成后会发送通知kSmpcQuickSDKNotiInitDidFinished
 @param configure 初始化配置类,SDK会优先使用打包工具上在线配置的productCode
 @result 错误码
 @note 必接
 */
- (int)initWithConfig:(SMPCQuickSDKInitConfigure *)configure application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
/**
 @brief 调用组件功能,参数请看对应组件接入文档
 */
- (int)callPlug:(NSString *)name params:(NSArray *)args;
@end
#pragma mark - 用户部分 登录 注册 登出
@interface SMPCQuickSDK(Account)
/**
 @brief 登录接口 ,登录后会发送kSmpcQuickSDKNotiLogin通知
 @result 错误码
 @note 必接
 */
- (int)login;
/**
 @brief 登出接口 代码调用注销
 @result 错误码
 @note 成功调用该接口后,SDK会发出kSmpcQuickSDKNotiLogout通知
 */
- (int)logout;
/** 设置切换账号回调 */
- (void)configSwitchAccount:(void(^)(NSDictionary * resultDict))resultBlock;
// 登录后获取用户uid,这个uid在渠道上唯一,多个渠道的用户uid可能重复
- (NSString *)userId;
// 登录后获取userToken可用于验证用户信息
- (NSString *)userToken;
// 登录后获取用户昵称
- (NSString *)userNick;
/** 查询渠道实名认证信息 */
- (NSDictionary *)realNameInfo;
/** 获取设备id */
- (NSString *)getDeviceID;
/** 清除设备id缓存数据 */
- (void)resetDeviceID;
/**
 @brief 调用渠道实名认证
 @result 错误码若渠道没有提供此方法会返回非0
 @note 结果会发送kSmpcQuickSDKNotiRealAuth通知
*/
- (int)realAuth;
/** 获取渠道用户登录方式目前仅QuickGame越狱渠道有用 */
- (QuickSDKUserTYPE)getChannelUserLoginType;
/** 获取用户额外信息,若没有额外信息则返回空字典 */
- (NSDictionary *)getChannelUserExtInfo;
#pragma mark - 更新角色信息
// 进入游戏角色,角色信息变更时调用(比如升级),请使用updateRoleInfoWith:isCreate:
- (void)updateRoleInfoWith:(SMPCQuickSDKGameRoleInfo *)info;
//// 创建角色、进入游戏角色、角色信息变更时调用(比如升级,isCreate表示是否为创建角色
- (void)updateRoleInfoWith:(SMPCQuickSDKGameRoleInfo *)info isCreate:(BOOL)isCreate;
@end
//MARK:- 充值
@interface SMPCQuickSDK(Pay)
/**
 @brief 商品购买
 *  @param orderInfo
 *  @param roleInfo
 @result 错误码
 */
- (int)payOrderInfo:(SMPCQuickSDKPayOrderInfo *)orderInfo
           roleInfo:(SMPCQuickSDKGameRoleInfo *)roleInfo;
/**
 @brief 商品信息
 *  @param productId 商品id
 */
-(void)Getlocalized:(NSString *)productIds;
@end
#pragma mark - 界面控制
@interface SMPCQuickSDK(UISetting)
#pragma mark 浮动条
/**
 @brief showToolBar:
 @brief 浮动工具栏,建议显示在左上角
 @result 错误码
 @note
 */
- (int)showToolBar:(SMPC_QUICK_SDK_TOOLBAR_PLACE)place;
//隐藏浮动工具栏
- (int)hideToolBar;
@end
@interface SMPCQuickSDK(Extend)
// 获取QuicSDK后台为渠道添加的自定义键值,任何时刻都可调用
// 如果没有将返回nil
- (NSString *)getConfigValue:(NSString *)key;
/**
 @brief isFunctionSupported:
 @brief 判断当前渠道是否实现了QuickSDK提供的某个接口
 @brief 如果当前渠道没有实现相应接口,就没有相应接口的回调
 @brief 例如渠道SDK没有实现pausedGame这个接口,即使调用了pausedGame,没有暂停恢复通知,因为pausedGame调用无效
 @result 是否
 @note
 */
- (BOOL)isFunctionTypeSupported:(SMPC_QUICK_SDK_FUNC_TYPE)type;
/**
 @brief 进入用户中心 如用户注销登录会发送kSmpcQPLogoutNotification(可多次触发)
 @result 错误码
 */
- (int)enterUserCenter;
/**
 @brief 调用渠道特定方法
 parameterDict: 调用方法需要传入的参数,如果没有则传入@{}
 @result 错误码
 */
- (int)callChannelSpecifyFunction:(NSInteger)functionName parameters:(NSDictionary *)parameterDict;
/**
 进入YunKefu
 @param gameRoleInfo
 @result 错误码
 */
- (int)enterYunKeFuCenter:(SMPCQuickSDKGameRoleInfo *)gameRoleInfo;
/** 显示是否同意游戏用户协议和隐私政策弹窗-可点击查看在QK后台自定义的用户协议和隐私政策详情
 * @param must 是否必须同意 YES:弹窗仅有同意按钮 NO同时显示不同意和同意按钮
 * @param resultBlock 结果回调 YES玩家已经同意 NO玩家没有同意
 */
- (void)showGameCustomPrivacyViewMustAgree:(BOOL)must result:(void(^)(BOOL hasAgreed))resultBlock;
/** 用手机浏览器打开指定url
 * @param url url地址
*/
- (void)openUrlOutAppWithBrowser:(NSString *)url;
/** 在app内用WKWebView打开指定url
 * @param url url地址
*/
- (void)openUrlInAppFullScreen:(NSString *)url;
/**  在APP内用SFSafariViewController打开指定url
 * @param url url地址
 * @param isCanClose 是否可以关闭浏览器 ,YES 可关闭
 */
- (void)openBrowserPageWithUrlString:(NSString *)url isCanClose:(BOOL)isCanClose;
/** 调用显示渠道用户隐私弹窗, 用户同意返回YES,不同意返回NO*/
- (void)showPrivacyView:(void (^)(BOOL isAgreed))isAgreed;
#pragma mark 分享
/**
 分享
 @param shareInfo shareInfo description
 @result 错误码
 */
- (int)callSDKShare:(SMPCQuickSDKShareInfo *)shareInfo;
//***********************应用生命周期的回调*******************//
//在应用对应的生命周期回调中调用
/**
 @brief - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url;
 @brief - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(nullable NSString *)sourceApplication annotation:(id)annotation
 @brief - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options
 @brief 渠道处理应用跳转
 @result 错误码
 @note 必接
 */
- (int)openURL:(NSURL *)url application:(UIApplication *)application;
- (int)openURL:(NSURL *)url sourceApplication:(NSString *)sourceApp application:(UIApplication *)application annotation:(id)annotation;
- (int)openURL:(NSURL *)url application:(UIApplication *)app options:(NSDictionary <NSString *, id>*)options;
/**
 @brief application:didRegisterForRemoteNotificationsWithDeviceToken:
 @brief 推送消息
 @result 错误码
 @note 必接
 */
- (int)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken;
/**
 @brief application:didFailToRegisterForRemoteNotificationsWithError:
 @brief 推送消息
 @result 错误码
 @note 必接
 */
- (int)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error;
- (int)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo;
- (int)applicationWillResignActive:(UIApplication *)application;
- (int)applicationDidEnterBackground:(UIApplication *)application;
- (int)applicationWillEnterForeground:(UIApplication *)application;
- (int)applicationDidBecomeActive:(UIApplication *)application;
- (int)applicationWillTerminate:(UIApplication *)application;
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray *  restorableObjects))restorationHandler;
@end
Channel/IOS/btmdb/Plugins/QuickSDK/SMPCQuickSDK.framework/Headers/SMPCQuickSDKDefines.h
New file
@@ -0,0 +1,92 @@
//
//  SMPCQuickSDKDefines.h
//  QuickSDKs
//
//
//
#ifndef SMPCQuickSDKDefines_h
#define SMPCQuickSDKDefines_h
#pragma mark - Notification Name
extern NSString* const kSmpcQuickSDKNotiInitDidFinished;   //初始化成功
extern NSString* const kSmpcQuickSDKNotiLogin;             //登录成功 如果没有设置切换账号block切换账号成功也会回调这个
extern NSString* const kSmpcQCGetLocalizedNotification;             //查询接商品信息的通知
extern NSString* const kSmpcQuickSDKNotiLogout;            //用户注销
extern NSString* const kSmpcQuickSDKNotiRecharge;          //充值结果
extern NSString* const kSmpcQuickSDKNotiPauseOver;         //暂停结束 这个回调可以不用监听
extern NSString * const kSmpcQuickSDKNotiPlugin;           /*组件通知 见该插件接入文档,默认可以不用监听*/
extern NSString* const kSmpcQuickSDKNotiRealAuth;             //实名认证结果通知
extern NSString* const kSmpcQuickSDKNotiExtra;             //特殊方法结果通知
#define QUICK_CHANNEL_TO_CP_NOTIFICATON_KEY @"quick_channel_to_cp_notification_key" //QUICK_CHANNEL_TO_CP_NOTIFICATON_KEY这个键定义了QuickSDK标准接口不能提供更多的信息给cp那边时的传输方案,这个通知带上渠道SDK需要传递到cp的信息.通常不需要,遇到了再讨论
#pragma mark - 通知userInfo中的重要key 错误和信息
extern NSString* const kSmpcQuickSDKKeyError;    /*Notification userinfo error Key */
extern NSString* const kSmpcQuickSDKKeyMsg;      /*Notification userinfo msg   Key */
// 订单号
#define kSmpcQuickSDKKeyOrderId              @"orderId"
// 游戏开发商给的订单号
#define kSmpcQuickSDKKeyCpOrderId            @"cpOrderId"
// 第3方渠道sdk给的订单号
#define kSmpcQuickSDKKeySdkOrderId           @"sdkOrderId"
// 透传参数
#define kSmpcQuickSDKKeyExtraParams          @"extraParams"
// user_token
#define kSmpcQuickSDKKeyUserToken            @"user_token"
/** 实名认证回调是否已实名 YES:已认证NO:未认证*/
#define kSmpcQuickSDKKeyRealName              @"realName"
/** 实名认证后年龄 */
#define kSmpcQuickSDKKeyRealAge              @"age"
/** 渠道实名认证失败是否可以继续游戏 YES:可以 NO:不可以 */
#define kSmpcQuickSDKKeyRealResumeGame              @"resumeGame"
/** 实名认证预留字段 */
#define kSmpcQuickSDKKeyRealOther              @"other"
#pragma mark - 浮动条位置 Enum
typedef enum {
    SMPC_QUICK_SDK_TOOLBAR_TOP_LEFT  = 1,           /* 左上 */
    SMPC_QUICK_SDK_TOOLBAR_TOP_RIGHT = 2,           /* 右上 */
    SMPC_QUICK_SDK_TOOLBAR_MID_LEFT  = 3,           /* 左中 */
    SMPC_QUICK_SDK_TOOLBAR_MID_RIGHT = 4,           /* 右中 */
    SMPC_QUICK_SDK_TOOLBAR_BOT_LEFT  = 5,           /* 左下 */
    SMPC_QUICK_SDK_TOOLBAR_BOT_RIGHT = 6,           /* 右下 */
}SMPC_QUICK_SDK_TOOLBAR_PLACE;
#pragma mark - 错误码
typedef enum {
    SMPC_QUICK_SDK_ERROR_NONE                      = 0,    /* 没有错误 */
    SMPC_QUICK_SDK_ERROR_UNKNOWN                   = -1,    /* 未知错误 */
    SMPC_QUICK_SDK_ERROR_NETWORK                   = -2,    /* 网络连接错误 */
    SMPC_QUICK_SDK_ERROR_CHECKFAILED               = -3,    /* 登录校验失败 */
    SMPC_QUICK_SDK_ERROR_CHECKLOGINING             = -4,    /* 正在校验登录 */
    SMPC_QUICK_SDK_ERROR_LOGINDISABLED             = -5,    /* 渠道禁止登录 */
    SMPC_QUICK_SDK_ERROR_PARAM                     = -10,   /* 参数错误 */
    SMPC_QUICK_SDK_ERROR_NOT_INIT                  = -20,   /* 还没有初始化 */
    SMPC_QUICK_SDK_ERROR_INIT_FAILED               = -21,   /* 初始化失败*/
    SMPC_QUICK_SDK_ERROR_UNSUPPORTED               = -100,  /* 功能不被支持 */
    SMPC_QUICK_SDK_ERROR_NOT_LOGIN                 = -301,  /* 没有登录用户 */
    SMPC_QUICK_SDK_ERROR_HAD_LOGIN                 = -302,  /* 已有登录用户 */
    SMPC_QUICK_SDK_ERROR_LOGOUT_FAIL               = -303,  /* 用户登出失败 */
    SMPC_QUICK_SDK_ERROR_RECHARGE_FAILED           = -400,  /* 充值失败 */
    SMPC_QUICK_SDK_ERROR_RECHARGE_CANCELLED        = -401,  /* 用户充值取消 */
}SMPC_QUICK_SDK_ERROR_CODE;
typedef enum {
    SMPC_QUICK_SDK_FUNC_TYPE_CPSCHANNELID      = 0, /*官方渠道cps渠道id*/
    SMPC_QUICK_SDK_FUNC_TYPE_PAUSED_GAME       = 1, /*暂停游戏*/
    SMPC_QUICK_SDK_FUNC_TYPE_ENTER_USER_CENTER = 2, /*进入用户中心*/
    SMPC_QUICK_SDK_FUNC_TYPE_ENTER_BBS         = 3, /*进入论坛*/
//    SMPC_QUICK_SDK_FUNC_TYPE_OPEN_URL          = 4,
    SMPC_QUICK_SDK_FUNC_TYPE_SHOW_TOOLBAR      = 5, /*显示浮动工具栏*/
    SMPC_QUICK_SDK_FUNC_TYPE_HIDE_TOOLBAR      = 6, /*隐藏浮动工具栏*/
    SMPC_QUICK_SDK_FUNC_TYPE_ENTER_CUSTOMER_CENTER = 7, /*进入客服中心*/
}SMPC_QUICK_SDK_FUNC_TYPE;
#endif
Channel/IOS/btmdb/Plugins/QuickSDK/SMPCQuickSDK.framework/Headers/SMPCQuickSDKGameRoleInfo.h
New file
@@ -0,0 +1,31 @@
//
//  SMPCQuickSDKGameRoleInfo.h
//  SMPCQuickSDK
//
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface SMPCQuickSDKGameRoleInfo : NSObject
NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,copy) NSString *serverId;         //服务器Id,必填
@property (nonatomic,copy) NSString *serverName;       //服务器名称,必填
@property (nonatomic,copy) NSString *gameRoleName;     //角色名,必填
@property (nonatomic,copy) NSString *gameRoleID;       //角色ID,必填
@property (nonatomic, copy) NSString * creatTime;      //角色创建时间(10位时间戳),必填,没有传0
NS_ASSUME_NONNULL_END
@property (nonatomic,copy) NSString * _Nullable gameUserBalance;  //玩家虚拟货币余额,选填,默认值0
@property (nonatomic,copy) NSString * _Nullable vipLevel;         //玩家vip等级,选填,默认值0
@property (nonatomic,copy) NSString * _Nullable gameUserLevel;    //玩家等级,选填,默认值0
@property (nonatomic,copy) NSString * _Nullable partyName;        //公会名称,选填,默认空字符串
@property (nonatomic,copy) NSString * _Nullable partyId;        //公会id,选填,默认空字符串
@property (nonatomic, copy) NSString * _Nullable fightPower;     //战力,选填,默认值0
@property (nonatomic, copy) NSString * _Nullable professionId;     //角色职业id, 选填,默认值,空字符串
@property (nonatomic, copy) NSString * _Nullable profession;     //角色职业, 选填,默认值,空字符串
@property (nonatomic,copy) NSString * _Nullable roleGender;        //角色性别,选填,默认值男
@property (nonatomic,copy) NSString * _Nullable partyRoleId;        //公会角色id,选填,默认空字符串
@property (nonatomic,copy) NSString * _Nullable partyRoleName;        //公会角色名,选填,默认空字符串
@property(nonatomic,copy) NSString * _Nullable extrasParams; //预留参数,选填,默认空字符串
@end
Channel/IOS/btmdb/Plugins/QuickSDK/SMPCQuickSDK.framework/Headers/SMPCQuickSDKInitConfigure.h
New file
@@ -0,0 +1,17 @@
//
//  SMPCQuickSDKInitConfigure.h
//  SMPCQuickSDK
//
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface SMPCQuickSDKInitConfigure : NSObject
@property (nonatomic, copy) NSString *productCode;  //QuickSDK提供的 product_code
@property (nonatomic, copy) NSString *productKey;   //QuickSDK提供的 product_token
@end
Channel/IOS/btmdb/Plugins/QuickSDK/SMPCQuickSDK.framework/Headers/SMPCQuickSDKPayOrderInfo.h
New file
@@ -0,0 +1,27 @@
//
//  SMPCQuickSDKPayOrderInfo.h
//  SMPCQuickSDK
//
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface SMPCQuickSDKPayOrderInfo : NSObject
@property(nonatomic,copy) NSString *goodsID;    //商品ID IAP时为苹果开发者后台配置的商品id,必填
@property(nonatomic,copy) NSString *productName;  //商品名称,必填
@property(nonatomic,copy) NSString *cpOrderID;  //游戏订单ID,必填
@property(nonatomic,assign) NSUInteger count;     //商品数量,必填
@property(nonatomic,assign) float amount;         //商品总价,必填,这个很重要
@property(nonatomic,copy) NSString *callbackUrl;  //购买回调地址,选填,优先使用服务器端配置的
@property(nonatomic,copy) NSString *extrasParams; //透传字段,选填,服务器回调原样传递
//deprecated 废弃的,可以不传值
@property(nonatomic,assign) float price;          //商品单价,选填,如果渠道需要,Quick将通过总价和数量来计算
@property(nonatomic,copy) NSString *productDesc;   //商品描述,选填,默认QuickSDK使用“数量+商品名称“拼接,如果数量为1,使用商品名称
@property(nonatomic,copy) NSString *quantifier;     //商品量词,选填,可以为@""空串
+ (instancetype)info;//获取一个对象属性值为nil,数值属性为0的实例
@end
Channel/IOS/btmdb/Plugins/QuickSDK/SMPCQuickSDK.framework/Headers/SMPCQuickSDKShareInfo.h
New file
@@ -0,0 +1,28 @@
//
//  SMPCQuickSDKShareInfo.h
//  SMPCQuickSDK
//
//  Created by xiaoxiao on 2019/2/19.
//
#import <Foundation/Foundation.h>
@interface SMPCQuickSDKShareInfo : NSObject
@property (nonatomic, strong) NSString *type;   //分享类型 1.facebook分享连接 2.facebook分享图片 3.微信分享文本 4.微信分享图片
@property (nonatomic, strong) NSString *title;   //分享标题
@property (nonatomic, strong) NSString *content;   //分享内容
@property (nonatomic, strong) NSString *imgPath;   //分享图片本地地址
@property (nonatomic, strong) NSString *filePath;   //分享文件路径
@property (nonatomic, strong) NSString *imgUrl;   //分享图片网络地址
@property (nonatomic, strong) NSString *sencetype;   //发送场景 0 聊天界面,1 朋友圈,2 收藏
@property (nonatomic, strong) NSString *url;   //分享链接
@property (nonatomic, strong) NSString *shareTo;   //分享到哪里
@property (nonatomic, strong) NSString *extenal;   //额外备注
@property (nonatomic, assign) float width;  //缩略图宽
@property (nonatomic, assign) float height;   //缩略图高
@end
Channel/IOS/btmdb/Plugins/QuickSDK/SMPCQuickSDK.framework/SMPCQuickSDK
Binary files differ
Channel/IOS/btmdb/Plugins/The2thWorldSDK/The2thWorldRES.bundle/TY_AN_34.png
Channel/IOS/btmdb/Plugins/The2thWorldSDK/The2thWorldRES.bundle/The2thWorldSDKConfig.plist
New file
@@ -0,0 +1,12 @@
<?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>JPush_AppKey</key>
    <string>111a5f817592ddc68edc802c</string>
    <key>TTTrack_AppID</key>
    <string>155761</string>
    <key>TrackingIO_AppKey</key>
    <string>12aef4c284c6996703765fe9f7422428</string>
</dict>
</plist>
Channel/IOS/btmdb/Plugins/The2thWorldSDK/UniversalSDK.h
New file
@@ -0,0 +1,79 @@
//
//  UniversalSDK.h
//  Unity-iPhone
//
//
#ifndef __UNIVERSALSDK_H_
#define __UNIVERSALSDK_H_
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <WebKit/WebKit.h>
#define UNITY_OBJ_NAME "ynmbxxjUtil"
#define UNITY_FUNC_NAME "HandleMsgWithSDK"
#define PRODUCT_CODE    @"42726078771331573814376577516900"
#define PRODUCT_KEY     @"28288976"
#define S2U_BatteryLevel                1
#define S2U_BatteryCharging             2
#define S2U_SdkInitComplete             3
#define S2U_DeviceInfo                  4
#define S2U_PushClientID                5
#define S2U_FreePlatformInitOk          100
#define S2U_FreePlatformInitFail        101
#define S2U_FreePlatformLoginOk         102
#define S2U_FreePlatformLoginFail       103
#define S2U_FreePlatformLoginCancel     104
#define S2U_FreePlatformLogoutOk        105
#define S2U_FreePlatformLogoutFail      106
#define S2U_FreePlatformSwitchAccountOk 107
#define S2U_FreePlatformPayOk           108
#define S2U_FreePlatformPayFail         109
#define S2U_FreePlatformPayCancel       110
#define S2U_FreePlatformRegisterOk      111
#define U2S_BatteryListenStart          1
#define U2S_BatteryListenStop           2
#define U2S_CopyContent                 7
#define U2S_OpenWebView                 8
#define U2S_Init                        9
#define U2S_FreePlatformInit            100
#define U2S_FreePlatformLogin           101
#define U2S_FreePlatformLogout          102
#define U2S_FreePlatformSwitchAccount   103
#define U2S_FreePlatformPay             104
#define U2S_PayFinished                 105
#define U2S_CreateRole                  106
#define U2S_RoleLogin                   107
#define U2S_RoleLevelUp                 108
#define U2S_JPushAddLocalMessage        200
#define U2S_JPushRemoveLocalMessage     201
#define U2S_MakeKeyAndVisible           300
#define U2S_SendRegistEvent             500
#define U2S_SendLoginEvent              600
#define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
static BOOL     JPush_IsProduction = FALSE;
@interface UniversalSDK : NSObject<WKUIDelegate, WKNavigationDelegate> {
    WKWebView* m_UIWebView;
    WKWebView* m_fakeUIWebView;
    UIButton* m_CloseBtn;
}
-(void) HandleUnityMessage:(NSString*) json;
-(void) Init;
-(id) APNativeJSONObject:(NSData*) data;
-(NSData*) APNativeJSONData:(id) obj;
-(void) RemoveLocalNotificationWithIdentifierKey:(NSString*) idKey;
-(void) QuickSDKInit:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
@end
#endif
Channel/IOS/btmdb/Plugins/The2thWorldSDK/UniversalSDK.mm
New file
@@ -0,0 +1,587 @@
//
//  UniversalSDK.m
//  Unity-iPhone
//
//  Created by 蔡瀚 on 2018/4/24.
//
#import "UniversalSDK.h"
#import "AdSupport/AdSupport.h"
#import "opus.h"
#ifdef NSFoundationVersionNumber_iOS_9_x_Max
#import <UserNotifications/UserNotifications.h>
#endif
#import "SystemConfiguration/CaptiveNetwork.h"
#import <SMPCQuickSDK/SMPCQuickSDK.h>
@implementation UniversalSDK
#define CHANNEL_NUM 1
static int s_frequency = 16000;
static int s_bitRate = 20000;
static int s_bandMode = OPUS_BANDWIDTH_WIDEBAND;
static int s_frameSize = 160;
static int sBatteryLevel = -1;
static int sBatteryState = -1;
static NSString* sAppID;
static NSString* sGameID;
static NSString* sUserName;
static NSThread* _thread;
static NSString* channel;
-(id)init
{
     self = [super init];
     m_fakeUIWebView = [[WKWebView alloc] initWithFrame:CGRectZero];
     NSURL *url = [NSURL URLWithString:@"www.baidu.com"];
     NSURLRequest *request = [NSURLRequest requestWithURL:url
                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                           timeoutInterval:10.f];
     [m_fakeUIWebView loadRequest:request];
     return self;
}
-(void) Init
{
    UIDevice *_device = [UIDevice currentDevice];
    _device.batteryMonitoringEnabled = true;
    NSString* _uniqueID = [[NSUserDefaults standardUserDefaults] objectForKey:@"tsw_unique_id"];
    //获取IDFA
    NSString* _idfa = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
    if(_uniqueID == NULL || [_uniqueID length] <= 0)
    {
        //判断IDFA是否为空
        BOOL isEmpty = [[_idfa stringByReplacingOccurrencesOfString:@"-" withString:@""] stringByReplacingOccurrencesOfString:@"0" withString:@""].length;
        if (isEmpty) {
            //不为空,将IDFA作为唯一标识
            _uniqueID = _idfa;
        }
        else {
            //为空,获取UUID作为唯一标识
            _uniqueID = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
        }
        //保存唯一设备标识,如已存在则不进行任何处理
        [[NSUserDefaults standardUserDefaults] setObject:_uniqueID forKey:@"tsw_unique_id"];
        [[NSUserDefaults standardUserDefaults] synchronize];
    }
    // 取得UserAgent
    [m_fakeUIWebView evaluateJavaScript:@"navigator.userAgent" completionHandler:^(id _Nullable userAgent, NSError * _Nullable error) {
        NSLog(@"%@", userAgent);
        NSString* _userAgent = [NSString stringWithFormat:@"%@", userAgent];
        // 发送设备信息
        NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                      _uniqueID,@"unique_id",
                                      _idfa,@"android_id",
                                      [NSNumber numberWithInt:S2U_DeviceInfo],@"code",
                                      _userAgent,@"userAgent",nil];
        [self SendMessageToUnity:_dict];
        }];
    NSString *_appid = sAppID;
    NSLog(@"init _appid:%@",_appid);
    NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                  [NSNumber numberWithInt:S2U_SdkInitComplete], @"code",
                                  @"hygame", @"channelPlatform",
                                  _appid, @"yj_appid", _appid, @"yj_spid", nil];
    [self SendMessageToUnity:_dict];
}
-(void)SendMessageToUnity:(NSDictionary*)dict
{
    BOOL _result = [NSJSONSerialization isValidJSONObject:dict];
    if(_result)
    {
        NSData* _jsonData = [NSJSONSerialization dataWithJSONObject:dict options:0 error:NULL];
        UnitySendMessage(UNITY_OBJ_NAME, UNITY_FUNC_NAME,
                         [[[NSString alloc] initWithData:_jsonData encoding:NSUTF8StringEncoding] UTF8String]);
    }
}
-(void) BatteryThread {
    while (TRUE)
    {
        [NSThread sleepForTimeInterval:1];
        UIDevice *_device = [UIDevice currentDevice];
        int _state = [_device batteryState];
        if(_state != sBatteryState){
            sBatteryState = _state;
            NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
                                   [NSNumber numberWithInt:sBatteryState], @"status",
                                   [NSNumber numberWithInt:S2U_BatteryCharging], @"code", nil];
            [self SendMessageToUnity:_dict];
        }
        int _level = (int)([_device batteryLevel] * 100);
        if(_level != sBatteryLevel){
            sBatteryLevel = _level;
            NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
                                   [NSNumber numberWithInt:sBatteryLevel], @"level",
                                   [NSNumber numberWithInt:S2U_BatteryLevel], @"code", nil];
            [self SendMessageToUnity:_dict];
        }
    }
}
-(void) OpenURL:(NSString*) url {
    if(m_UIWebView != NULL) {
        [self btnClick:NULL];
        return;
    }
    CGRect _bounds = UnityGetMainWindow().bounds;
    float _scale = _bounds.size.width / 1334;
    float _width = 982 * _scale;
    float _height = 560 * _scale;
    float _offsetX = (_bounds.size.width - _width) * .5f;
    float _offsetY = (_bounds.size.height - _height) * .5f;
    m_UIWebView = [[WKWebView alloc] initWithFrame:CGRectMake(_offsetX, _offsetY, _width, _height)];
    m_UIWebView.UIDelegate = self;
    m_UIWebView.navigationDelegate = self ;
    m_UIWebView.scrollView.scrollEnabled = YES;
    m_UIWebView.scrollView.bounces = NO;
    NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:url]];
    [m_UIWebView loadRequest:request];
}
-(void) btnClick:(UIButton*)sender {
    [m_CloseBtn removeFromSuperview];
    [m_CloseBtn removeTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
    m_CloseBtn = NULL;
    NSURLCache *_cache = [NSURLCache sharedURLCache];
    [_cache removeAllCachedResponses];
    [_cache setDiskCapacity:0];
    [_cache setMemoryCapacity:0];
    [m_UIWebView removeFromSuperview];
    m_UIWebView = NULL;
}
//-(void)webViewDidFinishLoad:(WKWebView *)webView{
- (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation{
    CGRect _bounds = UnityGetMainWindow().bounds;
    float _scale = _bounds.size.width / 1334;
    float _width = 982 * _scale;
    float _height = 560 * _scale;
    m_CloseBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    [m_CloseBtn setFrame:CGRectMake(_width - 600 * _scale, _height - 86 * _scale, 360 * _scale, 72 * _scale)];
    [m_CloseBtn setTitle:@"我知道了" forState:UIControlStateNormal];
    NSString *_bundlePath = [[NSBundle mainBundle] pathForResource:@"The2thWorldRES.bundle" ofType:nil];
    NSBundle *_bundle = [NSBundle bundleWithPath:_bundlePath];
    NSString *pic1Path = [_bundle pathForResource:@"TY_AN_34.png" ofType:nil];
    [m_CloseBtn setBackgroundImage:[UIImage imageWithContentsOfFile:pic1Path] forState:UIControlStateNormal];
    [m_CloseBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [m_CloseBtn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
    [m_UIWebView addSubview:m_CloseBtn];
    UIView *view = UnityGetGLViewController().view;
    [view addSubview:m_UIWebView];
}
-(void)QuickSDKInit:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // 监听初始化
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(smpcQpInitResult:)
                                                 name:kSmpcQuickSDKNotiInitDidFinished
                                               object:nil];
    // 监听登录
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(smpcQpLoginResult:) name:kSmpcQuickSDKNotiLogin object:nil];
    // 监听注销
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(smpcQpLogoutResult:) name:kSmpcQuickSDKNotiLogout object:nil];
    // 监听充值结果
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(smpcQpRechargeResult:) name:kSmpcQuickSDKNotiRecharge object:nil];
    // --------------------- 初始化 --------------------------
    SMPCQuickSDKInitConfigure *cfg = [[SMPCQuickSDKInitConfigure alloc] init];
    cfg.productKey = PRODUCT_KEY;
    cfg.productCode = PRODUCT_CODE;
    [[SMPCQuickSDK defaultInstance] initWithConfig:cfg application:application didFinishLaunchingWithOptions:launchOptions];
    // ------------------------------------------------------
}
- (void)smpcQpInitResult:(NSNotification *)notify {
    NSLog(@"init result:%@",notify);
    NSDictionary *userInfo = notify.userInfo;
    int errorCode = [userInfo[kSmpcQuickSDKKeyError] intValue];
    switch (errorCode) {
        case SMPC_QUICK_SDK_ERROR_NONE:
        {
            NSLog(@"初始化成功");
//            NSString *_appid = [[SMPCQuickSDK defaultInstance] getConfigValue:@"zfappid"];
//            if (_appid == nil || [_appid isEqualToString:@""])
//            {
//                _appid = sAppID;
//            }
        }
            break;
        case SMPC_QUICK_SDK_ERROR_INIT_FAILED:
        default:
        {
            //初始化失败
            NSLog(@"渠道初始化失败");
        }
            break;
    }
}
- (void)smpcQpLoginResult:(NSNotification *)notify {
    NSLog(@"登录成功通知%@",notify);
    int error = [[[notify userInfo] objectForKey:kSmpcQuickSDKKeyError] intValue];
    NSDictionary *userInfo = [notify userInfo];
    if (error == 0) {
        NSString *uid = [[SMPCQuickSDK defaultInstance] userId];
        channel = [[SMPCQuickSDK defaultInstance] getConfigValue:@"channel"];
        if(channel&&[channel length]!=0)
        {
        }
        else
        {
            channel = [NSString stringWithFormat:@"%d", [SMPCQuickSDK defaultInstance].channelType];
        }
        NSString *gameUID = [NSString stringWithFormat:@"%@@%@", uid, channel];
        NSString *UserName = [[SMPCQuickSDK defaultInstance] userId];
        //获取user_token,用于从服务器去验证用户信息
        NSString *user_token = userInfo[kSmpcQuickSDKKeyUserToken];
        NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
                               [NSDictionary dictionaryWithObjectsAndKeys:user_token, @"token",
                                UserName, @"userName",
                                gameUID, @"account", nil],@"info",
                               [NSNumber numberWithInt:S2U_FreePlatformLoginOk], @"code", nil];
        [self SendMessageToUnity:_dict];
    }
}
- (void)smpcQpLogoutResult:(NSNotification *)notify {
    NSLog(@"%s",__func__);
    NSDictionary *userInfo = notify.userInfo;
    int errorCode = [userInfo[kSmpcQuickSDKKeyError] intValue];
    switch (errorCode) {
        case SMPC_QUICK_SDK_ERROR_NONE:
        {
            NSLog(@"注销成功");
            //注销成功
            NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:S2U_FreePlatformLogoutOk], @"code", nil];
            [self SendMessageToUnity:_dict];
        }
            break;
        case SMPC_QUICK_SDK_ERROR_LOGOUT_FAIL:
        default:
        {
            //注销失败
            NSLog(@"注销失败");
        }
            break;
    }
    if (errorCode == SMPC_QUICK_SDK_ERROR_NONE) {
    }
}
- (void)smpcQpRechargeResult:(NSNotification *)notify{
    NSLog(@"充值结果%@",notify);
    NSDictionary *userInfo = notify.userInfo;
    int error = [[userInfo objectForKey:kSmpcQuickSDKKeyError] intValue];
    switch (error) {
        case SMPC_QUICK_SDK_ERROR_NONE:
        {
            //充值成功
            //QuickSDK订单号,cp下单时传入的订单号,渠道sdk的订单号,cp下单时传入的扩展参数
            NSString *orderID = userInfo[kSmpcQuickSDKKeyOrderId];
            NSString *cpOrderID = userInfo[kSmpcQuickSDKKeyCpOrderId];
            NSLog(@"充值成功数据:%@,%@",orderID,cpOrderID);
            NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
                                   [NSNumber numberWithInt:S2U_FreePlatformPayOk], @"code", nil];
            [self SendMessageToUnity:_dict];
        }
            break;
        case SMPC_QUICK_SDK_ERROR_RECHARGE_CANCELLED:
        case SMPC_QUICK_SDK_ERROR_RECHARGE_FAILED:
        {
            //充值失败
            NSString *orderID = userInfo[kSmpcQuickSDKKeyOrderId];
            NSString *cpOrderID = userInfo[kSmpcQuickSDKKeyCpOrderId];
            NSLog(@"充值失败数据%@,%@",orderID,cpOrderID);
            NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
                                   [NSNumber numberWithInt:S2U_FreePlatformPayFail], @"code", nil];
            [self SendMessageToUnity:_dict];
        }
            break;
        default:
            break;
    }
}
-(id) APNativeJSONObject:(NSData *)data{
    if (!data) {
        return nil;
    }
    NSError *error = nil;
    id retId = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error];
    if (error) {
        NSLog(@"%s trans data to obj with error: %@", __func__, error);
        return nil;
    }
    return retId;
}
-(void)HandleUnityMessage:(NSString *)json {
    NSLog(@"收到Unity发来的消息 => %@", json);
    NSData *_jsonData = [json dataUsingEncoding:NSUTF8StringEncoding];
    NSDictionary *_dict = [self APNativeJSONObject:_jsonData];
    switch([[_dict objectForKey:@"code"] intValue]){
        case U2S_Init:
            sAppID = _dict[@"appID"];
            sGameID = _dict[@"gameID"];
            [self Init];
            break;
        case U2S_CopyContent:
            [UIPasteboard generalPasteboard].string = _dict[@"content"];
            break;
        case U2S_FreePlatformInit:
            break;
        case U2S_MakeKeyAndVisible:
        {
            UIWindow * _window = [[UIApplication sharedApplication].delegate window];
            if (_window != nil && _window.rootViewController != nil) {
                [_window makeKeyAndVisible];
            }
        }
            break;
        case U2S_OpenWebView:
            [self OpenURL:_dict[@"url"]];
            break;
        case U2S_FreePlatformLogin:
        {
            int error = [[SMPCQuickSDK defaultInstance] login];
            if (error != 0) {
                NSLog(@"U2S_FreePlatformLogin => %d",error);
            }
        }
            break;
        case U2S_FreePlatformLogout:
        {
            [[SMPCQuickSDK defaultInstance] logout];
        }
            break;
        case U2S_CreateRole:
        {
            // 更新角色信息
            SMPCQuickSDKGameRoleInfo *gameRoleInfo = [SMPCQuickSDKGameRoleInfo new];
            gameRoleInfo.serverName = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"serverName"]];
            gameRoleInfo.gameRoleName = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleName"]];
            gameRoleInfo.serverId = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"sid"]]; //需要是数字字符串
            gameRoleInfo.gameRoleID = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleID"]];
            gameRoleInfo.gameUserBalance = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"money"]];
            gameRoleInfo.vipLevel = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"vipLevel"]];
            gameRoleInfo.gameUserLevel = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"level"]];
            gameRoleInfo.partyName = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"familyName"]];
            gameRoleInfo.creatTime = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"createTime"]];
            [[SMPCQuickSDK defaultInstance] updateRoleInfoWith:gameRoleInfo isCreate:YES];//如果这个角色是刚刚创建的,这里isCreate可以传YES
            break;
        }
        case U2S_RoleLogin:
        {
            // 更新角色信息
            SMPCQuickSDKGameRoleInfo *gameRoleInfo = [SMPCQuickSDKGameRoleInfo new];
            gameRoleInfo.serverName = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"serverName"]];
            gameRoleInfo.gameRoleName = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleName"]];
            gameRoleInfo.serverId = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"sid"]]; //需要是数字字符串
            gameRoleInfo.gameRoleID = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleID"]];
            gameRoleInfo.gameUserBalance = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"money"]];
            gameRoleInfo.vipLevel = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"vipLevel"]];
            gameRoleInfo.gameUserLevel = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"level"]];
            gameRoleInfo.partyName = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"familyName"]];
            gameRoleInfo.creatTime = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"createTime"]];
            [[SMPCQuickSDK defaultInstance] updateRoleInfoWith:gameRoleInfo isCreate:NO];//如果这个角色是刚刚创建的,这里isCreate可以传YES
            break;
        }
        case U2S_RoleLevelUp:
        {
            // 更新角色信息
            SMPCQuickSDKGameRoleInfo *gameRoleInfo = [SMPCQuickSDKGameRoleInfo new];
            gameRoleInfo.serverName = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"serverName"]];
            gameRoleInfo.gameRoleName = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleName"]];
            gameRoleInfo.serverId = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"sid"]]; //需要是数字字符串
            gameRoleInfo.gameRoleID = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleID"]];
            gameRoleInfo.gameUserBalance = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"money"]];
            gameRoleInfo.vipLevel = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"vipLevel"]];
            gameRoleInfo.gameUserLevel = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"level"]];
            gameRoleInfo.partyName = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"familyName"]];
            gameRoleInfo.creatTime = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"createTime"]];
            [[SMPCQuickSDK defaultInstance] updateRoleInfoWith:gameRoleInfo isCreate:NO];//如果这个角色是刚刚创建的,这里isCreate可以传YES
            break;
        }
        case U2S_FreePlatformPay:
        {
            SMPCQuickSDKGameRoleInfo *role = [[SMPCQuickSDKGameRoleInfo alloc] init];
            SMPCQuickSDKPayOrderInfo *order = [[SMPCQuickSDKPayOrderInfo alloc] init];
            role.serverName = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"serverName"]];
            role.gameRoleName = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleName"]];
            role.serverId = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"sid"]]; //需要是数字字符串
            role.gameRoleID = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleID"]];
            role.gameUserBalance = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"money"]];
            role.vipLevel = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"vipLevel"]];
            role.gameUserLevel = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"level"]];
            role.partyName = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"familyName"]];
            role.creatTime = [NSString stringWithFormat:@"%@",[_dict objectForKey:@"createTime"]];
            order.goodsID = [NSString stringWithFormat:@"%@", [_dict objectForKey:@"cpInfo"]]; //必填 iap时注意和苹果开发者后台一致,或者渠道映射的
            order.productName = [NSString stringWithFormat:@"%@", [_dict objectForKey:@"title"]];//必填
            order.cpOrderID = [NSString stringWithFormat:@"%@", [_dict objectForKey:@"orderId"]]; //必填 游戏订单号
            order.count = 1;  //必填 数量
            order.amount = [[_dict objectForKey:@"mount"] floatValue]; //必填 总价
//            NSString *_appid = [[SMPCQuickSDK defaultInstance] getConfigValue:@"zfappid"];
//            if (_appid == nil || [_appid isEqualToString:@""])
//            {
//                _appid = sAppID;
//            }
            NSString *_appid = sAppID;
            order.extrasParams = [NSString stringWithFormat:@"{\"appid\":\"%@\",\"cpinfo\":\"%@\",\"cporderid\":\"%@\",\"serverid\":\"%@\",\"channelID\":\"%@\"}",
                                  _appid,
                                  [_dict objectForKey:@"cpInfo"],
                                  [_dict objectForKey:@"orderId"],
                                  [_dict objectForKey:@"sid"],
                                  channel
                                  ];
//            //个别渠道要求单价*数量==总价
//            if([SMPCQuickSDK defaultInstance].channelType == 9999){
//                //通过判断渠道号处理特定渠道的参数
//                order.goodsID = @"productlist.name";
//            }
            int error = [[SMPCQuickSDK defaultInstance] payOrderInfo:order
                                                            roleInfo:role];
            if (error!=0)
                NSLog(@"%d", error);
        }
            break;
        case U2S_BatteryListenStart:
            if(_thread == NULL)
            {
                _thread = [[NSThread alloc] initWithTarget:self selector:@selector(BatteryThread) object:nil];
                [_thread setName:@"BatteryCheck"];
            }
            if(![_thread isExecuting])
            {
                [_thread start];
            }
            break;
        case U2S_BatteryListenStop:
            break;
    }
}
@end
extern "C" void native_opus_init(int frequency, int bitRate, int bandMode)
{
    s_frequency = frequency;
    s_bandMode = bandMode;
    s_bitRate = bitRate;
    s_frameSize = frequency / 100;
}
extern "C" int native_opus_encode(opus_int16 *pcm, int len, unsigned char *opus)
{
    int errorCode = 0;
    opus_int32 skip = 0;
    OpusEncoder *enc = opus_encoder_create(s_frequency, CHANNEL_NUM, OPUS_APPLICATION_VOIP, &errorCode);
    if (OPUS_OK != errorCode) {
        enc = NULL;
        return -1;
    }
    opus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(s_bandMode));
    opus_encoder_ctl(enc, OPUS_SET_BITRATE(s_bitRate));
    opus_encoder_ctl(enc, OPUS_SET_VBR(1));
    opus_encoder_ctl(enc, OPUS_SET_COMPLEXITY(10));
    opus_encoder_ctl(enc, OPUS_SET_INBAND_FEC(0));
    opus_encoder_ctl(enc, OPUS_SET_FORCE_CHANNELS(OPUS_SIGNAL_VOICE));
    opus_encoder_ctl(enc, OPUS_SET_DTX(0));
    opus_encoder_ctl(enc, OPUS_SET_PACKET_LOSS_PERC(0));
    opus_encoder_ctl(enc, OPUS_GET_LOOKAHEAD(&skip));
    opus_encoder_ctl(enc, OPUS_SET_LSB_DEPTH(16));
    unsigned char *rbytes = opus;
    opus_int16 *frame = pcm;
    int totalSize = 0;
    while (len >= s_frameSize)
    {
        opus_int32 length = opus_encode(enc, frame, s_frameSize, rbytes + sizeof(char), s_bitRate);
        rbytes[0] = length;
        frame += s_frameSize;
        rbytes += length + sizeof(char);
        len -= s_frameSize;
        totalSize += (length+1);
    }
    opus_encoder_destroy(enc);
    return totalSize;
}
extern "C" int native_opus_decode(unsigned char *opus, int len, short *pcm)
{
    int err = 0;
    //opus_int32 skip = 0;
    OpusDecoder *dec = opus_decoder_create(s_frequency, CHANNEL_NUM, &err);
    if (err != OPUS_OK) {
        dec = NULL;
        return -1;
    }
    while (len > 0)
    {
        int frame_opus_length = opus[0];
        int length = opus_decode(dec, opus + sizeof(char), frame_opus_length, pcm, s_frameSize, 0);
        opus += sizeof(char) + frame_opus_length;
        pcm += s_frameSize;
        len = len - frame_opus_length - sizeof(char);
    }
    opus_decoder_destroy(dec);
    return 0;
}
SdkProject/channel/btmdb/AndroidManifest.xml
New file
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.secondworld.sdk">
    <uses-permission android:name="android.permission.GET_TASKS" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
    <application
        android:name=".BtGameApp"
        android:allowBackup="true"
        android:usesCleartextTraffic="true"
        android:label="@string/app_name"
        tools:replace="android:name">
        <meta-data
            android:name="unityplayer.ForwardNativeEventsToDalvik"
            android:value="true" />
        <meta-data android:name="channelID" android:value="quicksdk_channel"/>
        <activity android:name="com.secondworld.sdk.SplashActivity"
            android:label="@string/app_name"
            android:screenOrientation="sensorLandscape">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <provider
            android:name="android.support.v4.content.FileProvider"
            android:authorities="quicksdk_packName.Provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/filepaths" />
        </provider>
    </application>
</manifest>
SdkProject/channel/btmdb/build.gradle
New file
@@ -0,0 +1,4 @@
//当前脚本为渠道的差异化配置
dependencies {
//    implementation project(path: ':quick')
}
SdkProject/channel/btmdb/config.properties
New file
@@ -0,0 +1 @@
PLUGINS=quick
SdkProject/channel/btmdb/deps.gradle
New file
@@ -0,0 +1 @@
//此脚本为渠道的第三方远程依赖库配置,会复制到unity中用于构建
SdkProject/channel/btmdb/java/com/secondworld/sdk/BtGameApp.java
New file
@@ -0,0 +1,21 @@
package com.secondworld.sdk;
public class BtGameApp extends QuickApp {
    @Override
    public void onCreate() {
        super.onCreate();
    }
    @Override
    protected PlatformDiff getPlatform() {
        return new BtGamePlatform();
    }
    @Override
    protected Class<? extends GameActivityProxy> getMainProxy() {
        return BtGameMain.class;
    }
}
SdkProject/channel/btmdb/java/com/secondworld/sdk/BtGameMain.java
New file
@@ -0,0 +1,104 @@
package com.secondworld.sdk;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.view.KeyEvent;
import com.quicksdk.QuickSDK;
import com.quicksdk.Sdk;
import com.secondworld.sdk.utils.LogUtil;
public class BtGameMain extends GameActivityProxy {
    @Override
    public void onCreate(Activity activity) {
        super.onCreate(activity);
//        LogUtil.i("SdkManager", "BtGameMain onCreate");
//        QuickSdkMgr.I.requestPermissions(activity);
        //QuickSdkMgr.I.init(activity);
        com.quicksdk.Sdk.getInstance().onCreate(activity);
        LogUtil.d("BtGameMain", "启动的是 BtGameMain!");
        PlatformDiff.I.OnCreate(GameAppProxy.app.getApplicationContext());
    }
    @Override
    public void onStart() {
        super.onStart();
        com.quicksdk.Sdk.getInstance().onStart(activity);
    }
    @Override
    public void onRestart() {
        super.onRestart();
        com.quicksdk.Sdk.getInstance().onRestart(activity);
    }
    @Override
    public void onPause() {
        super.onPause();
        com.quicksdk.Sdk.getInstance().onPause(activity);
    }
    @Override
    public void onResume() {
        super.onResume();
        com.quicksdk.Sdk.getInstance().onResume(activity);
    }
    @Override
    public void onStop() {
        super.onStop();
        com.quicksdk.Sdk.getInstance().onStop(activity);
    }
    @Override
    public void onDestroy() {
        super.onDestroy();
        com.quicksdk.Sdk.getInstance().onDestroy(activity);
    }
    @Override
    public void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        com.quicksdk.Sdk.getInstance().onNewIntent(intent);
    }
    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        QuickSdkMgr.I.onActivityResult(activity, requestCode);
        com.quicksdk.Sdk.getInstance().onActivityResult(activity, requestCode, resultCode, data);
    }
    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
        QuickSdkMgr.I.onRequestPermissionsResult(activity, requestCode, grantResults, permissions);
    }
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_BACK) {
            if (QuickSDK.getInstance().isShowExitDialog()) {
                Sdk.getInstance().exit(activity);
            } else {
                // 游戏调用自身的退出对话框,点击确定后,调用quick的exit接口
                new AlertDialog.Builder(activity).setTitle("退出").setMessage("是否退出游戏?").setPositiveButton("确定", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface arg0, int arg1) {
                        Sdk.getInstance().exit(activity);
                    }
                }).setNegativeButton("取消", null).show();
            }
            return true;
        }
        return super.onKeyDown(keyCode, event);
    }
}
SdkProject/channel/btmdb/java/com/secondworld/sdk/BtGamePlatform.java
New file
@@ -0,0 +1,67 @@
package com.secondworld.sdk;
import android.Manifest;
import android.content.Context;
public class BtGamePlatform extends PlatformDiff {
    @Override
    public String platformName() {
        return "hygame";
    }
    @Override
    public  String platformProductCode()  {
        return "96988247961101817457067750457726";
    }
    @Override
    public  String platformProductKey() {
        return "31423993";
    }
    @Override
    public void CreateRoleEvent(String roleID)
    {
    }
    //mount单位为分
    @Override
    public void PayEvent(String title, String goodsID, double mount)
    {
    }
    @Override
    public void PrePayEvent(String title, String goodsID, double mount)
    {
    }
    @Override
    public void OnCreate(Context var0)
    {
    }
    @Override
    public String[] platformPermission()
    {
        //return new String[] { Manifest.permission.WRITE_EXTERNAL_STORAGE};
        //return new String[] { Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_PHONE_STATE};
        return new String[] {};
    }
    @Override
    public void LoginSuccess()
    {
    }
    @Override
    public void StartRequestPermission()
    {
    }
}
SdkProject/gradle.properties
@@ -18,4 +18,4 @@
## Automatically convert third-party libraries to use AndroidX
android.enableJetifier=false
#当前构建的渠道名称
CHANNEL_NAME=btgotq
CHANNEL_NAME=btmdb