Compare commits
No commits in common. "3050b67a31a1d3710ab4a6675ab1b11d2284a143" and "9f0ba03957ede9c84de0665110cb4e6156241cd9" have entirely different histories.
3050b67a31
...
9f0ba03957
|
|
@ -48,10 +48,6 @@ namespace Guru
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Dictionary<string, object> DefaultRemoteData = new Dictionary<string, object>();
|
public Dictionary<string, object> DefaultRemoteData = new Dictionary<string, object>();
|
||||||
/// <summary>
|
|
||||||
/// 启用 AdjustDeeplink
|
|
||||||
/// </summary>
|
|
||||||
public bool UseAdjustDeeplink = false;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 支付初始化Keys
|
/// 支付初始化Keys
|
||||||
|
|
@ -73,7 +69,6 @@ namespace Guru
|
||||||
bool isBuyNoAds = false,
|
bool isBuyNoAds = false,
|
||||||
string bannerBackgroundColor = "#00000000",
|
string bannerBackgroundColor = "#00000000",
|
||||||
bool debugMode = false,
|
bool debugMode = false,
|
||||||
bool useAdjustDeeplink = false,
|
|
||||||
Dictionary<string, object> defaultRemoteData = null,
|
Dictionary<string, object> defaultRemoteData = null,
|
||||||
byte[] googleKeys = null,
|
byte[] googleKeys = null,
|
||||||
byte[] appleRootCerts = null)
|
byte[] appleRootCerts = null)
|
||||||
|
|
@ -88,7 +83,6 @@ namespace Guru
|
||||||
IsBuyNoAds = isBuyNoAds,
|
IsBuyNoAds = isBuyNoAds,
|
||||||
BannerBackgroundColor = bannerBackgroundColor,
|
BannerBackgroundColor = bannerBackgroundColor,
|
||||||
DebugMode = debugMode,
|
DebugMode = debugMode,
|
||||||
UseAdjustDeeplink = useAdjustDeeplink,
|
|
||||||
GoogleKeys = googleKeys,
|
GoogleKeys = googleKeys,
|
||||||
AppleRootCerts = appleRootCerts,
|
AppleRootCerts = appleRootCerts,
|
||||||
DefaultRemoteData = defaultRemoteData ?? new Dictionary<string, object>(),
|
DefaultRemoteData = defaultRemoteData ?? new Dictionary<string, object>(),
|
||||||
|
|
|
||||||
|
|
@ -249,14 +249,6 @@ namespace Guru
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// DeepLink 回调
|
|
||||||
internal static Action<string> _onDeeplinkCallback;
|
|
||||||
public static event Action<string> OnDeeplinkCallback
|
|
||||||
{
|
|
||||||
add => _onDeeplinkCallback += value;
|
|
||||||
remove => _onDeeplinkCallback -= value;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,6 @@ namespace Guru
|
||||||
bool autoRecordFinishedLevels = true,
|
bool autoRecordFinishedLevels = true,
|
||||||
bool debugMode = false,
|
bool debugMode = false,
|
||||||
bool isBuyNoAds = false,
|
bool isBuyNoAds = false,
|
||||||
bool useAdjustDeeplink = false,
|
|
||||||
string bannerColor = "#00000000",
|
string bannerColor = "#00000000",
|
||||||
Dictionary<string, object> defaultRemoteData = null,
|
Dictionary<string, object> defaultRemoteData = null,
|
||||||
byte[] googleKeys = null,
|
byte[] googleKeys = null,
|
||||||
|
|
@ -103,7 +102,7 @@ namespace Guru
|
||||||
{
|
{
|
||||||
var config = GuruSDKInitConfig.Build(useCustomConsent, autoLoadAds, iapEnabled,
|
var config = GuruSDKInitConfig.Build(useCustomConsent, autoLoadAds, iapEnabled,
|
||||||
autoRecordFinishedLevels, isBuyNoAds, bannerColor,
|
autoRecordFinishedLevels, isBuyNoAds, bannerColor,
|
||||||
debugMode, useAdjustDeeplink, defaultRemoteData, googleKeys, appleRootCerts);
|
debugMode, defaultRemoteData, googleKeys, appleRootCerts);
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -163,7 +162,10 @@ namespace Guru
|
||||||
//---- Start All tools ----
|
//---- Start All tools ----
|
||||||
LogI($"#2 --- InitFirebase ---");
|
LogI($"#2 --- InitFirebase ---");
|
||||||
//---------- Start Firebase ------------
|
//---------- Start Firebase ------------
|
||||||
StartFirebaseService();
|
FirebaseUtil.onInitComplete += OnFirebaseReady;
|
||||||
|
FirebaseUtil.OnUserAuthResult += OnUserAuthResult;
|
||||||
|
FirebaseUtil.OnFirebaseAuthResult += OnFirebaseAuthResult;
|
||||||
|
FirebaseUtil.InitFirebase(null); // 确保所有的逻辑提前被调用到 + Analytics.Init TODO:之后需要改为事件驱动
|
||||||
|
|
||||||
LogI($"#2.1 --- InitFacebook ---");
|
LogI($"#2.1 --- InitFacebook ---");
|
||||||
//---------- Start Facebook ------------
|
//---------- Start Facebook ------------
|
||||||
|
|
@ -173,23 +175,8 @@ namespace Guru
|
||||||
IsInitialSuccess = true;
|
IsInitialSuccess = true;
|
||||||
_onCompleteCallback?.Invoke(true);
|
_onCompleteCallback?.Invoke(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 启动 Firebase 服务
|
|
||||||
/// </summary>
|
|
||||||
private void StartFirebaseService()
|
|
||||||
{
|
|
||||||
FirebaseUtil.onInitComplete += OnFirebaseReady;
|
|
||||||
FirebaseUtil.OnUserAuthResult += OnUserAuthResult;
|
|
||||||
FirebaseUtil.OnFirebaseAuthResult += OnFirebaseAuthResult;
|
|
||||||
|
|
||||||
if (InitConfig.UseAdjustDeeplink)
|
|
||||||
{
|
|
||||||
FirebaseUtil.OnAdjustDeeplinkCallback = OnDeeplinkCallback; // 挂载 Deeplink 的回调
|
|
||||||
}
|
|
||||||
|
|
||||||
FirebaseUtil.InitFirebase(null); // 确保所有的逻辑提前被调用到
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnUserAuthResult(bool success)
|
private void OnUserAuthResult(bool success)
|
||||||
{
|
{
|
||||||
|
|
@ -770,20 +757,6 @@ namespace Guru
|
||||||
request.Send();
|
request.Send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Deeplink
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 添加回调链接
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="deeplink"></param>
|
|
||||||
private void OnDeeplinkCallback(string deeplink)
|
|
||||||
{
|
|
||||||
Callbacks.SDK._onDeeplinkCallback?.Invoke(deeplink); // 尝试调用回调
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue