diff --git a/Assets/Resources/GameAnalytics.meta b/Assets/Resources/GameAnalytics.meta new file mode 100644 index 00000000..e73d2d28 --- /dev/null +++ b/Assets/Resources/GameAnalytics.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2f7b142c5985b40449d22fa1859a2a00 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/GameAnalytics/Settings.asset b/Assets/Resources/GameAnalytics/Settings.asset new file mode 100644 index 00000000..2dff9dd1 --- /dev/null +++ b/Assets/Resources/GameAnalytics/Settings.asset @@ -0,0 +1,93 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 0} + m_Name: Settings + m_EditorClassIdentifier: Assembly-CSharp:GameAnalyticsSDK.Setup:Settings + TotalMessagesSubmitted: 0 + TotalMessagesFailed: 0 + DesignMessagesSubmitted: 0 + DesignMessagesFailed: 0 + QualityMessagesSubmitted: 0 + QualityMessagesFailed: 0 + ErrorMessagesSubmitted: 0 + ErrorMessagesFailed: 0 + BusinessMessagesSubmitted: 0 + BusinessMessagesFailed: 0 + UserMessagesSubmitted: 0 + UserMessagesFailed: 0 + CustomArea: + gameKey: [] + secretKey: [] + Build: [] + SelectedPlatformOrganization: [] + SelectedPlatformStudio: [] + SelectedPlatformGame: [] + SelectedPlatformGameID: + SelectedOrganization: + SelectedStudio: + SelectedGame: + NewVersion: + Changes: + SignUpOpen: 1 + StudioName: + GameName: + OrganizationName: + OrganizationIdentifier: + EmailGA: + IntroScreen: 1 + InfoLogEditor: 1 + InfoLogBuild: 1 + VerboseLogBuild: 0 + UseManualSessionHandling: 0 + SendExampleGameDataToMyGame: 0 + UseIMEI: 0 + InternetConnectivity: 0 + CustomDimensions01: [] + CustomDimensions02: [] + CustomDimensions03: [] + ResourceItemTypes: [] + ResourceCurrencies: [] + LastCreatedGamePlatform: 0 + Platforms: + CurrentInspectorState: 0 + ClosedHints: + DisplayHints: 0 + DisplayHintsScrollState: {x: 0, y: 0} + Logo: {fileID: 0} + UpdateIcon: {fileID: 0} + InfoIcon: {fileID: 0} + DeleteIcon: {fileID: 0} + GameIcon: {fileID: 0} + HomeIcon: {fileID: 0} + InstrumentIcon: {fileID: 0} + QuestionIcon: {fileID: 0} + UserIcon: {fileID: 0} + AmazonIcon: {fileID: 0} + GooglePlayIcon: {fileID: 0} + iosIcon: {fileID: 0} + macIcon: {fileID: 0} + windowsPhoneIcon: {fileID: 0} + UsePlayerSettingsBuildNumber: 0 + SubmitErrors: 1 + NativeErrorReporting: 0 + MaxErrorCount: 10 + SubmitFpsAverage: 1 + SubmitFpsCritical: 1 + IncludeGooglePlay: 1 + FpsCriticalThreshold: 20 + FpsCirticalSubmitInterval: 1 + PlatformFoldOut: + CustomDimensions01FoldOut: 0 + CustomDimensions02FoldOut: 0 + CustomDimensions03FoldOut: 0 + ResourceItemTypesFoldOut: 0 + ResourceCurrenciesFoldOut: 0 diff --git a/Assets/Resources/GameAnalytics/Settings.asset.meta b/Assets/Resources/GameAnalytics/Settings.asset.meta new file mode 100644 index 00000000..7d9bcb43 --- /dev/null +++ b/Assets/Resources/GameAnalytics/Settings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 10b7e284f13ce41268736687ce969d1c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Utils/AdsUtils.cs b/Assets/Scripts/Utils/AdsUtils.cs index d58100fe..e2b1a36c 100644 --- a/Assets/Scripts/Utils/AdsUtils.cs +++ b/Assets/Scripts/Utils/AdsUtils.cs @@ -71,7 +71,12 @@ public static class AdsUtils TKGSDKManager.Instance.ShowRewardAd(pAdPos, (pResult) => { pSuccessCallback?.Invoke(); - }, UIUtils.ShowNoAdsTip); + }, noUnityTips, true); } + + private static void noUnityTips() + { + + } } \ No newline at end of file diff --git a/Assets/TKGSDK/Common/GameInterface/TKGSDKManager.cs b/Assets/TKGSDK/Common/GameInterface/TKGSDKManager.cs index 41ef8ccb..10abd70c 100644 --- a/Assets/TKGSDK/Common/GameInterface/TKGSDKManager.cs +++ b/Assets/TKGSDK/Common/GameInterface/TKGSDKManager.cs @@ -166,7 +166,7 @@ public class TKGSDKManager : TKGSingleton /// Name of reward ad placement /// true:reward succ, false: reward failed /// Callback of reward ad show fail - public void ShowRewardAd(TKGRVPositionName _adPos, Action _rewardCallback = null, Action _showFailedCallback = null) + public void ShowRewardAd(TKGRVPositionName _adPos, Action _rewardCallback = null, Action _showFailedCallback = null, bool showSDKToast = false) { #if UNITY_EDITOR || NO_AD if (null != _rewardCallback) @@ -182,6 +182,7 @@ public class TKGSDKManager : TKGSingleton } else { + m_sdkInterface.SetShowSDKToast(showSDKToast); m_sdkInterface.ShowRewardAd(_adPos, _rewardCallback, _showFailedCallback); } } @@ -202,7 +203,7 @@ public class TKGSDKManager : TKGSingleton /// public bool IsReadyInterstitialAd() { - + return m_sdkInterface.IsReadyInterstitialAd(); } @@ -517,20 +518,88 @@ public class TKGSDKManager : TKGSingleton { m_sdkInterface.Shake(_shakeType, _intensity); } -#endregion -#region others + /// + /// share txt + /// + /// + public void Share(string shareText) + { + m_sdkInterface.ShareTxt(shareText); + } + + /// + /// regist APNS + /// + public void RegistAPNS() + { + + m_sdkInterface.RegistAPNS(); + } + + /// + /// shake + /// + /// notification identifier + /// The body of the notification. + /// notify after the time interval. format:yyyy-MM-dd HH:mm:ss + /// The application badge number. + /// The title of the notification. + /// The subtitle of the notification. + public void RegistNotification(string notiId, string body, string fireDate, int badge = 1, string title = "", string subTitle = "") + { + + m_sdkInterface.RegistNotification(notiId,body,fireDate,badge,title,subTitle); + } + + /// + /// remove all notification + /// + public void RemoveAllNotifications() + { + + m_sdkInterface.RemoveAllNotifications(); + } + + /// + /// remove notification by notification identifier + /// + /// notification identifier + public void RemoveNotification(string notiId) + { + + m_sdkInterface.RemoveNotification(notiId); + } + #endregion + + #region others + + public void Toast(string text) + { + m_sdkInterface.Toast(text); + } /// /// Set user source listener /// only call first can back source /// - /// true : origin user,false : not origin user + /// true : origin user,false : not origin user 2 public void SetUserSourceListener(Action _userSourceAction) { m_sdkInterface.SetUserSourceListener(_userSourceAction); } + /// + /// Set user source listener + /// only call first can back source + /// with campaginName + /// + /// true : origin user,false : not origin user 2 + public void SetUserSourceListener(Action _userSourceAction) + { + m_sdkInterface.SetUserSourceListener(_userSourceAction); + } + /// /// set common callback /// diff --git a/Assets/TKGSDK/Common/internal/ITKGSDK.cs b/Assets/TKGSDK/Common/internal/ITKGSDK.cs index ad7ff281..ee0b31a5 100644 --- a/Assets/TKGSDK/Common/internal/ITKGSDK.cs +++ b/Assets/TKGSDK/Common/internal/ITKGSDK.cs @@ -76,6 +76,12 @@ namespace Touka /// Callback of reward ad show fail void ShowRewardAd(TKGRVPositionName _adPos, Action _rewardCallback = null, Action _showFailedCallback = null); + /// + /// SetShowSDKToast + /// if use sdk toast set true else set false + + void SetShowSDKToast(bool _useSDKToast); + /// /// Is Ready Reward /// @@ -234,6 +240,8 @@ namespace Touka void OpenPolicyPop(); + void Toast(string _text); + /// /// shake /// @@ -251,6 +259,12 @@ namespace Touka /// void SetUserSourceListener(Action _userSourceAction); + /// + /// Set game focus + /// + /// + void SetUserSourceListener(Action _userSourceActionWithCampaignName); + /// /// common callback /// @@ -263,6 +277,41 @@ namespace Touka /// void SetLogEnable(bool _enable); + /// + /// share txt + /// + /// + void ShareTxt(string _shareTxt); + + /// + /// regist APNS + /// + void RegistAPNS(); + + + /// + /// shake + /// + /// notification identifier + /// The body of the notification. + /// notify after the time interval. format: yyyy-MM-dd HH:mm:ss + /// The application badge number. + /// The title of the notification. + /// The subtitle of the notification. + void RegistNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle); + + + /// + /// remove all notification + /// + void RemoveAllNotifications(); + + /// + /// remove notification by notification identifier + /// + /// notification identifier + void RemoveNotification(string notiId); + #endregion } diff --git a/Assets/TKGSDK/Common/internal/TKGSDKNative.cs b/Assets/TKGSDK/Common/internal/TKGSDKNative.cs index 647ccdac..55ff7ad4 100644 --- a/Assets/TKGSDK/Common/internal/TKGSDKNative.cs +++ b/Assets/TKGSDK/Common/internal/TKGSDKNative.cs @@ -147,6 +147,17 @@ namespace Touka TKGNativeInterface.Instance.showRewardAd(_adPos.ToString(), -1); } + public void Toast(string text) { + + TKGNativeInterface.Instance.toast(text); + + } + + public void SetShowSDKToast(bool _useSDKToast) + { + TKGNativeInterface.Instance.SetShowSDKToast(_useSDKToast); + } + /// /// Is Ready Interstitial /// @@ -564,6 +575,19 @@ namespace Touka TKGNativeInterface.Instance.SetUserSourceCallback(new AndroidTKGUserSourceCalllback()); } + /// + /// SetUserSourceListenerWithCampaignName + /// + /// + public void SetUserSourceListener(Action _userSourceAction) + { +#if UNITY_EDITOR + return; +#endif + TKGSDKCallback.mTKGUserSourceCallbackWithCampaignName = _userSourceAction; + TKGNativeInterface.Instance.SetUserSourceCallback(new AndroidTKGUserSourceCalllbackWithCampaignName()); + } + /// /// Set TKG Common callback /// @@ -585,15 +609,77 @@ namespace Touka #if UNITY_EDITOR return; #endif - -#if UNITY_IOS TKGNativeInterface.Instance.SetLogEnable(_enable); -#else + } + /// + /// share txt + /// + public void ShareTxt(string _shareTxt) + { +#if UNITY_EDITOR + return; +#endif + TKGNativeInterface.Instance.ShareTxt(_shareTxt); + } + + /// + /// regist APNS + /// + public void RegistAPNS() + { + +#if UNITY_EDITOR + return; +#else + TKGNativeInterface.Instance.RegistAPNS(); +#endif + + } + + /// + /// shake + /// + /// notification identifier + /// The body of the notification. + /// notify after the time interval. format: yyyy-MM-dd HH:mm:ss + /// The application badge number. + /// The title of the notification. + /// The subtitle of the notification. + public void RegistNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle) { + +#if UNITY_EDITOR + return; +#else + TKGNativeInterface.Instance.RegistNotification(notiId,body,fireDate,badge,title,subTitle); #endif } + /// + /// remove all notification + /// + public void RemoveAllNotifications() { + +#if UNITY_EDITOR + return; +#else + TKGNativeInterface.Instance.RemoveAllNotifications(); +#endif + } - #endregion + /// + /// remove notification by notification identifier + /// + /// notification identifier + public void RemoveNotification(string notiId) { + + +#if UNITY_EDITOR + return; +#else + TKGNativeInterface.Instance.RemoveNotification(notiId); +#endif + } +#endregion } } diff --git a/Assets/TKGSDK/Common/internal/iOS/TGiOSAdmanager.cs b/Assets/TKGSDK/Common/internal/iOS/TGiOSAdmanager.cs index 3e165610..8cd5700a 100644 --- a/Assets/TKGSDK/Common/internal/iOS/TGiOSAdmanager.cs +++ b/Assets/TKGSDK/Common/internal/iOS/TGiOSAdmanager.cs @@ -74,12 +74,37 @@ public class TGiOSAdManager : MonoBehaviour } + // 通知 + public void registAPNS() + { + TKG_RegistAPNS(); + } + + public void registNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle) + { + TKG_RegistNotification(notiId,body,fireDate,badge,title,subTitle); + } + + public void removeNotification(string notiId) + { + TKG_RemoveNotification(notiId); + } + + public void removeAllNotifications() + { + TKG_RemoveAllNotification(); + } // 震动 public void shake(int mType, float mIntensity = 1) { TKG_Shake(mType,mIntensity); } + public void share(string _shareText) + { + TKG_Share(_shareText); + } + // ads public void RemoveAllAds() @@ -141,6 +166,11 @@ public class TGiOSAdManager : MonoBehaviour TKG_ShowRewardVideo(adPos); } + public void ShowSDKToast(bool _show) + { + TKG_ShowSDKToast(_show); + } + // native public void LoadNative(float width, float height) { @@ -187,6 +217,10 @@ public class TGiOSAdManager : MonoBehaviour TKG_OpenMoreGame(); } + public void Toast(string content) + { + TKG_Toast(content); + } // 在线参数 public int GetConfigInt(string key, int defaultValue) @@ -357,21 +391,30 @@ public class TGiOSAdManager : MonoBehaviour // user source [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void TKG_UsersourceDelegate(bool isOrganic,string source); + public delegate void TKG_UsersourceDelegate(bool isOrganic,string source,string campaignName); [AOT.MonoPInvokeCallback(typeof(TKG_UsersourceDelegate))] - static void userSourceHandle(bool isOrganic, string source) + static void userSourceHandle(bool isOrganic, string source,string campaignName) { if (TKGSDKCallback.mTKGUserSourceCallback != null) { TKGSDKCallback.mTKGUserSourceCallback(isOrganic,source); TKGSDKCallback.mTKGUserSourceCallback = null; } + + if (TKGSDKCallback.mTKGUserSourceCallbackWithCampaignName != null) + { + TKGSDKCallback.mTKGUserSourceCallbackWithCampaignName(isOrganic,source, campaignName); + TKGSDKCallback.mTKGUserSourceCallbackWithCampaignName = null; + } } // dll [DllImport("__Internal")] private static extern void TKG_Shake(int mType, float mIntensity); + [DllImport("__Internal")] + private static extern void TKG_Share(string text); + [DllImport("__Internal")] private static extern void TKG_InitSDK(); @@ -414,6 +457,9 @@ public class TGiOSAdManager : MonoBehaviour [DllImport("__Internal")] private static extern void TKG_OpenMoreGame(); + [DllImport("__Internal")] + private static extern void TKG_Toast(string str); + // ads [DllImport("__Internal")] private static extern void TKG_LoadBanner(); @@ -445,6 +491,9 @@ public class TGiOSAdManager : MonoBehaviour [DllImport("__Internal")] private static extern void TKG_ShowRewardVideo(string adPos); + [DllImport("__Internal")] + private static extern void TKG_ShowSDKToast(bool _show); + [DllImport("__Internal")] private static extern void TKG_LoadNative(float width, float height); @@ -518,7 +567,20 @@ public class TGiOSAdManager : MonoBehaviour // 设置unity版本 [DllImport("__Internal")] - private static extern bool TKG_SetUnityVersion(string version); + private static extern void TKG_SetUnityVersion(string version); + + // 通知 + [DllImport("__Internal")] + private static extern void TKG_RegistAPNS(); + + [DllImport("__Internal")] + private static extern void TKG_RemoveAllNotification(); + + [DllImport("__Internal")] + private static extern void TKG_RemoveNotification(string notiId); + + [DllImport("__Internal")] + private static extern void TKG_RegistNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle); // ============================ old sdk todo ======================== diff --git a/Assets/TKGSDK/Config/Scripts/TKGAdPositionName.cs b/Assets/TKGSDK/Config/Scripts/TKGAdPositionName.cs index 9084037d..8211b630 100644 --- a/Assets/TKGSDK/Config/Scripts/TKGAdPositionName.cs +++ b/Assets/TKGSDK/Config/Scripts/TKGAdPositionName.cs @@ -39,6 +39,4 @@ public enum TKGRVPositionName Get_Monster, Get_Coin, Get_AutoMerge, - - } \ No newline at end of file diff --git a/Assets/TKGSDK/Config/Scripts/TKGParams.cs b/Assets/TKGSDK/Config/Scripts/TKGParams.cs index 675fafa8..b0dba034 100644 --- a/Assets/TKGSDK/Config/Scripts/TKGParams.cs +++ b/Assets/TKGSDK/Config/Scripts/TKGParams.cs @@ -15,7 +15,7 @@ public static class TKGParams { TKGParamKey.RemoveAdsShowCount.ToString(), 4 }, // int value // { TKGParamKey.LevelList.ToString(), "1,78,72,70,64,65,4,66" }, // string value { TKGParamKey.HasBlock.ToString(), 0 }, // bool value // 1:true 0:false - { TKGParamKey.UserGroup.ToString(), "Default" }, + { TKGParamKey.UserGroup.ToString(), "Default" }, { TKGParamKey.RemoveAdsShow.ToString(), 2 }, { TKGParamKey.RemoveAds.ToString(), 4 }, { TKGParamKey.LevelInterSwitch.ToString(), 3 }, diff --git a/Assets/TKGSDK/Demo/ToukaSDKDemo.cs b/Assets/TKGSDK/Demo/ToukaSDKDemo.cs index cb1102e8..7a7cc48d 100644 --- a/Assets/TKGSDK/Demo/ToukaSDKDemo.cs +++ b/Assets/TKGSDK/Demo/ToukaSDKDemo.cs @@ -79,7 +79,7 @@ namespace Touka public void OnButton_ShowRewardAd() { Debug.Log("[ToukaSDKDemo] OnButton_ShowRewardAd click"); - TKGSDKManager.Instance.ShowRewardAd(TKGRVPositionName.RV_GetDoubleCoin, RewardResult, RvShowFailed); + TKGSDKManager.Instance.ShowRewardAd(TKGRVPositionName.RV_GetDoubleCoin, RewardResult, RvShowFailed,true); } /// @@ -102,6 +102,7 @@ namespace Touka public void OnButton_IsReadyIV() { + Debug.Log("[ToukaSDKDemo] OnButton_IsReadyIV click"); bool isReadyIV = TKGSDKManager.Instance.IsReadyInterstitialAd(); Debug.Log("[ToukaSDKDemo] isReadyIV : " + isReadyIV); @@ -217,7 +218,7 @@ namespace Touka public void OnButton_OpenMoreGame() { Debug.Log("[ToukaSDKDemo] OnButton_OpenMoreGame click"); - TKGSDKManager.Instance.OpenMoreGame(); + //TKGSDKManager.Instance.OpenMoreGame(); } public void OnButton_ReviewBtn() diff --git a/Assets/TKGSDK/Demo/app_icon.png b/Assets/TKGSDK/Demo/app_icon.png new file mode 100644 index 00000000..cfa36c47 Binary files /dev/null and b/Assets/TKGSDK/Demo/app_icon.png differ diff --git a/Assets/TKGSDK/Demo/app_icon.png.meta b/Assets/TKGSDK/Demo/app_icon.png.meta new file mode 100644 index 00000000..6512c669 --- /dev/null +++ b/Assets/TKGSDK/Demo/app_icon.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 3221324322af4485da8817ea637bff7d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TKGSDK/Editor/ToukaAdsBuildPostProcessor.cs b/Assets/TKGSDK/Editor/ToukaAdsBuildPostProcessor.cs index a3a7d56f..f527a16c 100644 --- a/Assets/TKGSDK/Editor/ToukaAdsBuildPostProcessor.cs +++ b/Assets/TKGSDK/Editor/ToukaAdsBuildPostProcessor.cs @@ -56,7 +56,7 @@ namespace Touka PlistElementDict atf = plist.root["NSAppTransportSecurity"].AsDict(); atf.SetBoolean("NSAllowsArbitraryLoads", true); - #region iOS 14 +#region iOS 14 //SKAdnetwork追加 PlistElementArray URLWhiteListArr2 = plist.root.CreateArray("SKAdNetworkItems"); @@ -584,6 +584,59 @@ namespace Touka PlistElementDict dic126; dic126 = URLWhiteListArr2.AddDict(); dic126.SetString("SKAdNetworkIdentifier", "pwdxu55a5a.skadnetwork"); + + PlistElementDict dic127; + dic127 = URLWhiteListArr2.AddDict(); + dic127.SetString("SKAdNetworkIdentifier", "b9bk5wbcq9.skadnetwork"); + + PlistElementDict dic128; + dic128 = URLWhiteListArr2.AddDict(); + dic128.SetString("SKAdNetworkIdentifier", "x5l83yy675.skadnetwork"); + + PlistElementDict dic129; + dic129 = URLWhiteListArr2.AddDict(); + dic129.SetString("SKAdNetworkIdentifier", "x2jnk7ly8j.skadnetwork"); + + PlistElementDict dic130; + dic130 = URLWhiteListArr2.AddDict(); + dic130.SetString("SKAdNetworkIdentifier", "4w7y6s5ca2.skadnetwork"); + + PlistElementDict dic131; + dic131 = URLWhiteListArr2.AddDict(); + dic131.SetString("SKAdNetworkIdentifier", "7fmhfwg9en.skadnetwork"); + + PlistElementDict dic132; + dic132 = URLWhiteListArr2.AddDict(); + dic132.SetString("SKAdNetworkIdentifier", "qu637u8glc.skadnetwork"); + + PlistElementDict dic133; + dic133 = URLWhiteListArr2.AddDict(); + dic133.SetString("SKAdNetworkIdentifier", "krvm3zuq6h.skadnetwork"); + + PlistElementDict dic134; + dic134 = URLWhiteListArr2.AddDict(); + dic134.SetString("SKAdNetworkIdentifier", "3l6bd9hu43.skadnetwork"); + + PlistElementDict dic135; + dic135 = URLWhiteListArr2.AddDict(); + dic135.SetString("SKAdNetworkIdentifier", "a8cz6cu7e5.skadnetwork"); + + PlistElementDict dic136; + dic136 = URLWhiteListArr2.AddDict(); + dic136.SetString("SKAdNetworkIdentifier", "dkc879ngq3.skadnetwork"); + + PlistElementDict dic137; + dic137 = URLWhiteListArr2.AddDict(); + dic137.SetString("SKAdNetworkIdentifier", "m5mvw97r93.skadnetwork"); + + PlistElementDict dic138; + dic138 = URLWhiteListArr2.AddDict(); + dic138.SetString("SKAdNetworkIdentifier", "vcra2ehyfk.skadnetwork"); + + PlistElementDict dic139; + dic139 = URLWhiteListArr2.AddDict(); + dic139.SetString("SKAdNetworkIdentifier", "x5l83yy675.skadnetwork"); + #endregion PlistElementArray urlTypes = plist.root.CreateArray("CFBundleURLTypes"); @@ -619,40 +672,19 @@ namespace Touka private static void ModifyCode(string _path) { #if !AppStore_GB - ToukaClassHelper SplashScreenController = new ToukaClassHelper(_path + "/Classes/UI/SplashScreen.mm"); + ToukaClassHelper SplashScreenController = new ToukaClassHelper(_path + "/Classes/UI/SplashScreen.mm"); - if (!SplashScreenController.HasBolow("#import ")) - { - - SplashScreenController.WriteBelow("#include \"SplashScreen.h\"", "#import "); - SplashScreenController.WriteBelow("void HideSplashScreen()\n{", "[[TONativeSplashHelper helper]showSplashInLaunch];"); - - } -#endif - -#if USE_SPLASH - - ToukaClassHelper SplashScreenControllers = new ToukaClassHelper(_path + "/Classes/UI/SplashScreen.mm"); - - if (!SplashScreenControllers.HasBolow("#import ")) - { - - SplashScreenControllers.WriteBelow("#include \"SplashScreen.h\"", "#import "); - SplashScreenControllers.WriteBelow("void HideSplashScreen()\n{", "[[TKGSplashManager manager]showSplashInLaunch];"); - - } - - ToukaClassHelper UnityAppController = new ToukaClassHelper(_path + "/Classes/UnityAppController.mm"); - if (!UnityAppController.HasBolow("[[TKGSplashManager manager] showSplashInEnterForground];")) + if (!SplashScreenController.HasBolow("#import ")) { - UnityAppController.WriteBelow("#import \"UnityAppController.h\"", "\n#import "); - UnityAppController.WriteBelow("UnityPause(0);", "\n[[TKGSplashManager manager] showSplashInEnterForground];"); + + SplashScreenController.WriteBelow("#include \"SplashScreen.h\"", "#import "); + SplashScreenController.WriteBelow("void HideSplashScreen()\n{", "[[TONativeSplashHelper helper]showSplashInLaunch];"); + } - - #endif + } #endif } diff --git a/Assets/TKGSDK/Editor/ToukaAnalyticsBuildPostProcessor.cs b/Assets/TKGSDK/Editor/ToukaAnalyticsBuildPostProcessor.cs index 4d09d37b..3afb4224 100644 --- a/Assets/TKGSDK/Editor/ToukaAnalyticsBuildPostProcessor.cs +++ b/Assets/TKGSDK/Editor/ToukaAnalyticsBuildPostProcessor.cs @@ -148,7 +148,9 @@ public class ToukaAnalyticsBuildPostProcessor proj.AddBuildProperty(target, "OTHER_LDFLAGS", "-ObjC"); proj.SetBuildProperty(target, "ENABLE_BITCODE", "NO"); - proj.SetBuildProperty(target, "GCC_C_LANGUAGE_STANDARD", "gnu11"); + proj.SetBuildProperty(target, "GCC_C_LANGUAGE_STANDARD", "gnu99"); + proj.SetBuildProperty(target, "GCC_ENABLE_OBJC_EXCEPTIONS","YES"); + proj.SetBuildProperty(target, "EXCLUDED_ARCHS", "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8 EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))"); File.WriteAllText(projPath, proj.WriteToString()); @@ -174,11 +176,14 @@ public class ToukaAnalyticsBuildPostProcessor plist.ReadFromFile(plistPath); #if !AppStore_GB plist.root.SetString("NSLocationAlwaysUsageDescription", "为了更好的体验游戏"); + plist.root.SetString("NSCameraUsageDescription", "为了更好的体验游戏"); plist.root.SetString("NSLocationWhenInUseUsageDescription", "为了更好的体验游戏"); plist.root.SetString("NSUserTrackingUsageDescription", "该标识符将用于向您投放个性化广告"); plist.root.SetString("NSPhotoLibraryUsageDescription", "为了更好的体验游戏,请允许APP保存图片到您的相册"); + #else plist.root.SetString ("NSLocationAlwaysUsageDescription", "for better experience the game"); + plist.root.SetString("NSCameraUsageDescription", "for better experience the game"); plist.root.SetString ("NSLocationWhenInUseUsageDescription", "for better experience the game"); plist.root.SetString("NSUserTrackingUsageDescription", "This identifier will be used to deliver personalized ads to you."); plist.root.SetString("NSPhotoLibraryUsageDescription", "In order to experience the game better, please allow the APP to save pictures to your album."); diff --git a/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterface.cs b/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterface.cs index fe9a948d..37859160 100644 --- a/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterface.cs +++ b/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterface.cs @@ -11,7 +11,7 @@ namespace Touka { private static TKGNativeInterface _instance; - private string UnitySDKVersion = "2.2.1"; + private string UnitySDKVersion = "2.2.6"; public static TKGNativeInterface Instance { @@ -109,6 +109,8 @@ namespace Touka /// public abstract void showRewardAd(string _adPos, int _itemCount = -1); + + public abstract void SetShowSDKToast(bool _useSDKToast); /// /// Show Reward Ad /// @@ -394,6 +396,38 @@ namespace Touka /// public abstract void SetLogEnable(bool _enable); + /// + /// share txt + /// + /// + public abstract void ShareTxt(string _shareTxt); + + /// + /// regist APNS + /// + public abstract void RegistAPNS(); + + /// + /// shake + /// + /// notification identifier + /// The body of the notification. + /// notify after the time interval. format: yyyy-MM-dd HH:mm:ss + /// The application badge number. + /// The title of the notification. + /// The subtitle of the notification. + public abstract void RegistNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle); + + /// + /// remove all notification + /// + public abstract void RemoveAllNotifications(); + + /// + /// remove notification by notification identifier + /// + /// notification identifier + public abstract void RemoveNotification(string notiId); #endregion #region other callback @@ -408,6 +442,11 @@ namespace Touka /// public abstract void SetUserSourceCallback(AndroidTKGUserSourceCalllback _userSourceCallback); + /// + /// set user source callback with CampaignName + /// + public abstract void SetUserSourceCallback(AndroidTKGUserSourceCalllbackWithCampaignName _userSourceCallback); + #endregion } } \ No newline at end of file diff --git a/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceAndroid.cs b/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceAndroid.cs index 6502d2e3..f14ced62 100644 --- a/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceAndroid.cs +++ b/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceAndroid.cs @@ -205,6 +205,13 @@ namespace Touka #endif } + public override void SetShowSDKToast(bool _useSDKToast) + { +#if UNITY_ANDROID +#endif + + } + public override void ShowNativeAd(RectTransform pRect, Camera pCam = null, string pAdPos = "") { #if UNITY_ANDROID @@ -579,9 +586,8 @@ namespace Touka /// public override void SetLogEnable(bool _enable) { - SDKCall("setLogEnable", _enable); + SDKCall("setEnableLog", _enable); } - #endregion #region Others (Uncommon) @@ -662,6 +668,35 @@ namespace Touka SDKCall("pushMsg"); } + // + /// share txt + /// + /// + public override void ShareTxt(string _shareTxt) + { + SDKCall("localShareTxt", _shareTxt); + } + + public override void RegistAPNS() + { + + } + + public override void RegistNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle) + { + + } + + public override void RemoveNotification(string notiId) + { + + } + + public override void RemoveAllNotifications() + { + + } + #endregion #region common callback @@ -676,6 +711,12 @@ namespace Touka SDKCall("getUserSource", _userSourceCallback); } + + public override void SetUserSourceCallback(AndroidTKGUserSourceCalllbackWithCampaignName _userSourceCallback) + { + SDKCall("getUserSource", _userSourceCallback); + } + #endregion } diff --git a/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceDefault.cs b/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceDefault.cs index e5b57065..0faea728 100644 --- a/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceDefault.cs +++ b/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceDefault.cs @@ -499,6 +499,11 @@ namespace Touka } + public override void SetUserSourceCallback(AndroidTKGUserSourceCalllbackWithCampaignName _userSourceCallback) + { + + } + public override void RemoveNativeAd() { } @@ -513,6 +518,37 @@ namespace Touka } + public override void ShareTxt(string _shareTxt) + { + + } + + + public override void RegistAPNS() + { + + } + + public override void RegistNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle) + { + + } + + public override void RemoveNotification(string notiId) + { + + } + + public override void RemoveAllNotifications() + { + + } + + public override void SetShowSDKToast(bool _useSDKToast) + { + + } + #endregion } diff --git a/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceIOS.cs b/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceIOS.cs index fa11704e..f3b58d5e 100644 --- a/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceIOS.cs +++ b/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceIOS.cs @@ -87,7 +87,7 @@ namespace Touka #endif } - #region Ads Show +#region Ads Show /// /// Show banner Ad @@ -159,6 +159,13 @@ namespace Touka #endif } + public override void SetShowSDKToast(bool _useSDKToast) + { +#if !UNITY_EDITOR + TGiOSAdManager.Instance.ShowSDKToast(_useSDKToast); +#endif + } + /// /// Show FullScreen Ad(is RV without reward callback) /// @@ -495,7 +502,42 @@ namespace Touka TGiOSAdManager.Instance.OpenMoreGame(); #endif } + // + /// share txt + /// + /// + public override void ShareTxt(string _shareTxt) + { + TGiOSAdManager.Instance.share(_shareTxt); + } + public override void RegistAPNS() + { +#if !UNITY_EDITOR + TGiOSAdManager.Instance.registAPNS(); +#endif + } + + public override void RegistNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle) + { +#if !UNITY_EDITOR + TGiOSAdManager.Instance.registNotification(notiId,body,fireDate,badge,title,subTitle); +#endif + } + + public override void RemoveNotification(string notiId) + { +#if !UNITY_EDITOR + TGiOSAdManager.Instance.removeNotification(notiId); +#endif + } + + public override void RemoveAllNotifications() + { +#if !UNITY_EDITOR + TGiOSAdManager.Instance.removeAllNotifications(); +#endif + } #endregion #region Others (Uncommon) @@ -564,7 +606,9 @@ namespace Touka /// public override void toast(string _content) { - +#if !UNITY_EDITOR + TGiOSAdManager.Instance.Toast(_content); +#endif } /// @@ -589,7 +633,12 @@ namespace Touka } - + public override void SetUserSourceCallback(AndroidTKGUserSourceCalllbackWithCampaignName _userSourceCallback) + { + + } + + #endregion diff --git a/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGSDKCallback.cs b/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGSDKCallback.cs index e981a741..084d9d7b 100644 --- a/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGSDKCallback.cs +++ b/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGSDKCallback.cs @@ -18,6 +18,9 @@ namespace Touka // tkg user source public static Action mTKGUserSourceCallback = null; + // tkg user source + public static Action mTKGUserSourceCallbackWithCampaignName = null; + // tkg common callback public static Action mTKGCommonCallback = null; @@ -86,6 +89,16 @@ namespace Touka mTKGUserSourceCallback = _userSourceCallbackAction; } + + /// + /// set user source callback with CampaignName + /// + /// + public static void SetTKGUserSourceCallback(Action _userSourceCallbackWithCampaignNameAction) + { + mTKGUserSourceCallbackWithCampaignName = _userSourceCallbackWithCampaignNameAction; + } + public static void SetRewardClickCallback(Action _rewardClickAction) { mRewardClickCallback = _rewardClickAction; diff --git a/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGSDKCallbackAndroid.cs b/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGSDKCallbackAndroid.cs index d1152d9e..e927178f 100644 --- a/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGSDKCallbackAndroid.cs +++ b/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGSDKCallbackAndroid.cs @@ -336,6 +336,25 @@ namespace Touka } } + + /// + /// tkg callback + /// + public class AndroidTKGUserSourceCalllbackWithCampaignName : AndroidJavaProxy + { + public AndroidTKGUserSourceCalllbackWithCampaignName() : base("com.touka.tkg.idal.UserSourceCallbackWithType") { } + + public void onResult(bool _isOrganic, string _userSource,string campaignName) + { + TKGDebugger.LogDebug("TKGCallback onCall, isOrganic : " + _isOrganic + " , userSource : " + _userSource + " , campaignName : " + campaignName); + if(TKGSDKCallback.mTKGUserSourceCallbackWithCampaignName != null) + { + TKGSDKCallback.mTKGUserSourceCallbackWithCampaignName.Invoke(_isOrganic, _userSource,campaignName); + TKGSDKCallback.mTKGUserSourceCallbackWithCampaignName = null; + } + } + } + /* Loom.QueueOnMainThread((pObj) => { diff --git a/Assets/TKGSDK/NativeSDK/Scripts/Utils/DplusAgent.cs b/Assets/TKGSDK/NativeSDK/Scripts/Utils/DplusAgent.cs index f4abb407..8cb746ab 100644 --- a/Assets/TKGSDK/NativeSDK/Scripts/Utils/DplusAgent.cs +++ b/Assets/TKGSDK/NativeSDK/Scripts/Utils/DplusAgent.cs @@ -225,18 +225,7 @@ namespace Touka } #if UNITY_IPHONE - [DllImport("__Internal")] - private static extern void _EventObject(string eventID, string jsonStr); - [DllImport("__Internal")] - private static extern void _RegisterSuperProperty(string jsonStr); - [DllImport("__Internal")] - private static extern void _UnregisterSuperProperty(string propertyName); - [DllImport("__Internal")] - private static extern string _GetSuperProperties(); - [DllImport("__Internal")] - private static extern void _ClearSuperProperties(); - [DllImport("__Internal")] - private static extern void _SetFirstLaunchEvent(string[] propertyName,int len); + #endif diff --git a/Assets/ThirdPlugins/EasyTouchBundle/Install.meta b/Assets/ThirdPlugins/EasyTouchBundle/Install.meta index beb20e73..2dbb760d 100644 --- a/Assets/ThirdPlugins/EasyTouchBundle/Install.meta +++ b/Assets/ThirdPlugins/EasyTouchBundle/Install.meta @@ -1,9 +1,8 @@ fileFormatVersion: 2 guid: 9d20c22a55c184e4999fe7185f147b03 folderAsset: yes -timeCreated: 1451904390 -licenseType: Store DefaultImporter: + externalObjects: {} userData: assetBundleName: assetBundleVariant: diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 47cc6088..209e47d0 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -18,10 +18,10 @@ PlayerSettings: cursorHotspot: {x: 0, y: 0} m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} m_ShowUnitySplashScreen: 1 - m_ShowUnitySplashLogo: 1 + m_ShowUnitySplashLogo: 0 m_SplashScreenOverlayOpacity: 1 - m_SplashScreenAnimation: 1 - m_SplashScreenLogoStyle: 1 + m_SplashScreenAnimation: 0 + m_SplashScreenLogoStyle: 0 m_SplashScreenDrawMode: 0 m_SplashScreenBackgroundAnimationZoom: 1 m_SplashScreenLogoAnimationZoom: 1