添加officialdev渠道配置。oss/appkey全部使用dev一致的数据

main
liuchunguang 2026-03-03 19:07:36 +08:00
parent 0285afaee8
commit a8ae03fd13
14 changed files with 364 additions and 0 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9d7cc3e0065887f408f7e7c94c2fc9ba
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,118 @@
#if SDK_CRASHSIGHT
using System;
using PhxhSDK.Data;
using UnityEngine;
using UnityEngine.Diagnostics;
namespace PhxhSDK
{
public class CrashSightSdkHelper : SdkHelper
{
// 设置上报的目标域名,请根据项目需求进行填写。(必填)
private const string crashServerUrl_Android = "https://android.crashsight.qq.com/pb/async";
// 设置上报所指向的APP ID, 并进行初始化。APPID可以在管理端更多->产品设置->产品信息中找到。
// private const string appId_Android = "669a94ce69";
private const string crashServerUrl_iOS = "https://ios.crashsight.qq.com/pb/sync";
// private const string appId_iOS = "6ff03772f9";
public override void EarlyInit()
{
// Debug开关Debug模式下会打印更多便于问题定位的Log.
var enableDebug = false;
#if DEBUG
enableDebug = true;
#endif
CrashSightAgent.ConfigDebugMode(enableDebug);
var uploadUrl = "";
switch (Application.platform)
{
case RuntimePlatform.Android:
uploadUrl = crashServerUrl_Android;
break;
case RuntimePlatform.IPhonePlayer:
uploadUrl = crashServerUrl_iOS;
break;
default:
DebugUtil.LogError("CrashSightSdkHelper", "Unsupported platform: " + Application.platform);
break;
}
if (!string.IsNullOrEmpty(uploadUrl))
{
CrashSightAgent.ConfigCrashServerUrl(uploadUrl);
}
var appId = "";
var loadJson = Resources.Load<TextAsset>("CrashSightData.json");
if (loadJson == null)
{
DebugUtil.LogError("CrashSightSdkHelper", "CrashSightData.json not found");
return;
}
try
{
var data = JsonUtility.FromJson<CrashSightData>(loadJson.text);
appId = data.id;
} catch (Exception e)
{
DebugUtil.LogError("CrashSightSdkHelper", "CrashSightData.json parse error: " + e.Message);
return;
}
if (!string.IsNullOrEmpty(appId))
{
CrashSightAgent.InitWithAppId(appId);
DebugUtil.Log("CrashSightSdkHelper", "CrashSight appId: " + appId);
}
else
{
DebugUtil.LogError("CrashSightSdkHelper", "CrashSight appId is empty");
}
}
public override void Init()
{
}
public override void AfterLoginInit()
{
}
public override void Update()
{
}
public override void Release()
{
}
public void TestCrashJava()
{
CrashSightAgent.TestJavaCrash();
}
public void TestOcCrash()
{
CrashSightAgent.TestOcCrash();
}
public void TestCrashException()
{
throw new Exception("测试模拟异常");
}
public void TestCrash()
{
UnityEngine.Diagnostics.Utils.ForceCrash(ForcedCrashCategory.AccessViolation);
}
public void TestNativeCrash()
{
CrashSightAgent.TestNativeCrash();
}
}
}
#endif

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f7558a87675ed9b4d8ddf26c290df6d1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.phxh.dev.nld" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<queries>
<package android:name="com.eg.android.AlipayGphone" />
<package android:name="com.alipay.wallet" />
</queries>
<application
android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true" >
<activity
android:name="com.phxh.dev.nld.PayActivity">
<meta-data
android:name="unityplayer.UnityActivity"
android:value="true" />
</activity>
</application>
</manifest>

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e67627dae8fb6664abc0325a1e989564
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,32 @@
fileFormatVersion: 2
guid: 42887166198c26f4a88574c85ebbf377
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,32 @@
fileFormatVersion: 2
guid: 99faef125be8c3446a158d4b75c6428a
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,21 @@
<?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">
<!--定义权限-->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <!--获取wifi状态-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!--获取移动网络状态-->
<application>
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:theme="@style/UnityThemeSelector">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
</application>
</manifest>

View File

@ -0,0 +1,32 @@
fileFormatVersion: 2
guid: 3b6bcfef57fcb4719bb44b6f7b71be30
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
Define_list:"OFFICIAL","SDK_CRASHSIGHT"
PackageName:"com.phxh.nlddev"
Language:"Lan_Default"
Version:"0.1.0"
CrashSight_Android: 03cdda7816, ffeaeb80-b215-4e27-b647-0ff8c6aac5e1
CrashSight_iOS: 6c1aacfcbc, 6deffc19-40ea-4549-b043-7152c538a563

View File

@ -0,0 +1,67 @@
# 宏定义列表,供脚本添加到 PlayerSettings 的宏定义中
Define_list:
- OFFICIAL # 正式渠道宏
- SDK_CRASHSIGHT # 崩溃监控 SDK 宏
- LOGIN_PHONE # 手机登录
- BI_PHXH # BI
# 应用包名
PackageName: "com.phxh.nlddev"
# 是否海外渠道
IsOversea: false
# 多语言配置
Language: "Lan_CN"
# 当前版本号
Version: "0.8.0"
# BuildCode
BuildCode: 4
# 构建资源远程上传路径
OssRemoteUploadPath: "oss://nld-dev-yhpxkqgzatnrmbws/client_res/Build"
AssetsEndPoint: "oss-cn-chengdu.aliyuncs.com"
# 阿里云 OSS 配置
ConfigAccessKeyId: "LTAI5tPLKwa1cSD1woBLvNBq"
ConfigAccessKeySecret: "aPvNg3waBzXas8nnn2lo46o1TEQY8X"
ConfigBucketName: "nld-dev-yhpxkqgzatnrmbws"
ConfigURL: "http://yhpxkqgzatnrmbws.kedrgame.com"
# http请求配置
AppAccessKey: "0SoE48O9sayjkG8J"
AppKey: "uUi_UI1oMKWo0VOSN1zme17Z70-FlAv3Lcx2mNhoYe4="
# 崩溃监控配置(仅 Android
CrashSight_Android:
id: "669a94ce69" # 崩溃上报的 App ID
key: "d9412717-2416-4270-b8bc-f7a0805f988f" # 崩溃上报的 Key
# TalkingData初始化
TalkingData:
appid: "2D0025FE20F34810BADABEFC00D32D22" # 测试包的App ID
channel: "Dev" # 上报渠道
Packages:
# - CrashSight@latest
- Poco@latest
- WXPay@1.0.0
- AliPay@0.0.1
- ThinkingData@1.0.0
- TalkingData@0.0.1
- AIhelper@latest
- DeviceHelper@0.0.1
# 爱加密配置
Encryption:
ApiUrl: "https://runenc.ijiami.cn/common" # 爱加密API地址
StrategyName: "Dev加固策略" # 加密策略名称
Username: "PHXHJG" # 爱加密用户名
Password: "LaMYRIx0UzFgCIR" # 爱加密密码
ToolPath: "${WORKSPACE}/Tool/build_tools/encryptionTool-v4.3.6-202409.jar" # 加密工具路径
NeedSign: true # 是否需要签名
SignName: "朴合辛火安卓" # 签名名称
SignVersion: 4 # 签名版本(1-8)
RetryCount: 3 # 异常重试次数