Commit 26edaaee authored by zhangzhe's avatar zhangzhe

热启动广告,适配iOS

parent 4528b355
fileFormatVersion: 2 fileFormatVersion: 2
guid: 2ccae94f868cb4d4aa6e4ea819a58db4 guid: 3bdf81920b9ea8e46abd100e083eefe7
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: c66f7e7746c4c404f888d1bf0c2c1cc2 guid: 66e2d68a3d594c442ba620e41fb79243
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: b803d513b69b14353a28e60eba7f5d42 guid: 047afee41e5ea4041b38650dde06204e
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
......
fileFormatVersion: 2
guid: 4de77bfbd9c014146a2b371280ff0f63
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e8fc61bed8a2640c7a2c6d5a51574621
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 9216b5ab3159c44e594fa8e3a6bfcd90
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 9b3f9e305d4804719b5f4505912accf2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: a75f8ac9bc3f8414cb9b1aca48735084
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2 fileFormatVersion: 2
guid: 66e2d68a3d594c442ba620e41fb79243 guid: 38d19574108d441eaa5582181c64bb45
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 047afee41e5ea4041b38650dde06204e guid: e24a43648931942f585b1e978897070c
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 4de77bfbd9c014146a2b371280ff0f63 guid: cfc4dd6437e6949a6b3cf650644717eb
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: e8fc61bed8a2640c7a2c6d5a51574621 guid: ffb8242b88e1447d89f706e2d20c59f2
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 9216b5ab3159c44e594fa8e3a6bfcd90 guid: 1ebb9d9396d39490a94d173d8a366356
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 9b3f9e305d4804719b5f4505912accf2 guid: 6dc6d9800179c4592a824310321fdf9b
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
......
...@@ -76,17 +76,15 @@ public class CallingNativeMethods ...@@ -76,17 +76,15 @@ public class CallingNativeMethods
/// </summary> /// </summary>
public void SendWxLogin() public void SendWxLogin()
{ {
bool isInstalled = false; bool isInstalled = false;
isInstalled = _isWechatInstalled(); isInstalled = _isWechatInstalled();
if (isInstalled) if (isInstalled)
{ {
_WechatLogin(WX_APPID, state, universalLink); _WechatLogin(Constant.Instance.WX_APP_ID, "state", Constant.Instance.universalLink);
} }
else else
{ {
Debug.Log("请先安装微信客户端!"); ToastPlugin.ToastHelper.ShowToast("请先安装微信客户端!");
} }
} }
...@@ -97,8 +95,6 @@ public class CallingNativeMethods ...@@ -97,8 +95,6 @@ public class CallingNativeMethods
public void LoginCallBack(string msg) public void LoginCallBack(string msg)
{ {
Debug.Log("微信登录的回调在这里: " + msg); Debug.Log("微信登录的回调在这里: " + msg);
// 051AdH000dJnkL1KyK300KeBye2AdH0d
BingWxLogin(msg);
} }
#endif #endif
......
...@@ -41,7 +41,7 @@ public class @switch ...@@ -41,7 +41,7 @@ public class @switch
public int qq { get; set; } public int qq { get; set; }
/// <summary> /// <summary>
/// app进入后台多久后打开app显示开屏广告 /// app进入后台多久后打开app显示广告
/// (单位:秒) /// (单位:秒)
/// </summary> /// </summary>
public int splash_time { get; set; } public int splash_time { get; set; }
......
...@@ -120,7 +120,7 @@ public class CarPresenter : CarContract.Presenter ...@@ -120,7 +120,7 @@ public class CarPresenter : CarContract.Presenter
mView.showShouhuo(bean.landStatusDTO.landId); mView.showShouhuo(bean.landStatusDTO.landId);
//mView.showFlyFruit(); //mView.showFlyFruit();
#if UNITY_IOS #if UNITY_IOS
if (UserInfoManager.Instance().shubiao != 0) if (Constant.Instance.shubiao)
{ {
mView.showFlyFruit(); mView.showFlyFruit();
} }
......
...@@ -73,14 +73,19 @@ public class AdUtils ...@@ -73,14 +73,19 @@ public class AdUtils
ReportVideo(actionName); ReportVideo(actionName);
callback(true); callback(true);
//EventCenter.Broadcast(MyEventType.FlyVideoRedPack); //EventCenter.Broadcast(MyEventType.FlyVideoRedPack);
#if UNITY_IOS
if (UserInfoManager.Instance().shubiao != 0) // 热启动播放的激励视频, 不增加每日存钱罐, 所以也不播放每日存钱罐的动画
if (actionName != "hot_lunch_reward")
{ {
EventCenter.Broadcast(MyEventType.FlyVideoRedPack); #if UNITY_IOS
} if (Constant.Instance.shubiao)
{
EventCenter.Broadcast(MyEventType.FlyVideoRedPack);
}
#else #else
EventCenter.Broadcast(MyEventType.FlyVideoRedPack); EventCenter.Broadcast(MyEventType.FlyVideoRedPack);
#endif #endif
}
} }
public void onAdShow() public void onAdShow()
......
...@@ -47,39 +47,39 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View ...@@ -47,39 +47,39 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
// 顶部钱旁的提现按钮 // 顶部钱旁的提现按钮
GameObject withdraw = transform.Find("Title/bg/withdraw").gameObject; GameObject withdraw = transform.Find("Title/bg/withdraw").gameObject;
withdraw.SetActive(UserInfoManager.Instance().shubiao != 0); withdraw.SetActive(Constant.Instance.shubiao);
// 每日提现 // 每日提现
GameObject meirijiangli = transform.Find("Title/meirijiangli").gameObject; GameObject meirijiangli = transform.Find("Title/meirijiangli").gameObject;
meirijiangli.SetActive(UserInfoManager.Instance().shubiao != 0); meirijiangli.SetActive(Constant.Instance.shubiao);
// 明日存钱罐 // 明日存钱罐
GameObject pigbank = transform.Find("Title/pigbank").gameObject; GameObject pigbank = transform.Find("Title/pigbank").gameObject;
pigbank.SetActive(UserInfoManager.Instance().shubiao != 0); pigbank.SetActive(Constant.Instance.shubiao);
// 收货奖励 // 收货奖励
GameObject Harvestreward = transform.Find("BottomFun/Harvestreward").gameObject; GameObject Harvestreward = transform.Find("BottomFun/Harvestreward").gameObject;
Harvestreward.SetActive(UserInfoManager.Instance().shubiao != 0); Harvestreward.SetActive(Constant.Instance.shubiao);
// 幸运转盘 // 幸运转盘
//GameObject GameObject = transform.Find("BottomFun/GameObject").gameObject; //GameObject GameObject = transform.Find("BottomFun/GameObject").gameObject;
//GameObject.SetActive(UserInfoManager.Instance().shubiao != 0); //GameObject.SetActive(Constant.Instance.shubiao);
// 天天提现 // 天天提现
GameObject EveryDayWithdraw = transform.Find("BottomFun/EveryDayWithdraw").gameObject; GameObject EveryDayWithdraw = transform.Find("BottomFun/EveryDayWithdraw").gameObject;
EveryDayWithdraw.SetActive(UserInfoManager.Instance().shubiao != 0); EveryDayWithdraw.SetActive(Constant.Instance.shubiao);
// 种植 // 种植
GameObject Plant = transform.Find("BottomFun/plant").gameObject; GameObject Plant = transform.Find("BottomFun/plant").gameObject;
Plant.SetActive(UserInfoManager.Instance().shubiao != 0); Plant.SetActive(Constant.Instance.shubiao);
// 漂浮红包 // 漂浮红包
GameObject Coin1 = transform.Find("Car_list_bg/FloatCoin/Coin1").gameObject; GameObject Coin1 = transform.Find("Car_list_bg/FloatCoin/Coin1").gameObject;
Coin1.SetActive(UserInfoManager.Instance().shubiao != 0); Coin1.SetActive(Constant.Instance.shubiao);
// 下面的红包 // 下面的红包
GameObject receive_red_oack = transform.Find("Car_list_bg/Park/receive_red_oack").gameObject; GameObject receive_red_oack = transform.Find("Car_list_bg/Park/receive_red_oack").gameObject;
receive_red_oack.SetActive(UserInfoManager.Instance().shubiao != 0); receive_red_oack.SetActive(Constant.Instance.shubiao);
} }
// 判断是否是刘海屏 // 判断是否是刘海屏
...@@ -101,7 +101,7 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View ...@@ -101,7 +101,7 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
transform.Find("Title").GetComponent<RectTransform>().anchoredPosition = new Vector2(titlePosition.x, titlePosition.y - 45); transform.Find("Title").GetComponent<RectTransform>().anchoredPosition = new Vector2(titlePosition.x, titlePosition.y - 45);
} }
if (UserInfoManager.Instance().shubiao == 0) if (Constant.Instance.shubiao)
{ {
transform.Find("BottomFun/Dailytasks").GetComponent<RectTransform>().anchoredPosition = new Vector2(285, 1170); transform.Find("BottomFun/Dailytasks").GetComponent<RectTransform>().anchoredPosition = new Vector2(285, 1170);
} }
......
...@@ -48,7 +48,7 @@ public class SettingControl : MonoBehaviour ...@@ -48,7 +48,7 @@ public class SettingControl : MonoBehaviour
private void CheckShubiao() private void CheckShubiao()
{ {
// 退出登录按钮 // 退出登录按钮
logoutButton.SetActive(UserInfoManager.Instance().shubiao != 0); logoutButton.SetActive(Constant.Instance.shubiao);
} }
#endif #endif
......
...@@ -69,7 +69,7 @@ public class TaskDiamandControl : MonoBehaviour ...@@ -69,7 +69,7 @@ public class TaskDiamandControl : MonoBehaviour
#if UNITY_IOS #if UNITY_IOS
int[] sidArray = new int[] { 2594, 2590, 2596, 2591 }; int[] sidArray = new int[] { 2594, 2590, 2596, 2591 };
List<int> sidList = new List<int>(sidArray); List<int> sidList = new List<int>(sidArray);
if (UserInfoManager.Instance().shubiao == 0 && sidList.Contains(bean.taskList[i].sid)) if (Constant.Instance.shubiao && sidList.Contains(bean.taskList[i].sid))
{ {
continue; continue;
} }
......
...@@ -23,7 +23,7 @@ public class TitleControl : MonoBehaviour ...@@ -23,7 +23,7 @@ public class TitleControl : MonoBehaviour
#if UNITY_IOS #if UNITY_IOS
if (UserInfoManager.Instance().shubiao == 0) if (Constant.Instance.shubiao)
{ {
transform.Find("withdraw").gameObject.SetActive(false); transform.Find("withdraw").gameObject.SetActive(false);
} }
......
//
// IOSADManager.h
// caiyuan
//
// Created by 张哲 on 2021/3/8.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface IOSADManager : NSObject
@end
NS_ASSUME_NONNULL_END
//
// IOSADManager.m
// caiyuan
//
// Created by 张哲 on 2021/3/8.
//
#import "IOSADManager.h"
#import <BUAdSDK/BUAdSDK.h>
#import <UMCommon/UMCommon.h>
#import "ViewController.h"
@implementation IOSADManager
#if defined(__cplusplus)
extern "C" {
#endif
// 初始化穿山甲SDK
void InitCSJSDK(char *appId)
{
NSLog(@"穿山甲appid:%@", [NSString stringWithUTF8String:appId]);
//穿山甲
[BUAdSDKManager setAppID:[NSString stringWithUTF8String:appId]];
// [BUAdSDKManager setAppID:@"5000546"];
[BUAdSDKManager setGDPR:0];
[BUAdSDKManager setCoppa:0];
[BUAdSDKManager setIsPaidApp:NO];
[BUAdSDKManager setLoglevel:BUAdSDKLogLevelDebug];
}
// 初始化友盟SDK
void InitUMSDK(char *appKey)
{
NSLog(@"unity传值:%@", [NSString stringWithUTF8String:appKey]);
[UMConfigure initWithAppkey:[NSString stringWithUTF8String:appKey] channel:@"App Store"];
[UMConfigure setLogEnabled: NO];
}
void ReSendIDFA()
{
[[ViewController shareManager] sendIDFA];
}
#if defined(__cplusplus)
}
#endif
@end
fileFormatVersion: 2
guid: 1620ed796125a46a0ba04c2a4de7b6fe
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings: {}
- first:
tvOS: tvOS
second:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: f42460d150f4a430db0dcc11c3987704
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
...@@ -10,12 +10,14 @@ ...@@ -10,12 +10,14 @@
#import "WXApi.h" #import "WXApi.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface ViewController : UIResponder<UIApplicationDelegate, WXApiDelegate> @interface BridageManager : UIResponder<UIApplicationDelegate, WXApiDelegate>
+ (instancetype)shareManager;
-(void)sendUdid; @property (nonatomic, strong) NSString *udid;
@property (nonatomic, strong) NSString *idfaString;
-(void)sendIDFA; +(instancetype)shareManager;
-(void)bridage;
@end @end
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: d6e0521b9d1e445d188514697e917d63 guid: b24133e6186444d3f85a6c2035ce141c
PluginImporter: PluginImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2
......
// //
// ViewController.m // BridageManager.m
// iosPlugins // iosPlugins
// //
// Created by os on 2020/4/10. // Created by os on 2020/4/10.
// Copyright © 2020 os. All rights reserved. // Copyright © 2020 os. All rights reserved.
// //
#import "ViewController.h" #import "BridageManager.h"
#import "UserData.h" #import "UserData.h"
#import "BGKeychainTool.h" #import "BGKeychainTool.h"
#import <BUAdSDK/BUAdSDK.h>
#import <UMCommon/UMCommon.h>
@interface BridageManager ()
@end
@implementation BridageManager
@implementation ViewController
+(instancetype) shareManager +(instancetype) shareManager
{ {
static dispatch_once_t onceToken; static dispatch_once_t onceToken;
static ViewController *instance; static BridageManager *instance;
dispatch_once(&onceToken, ^{ dispatch_once(&onceToken, ^{
instance = [[ViewController alloc] init]; instance = [[BridageManager alloc] init];
}); });
return instance; return instance;
} }
//微信发送请求到第三方应用时,会回调到该方法 //微信发送请求到第三方应用时,会回调到该方法
-(void) onReq:(BaseReq *)req {} -(void) onReq:(BaseReq *)req {}
//第三方应用发送到微信的请求处理后的响应结果,会回调到该方法 //第三方应用发送到微信的请求处理后的响应结果,会回调到该方法
...@@ -78,73 +86,72 @@ char* MakeStringCopy(const char* string){ ...@@ -78,73 +86,72 @@ char* MakeStringCopy(const char* string){
//信息提示 //信息提示
void OnShowMessage(const char* msg) void OnShowMessage(const char* msg)
{ {
UnitySendMessage("WxLogin","LoginCallBack",MakeStringCopy(msg)); UnitySendMessage("LoginView", "LoginCallBack", MakeStringCopy(msg));
} }
void OnShareShowMessage(const char* msg) void OnShareShowMessage(const char* msg)
{ {
UnitySendMessage("MainPanel","ShareCallBack",MakeStringCopy(msg)); // UnitySendMessage("MainPanel","ShareCallBack",MakeStringCopy(msg));
} }
-(void)sendUdid -(void)bridage
{ {
UserData *data = [[UserData alloc] init]; UserData *data = [[UserData alloc] init];
NSDictionary *userDic = [data readPlist]; NSDictionary *userDic = [data readPlist];
if ([BGKeychainTool getDeviceIDInKeychain].length > 0) { if ([BGKeychainTool getDeviceIDInKeychain].length > 0) {
NSString *udid = [BGKeychainTool getDeviceIDInKeychain]; _udid = [BGKeychainTool getDeviceIDInKeychain];
const char *codeInfo = [udid cStringUsingEncoding:NSASCIIStringEncoding];
SendUDID(codeInfo);
} }
if (userDic[@"idfa"]) { if (userDic[@"idfa"]) {
NSString *idfaString = [NSString stringWithFormat:@"%@",userDic[@"idfa"]]; _idfaString = [NSString stringWithFormat:@"%@",userDic[@"idfa"]];
const char *codeInfo = [idfaString cStringUsingEncoding:NSASCIIStringEncoding];
SendIDFA(codeInfo);
} }
const char *login = [@"login" cStringUsingEncoding:NSASCIIStringEncoding];
SendTouristLogin(login);
} }
-(void)sendIDFA void SendTouristLogin(const char *str)
{ {
UserData *data = [[UserData alloc] init]; // UnitySendMessage("Main Camera","TouristLogin", MakeStringCopy(str));
NSDictionary *userDic = [data readPlist]; }
if ([BGKeychainTool getDeviceIDInKeychain].length > 0) { #if defined(__cplusplus)
NSString *udid = [BGKeychainTool getDeviceIDInKeychain]; extern "C" {
const char *codeInfo = [udid cStringUsingEncoding:NSASCIIStringEncoding]; #endif
SendUDID(codeInfo); // 初始化穿山甲SDK
void InitCSJSDK(char *appId)
{
NSLog(@"穿山甲appid:%@", [NSString stringWithUTF8String:appId]);
//穿山甲
[BUAdSDKManager setAppID:[NSString stringWithUTF8String:appId]];
// [BUAdSDKManager setAppID:@"5000546"];
[BUAdSDKManager setGDPR:0];
[BUAdSDKManager setCoppa:0];
[BUAdSDKManager setIsPaidApp:NO];
[BUAdSDKManager setLoglevel:BUAdSDKLogLevelDebug];
} }
if (userDic[@"idfa"]) { // 初始化友盟SDK
NSString *idfaString = [NSString stringWithFormat:@"%@",userDic[@"idfa"]]; void InitUMSDK(char *appKey)
const char *codeInfo = [idfaString cStringUsingEncoding:NSASCIIStringEncoding]; {
SendSplashIDFA(codeInfo); NSLog(@"unity传值:%@", [NSString stringWithUTF8String:appKey]);
[UMConfigure initWithAppkey:[NSString stringWithUTF8String:appKey] channel:@"App Store"];
[UMConfigure setLogEnabled: NO];
} }
typedef void (*ResultHandler) (const char *device, const char *idfa);
void BridageDeviceAndIDFA(ResultHandler resultHandler)
{
resultHandler([BridageManager shareManager].udid.UTF8String, [BridageManager shareManager].idfaString.UTF8String);
}
#if defined(__cplusplus)
} }
#endif
void SendSplashIDFA(const char *str)
{
UnitySendMessage("Canvas","SetIDFA", MakeStringCopy(str));
}
void SendUDID(const char *str)
{
UnitySendMessage("Main Camera","SetUDID", MakeStringCopy(str));
}
void SendIDFA(const char *str)
{
UnitySendMessage("Main Camera","SetIDFA", MakeStringCopy(str));
}
void SendTouristLogin(const char *str)
{
UnitySendMessage("Main Camera","TouristLogin", MakeStringCopy(str));
}
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5b6a371f436e0434c96e6f5089f57bfb guid: 9231f6ad929664f4596a448a72a740f4
PluginImporter: PluginImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 517b97a0c8d97412e872329c9a0e7e03 guid: a15f2fa74b26f4e03b1434ed9bde5ea1
PluginImporter: PluginImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: bd76b9bd0af0d4972bf48a162d64eed2 guid: 1688625fa7cd347bf983bec6b3e15644
PluginImporter: PluginImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2
......
fileFormatVersion: 2
guid: 81f60b393d9a64277b6f8db14ce0c4b5
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#import <AppTrackingTransparency/AppTrackingTransparency.h> #import <AppTrackingTransparency/AppTrackingTransparency.h>
#import "KeychainItemWrapper.h" #import "KeychainItemWrapper.h"
#import "UserData.h" #import "UserData.h"
#import "BridageManager.h"
NSString * const FCLogin = @"SKLogin"; NSString * const FCLogin = @"SKLogin";
NSString * const FCIdentifier = @"SKIdentifier"; NSString * const FCIdentifier = @"SKIdentifier";
...@@ -36,6 +37,8 @@ NSString * const FCIdentifier = @"SKIdentifier"; ...@@ -36,6 +37,8 @@ NSString * const FCIdentifier = @"SKIdentifier";
NSString *idfa = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString]; NSString *idfa = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
if (idfa.length) { if (idfa.length) {
[data writeValue:idfa Key:@"idfa"]; [data writeValue:idfa Key:@"idfa"];
[[BridageManager shareManager] bridage];
} }
} }
}]; }];
......
...@@ -11,24 +11,6 @@ PluginImporter: ...@@ -11,24 +11,6 @@ PluginImporter:
isExplicitlyReferenced: 0 isExplicitlyReferenced: 0
validateReferences: 1 validateReferences: 1
platformData: platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first: - first:
Any: Any:
second: second:
...@@ -39,42 +21,13 @@ PluginImporter: ...@@ -39,42 +21,13 @@ PluginImporter:
second: second:
enabled: 0 enabled: 0
settings: settings:
CPU: AnyCPU
DefaultValueInitialized: true DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: x86_64
- first: - first:
iPhone: iOS iPhone: iOS
second: second:
enabled: 1 enabled: 1
settings: settings:
AddToEmbeddedBinaries: false AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:
...@@ -16,19 +16,12 @@ PluginImporter: ...@@ -16,19 +16,12 @@ PluginImporter:
second: second:
enabled: 0 enabled: 0
settings: settings:
Exclude Android: 1
Exclude Editor: 1 Exclude Editor: 1
Exclude Linux64: 1 Exclude Linux64: 1
Exclude OSXUniversal: 1 Exclude OSXUniversal: 1
Exclude Win: 1 Exclude Win: 1
Exclude Win64: 1 Exclude Win64: 1
Exclude iOS: 0 Exclude iOS: 0
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first: - first:
Any: Any:
second: second:
...@@ -47,7 +40,7 @@ PluginImporter: ...@@ -47,7 +40,7 @@ PluginImporter:
second: second:
enabled: 0 enabled: 0
settings: settings:
CPU: AnyCPU CPU: x86_64
- first: - first:
Standalone: OSXUniversal Standalone: OSXUniversal
second: second:
......
fileFormatVersion: 2
guid: 3ca9905b6a7184e59adb16669bfbe932
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: cbcb521cb7b7e45d4bddf9861d5217ec
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2 fileFormatVersion: 2
guid: ccfd845a8e6a04b35ae06b55c7a7a5ea guid: ccfd845a8e6a04b35ae06b55c7a7a5ea
folderAsset: yes folderAsset: yes
timeCreated: 1506304401
licenseType: Free
DefaultImporter: DefaultImporter:
externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:
fileFormatVersion: 2 fileFormatVersion: 2
guid: b2df5f25d45684b11a962550a24bc31a guid: b2df5f25d45684b11a962550a24bc31a
folderAsset: yes folderAsset: yes
timeCreated: 1506304401
licenseType: Free
PluginImporter: PluginImporter:
externalObjects: {}
serializedVersion: 2 serializedVersion: 2
iconMap: {} iconMap: {}
executionOrder: {} executionOrder: {}
defineConstraints: []
isPreloaded: 0 isPreloaded: 0
isOverridable: 0 isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData: platformData:
data: - first:
first: Any:
Any: second:
second: enabled: 0
enabled: 0 settings: {}
settings: {} - first:
data: Editor: Editor
first: second:
Editor: Editor enabled: 0
second: settings:
enabled: 0 DefaultValueInitialized: true
settings: - first:
DefaultValueInitialized: true iPhone: iOS
data: second:
first: enabled: 1
iPhone: iOS settings: {}
second:
enabled: 1
settings: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:
fileFormatVersion: 2 fileFormatVersion: 2
guid: 053cdf1283ee84e2fbf00722dc80b879 guid: 053cdf1283ee84e2fbf00722dc80b879
folderAsset: yes folderAsset: yes
timeCreated: 1506304401
licenseType: Free
DefaultImporter: DefaultImporter:
externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:
...@@ -6,8 +6,11 @@ PluginImporter: ...@@ -6,8 +6,11 @@ PluginImporter:
serializedVersion: 2 serializedVersion: 2
iconMap: {} iconMap: {}
executionOrder: {} executionOrder: {}
defineConstraints: []
isPreloaded: 0 isPreloaded: 0
isOverridable: 0 isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData: platformData:
- first: - first:
Any: Any:
......
...@@ -6,8 +6,11 @@ PluginImporter: ...@@ -6,8 +6,11 @@ PluginImporter:
serializedVersion: 2 serializedVersion: 2
iconMap: {} iconMap: {}
executionOrder: {} executionOrder: {}
defineConstraints: []
isPreloaded: 0 isPreloaded: 0
isOverridable: 0 isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData: platformData:
- first: - first:
Any: Any:
......
...@@ -89,7 +89,10 @@ public class InitProject : MonoBehaviour ...@@ -89,7 +89,10 @@ public class InitProject : MonoBehaviour
public void OnClickAgree() public void OnClickAgree()
{ {
PlayerPrefs.SetInt("IsFirstShowYxDialog", 1); PlayerPrefs.SetInt("IsFirstShowYxDialog", 1);
XyDialog.SetActive(false); if (XyDialog != null)
{
XyDialog.SetActive(false);
}
SceneManager.LoadSceneAsync(1);//跳转场景 SceneManager.LoadSceneAsync(1);//跳转场景
} }
/// <summary> /// <summary>
...@@ -143,7 +146,7 @@ public class InitProject : MonoBehaviour ...@@ -143,7 +146,7 @@ public class InitProject : MonoBehaviour
public void SetIDFA(string str) public void SetIDFA(string str)
{ {
Debug.Log("IDFA = " + str); Debug.Log("IDFA = " + str);
UserInfoManager.Instance().idfa = str; Constant.Instance.idfa = str;
} }
/// <summary> /// <summary>
...@@ -153,7 +156,7 @@ public class InitProject : MonoBehaviour ...@@ -153,7 +156,7 @@ public class InitProject : MonoBehaviour
public void SetUDID(string str) public void SetUDID(string str)
{ {
Debug.Log("UDID = " + str); Debug.Log("UDID = " + str);
UserInfoManager.Instance().udid = str; Constant.Instance.device = str;
} }
#endif #endif
......
...@@ -68,13 +68,18 @@ public class Splash : MonoBehaviour ...@@ -68,13 +68,18 @@ public class Splash : MonoBehaviour
//获取App信息 //获取App信息
HttpTool.Instance._Get("app/v1/app_info", null, new Action<AppInfoBean>((bean) => HttpTool.Instance._Get("app/v1/app_info", null, new Action<AppInfoBean>((bean) =>
{ {
if (int.Parse(UserInfoManager.Instance().build) < bean.sdgowi.vc) PlayerDataControl.Instance.PrivacyPolicyUrl = bean.h5_url.privacy;
PlayerDataControl.Instance.UserAgreementUrl = bean.h5_url.user;
PlayerDataControl.Instance.AboutUsUrl = bean.h5_url.aboutUs;
Constant.Instance.splash_time = bean.@switch.splash_time;
if (int.Parse(Constant.Instance.vc) < bean.sdgowi.vc)
{ {
UserInfoManager.Instance().shubiao = 1; Constant.Instance.shubiao = true;
} }
else else
{ {
UserInfoManager.Instance().shubiao = 0; Constant.Instance.shubiao = false;
} }
//UserInfoManager.Instance().shubiao = 1; //UserInfoManager.Instance().shubiao = 1;
novelInfo(); novelInfo();
......
...@@ -206,7 +206,7 @@ public class StartControl : MonoBehaviour ...@@ -206,7 +206,7 @@ public class StartControl : MonoBehaviour
} }
else else
{ {
ShowSplashAd(); ShowRewardAd();
} }
} }
} }
...@@ -236,11 +236,30 @@ public class StartControl : MonoBehaviour ...@@ -236,11 +236,30 @@ public class StartControl : MonoBehaviour
Debug.unityLogger.Log("Unity后台返回策略"); Debug.unityLogger.Log("Unity后台返回策略");
} }
private void ShowRewardAd()
{
AdUtils.PlayRewardAd("hot_lunch_reward", new Action<bool>((cb) =>
{
if (cb)
{
HttpTool.Instance._Post("app/v1/cscmnq/hotStart", null, new Action<EmptyModel>((bean) =>
{
EventCenter.Broadcast(MyEventType.FlyHongbao);
}), new Action<string, string>((code, errMsg) =>
{
Debug.unityLogger.Log("热启动看广告加红包请求Error Code" + code + "msg" + errMsg);
}));
}
}));
}
private void ShowSplashAd() private void ShowSplashAd()
{ {
AdManager.Instance.LoadSplashAd(new SplshAdListener()); AdManager.Instance.LoadSplashAd(new SplshAdListener());
} }
private sealed class SplshAdListener : ZXADSplashListener private sealed class SplshAdListener : ZXADSplashListener
{ {
public void onAdShow() public void onAdShow()
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"com.unity.modules.animation": "1.0.0", "com.unity.modules.animation": "1.0.0",
"com.unity.modules.uielements": "1.0.0" "com.unity.modules.uielements": "1.0.0"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.2d.common": { "com.unity.2d.common": {
"version": "2.1.0", "version": "2.1.0",
...@@ -21,21 +21,21 @@ ...@@ -21,21 +21,21 @@
"com.unity.2d.sprite": "1.0.0", "com.unity.2d.sprite": "1.0.0",
"com.unity.modules.uielements": "1.0.0" "com.unity.modules.uielements": "1.0.0"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.2d.path": { "com.unity.2d.path": {
"version": "2.1.0", "version": "2.1.0",
"depth": 1, "depth": 1,
"source": "registry", "source": "registry",
"dependencies": {}, "dependencies": {},
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.2d.pixel-perfect": { "com.unity.2d.pixel-perfect": {
"version": "2.1.0", "version": "2.1.0",
"depth": 0, "depth": 0,
"source": "registry", "source": "registry",
"dependencies": {}, "dependencies": {},
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.2d.psdimporter": { "com.unity.2d.psdimporter": {
"version": "2.1.6", "version": "2.1.6",
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
"com.unity.2d.animation": "3.2.5", "com.unity.2d.animation": "3.2.5",
"com.unity.2d.sprite": "1.0.0" "com.unity.2d.sprite": "1.0.0"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.2d.sprite": { "com.unity.2d.sprite": {
"version": "1.0.0", "version": "1.0.0",
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
"com.unity.2d.common": "2.0.2", "com.unity.2d.common": "2.0.2",
"com.unity.2d.path": "2.0.6" "com.unity.2d.path": "2.0.6"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.2d.tilemap": { "com.unity.2d.tilemap": {
"version": "1.0.0", "version": "1.0.0",
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
"dependencies": { "dependencies": {
"com.unity.ugui": "1.0.0" "com.unity.ugui": "1.0.0"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.analytics": { "com.unity.analytics": {
"version": "3.3.5", "version": "3.3.5",
...@@ -87,21 +87,21 @@ ...@@ -87,21 +87,21 @@
"dependencies": { "dependencies": {
"com.unity.ugui": "1.0.0" "com.unity.ugui": "1.0.0"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.collab-proxy": { "com.unity.collab-proxy": {
"version": "1.2.16", "version": "1.2.16",
"depth": 0, "depth": 0,
"source": "registry", "source": "registry",
"dependencies": {}, "dependencies": {},
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.ext.nunit": { "com.unity.ext.nunit": {
"version": "1.0.6", "version": "1.0.6",
"depth": 1, "depth": 1,
"source": "registry", "source": "registry",
"dependencies": {}, "dependencies": {},
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.ide.rider": { "com.unity.ide.rider": {
"version": "1.1.4", "version": "1.1.4",
...@@ -110,21 +110,21 @@ ...@@ -110,21 +110,21 @@
"dependencies": { "dependencies": {
"com.unity.test-framework": "1.1.1" "com.unity.test-framework": "1.1.1"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.ide.vscode": { "com.unity.ide.vscode": {
"version": "1.2.3", "version": "1.2.3",
"depth": 0, "depth": 0,
"source": "registry", "source": "registry",
"dependencies": {}, "dependencies": {},
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.mathematics": { "com.unity.mathematics": {
"version": "1.1.0", "version": "1.1.0",
"depth": 1, "depth": 1,
"source": "registry", "source": "registry",
"dependencies": {}, "dependencies": {},
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.multiplayer-hlapi": { "com.unity.multiplayer-hlapi": {
"version": "1.0.8", "version": "1.0.8",
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
"dependencies": { "dependencies": {
"nuget.mono-cecil": "0.1.6-preview" "nuget.mono-cecil": "0.1.6-preview"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.purchasing": { "com.unity.purchasing": {
"version": "2.2.1", "version": "2.2.1",
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
"dependencies": { "dependencies": {
"com.unity.ugui": "1.0.0" "com.unity.ugui": "1.0.0"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.test-framework": { "com.unity.test-framework": {
"version": "1.1.20", "version": "1.1.20",
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
"com.unity.modules.imgui": "1.0.0", "com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0" "com.unity.modules.jsonserialize": "1.0.0"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.textmeshpro": { "com.unity.textmeshpro": {
"version": "2.1.1", "version": "2.1.1",
...@@ -162,14 +162,14 @@ ...@@ -162,14 +162,14 @@
"dependencies": { "dependencies": {
"com.unity.ugui": "1.0.0" "com.unity.ugui": "1.0.0"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.timeline": { "com.unity.timeline": {
"version": "1.2.17", "version": "1.2.17",
"depth": 0, "depth": 0,
"source": "registry", "source": "registry",
"dependencies": {}, "dependencies": {},
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.ugui": { "com.unity.ugui": {
"version": "1.0.0", "version": "1.0.0",
...@@ -188,14 +188,14 @@ ...@@ -188,14 +188,14 @@
"com.unity.modules.vr": "1.0.0", "com.unity.modules.vr": "1.0.0",
"com.unity.modules.xr": "1.0.0" "com.unity.modules.xr": "1.0.0"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"nuget.mono-cecil": { "nuget.mono-cecil": {
"version": "0.1.6-preview", "version": "0.1.6-preview",
"depth": 1, "depth": 1,
"source": "registry", "source": "registry",
"dependencies": {}, "dependencies": {},
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.modules.ai": { "com.unity.modules.ai": {
"version": "1.0.0", "version": "1.0.0",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment