Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
W
wdlc_mjb_unity
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
wdlc_mjb_unity
Commits
797e4297
Commit
797e4297
authored
Apr 30, 2021
by
zhangzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iOS的修改
parent
f2a162eb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
63 changed files
with
4082 additions
and
106 deletions
+4082
-106
AdManager.cs
Assets/AdSDK/AD/AD_Manager/AdManager.cs
+6
-0
CSJRewardUtil.cs
Assets/AdSDK/AD/CSJ/CSJRewardUtil.cs
+1
-1
FSRewardUtils.cs
Assets/AdSDK/AD/Funshion/FSRewardUtils.cs
+3
-1
YLBRewardAdUtil.cs
Assets/AdSDK/AD/YLB/YlbDemo/YLBRewardAdUtil.cs
+3
-1
Example.cs
Assets/AdSDK/AD/ZXHC/ZXHCDemo/Example.cs
+3
-2
ZXHCSplashUtil.cs
Assets/AdSDK/AD/ZXHC/ZXHCDemo/ZXHCSplashUtil.cs
+3
-1
InitProject.cs
Assets/AdSDK/InitProject/Scripts/InitProject.cs
+110
-7
EncryptHelper.cs
Assets/AdSDK/NetWork/HTTP/EncryptHelper.cs
+25
-0
HttpTool.cs
Assets/AdSDK/NetWork/HTTP/HttpTool.cs
+43
-50
UserInfoManager.cs
Assets/AdSDK/NetWork/HTTP/UserInfoManager.cs
+142
-0
UserInfoManager.cs.meta
Assets/AdSDK/NetWork/HTTP/UserInfoManager.cs.meta
+11
-0
AppInfoBean.cs
Assets/Game/Main/Scripts/Model/AppInfoBean.cs
+7
-0
WxLoginUtil.cs
Assets/Game/Main/Scripts/Utils/WxLoginUtil.cs
+71
-2
SettingControl.cs
Assets/Game/Main/Scripts/View/SettingControl.cs
+18
-0
Splash.cs
Assets/Game/Splash/Splash.cs
+66
-17
AD.meta
Assets/Plugins/iOS/AD.meta
+8
-0
IOSADManager.h
Assets/Plugins/iOS/AD/IOSADManager.h
+16
-0
IOSADManager.h.meta
Assets/Plugins/iOS/AD/IOSADManager.h.meta
+33
-0
IOSADManager.mm
Assets/Plugins/iOS/AD/IOSADManager.mm
+44
-0
IOSADManager.mm.meta
Assets/Plugins/iOS/AD/IOSADManager.mm.meta
+33
-0
KeyChain.meta
Assets/Plugins/iOS/KeyChain.meta
+8
-0
BGKeychainTool.h
Assets/Plugins/iOS/KeyChain/BGKeychainTool.h
+19
-0
BGKeychainTool.h.meta
Assets/Plugins/iOS/KeyChain/BGKeychainTool.h.meta
+33
-0
BGKeychainTool.m
Assets/Plugins/iOS/KeyChain/BGKeychainTool.m
+65
-0
BGKeychainTool.m.meta
Assets/Plugins/iOS/KeyChain/BGKeychainTool.m.meta
+33
-0
KeychainItemManager.h
Assets/Plugins/iOS/KeyChain/KeychainItemManager.h
+19
-0
KeychainItemManager.h.meta
Assets/Plugins/iOS/KeyChain/KeychainItemManager.h.meta
+33
-0
KeychainItemManager.m
Assets/Plugins/iOS/KeyChain/KeychainItemManager.m
+166
-0
KeychainItemManager.m.meta
Assets/Plugins/iOS/KeyChain/KeychainItemManager.m.meta
+80
-0
KeychainItemWrapper.h
Assets/Plugins/iOS/KeyChain/KeychainItemWrapper.h
+74
-0
KeychainItemWrapper.h.meta
Assets/Plugins/iOS/KeyChain/KeychainItemWrapper.h.meta
+33
-0
KeychainItemWrapper.m
Assets/Plugins/iOS/KeyChain/KeychainItemWrapper.m
+313
-0
KeychainItemWrapper.m.meta
Assets/Plugins/iOS/KeyChain/KeychainItemWrapper.m.meta
+80
-0
UserData.h
Assets/Plugins/iOS/KeyChain/UserData.h
+21
-0
UserData.h.meta
Assets/Plugins/iOS/KeyChain/UserData.h.meta
+33
-0
UserData.m
Assets/Plugins/iOS/KeyChain/UserData.m
+59
-0
UserData.m.meta
Assets/Plugins/iOS/KeyChain/UserData.m.meta
+33
-0
WeChat.meta
Assets/Plugins/iOS/WeChat.meta
+8
-0
Native.h
Assets/Plugins/iOS/WeChat/Native.h
+17
-0
Native.h.meta
Assets/Plugins/iOS/WeChat/Native.h.meta
+33
-0
Native.mm
Assets/Plugins/iOS/WeChat/Native.mm
+65
-0
Native.mm.meta
Assets/Plugins/iOS/WeChat/Native.mm.meta
+33
-0
ViewController.h
Assets/Plugins/iOS/WeChat/ViewController.h
+19
-0
ViewController.h.meta
Assets/Plugins/iOS/WeChat/ViewController.h.meta
+33
-0
ViewController.m
Assets/Plugins/iOS/WeChat/ViewController.m
+125
-0
ViewController.m.meta
Assets/Plugins/iOS/WeChat/ViewController.m.meta
+33
-0
WXApi.h
Assets/Plugins/iOS/WeChat/WXApi.h
+198
-0
WXApi.h.meta
Assets/Plugins/iOS/WeChat/WXApi.h.meta
+33
-0
WXApiObject.h
Assets/Plugins/iOS/WeChat/WXApiObject.h
+1079
-0
WXApiObject.h.meta
Assets/Plugins/iOS/WeChat/WXApiObject.h.meta
+33
-0
WechatAuthSDK.h
Assets/Plugins/iOS/WeChat/WechatAuthSDK.h
+68
-0
WechatAuthSDK.h.meta
Assets/Plugins/iOS/WeChat/WechatAuthSDK.h.meta
+33
-0
libWeChatSDK.a
Assets/Plugins/iOS/WeChat/libWeChatSDK.a
+0
-0
libWeChatSDK.a.meta
Assets/Plugins/iOS/WeChat/libWeChatSDK.a.meta
+33
-0
WebView.meta
Assets/Plugins/iOS/WebView.meta
+8
-0
WKWebViewController.h
Assets/Plugins/iOS/WebView/WKWebViewController.h
+27
-0
WKWebViewController.h.meta
Assets/Plugins/iOS/WebView/WKWebViewController.h.meta
+33
-0
WKWebViewController.m
Assets/Plugins/iOS/WebView/WKWebViewController.m
+315
-0
WKWebViewController.m.meta
Assets/Plugins/iOS/WebView/WKWebViewController.m.meta
+33
-0
manifest.json
Packages/manifest.json
+5
-0
packages-lock.json
Packages/packages-lock.json
+67
-14
PackageManagerSettings.asset
ProjectSettings/PackageManagerSettings.asset
+1
-1
ProjectSettings.asset
ProjectSettings/ProjectSettings.asset
+2
-9
No files found.
Assets/AdSDK/AD/AD_Manager/AdManager.cs
View file @
797e4297
...
@@ -259,6 +259,7 @@ public class AdManager
...
@@ -259,6 +259,7 @@ public class AdManager
Debug
.
unityLogger
.
Log
(
"huangjunhui"
,
"Splash加载 "
+
entity
.
adPlatform
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
Debug
.
unityLogger
.
Log
(
"huangjunhui"
,
"Splash加载 "
+
entity
.
adPlatform
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
GDTSplshAdUtils
.
Instance
.
LoadSplshAd
(
entity
,
listener
,
callback
);
GDTSplshAdUtils
.
Instance
.
LoadSplshAd
(
entity
,
listener
,
callback
);
break
;
break
;
#if UNITY_ANDROID
case
ZXADConfig
.
PLANTFORM_AD_ZXHC
:
case
ZXADConfig
.
PLANTFORM_AD_ZXHC
:
//掌心汇川开屏广告
//掌心汇川开屏广告
ZXHCSplashUtil
.
Instance
.
LoadSplshAd
(
entity
,
listener
,
callback
);
ZXHCSplashUtil
.
Instance
.
LoadSplshAd
(
entity
,
listener
,
callback
);
...
@@ -267,6 +268,7 @@ public class AdManager
...
@@ -267,6 +268,7 @@ public class AdManager
case
ZXADConfig
.
PLANTFORM_AD_FS
:
case
ZXADConfig
.
PLANTFORM_AD_FS
:
FSSplashUtil
.
Instance
.
loadSplashAd
(
entity
,
listener
,
callback
);
FSSplashUtil
.
Instance
.
loadSplashAd
(
entity
,
listener
,
callback
);
break
;
break
;
#endif
default
:
default
:
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"不支持加载"
+
entity
.
adPlatform
+
"的Splash广告"
);
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"不支持加载"
+
entity
.
adPlatform
+
"的Splash广告"
);
callback
(
false
);
callback
(
false
);
...
@@ -1146,6 +1148,7 @@ public class AdManager
...
@@ -1146,6 +1148,7 @@ public class AdManager
//广点通激励视频广告加载
//广点通激励视频广告加载
GDTRewardAdUtil
.
Instance
.
LoadCacheRewardAd
(
entity
,
callback
);
GDTRewardAdUtil
.
Instance
.
LoadCacheRewardAd
(
entity
,
callback
);
break
;
break
;
#if UNITY_ANDROID
case
ZXADConfig
.
PLANTFORM_AD_YLB
:
case
ZXADConfig
.
PLANTFORM_AD_YLB
:
//优良宝激励视频广告加载
//优良宝激励视频广告加载
YLBRewardAdUtil
.
Instance
.
LoadCacheRewardAd
(
entity
,
callback
);
YLBRewardAdUtil
.
Instance
.
LoadCacheRewardAd
(
entity
,
callback
);
...
@@ -1154,6 +1157,7 @@ public class AdManager
...
@@ -1154,6 +1157,7 @@ public class AdManager
case
ZXADConfig
.
PLANTFORM_AD_FS
:
case
ZXADConfig
.
PLANTFORM_AD_FS
:
FSRewardUtils
.
Instance
.
LoadCacheRewardAd
(
entity
,
callback
);
FSRewardUtils
.
Instance
.
LoadCacheRewardAd
(
entity
,
callback
);
break
;
break
;
#endif
default
:
default
:
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"不支持加载"
+
entity
.
adPlatform
+
"的激励视频广告"
);
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"不支持加载"
+
entity
.
adPlatform
+
"的激励视频广告"
);
callback
(
null
);
callback
(
null
);
...
@@ -1257,6 +1261,7 @@ public class AdManager
...
@@ -1257,6 +1261,7 @@ public class AdManager
//广点通激励视频广告播放
//广点通激励视频广告播放
GDTRewardAdUtil
.
Instance
.
playCacheRewardAd
(
entity
,
listener
,
callback
);
GDTRewardAdUtil
.
Instance
.
playCacheRewardAd
(
entity
,
listener
,
callback
);
break
;
break
;
#if UNITY_ANDROID
case
ZXADConfig
.
PLANTFORM_AD_YLB
:
case
ZXADConfig
.
PLANTFORM_AD_YLB
:
//优良宝激励视频广告播放
//优良宝激励视频广告播放
YLBRewardAdUtil
.
Instance
.
playCacheRewardAd
(
entity
,
listener
,
callback
);
YLBRewardAdUtil
.
Instance
.
playCacheRewardAd
(
entity
,
listener
,
callback
);
...
@@ -1265,6 +1270,7 @@ public class AdManager
...
@@ -1265,6 +1270,7 @@ public class AdManager
case
ZXADConfig
.
PLANTFORM_AD_FS
:
case
ZXADConfig
.
PLANTFORM_AD_FS
:
FSRewardUtils
.
Instance
.
playCacheRewardAd
(
entity
,
listener
,
callback
);
FSRewardUtils
.
Instance
.
playCacheRewardAd
(
entity
,
listener
,
callback
);
break
;
break
;
#endif
default
:
default
:
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"不支持Show"
+
entity
.
adPlatform
+
"的激励视频广告"
);
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"不支持Show"
+
entity
.
adPlatform
+
"的激励视频广告"
);
callback
(
false
);
callback
(
false
);
...
...
Assets/AdSDK/AD/CSJ/CSJRewardUtil.cs
View file @
797e4297
...
@@ -145,7 +145,7 @@ public class CSJRewardUtil
...
@@ -145,7 +145,7 @@ public class CSJRewardUtil
#if UNITY_IOS
#if UNITY_IOS
EventUtils
.
onEventPullSuccess
(
entity
);
EventUtils
.
onEventPullSuccess
(
entity
);
this
.
csjAD
.
SetRewardVideoAdForIOS
(
entity
.
codeGroup
+
entity
.
slotName
,
ad
);
this
.
csjAD
.
SetRewardVideoAdForIOS
(
entity
.
codeGroup
+
entity
.
slotName
,
ad
);
callback
(
true
);
callback
(
entity
);
#endif
#endif
}
}
...
...
Assets/AdSDK/AD/Funshion/FSRewardUtils.cs
View file @
797e4297
using
System
;
#
if
UNITY_ANDROID
using
System
;
using
System.Collections
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine
;
...
@@ -198,3 +199,4 @@ public class FSRewardUtils
...
@@ -198,3 +199,4 @@ public class FSRewardUtils
}
}
}
}
#
endif
\ No newline at end of file
Assets/AdSDK/AD/YLB/YlbDemo/YLBRewardAdUtil.cs
View file @
797e4297
using
System
;
#
if
UNITY_ANDROID
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine
;
...
@@ -191,3 +192,4 @@ public class YLBRewardAdUtil
...
@@ -191,3 +192,4 @@ public class YLBRewardAdUtil
}
}
}
}
#
endif
\ No newline at end of file
Assets/AdSDK/AD/ZXHC/ZXHCDemo/Example.cs
View file @
797e4297
using
System
;
#
if
UNITY_ANDROID
using
System
;
using
System.Collections
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine
;
...
@@ -85,4 +86,4 @@ namespace ZXHC
...
@@ -85,4 +86,4 @@ namespace ZXHC
}
}
}
}
#endif
Assets/AdSDK/AD/ZXHC/ZXHCDemo/ZXHCSplashUtil.cs
View file @
797e4297
using
System
;
#
if
UNITY_ANDROID
using
System
;
using
System.Collections
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine
;
...
@@ -102,3 +103,4 @@ public class ZXHCSplashUtil
...
@@ -102,3 +103,4 @@ public class ZXHCSplashUtil
}
}
#
endif
\ No newline at end of file
Assets/AdSDK/InitProject/Scripts/InitProject.cs
View file @
797e4297
...
@@ -3,6 +3,7 @@ using System;
...
@@ -3,6 +3,7 @@ using System;
using
System.Collections
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Runtime.InteropServices
;
using
UnityEngine
;
using
UnityEngine
;
using
UnityEngine.Android
;
using
UnityEngine.Android
;
using
UnityEngine.SceneManagement
;
using
UnityEngine.SceneManagement
;
...
@@ -14,7 +15,29 @@ public class InitProject : MonoBehaviour
...
@@ -14,7 +15,29 @@ public class InitProject : MonoBehaviour
"android.permission.WRITE_EXTERNAL_STORAGE"
,
"android.permission.WRITE_EXTERNAL_STORAGE"
,
"android.permission.READ_EXTERNAL_STORAGE"
,
"android.permission.READ_EXTERNAL_STORAGE"
,
};
};
// Start is called before the first frame update
private
bool
haveNet
;
#if !UNITY_EDITOR && UNITY_IOS
[
DllImport
(
"__Internal"
)]
public
static
extern
void
InitUMSDK
(
string
appKey
);
// ios初始化友盟SDK
#endif
private
void
Awake
()
{
Application
.
targetFrameRate
=
60
;
#if UNITY_IOS
//PingNetAddress();
StartCoroutine
(
CheckNetStatus
());
#endif
#if !UNITY_EDITOR && UNITY_IOS
// 初始化友盟sdk
InitUMSDK
(
"608785185844f15425ecd61a"
);
#endif
}
void
Start
()
void
Start
()
{
{
#if UNITY_ANDROID
#if UNITY_ANDROID
...
@@ -23,16 +46,20 @@ public class InitProject : MonoBehaviour
...
@@ -23,16 +46,20 @@ public class InitProject : MonoBehaviour
OaidUtil
.
GetOaid
(
new
Action
<
string
>((
oaid
)
=>
{
OaidUtil
.
GetOaid
(
new
Action
<
string
>((
oaid
)
=>
{
ZXHCUtils
.
SetDeviceOaid
(
oaid
);
ZXHCUtils
.
SetDeviceOaid
(
oaid
);
}));
}));
#elif UNITY_IOS
StartCoroutine
(
StartApp
());
#endif
#endif
}
}
private
void
Awake
()
{
//StartCoroutine(loadScene());
}
private
IEnumerator
StartApp
()
private
IEnumerator
StartApp
()
{
{
#if UNITY_IOS
while
(!
haveNet
)
{
yield
return
new
WaitForSeconds
(
0.5f
);
}
#endif
yield
return
GetPermission
();
yield
return
GetPermission
();
#if UNITY_ANDROID && !UNITY_EDITOR
#if UNITY_ANDROID && !UNITY_EDITOR
//Android初始化参数
//Android初始化参数
...
@@ -46,6 +73,9 @@ public class InitProject : MonoBehaviour
...
@@ -46,6 +73,9 @@ public class InitProject : MonoBehaviour
if
(
IsOk
())
if
(
IsOk
())
{
{
Debug
.
unityLogger
.
Log
(
"huangjunhui load "
,
"2 校验 签名 结束 开始 加载场景"
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
Debug
.
unityLogger
.
Log
(
"huangjunhui load "
,
"2 校验 签名 结束 开始 加载场景"
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
#if UNITY_IOS
Gettd
();
#endif
}
}
else
else
{
{
...
@@ -53,7 +83,72 @@ public class InitProject : MonoBehaviour
...
@@ -53,7 +83,72 @@ public class InitProject : MonoBehaviour
}
}
}
}
#if UNITY_IOS
[
DllImport
(
"__Internal"
)]
private
static
extern
void
ShowIOSNoWebAlert
();
IEnumerator
CheckNetStatus
()
{
#if UNITY_EDITOR
haveNet
=
false
;
yield
return
new
WaitForSeconds
(
0
);
haveNet
=
true
;
#endif
bool
didShowAlert
=
false
;
while
(!
haveNet
)
{
if
(
Application
.
internetReachability
==
NetworkReachability
.
NotReachable
)
{
if
(!
didShowAlert
)
{
ShowIOSNoWebAlert
();
didShowAlert
=
true
;
}
Debug
.
Log
(
"网络连接不可用"
);
haveNet
=
false
;
}
else
{
Debug
.
Log
(
"网络连接正常"
);
haveNet
=
true
;
}
yield
return
new
WaitForSeconds
(
0.1f
);
}
}
/// <summary>
/// iOS 获取IDFA方法, 原生调用
/// </summary>
/// <param name="str"></param>
public
void
SetIDFA
(
string
str
)
{
Debug
.
Log
(
"IDFA = "
+
str
);
UserInfoManager
.
Instance
().
idfa
=
str
;
}
/// <summary>
/// iOS 获取UDID方法, 原生调用
/// </summary>
/// <param name="str"></param>
public
void
SetUDID
(
string
str
)
{
Debug
.
Log
(
"UDID = "
+
str
);
UserInfoManager
.
Instance
().
udid
=
str
;
}
#endif
public
object
GetPermission
()
public
object
GetPermission
()
{
{
...
@@ -101,7 +196,13 @@ public class InitProject : MonoBehaviour
...
@@ -101,7 +196,13 @@ public class InitProject : MonoBehaviour
Debug
.
unityLogger
.
Log
(
"huangjunhui load "
,
"5 加载splash场景 "
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
Debug
.
unityLogger
.
Log
(
"huangjunhui load "
,
"5 加载splash场景 "
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
}));
}));
#else
#else
callback
(
"不支持"
);
////加载游戏场景
SceneManager
.
LoadSceneAsync
(
1
);
//if (async2 != null)
//{
// async2.allowSceneActivation = true;
//}
EventUtils
.
OnEvent
(
"app_start"
);
#endif
#endif
}
}
...
@@ -130,6 +231,8 @@ public class InitProject : MonoBehaviour
...
@@ -130,6 +231,8 @@ public class InitProject : MonoBehaviour
int
hashCode
=
Signatures
[
0
].
Call
<
int
>(
"hashCode"
);
int
hashCode
=
Signatures
[
0
].
Call
<
int
>(
"hashCode"
);
return
hashCode
==
1068458861
;
//我们签名的哈希值
return
hashCode
==
1068458861
;
//我们签名的哈希值
}
}
#elif UNITY_IOS
return
true
;
#endif
#endif
return
false
;
return
false
;
}
}
...
...
Assets/AdSDK/NetWork/HTTP/EncryptHelper.cs
View file @
797e4297
...
@@ -245,6 +245,31 @@ namespace EncryptHelper
...
@@ -245,6 +245,31 @@ namespace EncryptHelper
return
Encoding
.
UTF8
.
GetString
(
original
);
return
Encoding
.
UTF8
.
GetString
(
original
);
}
}
/// <summary>
/// MD5加密
/// </summary>
/// <param name="value">需要加密字符串</param>
/// <returns>返回32位大写字符</returns>
public
static
string
MD5Encrypt
(
string
value
)
{
//将输入字符串转换成字节数组 ANSI代码页编码
var
buffer
=
Encoding
.
Default
.
GetBytes
(
value
);
//接着,创建Md5对象进行散列计算
var
data
=
MD5
.
Create
().
ComputeHash
(
buffer
);
//创建一个新的Stringbuilder收集字节
var
sb
=
new
StringBuilder
();
//遍历每个字节的散列数据
foreach
(
var
t
in
data
)
{
//转换大写十六进制字符串
// X2 大写
// x2 小写
sb
.
Append
(
t
.
ToString
(
"x2"
));
}
//返回十六进制字符串
return
sb
.
ToString
();
}
public
static
string
ADCSD
(
string
v
,
string
v2
)
public
static
string
ADCSD
(
string
v
,
string
v2
)
{
{
string
value
;
string
value
;
...
...
Assets/AdSDK/NetWork/HTTP/HttpTool.cs
View file @
797e4297
...
@@ -19,7 +19,11 @@ public class HttpTool : MonoBehaviour
...
@@ -19,7 +19,11 @@ public class HttpTool : MonoBehaviour
public
bool
IsShowLog
=
false
;
public
bool
IsShowLog
=
false
;
private
static
string
HttpLogTag
=
"UnityHttp"
;
private
static
string
HttpLogTag
=
"UnityHttp"
;
#if UNITY_IOS
private
string
appLs
=
"1ea6df1a7869ab78"
;
#elif UNITY_ANDROID
private
string
appLs
=
"c4f628fe0c45566f"
;
private
string
appLs
=
"c4f628fe0c45566f"
;
#endif
private
static
HttpTool
_instacne
=
null
;
private
static
HttpTool
_instacne
=
null
;
...
@@ -319,53 +323,43 @@ public class HttpTool : MonoBehaviour
...
@@ -319,53 +323,43 @@ public class HttpTool : MonoBehaviour
#if UNITY_IOS
#if UNITY_IOS
//paragrams.Add("pkg", "com.ym.animalspa");
paragrams
[
"pkg"
]
=
Application
.
identifier
;
//paragrams.Add("appLs", appLs);
paragrams
[
"appLs"
]
=
appLs
;
//paragrams.Add("ts", UserInfoManager.getInstance().GetTimeStamp());
paragrams
[
"ts"
]
=
UserInfoManager
.
Instance
().
GetTimeStamp
();
//paragrams.Add("platform", "ios");
paragrams
[
"platform"
]
=
"ios"
;
//paragrams.Add("source", "AppStore");
paragrams
[
"source"
]
=
"AppStore"
;
//paragrams.Add("module", "behavior");
paragrams
[
"module"
]
=
"behavior"
;
//paragrams.Add("ua", "Safari");
paragrams
[
"ntt"
]
=
"4G"
;
//paragrams.Add("ntt", "4G");
if
(
UserInfoManager
.
Instance
().
udid
.
Length
>
0
)
////paragrams.Add("device", "d0ff4c9b53d1688fc81ce8d730b2989a");
{
//if (UserInfoManager.getInstance().udid.Length > 0)
paragrams
[
"device"
]
=
UserInfoManager
.
Instance
().
udid
;
//{
}
// paragrams.Add("device", UserInfoManager.getInstance().udid);
if
(
UserInfoManager
.
Instance
().
build
.
Length
>
0
)
//}
{
//if (UserInfoManager.getInstance().build.Length > 0)
paragrams
[
"vc"
]
=
UserInfoManager
.
Instance
().
build
;
//{
}
// paragrams.Add("vc", UserInfoManager.getInstance().build);
if
(
UserInfoManager
.
Instance
().
version
.
Length
>
0
)
//}
{
//if (UserInfoManager.getInstance().version.Length > 0)
paragrams
[
"vn"
]
=
UserInfoManager
.
Instance
().
version
;
//{
}
// paragrams.Add("vn", UserInfoManager.getInstance().version);
if
(
UserInfoManager
.
Instance
().
idfa
.
Length
>
0
)
//}
{
//if (UserInfoManager.getInstance().idfa.Length > 0)
paragrams
[
"idfa"
]
=
UserInfoManager
.
Instance
().
idfa
;
//{
}
// paragrams.Add("idfa", UserInfoManager.getInstance().idfa);
if
(
PrefenceUtils
.
GetInstance
().
getToken
().
Length
>
0
)
//}
{
//if (UserInfoManager.getInstance().token.Length > 0)
paragrams
[
"token"
]
=
PrefenceUtils
.
GetInstance
().
getToken
();
//{
}
// paragrams.Add("token", UserInfoManager.getInstance().token);
if
(
IS_TGYZ
)
//}
{
//if (UserInfoManager.getInstance().uid > 0)
paragrams
[
"zygt"
]
=
"hzwz"
;
//{
paragrams
[
"tgtk"
]
=
"1"
;
// paragrams.Add("uid", UserInfoManager.getInstance().uid + "");
paragrams
[
"uid"
]
=
"1"
;
//}
}
else
//if (IS_TGYZ)
{
paragrams
[
"uid"
]
=
PrefenceUtils
.
GetInstance
().
getUid
();
//{
}
// paragrams["zygt"] = "hzwz";
// paragrams["tgtk"] = "1";
//}
//string signString = signParamsWithDict(paragrams);
//paragrams.Add("sign", signString);
#elif UNITY_ANDROID
#elif UNITY_ANDROID
if
(
IS_TGYZ
)
if
(
IS_TGYZ
)
...
@@ -414,10 +408,9 @@ public class HttpTool : MonoBehaviour
...
@@ -414,10 +408,9 @@ public class HttpTool : MonoBehaviour
paragrams
[
"platform"
]
=
"android"
;
paragrams
[
"platform"
]
=
"android"
;
paragrams
[
"source"
]
=
PrefenceUtils
.
GetInstance
().
getSource
();
paragrams
[
"source"
]
=
PrefenceUtils
.
GetInstance
().
getSource
();
paragrams
[
"ua"
]
=
PrefenceUtils
.
GetInstance
().
getUA
();
paragrams
[
"ua"
]
=
PrefenceUtils
.
GetInstance
().
getUA
();
#endif
string
signString
=
signParamsWithDict
(
paragrams
);
string
signString
=
signParamsWithDict
(
paragrams
);
paragrams
[
"sign"
]
=
signString
;
paragrams
[
"sign"
]
=
signString
;
#endif
...
@@ -510,7 +503,7 @@ public class HttpTool : MonoBehaviour
...
@@ -510,7 +503,7 @@ public class HttpTool : MonoBehaviour
return
""
;
return
""
;
#endif
#endif
}
}
#endregion
#
endregion
}
}
Assets/AdSDK/NetWork/HTTP/UserInfoManager.cs
0 → 100644
View file @
797e4297
using
LitJson
;
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
System
;
using
System.Text
;
using
System.IO
;
// 用户单例
public
class
UserInfoManager
:
MonoBehaviour
{
private
static
UserInfoManager
instance
;
public
static
UserInfoManager
Instance
()
{
if
(
instance
==
null
)
{
GameObject
obj
=
new
GameObject
();
// 设置对象名字为脚本名
obj
.
name
=
typeof
(
UserInfoManager
).
ToString
();
// 让这个单例模式对象 切换场景不移除
DontDestroyOnLoad
(
obj
);
instance
=
obj
.
AddComponent
<
UserInfoManager
>();
}
return
instance
;
}
// 钻石
public
int
avaDiamond
=
0
;
// 金币
public
int
avaCoin
=
0
;
// UDID
public
string
udid
=
"udid"
;
// IDFA
public
string
idfa
=
""
;
public
string
token
=
""
;
public
string
uid
=
""
;
public
string
build
=
"1"
;
public
string
version
=
"1.0.0"
;
public
int
shubiao
;
// 0 shen 1 tou
public
bool
isBind
=
false
;
// 是否绑定wx
// public void touristLogin(Action<string> success, Action<string> fail)
// {
// NetworkTool.Instance().Post(HttpManager.URL_TOURIST_LOGIN, null, new Action<string, LoginResult>((res, model) => {
// this.token = model.token;
// this.uid = model.uid + "";
// success(res);
// AppInfo();
// }), new Action<string>((error) => {
// fail(error);
// AppInfo();
// }));
// }
// public void AppInfo()
// {
// NetworkTool.Instance().GET(HttpManager.URL_INFO, null, new Action<string, AppInfoResult>((res, model) => {
// shubiao = model.sdgowi["shubiao"];
//#if UNITY_ANDROID
// shubiao = 1;
//#endif
// IsBindWx();
// }), new Action<string>((error) => {
// IsBindWx();
// }));
// }
// public void IsBindWx()
// {
// NetworkTool.Instance().GET(HttpManager.URL_IS_BIND_WX, null, new Action<string, AppInfoBind>((res, model) => {
// isBind = model.isBind;
// Messenger.Broadcast("RefreshWXBind");
// }), new Action<string>((error) => {
// Messenger.Broadcast("RefreshWXBind");
// }));
// }
// 随机code
public
string
CreateRandomCode
()
{
string
str
=
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
;
char
[]
chars
=
str
.
ToCharArray
();
StringBuilder
strRan
=
new
StringBuilder
();
System
.
Random
ran
=
new
System
.
Random
();
for
(
int
i
=
0
;
i
<
16
;
i
++)
{
strRan
.
Append
(
chars
[
ran
.
Next
(
0
,
62
)]);
}
return
strRan
.
ToString
();
}
// 时间戳毫秒
public
string
GetTimeStamp
()
{
TimeSpan
ts
=
DateTime
.
Now
-
new
DateTime
(
1970
,
1
,
1
,
0
,
0
,
0
,
0
);
string
time
=
Convert
.
ToInt64
(
ts
.
TotalSeconds
-
8
*
3600
).
ToString
()
+
"000"
;
return
time
;
}
// 时间戳秒
public
string
TimeSecond
()
{
TimeSpan
ts
=
DateTime
.
Now
-
new
DateTime
(
1970
,
1
,
1
,
0
,
0
,
0
,
0
);
string
time
=
Convert
.
ToInt64
(
ts
.
TotalSeconds
-
8
*
3600
).
ToString
();
return
time
;
}
}
Assets/AdSDK/NetWork/HTTP/UserInfoManager.cs.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: ea02560b34b8f4fc488675d20d088960
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Scripts/Model/AppInfoBean.cs
View file @
797e4297
...
@@ -14,6 +14,8 @@ public class AppInfoBean
...
@@ -14,6 +14,8 @@ public class AppInfoBean
///
///
/// </summary>
/// </summary>
public
@switch
@switch
{
get
;
set
;
}
public
@switch
@switch
{
get
;
set
;
}
public
sdgowi
sdgowi
;
}
}
public
class
H5_url
public
class
H5_url
{
{
...
@@ -38,3 +40,8 @@ public class @switch
...
@@ -38,3 +40,8 @@ public class @switch
/// </summary>
/// </summary>
public
int
qq
{
get
;
set
;
}
public
int
qq
{
get
;
set
;
}
}
}
public
class
sdgowi
{
public
int
vc
;
}
Assets/Game/Main/Scripts/Utils/WxLoginUtil.cs
View file @
797e4297
...
@@ -4,6 +4,8 @@ using UnityEngine;
...
@@ -4,6 +4,8 @@ using UnityEngine;
using
System
;
using
System
;
using
DG.Tweening
;
using
DG.Tweening
;
using
LitJson
;
using
LitJson
;
using
System.Runtime.InteropServices
;
public
class
WxLoginUtil
:
MonoBehaviour
public
class
WxLoginUtil
:
MonoBehaviour
{
{
public
GameObject
wxLoginBg
;
public
GameObject
wxLoginBg
;
...
@@ -12,6 +14,18 @@ public class WxLoginUtil : MonoBehaviour
...
@@ -12,6 +14,18 @@ public class WxLoginUtil : MonoBehaviour
private
static
string
WX_APPID
=
"wxeb614acc314efbfb"
;
private
static
string
WX_APPID
=
"wxeb614acc314efbfb"
;
private
static
string
WX_APPKEY
=
"89abbb00107cc6255198cf1285181b4e"
;
private
static
string
WX_APPKEY
=
"89abbb00107cc6255198cf1285181b4e"
;
#if UNITY_IOS
private
static
string
state
=
"ioswdlcWxLog"
;
private
static
string
universalLink
=
"https://feedapi.zhangxineducation.com/ioswdlc/"
;
//判断微信是否安装
[
DllImport
(
"__Internal"
)]
private
static
extern
bool
_isWechatInstalled
();
[
DllImport
(
"__Internal"
)]
private
static
extern
void
_WechatLogin
(
string
appid
,
string
state
,
string
universalLink
);
#endif
private
void
Awake
()
private
void
Awake
()
{
{
Screen
.
sleepTimeout
=
SleepTimeout
.
NeverSleep
;
Screen
.
sleepTimeout
=
SleepTimeout
.
NeverSleep
;
...
@@ -33,6 +47,16 @@ public class WxLoginUtil : MonoBehaviour
...
@@ -33,6 +47,16 @@ public class WxLoginUtil : MonoBehaviour
//callBack = wxLoginCallBack;
//callBack = wxLoginCallBack;
//DeviceLogin();
//DeviceLogin();
#if UNITY_IOS
if
(
UserInfoManager
.
Instance
().
shubiao
==
0
)
{
callBack
=
wxLoginCallBack
;
DeviceLogin
();
wxLoginBg
.
SetActive
(
false
);
return
;
}
#endif
//Android打包
//Android打包
//Token为null 没有登录
//Token为null 没有登录
if
(
PrefenceUtils
.
GetInstance
().
getToken
().
Equals
(
""
))
if
(
PrefenceUtils
.
GetInstance
().
getToken
().
Equals
(
""
))
...
@@ -67,23 +91,68 @@ public class WxLoginUtil : MonoBehaviour
...
@@ -67,23 +91,68 @@ public class WxLoginUtil : MonoBehaviour
}
}
#if UNITY_EDITOR
#if UNITY_EDITOR
DeviceLogin
();
DeviceLogin
();
// BingWxLogin("061QyXFa1x7zSA0WBoGa1Ttfob0QyXFa");
// BingWxLogin("061QyXFa1x7zSA0WBoGa1Ttfob0QyXFa");
#el
se
#el
if UNITY_ANDROID
CallLocalFunUtil
.
Instance
.
WxLogin
();
CallLocalFunUtil
.
Instance
.
WxLogin
();
#elif UNITY_IOS
SendWxLogin
();
#endif
#endif
EventUtils
.
OnEvent
(
"login_click"
);
EventUtils
.
OnEvent
(
"login_click"
);
}
}
#if UNITY_IOS
/// <summary>
/// iOS 微信登录
/// </summary>
public
void
SendWxLogin
()
{
bool
isInstalled
=
false
;
isInstalled
=
_isWechatInstalled
();
if
(
isInstalled
)
{
_WechatLogin
(
WX_APPID
,
state
,
universalLink
);
}
else
{
Debug
.
Log
(
"请先安装微信客户端!"
);
}
}
/// <summary>
/// iOS微信登录回调
/// </summary>
/// <param name="msg"></param>
public
void
LoginCallBack
(
string
msg
)
{
Debug
.
Log
(
"微信登录的回调在这里: "
+
msg
);
// 051AdH000dJnkL1KyK300KeBye2AdH0d
BingWxLogin
(
msg
);
}
#endif
#if UNITY_IOS
[
DllImport
(
"__Internal"
)]
private
static
extern
void
ShowIOSWebView
(
string
urlStr
,
string
titleStr
);
#endif
public
void
OnClickUserAgreement
()
public
void
OnClickUserAgreement
()
{
{
Debug
.
unityLogger
.
Log
(
"用户协议"
);
Debug
.
unityLogger
.
Log
(
"用户协议"
);
#if UNITY_IOS
ShowIOSWebView
(
PlayerDataControl
.
Instance
.
UserAgreementUrl
,
"用户协议"
);
#elif UNITY_ANDROID
CallLocalFunUtil
.
Instance
.
OpenWebPage
(
PlayerDataControl
.
Instance
.
UserAgreementUrl
,
"用户协议"
);
CallLocalFunUtil
.
Instance
.
OpenWebPage
(
PlayerDataControl
.
Instance
.
UserAgreementUrl
,
"用户协议"
);
#endif
}
}
public
void
OnClickPrivacyPolicy
()
public
void
OnClickPrivacyPolicy
()
{
{
Debug
.
unityLogger
.
Log
(
"隐私协议"
);
Debug
.
unityLogger
.
Log
(
"隐私协议"
);
#if UNITY_IOS
ShowIOSWebView
(
PlayerDataControl
.
Instance
.
PrivacyPolicyUrl
,
"隐私协议"
);
#elif UNITY_ANDROID
CallLocalFunUtil
.
Instance
.
OpenWebPage
(
PlayerDataControl
.
Instance
.
PrivacyPolicyUrl
,
"隐私协议"
);
CallLocalFunUtil
.
Instance
.
OpenWebPage
(
PlayerDataControl
.
Instance
.
PrivacyPolicyUrl
,
"隐私协议"
);
#endif
}
}
/// <summary>
/// <summary>
/// 微信绑定成功
/// 微信绑定成功
...
...
Assets/Game/Main/Scripts/View/SettingControl.cs
View file @
797e4297
using
System
;
using
System
;
using
System.Collections
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Runtime.InteropServices
;
using
UnityEngine
;
using
UnityEngine
;
using
UnityEngine.Networking
;
using
UnityEngine.Networking
;
using
UnityEngine.UI
;
using
UnityEngine.UI
;
...
@@ -94,24 +95,41 @@ public class SettingControl : MonoBehaviour
...
@@ -94,24 +95,41 @@ public class SettingControl : MonoBehaviour
PlayerPrefs
.
SetInt
(
NotifIsOpen
,
0
);
PlayerPrefs
.
SetInt
(
NotifIsOpen
,
0
);
}
}
#if UNITY_IOS
[
DllImport
(
"__Internal"
)]
private
static
extern
void
ShowIOSWebView
(
string
urlStr
,
string
titleStr
);
#endif
public
void
OnClickUserAgreement
()
public
void
OnClickUserAgreement
()
{
{
AudioUtils
.
ins
.
PlayBtnAudio
();
AudioUtils
.
ins
.
PlayBtnAudio
();
Debug
.
unityLogger
.
Log
(
"用户协议"
);
Debug
.
unityLogger
.
Log
(
"用户协议"
);
#if UNITY_IOS
ShowIOSWebView
(
PlayerDataControl
.
Instance
.
UserAgreementUrl
,
"用户协议"
);
#elif UNITY_ANDROID
CallLocalFunUtil
.
Instance
.
OpenWebPage
(
PlayerDataControl
.
Instance
.
UserAgreementUrl
,
"用户协议"
);
CallLocalFunUtil
.
Instance
.
OpenWebPage
(
PlayerDataControl
.
Instance
.
UserAgreementUrl
,
"用户协议"
);
#endif
}
}
public
void
OnClickPrivacyPolicy
()
public
void
OnClickPrivacyPolicy
()
{
{
AudioUtils
.
ins
.
PlayBtnAudio
();
AudioUtils
.
ins
.
PlayBtnAudio
();
Debug
.
unityLogger
.
Log
(
"隐私协议"
);
Debug
.
unityLogger
.
Log
(
"隐私协议"
);
#if UNITY_IOS
ShowIOSWebView
(
PlayerDataControl
.
Instance
.
PrivacyPolicyUrl
,
"隐私协议"
);
#elif UNITY_ANDROID
CallLocalFunUtil
.
Instance
.
OpenWebPage
(
PlayerDataControl
.
Instance
.
PrivacyPolicyUrl
,
"隐私协议"
);
CallLocalFunUtil
.
Instance
.
OpenWebPage
(
PlayerDataControl
.
Instance
.
PrivacyPolicyUrl
,
"隐私协议"
);
#endif
}
}
public
void
OnClicAboutUs
()
public
void
OnClicAboutUs
()
{
{
AudioUtils
.
ins
.
PlayBtnAudio
();
AudioUtils
.
ins
.
PlayBtnAudio
();
Debug
.
unityLogger
.
Log
(
"关于我们"
);
Debug
.
unityLogger
.
Log
(
"关于我们"
);
#if UNITY_IOS
ShowIOSWebView
(
PlayerDataControl
.
Instance
.
AboutUsUrl
,
"关于我们"
);
#elif UNITY_ANDROID
CallLocalFunUtil
.
Instance
.
OpenWebPage
(
PlayerDataControl
.
Instance
.
AboutUsUrl
,
"关于我们"
);
CallLocalFunUtil
.
Instance
.
OpenWebPage
(
PlayerDataControl
.
Instance
.
AboutUsUrl
,
"关于我们"
);
#endif
}
}
public
void
OnclickLoginOut
()
public
void
OnclickLoginOut
()
{
{
...
...
Assets/Game/Splash/Splash.cs
View file @
797e4297
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
using
System.Collections
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Runtime.InteropServices
;
using
System.Threading
;
using
System.Threading
;
using
LitJson
;
using
LitJson
;
using
Umeng
;
using
Umeng
;
...
@@ -104,7 +105,11 @@ public class Splash : MonoBehaviour
...
@@ -104,7 +105,11 @@ public class Splash : MonoBehaviour
Debug
.
unityLogger
.
Log
(
"huangjunhui load "
,
"5 加载splash场景 "
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
Debug
.
unityLogger
.
Log
(
"huangjunhui load "
,
"5 加载splash场景 "
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
}));
}));
#else
#else
callback
(
"不支持"
);
////加载游戏场景
//SceneManager.LoadSceneAsync(1);
EventUtils
.
OnEvent
(
"app_start"
);
Debug
.
unityLogger
.
Log
(
"huangjunhui load "
,
"5 加载splash场景 "
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
#endif
#endif
}
}
...
@@ -183,40 +188,84 @@ public class Splash : MonoBehaviour
...
@@ -183,40 +188,84 @@ public class Splash : MonoBehaviour
PlayerDataControl
.
Instance
.
PrivacyPolicyUrl
=
bean
.
h5_url
.
privacy
;
PlayerDataControl
.
Instance
.
PrivacyPolicyUrl
=
bean
.
h5_url
.
privacy
;
PlayerDataControl
.
Instance
.
MyQQ
=
bean
.
@switch
.
qq
.
ToString
();
PlayerDataControl
.
Instance
.
MyQQ
=
bean
.
@switch
.
qq
.
ToString
();
#if UNITY_IOS
if
(
int
.
Parse
(
UserInfoManager
.
Instance
().
build
)
>=
bean
.
sdgowi
.
vc
)
{
UserInfoManager
.
Instance
().
shubiao
=
1
;
}
else
{
UserInfoManager
.
Instance
().
shubiao
=
0
;
}
#endif
//第一次进入app 显示协议弹窗
if
(
PlayerDataControl
.
Instance
.
GetIsShowDialog
())
{
// dialog.SetActive(true);
PlayerDataControl
.
Instance
.
SetIsShowDialog
();
LoadCacheAd
();
//登录
Login
();
}
else
{
//不是第一次 展示开屏
Debug
.
unityLogger
.
Log
(
"huangjunhui load "
,
"3 开始加载广告 "
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
AdManager
.
Instance
.
LoadSplashAd
(
new
SplshAdListener
());
LoadCacheAd
();
}
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
{
{
PlayerDataControl
.
Instance
.
MyQQ
=
"435749473335"
;
PlayerDataControl
.
Instance
.
MyQQ
=
"435749473335"
;
//第一次进入app 显示协议弹窗
if
(
PlayerDataControl
.
Instance
.
GetIsShowDialog
())
{
// dialog.SetActive(true);
PlayerDataControl
.
Instance
.
SetIsShowDialog
();
LoadCacheAd
();
//登录
Login
();
}
else
{
//不是第一次 展示开屏
Debug
.
unityLogger
.
Log
(
"huangjunhui load "
,
"3 开始加载广告 "
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
AdManager
.
Instance
.
LoadSplashAd
(
new
SplshAdListener
());
LoadCacheAd
();
}
}));
}));
//第一次进入app 显示协议弹窗
if
(
PlayerDataControl
.
Instance
.
GetIsShowDialog
())
{
// dialog.SetActive(true);
PlayerDataControl
.
Instance
.
SetIsShowDialog
();
LoadCacheAd
();
//登录
Login
();
}
else
{
//不是第一次 展示开屏
Debug
.
unityLogger
.
Log
(
"huangjunhui load "
,
"3 开始加载广告 "
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
AdManager
.
Instance
.
LoadSplashAd
(
new
SplshAdListener
());
LoadCacheAd
();
}
}
}
#if UNITY_IOS
[
DllImport
(
"__Internal"
)]
private
static
extern
void
ShowIOSWebView
(
string
urlStr
,
string
titleStr
);
#endif
public
void
OnClickUserAgreement
()
public
void
OnClickUserAgreement
()
{
{
Debug
.
unityLogger
.
Log
(
"用户协议"
);
Debug
.
unityLogger
.
Log
(
"用户协议"
);
#if UNITY_IOS
ShowIOSWebView
(
PlayerDataControl
.
Instance
.
UserAgreementUrl
,
"用户协议"
);
#elif UNITY_ANDROID
CallLocalFunUtil
.
Instance
.
OpenWebPage
(
PlayerDataControl
.
Instance
.
UserAgreementUrl
,
"用户协议"
);
CallLocalFunUtil
.
Instance
.
OpenWebPage
(
PlayerDataControl
.
Instance
.
UserAgreementUrl
,
"用户协议"
);
#endif
}
}
public
void
OnClickPrivacyPolicy
()
public
void
OnClickPrivacyPolicy
()
{
{
Debug
.
unityLogger
.
Log
(
"隐私协议"
);
Debug
.
unityLogger
.
Log
(
"隐私协议"
);
#if UNITY_IOS
ShowIOSWebView
(
PlayerDataControl
.
Instance
.
PrivacyPolicyUrl
,
"隐私协议"
);
#elif UNITY_ANDROID
CallLocalFunUtil
.
Instance
.
OpenWebPage
(
PlayerDataControl
.
Instance
.
PrivacyPolicyUrl
,
"隐私协议"
);
CallLocalFunUtil
.
Instance
.
OpenWebPage
(
PlayerDataControl
.
Instance
.
PrivacyPolicyUrl
,
"隐私协议"
);
#endif
}
}
/// <summary>
/// <summary>
...
...
Assets/Plugins/iOS/AD.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: 88cedd93143814b95b73a503645d0b9b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Plugins/iOS/AD/IOSADManager.h
0 → 100644
View file @
797e4297
//
// 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
Assets/Plugins/iOS/AD/IOSADManager.h.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: 5b6a371f436e0434c96e6f5089f57bfb
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:
Assets/Plugins/iOS/AD/IOSADManager.mm
0 → 100644
View file @
797e4297
//
// IOSADManager.m
// caiyuan
//
// Created by 张哲 on 2021/3/8.
//
#import "IOSADManager.h"
#import <BUAdSDK/BUAdSDK.h>
#import <UMCommon/UMCommon.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];
}
#if defined(__cplusplus)
}
#endif
@end
Assets/Plugins/iOS/AD/IOSADManager.mm.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: d6e0521b9d1e445d188514697e917d63
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:
Assets/Plugins/iOS/KeyChain.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: 13cfb14ab487b43abb55edac64a6258c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Plugins/iOS/KeyChain/BGKeychainTool.h
0 → 100644
View file @
797e4297
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface
BGKeychainTool
:
NSObject
/**
本方法是得到 UUID 后存入系统中的 keychain 的方法
不用添加 plist 文件
程序删除后重装,仍可以得到相同的唯一标示
但是当系统升级或者刷机后,系统中的钥匙串会被清空,此时本方法失效
*/
+
(
NSString
*
)
getDeviceIDInKeychain
;
@end
NS_ASSUME_NONNULL_END
Assets/Plugins/iOS/KeyChain/BGKeychainTool.h.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: aaf7a020319044d8cb7cc5a04711550d
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:
Assets/Plugins/iOS/KeyChain/BGKeychainTool.m
0 → 100644
View file @
797e4297
#import "BGKeychainTool.h"
@implementation
BGKeychainTool
+
(
NSString
*
)
getDeviceIDInKeychain
{
NSString
*
bundleId
=
[[
NSBundle
mainBundle
]
bundleIdentifier
];
NSString
*
getUDIDInKeychain
=
(
NSString
*
)[
BGKeychainTool
load
:
bundleId
];
// NSLog(@"从keychain中获取到的 UDID_INSTEAD %@",getUDIDInKeychain);
if
(
!
getUDIDInKeychain
||
[
getUDIDInKeychain
isEqualToString
:
@""
]
||
[
getUDIDInKeychain
isKindOfClass
:[
NSNull
class
]])
{
CFUUIDRef
puuid
=
CFUUIDCreate
(
nil
);
CFStringRef
uuidString
=
CFUUIDCreateString
(
nil
,
puuid
);
NSString
*
result
=
(
NSString
*
)
CFBridgingRelease
(
CFStringCreateCopy
(
NULL
,
uuidString
));
CFRelease
(
puuid
);
CFRelease
(
uuidString
);
// NSLog(@"\n \n \n _____重新存储 UUID _____\n \n \n %@",result);
[
BGKeychainTool
save
:
bundleId
data
:
result
];
getUDIDInKeychain
=
(
NSString
*
)[
BGKeychainTool
load
:
bundleId
];
}
// NSLog(@"最终 ———— UDID_INSTEAD %@",getUDIDInKeychain);
return
getUDIDInKeychain
;
}
+
(
NSMutableDictionary
*
)
getKeychainQuery
:
(
NSString
*
)
service
{
return
[
NSMutableDictionary
dictionaryWithObjectsAndKeys
:
(
id
)
kSecClassGenericPassword
,(
id
)
kSecClass
,
service
,
(
id
)
kSecAttrService
,
service
,
(
id
)
kSecAttrAccount
,
(
id
)
kSecAttrAccessibleAfterFirstUnlock
,(
id
)
kSecAttrAccessible
,
nil
];
}
+
(
void
)
save
:
(
NSString
*
)
service
data
:
(
id
)
data
{
NSMutableDictionary
*
keychainQuery
=
[
self
getKeychainQuery
:
service
];
SecItemDelete
((
CFDictionaryRef
)
keychainQuery
);
[
keychainQuery
setObject
:[
NSKeyedArchiver
archivedDataWithRootObject
:
data
]
forKey
:(
id
)
kSecValueData
];
SecItemAdd
((
CFDictionaryRef
)
keychainQuery
,
NULL
);
}
+
(
id
)
load
:
(
NSString
*
)
service
{
id
ret
=
nil
;
NSMutableDictionary
*
keychainQuery
=
[
self
getKeychainQuery
:
service
];
[
keychainQuery
setObject
:(
id
)
kCFBooleanTrue
forKey
:(
id
)
kSecReturnData
];
[
keychainQuery
setObject
:(
id
)
kSecMatchLimitOne
forKey
:(
id
)
kSecMatchLimit
];
CFDataRef
keyData
=
NULL
;
if
(
SecItemCopyMatching
((
CFDictionaryRef
)
keychainQuery
,
(
CFTypeRef
*
)
&
keyData
)
==
noErr
)
{
ret
=
[
NSKeyedUnarchiver
unarchiveObjectWithData
:(
__bridge
NSData
*
)
keyData
];
}
if
(
keyData
)
CFRelease
(
keyData
);
return
ret
;
}
+
(
void
)
delete
:
(
NSString
*
)
service
{
NSMutableDictionary
*
keychainQuery
=
[
self
getKeychainQuery
:
service
];
SecItemDelete
((
CFDictionaryRef
)
keychainQuery
);
}
@end
//这个方法是给unity调用的方法
const
char
*
Get_UUID_By_KeyChain
()
{
NSString
*
uuid
=
[
BGKeychainTool
getDeviceIDInKeychain
];
return
strdup
(
uuid
.
UTF8String
);
}
Assets/Plugins/iOS/KeyChain/BGKeychainTool.m.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: 740cd1c0d97714e3ba9b2b0175d9283e
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:
Assets/Plugins/iOS/KeyChain/KeychainItemManager.h
0 → 100644
View file @
797e4297
//
// KeychainItemManager.h
// ZhiJi
//
// Created by 明津李 on 2020/6/8.
// Copyright © 2020 Company. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface
KeychainItemManager
:
NSObject
+
(
void
)
readKeychainIDFA
;
@end
NS_ASSUME_NONNULL_END
Assets/Plugins/iOS/KeyChain/KeychainItemManager.h.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: e709e18322f6f4217b8a59cc2d311c46
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:
Assets/Plugins/iOS/KeyChain/KeychainItemManager.m
0 → 100644
View file @
797e4297
//
// KeychainItemManager.m
// ZhiJi
//
// Created by 明津李 on 2020/6/8.
// Copyright © 2020 Company. All rights reserved.
//
#import "KeychainItemManager.h"
#import <AdSupport/AdSupport.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>
#import "KeychainItemWrapper.h"
#import "UserData.h"
NSString
*
const
FCLogin
=
@"SKLogin"
;
NSString
*
const
FCIdentifier
=
@"SKIdentifier"
;
@implementation
KeychainItemManager
+
(
void
)
readKeychainIDFA
{
KeychainItemWrapper
*
keychain
=
[[
KeychainItemWrapper
alloc
]
initWithIdentifier
:
FCLogin
accessGroup
:
nil
];
UserData
*
data
=
[[
UserData
alloc
]
init
];
[
data
initPlist
];
[
keychain
setObject
:
@" "
forKey
:(
__bridge
id
)(
kSecAttrAccount
)];
[
keychain
setObject
:
@" "
forKey
:(
__bridge
id
)(
kSecValueData
)];
if
(
@available
(
iOS
14
,
*
))
{
[
ATTrackingManager
requestTrackingAuthorizationWithCompletionHandler
:
^
(
ATTrackingManagerAuthorizationStatus
status
)
{
NSLog
(
@"app追踪权限:%lu"
,(
unsigned
long
)
status
);
if
(
status
==
ATTrackingManagerAuthorizationStatusAuthorized
)
{
NSLog
(
@"用户同意广告追踪"
);
NSString
*
idfa
=
[[[
ASIdentifierManager
sharedManager
]
advertisingIdentifier
]
UUIDString
];
if
(
idfa
.
length
)
{
[
data
writeValue
:
idfa
Key
:
@"idfa"
];
}
}
}];
}
else
{
if
([[
ASIdentifierManager
sharedManager
]
isAdvertisingTrackingEnabled
]){
NSString
*
idfa
=
[[[
ASIdentifierManager
sharedManager
]
advertisingIdentifier
]
UUIDString
];
if
(
idfa
.
length
)
{
[
data
writeValue
:
idfa
Key
:
@"idfa"
];
}
}
else
{
NSLog
(
@"用户开启了限制广告追踪"
);
}
}
if
(
!
[
keychain
objectForKey
:(
__bridge
id
)
kSecAttrService
])
{
NSString
*
identifier
=
[
self
getUUID
];
if
(
identifier
.
length
==
0
)
{
identifier
=
@"identifier"
;
}
NSDictionary
*
dic
=
@{
FCIdentifier
:
identifier
};
NSString
*
infoStr
=
[
self
convertToJsonData
:
dic
];
[
keychain
setObject
:
infoStr
forKey
:(
__bridge
id
)
kSecAttrService
];
[
data
writeValue
:
identifier
Key
:
@"identifier"
];
}
else
{
NSString
*
infoStr
=
[
keychain
objectForKey
:(
__bridge
id
)
kSecAttrService
];
NSDictionary
*
infoDic
=
[
self
dictionaryWithJsonString
:
infoStr
];
if
(
infoDic
)
{
NSString
*
identifier
=
[
NSString
stringWithFormat
:
@"%@"
,
infoDic
[
FCIdentifier
]];
if
(
identifier
.
length
)
{
[
data
writeValue
:
identifier
Key
:
@"identifier"
];
}
}
}
}
+
(
void
)
removeKeychainIDFA
{
KeychainItemWrapper
*
keychain
=
[[
KeychainItemWrapper
alloc
]
initWithIdentifier
:
FCLogin
accessGroup
:
nil
];
[
keychain
resetKeychainItem
];
UserData
*
data
=
[[
UserData
alloc
]
init
];
[
data
removeValueForKey
:
FCIdentifier
];
}
+
(
NSString
*
)
getUUID
{
return
[
NSString
stringWithFormat
:
@"%@"
,[
self
UUID
]];
}
+
(
NSString
*
)
UUID
{
CFUUIDRef
uuid
=
CFUUIDCreate
(
NULL
);
assert
(
uuid
!=
NULL
);
CFStringRef
uuidStr
=
CFUUIDCreateString
(
NULL
,
uuid
);
return
(
__bridge
NSString
*
)(
uuidStr
);
}
+
(
NSString
*
)
getNickName
{
NSString
*
nickName
=
[
self
randomStringWithLength
:
10
];
return
[
NSString
stringWithFormat
:
@"%@"
,
nickName
];
}
+
(
NSString
*
)
randomStringWithLength
:
(
NSInteger
)
len
{
NSString
*
letters
=
@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
;
NSMutableString
*
randomString
=
[
NSMutableString
stringWithCapacity
:
len
];
for
(
NSInteger
i
=
0
;
i
<
len
;
i
++
)
{
int
idx
=
arc4random
()
%
letters
.
length
;
[
randomString
appendFormat
:
@"%c"
,
[
letters
characterAtIndex
:
idx
]];
}
return
randomString
;
}
+
(
NSString
*
)
convertToJsonData
:
(
NSDictionary
*
)
dict
{
NSError
*
error
;
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
dict
options
:
NSJSONWritingPrettyPrinted
error
:&
error
];
NSString
*
jsonString
;
if
(
!
jsonData
)
{
NSLog
(
@"%@"
,
error
);
}
else
{
jsonString
=
[[
NSString
alloc
]
initWithData
:
jsonData
encoding
:
NSUTF8StringEncoding
];
}
NSMutableString
*
mutStr
=
[
NSMutableString
stringWithString
:
jsonString
];
NSRange
range
=
{
0
,
jsonString
.
length
};
//去掉字符串中的空格
[
mutStr
replaceOccurrencesOfString
:
@" "
withString
:
@""
options
:
NSLiteralSearch
range
:
range
];
NSRange
range2
=
{
0
,
mutStr
.
length
};
//去掉字符串中的换行符
[
mutStr
replaceOccurrencesOfString
:
@"
\n
"
withString
:
@""
options
:
NSLiteralSearch
range
:
range2
];
return
mutStr
;
}
+
(
NSDictionary
*
)
dictionaryWithJsonString
:
(
NSString
*
)
jsonString
{
if
(
jsonString
==
nil
)
{
return
nil
;
}
NSData
*
jsonData
=
[
jsonString
dataUsingEncoding
:
NSUTF8StringEncoding
];
NSError
*
err
;
NSDictionary
*
dic
=
[
NSJSONSerialization
JSONObjectWithData
:
jsonData
options
:
NSJSONReadingMutableContainers
error
:&
err
];
if
(
err
)
{
NSLog
(
@"json解析失败:%@"
,
err
);
return
nil
;
}
return
dic
;
}
@end
Assets/Plugins/iOS/KeyChain/KeychainItemManager.m.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: aed2ca79005a14fc6bc0523079f6ce90
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
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:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
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:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:
Assets/Plugins/iOS/KeyChain/KeychainItemWrapper.h
0 → 100755
View file @
797e4297
/*
File: KeychainItemWrapper.h
Abstract:
Objective-C wrapper for accessing a single keychain item.
Version: 1.2
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of
this Apple software constitutes acceptance of these terms. If you do
not agree with these terms, please do not use, install, modify or
redistribute this Apple software.
In consideration of your agreement to abide by the following terms, and
subject to these terms, Apple grants you a personal, non-exclusive
license, under Apple's copyrights in this original Apple software (the
"Apple Software"), to use, reproduce, modify and redistribute the Apple
Software, with or without modifications, in source and/or binary forms;
provided that if you redistribute the Apple Software in its entirety and
without modifications, you must retain this notice and the following
text and disclaimers in all such redistributions of the Apple Software.
Neither the name, trademarks, service marks or logos of Apple Inc. may
be used to endorse or promote products derived from the Apple Software
without specific prior written permission from Apple. Except as
expressly stated in this notice, no other rights or licenses, express or
implied, are granted by Apple herein, including but not limited to any
patent rights that may be infringed by your derivative works or by other
works in which the Apple Software may be incorporated.
The Apple Software is provided by Apple on an "AS IS" basis. APPLE
MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Copyright (C) 2010 Apple Inc. All Rights Reserved.
*/
#import <UIKit/UIKit.h>
/*
The KeychainItemWrapper class is an abstraction layer for the iPhone Keychain communication. It is merely a
simple wrapper to provide a distinct barrier between all the idiosyncracies involved with the Keychain
CF/NS container objects.
*/
@interface
KeychainItemWrapper
:
NSObject
{
NSMutableDictionary
*
keychainItemData
;
// The actual keychain item data backing store.
NSMutableDictionary
*
genericPasswordQuery
;
// A placeholder for the generic keychain item query used to locate the item.
}
@property
(
nonatomic
,
retain
)
NSMutableDictionary
*
keychainItemData
;
@property
(
nonatomic
,
retain
)
NSMutableDictionary
*
genericPasswordQuery
;
// Designated initializer.
-
(
id
)
initWithIdentifier
:
(
NSString
*
)
identifier
accessGroup
:(
NSString
*
)
accessGroup
;
-
(
void
)
setObject
:(
id
)
inObject
forKey
:(
id
)
key
;
-
(
id
)
objectForKey
:(
id
)
key
;
// Initializes and resets the default generic keychain item data.
-
(
void
)
resetKeychainItem
;
@end
\ No newline at end of file
Assets/Plugins/iOS/KeyChain/KeychainItemWrapper.h.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: 345b29d09ebb2478193c1904ce6904a2
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:
Assets/Plugins/iOS/KeyChain/KeychainItemWrapper.m
0 → 100755
View file @
797e4297
This diff is collapsed.
Click to expand it.
Assets/Plugins/iOS/KeyChain/KeychainItemWrapper.m.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: d010bb3024e7b4850a4977997c8a8ae6
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
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:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
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:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags: -fno-objc-arc
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:
Assets/Plugins/iOS/KeyChain/UserData.h
0 → 100755
View file @
797e4297
//
// Data.h
// zhifuxitong
//
// Created by ssp on 13-6-27.
// Copyright (c) 2013年 ssp. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface
UserData
:
NSObject
-
(
NSDictionary
*
)
readPlist
;
-
(
void
)
writeValue
:(
id
)
value
Key
:(
NSString
*
)
key
;
-
(
void
)
initPlist
;
-
(
void
)
removeValueForKey
:(
NSString
*
)
key
;
@end
Assets/Plugins/iOS/KeyChain/UserData.h.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: 2f7d4266dd90a4242b022ea268286ba0
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:
Assets/Plugins/iOS/KeyChain/UserData.m
0 → 100755
View file @
797e4297
#import "UserData.h"
@interface
UserData
()
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
dataDic
;
@end
@implementation
UserData
-
(
NSDictionary
*
)
readPlist
{
NSString
*
plistPath
=
[[
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
)
firstObject
]
stringByAppendingPathComponent
:
@"UserData.plist"
];
self
.
dataDic
=
[[
NSMutableDictionary
alloc
]
initWithContentsOfFile
:
plistPath
];
return
self
.
dataDic
;
}
-
(
void
)
writeValue
:
(
id
)
value
Key
:
(
NSString
*
)
key
{
if
(
value
==
nil
||
key
==
nil
)
{
return
;
}
NSString
*
plistPath
=
[[
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
)
firstObject
]
stringByAppendingPathComponent
:
@"UserData.plist"
];
self
.
dataDic
=
[[
NSMutableDictionary
alloc
]
initWithContentsOfFile
:
plistPath
];
[
self
.
dataDic
setObject
:
value
forKey
:
key
];
[
self
.
dataDic
writeToFile
:
plistPath
atomically
:
YES
];
}
-
(
void
)
removeValueForKey
:
(
id
)
key
{
NSString
*
plistPath
=
[[
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
)
firstObject
]
stringByAppendingPathComponent
:
@"UserData.plist"
];
self
.
dataDic
=
[[[
NSMutableDictionary
alloc
]
initWithContentsOfFile
:
plistPath
]
mutableCopy
];
[
self
.
dataDic
removeObjectForKey
:
key
];
[
self
.
dataDic
writeToFile
:
plistPath
atomically
:
YES
];
}
-
(
void
)
initPlist
{
NSString
*
plistPath
=
[[
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
)
firstObject
]
stringByAppendingPathComponent
:
@"UserData.plist"
];
if
(
!
[[
NSFileManager
defaultManager
]
fileExistsAtPath
:
plistPath
])
{
self
.
dataDic
=
[[
NSMutableDictionary
alloc
]
init
];
[
self
.
dataDic
writeToFile
:
plistPath
atomically
:
YES
];
}
}
@end
Assets/Plugins/iOS/KeyChain/UserData.m.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: d833fefb78fb04806bb21bc28040a453
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:
Assets/Plugins/iOS/WeChat.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: 01c81d79ebee8482e899bc332140f056
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Plugins/iOS/WeChat/Native.h
0 → 100644
View file @
797e4297
//
// Native.h
// iosPlugins
//
// Created by os on 2020/4/10.
// Copyright © 2020 os. All rights reserved.
//
#include "UI/UnityViewControllerBase.h"
#include "UnityAppController+ViewHandling.h"
@interface
Native
:
NSObject
@end
extern
"C"
{
void
_WechatLogin
(
char
*
appid
,
char
*
state
,
char
*
universalLink
);
bool
_isWechatInstalled
();
void
_ShareByIos
(
int
type
,
char
*
url
);
}
Assets/Plugins/iOS/WeChat/Native.h.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: 517b97a0c8d97412e872329c9a0e7e03
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:
Assets/Plugins/iOS/WeChat/Native.mm
0 → 100644
View file @
797e4297
//
// Native.mm
// iosPlugins
//
// Created by os on 2020/4/10.
// Copyright © 2020 os. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Native.h"
#import "Libraries/Plugins/iOS/WeChat/WXApi.h"
@interface Native()
@end
@implementation Native : NSObject
//判断是否安装微信
bool _isWechatInstalled()
{
return [WXApi isWXAppInstalled];
}
//微信登录
void _WechatLogin(char *appid, char *state, char *universalLink)
{
//向微信注册appid:填写自己微信开放平台的appid信息
NSString *weichatId = [NSString stringWithFormat:@"%s", appid];
NSString *UNIVERSAL_LINK = [NSString stringWithFormat:@"%s", universalLink];
[WXApi registerApp:weichatId universalLink:UNIVERSAL_LINK];
if([WXApi isWXAppInstalled] ==false)
{
NSLog(@"请先安装微信客户端");
return;
}
//登录
SendAuthReq* req = [[SendAuthReq alloc] init];
req.scope = @"snsapi_userinfo";
req.state = [NSString stringWithFormat:@"%s", state];
//[WXApi sendReq:req];
[WXApi sendReq:req completion:^(BOOL success) { NSLog(@"唤起微信:%@", success ? @"成功" : @"失败"); }];
}
//分享图片类型接口示例
//参数:type表示分享类型(0:分享某个好友聊天;1:分享到微信朋友圈)
//参数:url为图片本地地址,当然也可以用远程地址然后下载下来。
//具体分享其他类型(如文宇类型,音乐类型,视频类型可参考微信官网API)
void _ShareByIos(int type, char* url)
{
NSString *sharePicUrl = [NSString stringWithFormat:@"%s", url];
//UIImage *image = [UIImage imageNamed:sharePicUrl];
//NSData* imageData = UIImageJPEGRepresentation(image, 0.7);
WXImageObject *imageObject = [WXImageObject object];
imageObject.imageData = [NSData dataWithContentsOfFile:sharePicUrl];
WXMediaMessage *message = [WXMediaMessage message];
[message setThumbImage:[UIImage imageNamed:@"xzqShare.png"]];
message.mediaObject = imageObject;
SendMessageToWXReq *req = [[SendMessageToWXReq alloc] init];
req.bText = NO;
req.message = message;
req.scene = type ==0? WXSceneSession : WXSceneTimeline;//0表示聊天,1,表示朋友圈
[WXApi sendReq:req completion:^(BOOL success) { NSLog(@"微信分享:%@", success ? @"成功" : @"失败"); }];
}
@end
Assets/Plugins/iOS/WeChat/Native.mm.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: bd76b9bd0af0d4972bf48a162d64eed2
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:
Assets/Plugins/iOS/WeChat/ViewController.h
0 → 100644
View file @
797e4297
//
// ViewController.h
// iosPlugins
//
// Created by os on 2020/4/10.
// Copyright © 2020 os. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "WXApi.h"
NS_ASSUME_NONNULL_BEGIN
@interface
ViewController
:
UIResponder
<
UIApplicationDelegate
,
WXApiDelegate
>
+
(
instancetype
)
shareManager
;
-
(
void
)
sendUdid
;
@end
NS_ASSUME_NONNULL_END
Assets/Plugins/iOS/WeChat/ViewController.h.meta
0 → 100644
View file @
797e4297
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:
Assets/Plugins/iOS/WeChat/ViewController.m
0 → 100644
View file @
797e4297
//
// ViewController.m
// iosPlugins
//
// Created by os on 2020/4/10.
// Copyright © 2020 os. All rights reserved.
//
#import "ViewController.h"
#import "UserData.h"
#import "BGKeychainTool.h"
@implementation
ViewController
+
(
instancetype
)
shareManager
{
static
dispatch_once_t
onceToken
;
static
ViewController
*
instance
;
dispatch_once
(
&
onceToken
,
^
{
instance
=
[[
ViewController
alloc
]
init
];
});
return
instance
;
}
//微信发送请求到第三方应用时,会回调到该方法
-
(
void
)
onReq
:
(
BaseReq
*
)
req
{}
//第三方应用发送到微信的请求处理后的响应结果,会回调到该方法
-
(
void
)
onResp
:
(
BaseResp
*
)
resp
{
NSLog
(
@"微信响应"
);
//微信登录授权回调
if
([
resp
isKindOfClass
:[
SendAuthResp
class
]])
{
SendAuthResp
*
temp
=
(
SendAuthResp
*
)
resp
;
int
errorCode
=
temp
.
errCode
;
switch
(
errorCode
)
{
//[NSUTF8StringEncoding temp.code]
case
0
:
{
printf
(
"登录成功-xcode"
);
NSLog
(
@"code %@"
,
temp
.
code
);
NSString
*
message
=
temp
.
code
;
const
char
*
codeInfo
=
[
message
cStringUsingEncoding
:
NSASCIIStringEncoding
];
OnShowMessage
(
codeInfo
);
break
;
}
case
-
2
:
printf
(
"用户取消"
);
OnShowMessage
(
"-2;用户取消"
);
break
;
case
-
4
:
printf
(
"用户拒绝授权"
);
OnShowMessage
(
"-4;用户取消"
);
break
;
default
:
printf
(
"登录失败"
);
OnShowMessage
(
"-1;登录失败"
);
break
;
}
}
//微信分享授权回调
else
if
([
resp
isKindOfClass
:[
SendMessageToWXResp
class
]])
{
//0成功,-2是取消,其他异常
SendMessageToWXResp
*
rresp
=
(
SendMessageToWXResp
*
)
resp
;
NSString
*
code
=
[
NSString
stringWithFormat
:
@"%d"
,
rresp
.
errCode
];
const
char
*
codeInfo
=
[
code
cStringUsingEncoding
:
NSASCIIStringEncoding
];
OnShareShowMessage
(
codeInfo
);
}
}
//防止内存泄漏,崩溃,这里进行参数转换
char
*
MakeStringCopy
(
const
char
*
string
){
if
(
string
==
NULL
){
return
NULL
;
}
char
*
res
=
(
char
*
)
malloc
(
strlen
(
string
)
+
1
);
strcpy
(
res
,
string
);
return
res
;
}
//信息提示
void
OnShowMessage
(
const
char
*
msg
)
{
UnitySendMessage
(
"WxLogin"
,
"LoginCallBack"
,
MakeStringCopy
(
msg
));
}
void
OnShareShowMessage
(
const
char
*
msg
)
{
UnitySendMessage
(
"MainPanel"
,
"ShareCallBack"
,
MakeStringCopy
(
msg
));
}
-
(
void
)
sendUdid
{
UserData
*
data
=
[[
UserData
alloc
]
init
];
NSDictionary
*
userDic
=
[
data
readPlist
];
if
([
BGKeychainTool
getDeviceIDInKeychain
].
length
>
0
)
{
NSString
*
udid
=
[
BGKeychainTool
getDeviceIDInKeychain
];
const
char
*
codeInfo
=
[
udid
cStringUsingEncoding
:
NSASCIIStringEncoding
];
SendUDID
(
codeInfo
);
}
if
(
userDic
[
@"idfa"
])
{
NSString
*
idfaString
=
[
NSString
stringWithFormat
:
@"%@"
,
userDic
[
@"idfa"
]];
const
char
*
codeInfo
=
[
idfaString
cStringUsingEncoding
:
NSASCIIStringEncoding
];
SendIDFA
(
codeInfo
);
}
const
char
*
login
=
[
@"login"
cStringUsingEncoding
:
NSASCIIStringEncoding
];
SendTouristLogin
(
login
);
}
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
));
}
@end
Assets/Plugins/iOS/WeChat/ViewController.m.meta
0 → 100644
View file @
797e4297
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:
Assets/Plugins/iOS/WeChat/WXApi.h
0 → 100644
View file @
797e4297
//
// WXApi.h
// 所有Api接口
//
// Created by Wechat on 12-2-28.
// Copyright (c) 2012年 Tencent. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "WXApiObject.h"
NS_ASSUME_NONNULL_BEGIN
#pragma mark - WXApiDelegate
/*! @brief 接收并处理来自微信终端程序的事件消息
*
* 接收并处理来自微信终端程序的事件消息,期间微信界面会切换到第三方应用程序。
* WXApiDelegate 会在handleOpenURL:delegate:中使用并触发。
*/
@protocol
WXApiDelegate
<
NSObject
>
@optional
/*! @brief 收到一个来自微信的请求,第三方应用程序处理完后调用sendResp向微信发送结果
*
* 收到一个来自微信的请求,异步处理完成后必须调用sendResp发送处理结果给微信。
* 可能收到的请求有GetMessageFromWXReq、ShowMessageFromWXReq等。
* @param req 具体请求内容,是自动释放的
*/
-
(
void
)
onReq
:
(
BaseReq
*
)
req
;
/*! @brief 发送一个sendReq后,收到微信的回应
*
* 收到一个来自微信的处理结果。调用一次sendReq后会收到onResp。
* 可能收到的处理结果有SendMessageToWXResp、SendAuthResp等。
* @param resp具体的回应内容,是自动释放的
*/
-
(
void
)
onResp
:(
BaseResp
*
)
resp
;
@end
#pragma mark - WXApiLogDelegate
@protocol
WXApiLogDelegate
<
NSObject
>
-
(
void
)
onLog
:
(
NSString
*
)
log
logLevel
:
(
WXLogLevel
)
level
;
@end
#pragma mark - WXApi
/*! @brief 微信Api接口函数类
*
* 该类封装了微信终端SDK的所有接口
*/
@interface
WXApi
:
NSObject
/*! @brief WXApi的成员函数,向微信终端程序注册第三方应用。
*
* 需要在每次启动第三方应用程序时调用。
* @attention 请保证在主线程中调用此函数
* @param appid 微信开发者ID
* @param universalLink 微信开发者Universal Link
* @return 成功返回YES,失败返回NO。
*/
+
(
BOOL
)
registerApp
:(
NSString
*
)
appid
universalLink
:(
NSString
*
)
universalLink
;
/*! @brief 处理旧版微信通过URL启动App时传递的数据
*
* 需要在 application:openURL:sourceApplication:annotation:或者application:handleOpenURL中调用。
* @param url 微信启动第三方应用时传递过来的URL
* @param delegate WXApiDelegate对象,用来接收微信触发的消息。
* @return 成功返回YES,失败返回NO。
*/
+
(
BOOL
)
handleOpenURL
:(
NSURL
*
)
url
delegate
:(
nullable
id
<
WXApiDelegate
>
)
delegate
;
/*! @brief 处理微信通过Universal Link启动App时传递的数据
*
* 需要在 application:continueUserActivity:restorationHandler:中调用。
* @param userActivity 微信启动第三方应用时系统API传递过来的userActivity
* @param delegate WXApiDelegate对象,用来接收微信触发的消息。
* @return 成功返回YES,失败返回NO。
*/
+
(
BOOL
)
handleOpenUniversalLink
:(
NSUserActivity
*
)
userActivity
delegate
:(
nullable
id
<
WXApiDelegate
>
)
delegate
;
/*! @brief 检查微信是否已被用户安装
*
* @return 微信已安装返回YES,未安装返回NO。
*/
+
(
BOOL
)
isWXAppInstalled
;
/*! @brief 判断当前微信的版本是否支持OpenApi
*
* @return 支持返回YES,不支持返回NO。
*/
+
(
BOOL
)
isWXAppSupportApi
;
/*! @brief 获取微信的itunes安装地址
*
* @return 微信的安装地址字符串。
*/
+
(
NSString
*
)
getWXAppInstallUrl
;
/*! @brief 获取当前微信SDK的版本号
*
* @return 返回当前微信SDK的版本号
*/
+
(
NSString
*
)
getApiVersion
;
/*! @brief 打开微信
*
* @return 成功返回YES,失败返回NO。
*/
+
(
BOOL
)
openWXApp
;
/*! @brief 发送请求到微信,等待微信返回onResp
*
* 函数调用后,会切换到微信的界面。第三方应用程序等待微信返回onResp。微信在异步处理完成后一定会调用onResp。支持以下类型
* SendAuthReq、SendMessageToWXReq、PayReq等。
* @param req 具体的发送请求。
* @param completion 调用结果回调block
*/
+
(
void
)
sendReq
:(
BaseReq
*
)
req
completion
:(
void
(
^
__nullable
)(
BOOL
success
))
completion
;
/*! @brief 收到微信onReq的请求,发送对应的应答给微信,并切换到微信界面
*
* 函数调用后,会切换到微信的界面。第三方应用程序收到微信onReq的请求,异步处理该请求,完成后必须调用该函数。可能发送的相应有
* GetMessageFromWXResp、ShowMessageFromWXResp等。
* @param resp 具体的应答内容
* @param completion 调用结果回调block
*/
+
(
void
)
sendResp
:(
BaseResp
*
)
resp
completion
:(
void
(
^
__nullable
)(
BOOL
success
))
completion
;
/*! @brief 发送Auth请求到微信,支持用户没安装微信,等待微信返回onResp
*
* 函数调用后,会切换到微信的界面。第三方应用程序等待微信返回onResp。微信在异步处理完成后一定会调用onResp。支持SendAuthReq类型。
* @param req 具体的发送请求。
* @param viewController 当前界面对象。
* @param delegate WXApiDelegate对象,用来接收微信触发的消息。
* @param completion 调用结果回调block
*/
+
(
void
)
sendAuthReq
:(
SendAuthReq
*
)
req
viewController
:(
UIViewController
*
)
viewController
delegate
:(
nullable
id
<
WXApiDelegate
>
)
delegate
completion
:(
void
(
^
__nullable
)(
BOOL
success
))
completion
;
/*! @brief 测试函数,用于排查当前App通过Universal Link方式分享到微信的流程
注意1: 调用自检函数之前必须要先调用registerApp:universalLink接口, 并确认调用成功
注意2: 自检过程中会有Log产生,可以先调用startLogByLevel函数,根据Log排查问题
注意3: 会多次回调block
注意4: 仅用于新接入SDK时调试使用,请勿在正式环境的调用
*
* 当completion回调的step为WXULCheckStepFinal时,表示检测通过,Universal Link接入成功
* @param completion 回调Block
*/
+
(
void
)
checkUniversalLinkReady
:(
nonnull
WXCheckULCompletion
)
completion
;
/*! @brief WXApi的成员函数,接受微信的log信息。byBlock
注意1:SDK会强引用这个block,注意不要导致内存泄漏,注意不要导致内存泄漏
注意2:调用过一次startLog by block之后,如果再调用一次任意方式的startLoad,会释放上一次logBlock,不再回调上一个logBlock
*
* @param level 打印log的级别
* @param logBlock 打印log的回调block
*/
+
(
void
)
startLogByLevel
:(
WXLogLevel
)
level
logBlock
:(
WXLogBolock
)
logBlock
;
/*! @brief WXApi的成员函数,接受微信的log信息。byDelegate
注意1:sdk会弱引用这个delegate,这里可加任意对象为代理,不需要与WXApiDelegate同一个对象
注意2:调用过一次startLog by delegate之后,再调用一次任意方式的startLoad,不会再回调上一个logDelegate对象
* @param level 打印log的级别
* @param logDelegate 打印log的回调代理,
*/
+
(
void
)
startLogByLevel
:(
WXLogLevel
)
level
logDelegate
:(
id
<
WXApiLogDelegate
>
)
logDelegate
;
/*! @brief 停止打印log,会清理block或者delegate为空,释放block
* @param
*/
+
(
void
)
stopLog
;
@end
NS_ASSUME_NONNULL_END
Assets/Plugins/iOS/WeChat/WXApi.h.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: accad33fb5a094ba7a0889f3420e2a37
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:
Assets/Plugins/iOS/WeChat/WXApiObject.h
0 → 100644
View file @
797e4297
This diff is collapsed.
Click to expand it.
Assets/Plugins/iOS/WeChat/WXApiObject.h.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: 4804ab27a6fcc42e6a0b76e4f28ba140
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:
Assets/Plugins/iOS/WeChat/WechatAuthSDK.h
0 → 100644
View file @
797e4297
//
// WechatAuthSDK.h
// WechatAuthSDK
//
// Created by 李凯 on 13-11-29.
// Copyright (c) 2013年 Tencent. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
enum
AuthErrCode
{
WechatAuth_Err_Ok
=
0
,
//Auth成功
WechatAuth_Err_NormalErr
=
-
1
,
//普通错误
WechatAuth_Err_NetworkErr
=
-
2
,
//网络错误
WechatAuth_Err_GetQrcodeFailed
=
-
3
,
//获取二维码失败
WechatAuth_Err_Cancel
=
-
4
,
//用户取消授权
WechatAuth_Err_Timeout
=
-
5
,
//超时
};
@protocol
WechatAuthAPIDelegate
<
NSObject
>
@optional
-
(
void
)
onAuthGotQrcode
:
(
UIImage
*
)
image
;
//得到二维码
-
(
void
)
onQrcodeScanned
;
//二维码被扫描
-
(
void
)
onAuthFinish
:(
int
)
errCode
AuthCode
:(
nullable
NSString
*
)
authCode
;
//成功登录
@end
@interface
WechatAuthSDK
:
NSObject
{
NSString
*
_sdkVersion
;
__weak
id
<
WechatAuthAPIDelegate
>
_delegate
;
}
@property
(
nonatomic
,
weak
,
nullable
)
id
<
WechatAuthAPIDelegate
>
delegate
;
@property
(
nonatomic
,
readonly
)
NSString
*
sdkVersion
;
//authSDK版本号
/*! @brief 发送登录请求,等待WechatAuthAPIDelegate回调
*
* @param appId 微信开发者ID
* @param nonceStr 一个随机的尽量不重复的字符串,用来使得每次的signature不同
* @param timeStamp 时间戳
* @param scope 应用授权作用域,拥有多个作用域用逗号(,)分隔
* @param signature 签名
* @param schemeData 会在扫码后拼在scheme后
* @return 成功返回YES,失败返回NO
注:该实现只保证同时只有一个Auth在运行,Auth未完成或未Stop再次调用Auth接口时会返回NO。
*/
-
(
BOOL
)
Auth
:(
NSString
*
)
appId
nonceStr
:(
NSString
*
)
nonceStr
timeStamp
:(
NSString
*
)
timeStamp
scope
:(
NSString
*
)
scope
signature
:(
NSString
*
)
signature
schemeData
:(
nullable
NSString
*
)
schemeData
;
/*! @brief 暂停登录请求
*
* @return 成功返回YES,失败返回NO。
*/
-
(
BOOL
)
StopAuth
;
@end
NS_ASSUME_NONNULL_END
Assets/Plugins/iOS/WeChat/WechatAuthSDK.h.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: 9fcd68daa4077463cbac8118038cd87c
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:
Assets/Plugins/iOS/WeChat/libWeChatSDK.a
0 → 100644
View file @
797e4297
File added
Assets/Plugins/iOS/WeChat/libWeChatSDK.a.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: 2b45e75b1af0a4dafbee5aee61b24410
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:
Assets/Plugins/iOS/WebView.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: 7d5d495f194394494bbcd4b7ff0584a8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Plugins/iOS/WebView/WKWebViewController.h
0 → 100644
View file @
797e4297
//
// WKWebViewController.h
// Gardening
//
// Created by GY.Z on 2021/1/4.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface
WKWebViewController
:
UIViewController
@property
(
nonatomic
,
copy
)
NSString
*
url
;
@property
(
nonatomic
,
copy
)
NSString
*
webTitle
;
@property
(
nonatomic
,
assign
)
bool
showNav
;
@property
(
nonatomic
,
assign
)
NSInteger
countDown
;
@property
(
nonatomic
,
copy
)
NSString
*
details
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
adsDict
;
@property
(
nonatomic
,
copy
)
void
(
^
dismissCallBack
)(
void
);
@end
NS_ASSUME_NONNULL_END
Assets/Plugins/iOS/WebView/WKWebViewController.h.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: 4e145fed4a87e4b53b7de315c9181cc5
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:
Assets/Plugins/iOS/WebView/WKWebViewController.m
0 → 100644
View file @
797e4297
This diff is collapsed.
Click to expand it.
Assets/Plugins/iOS/WebView/WKWebViewController.m.meta
0 → 100644
View file @
797e4297
fileFormatVersion: 2
guid: 116ed979ac679451eb8e6cb4a35ffaf5
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:
Packages/manifest.json
View file @
797e4297
...
@@ -6,13 +6,18 @@
...
@@ -6,13 +6,18 @@
"com.unity.2d.sprite"
:
"1.0.0"
,
"com.unity.2d.sprite"
:
"1.0.0"
,
"com.unity.2d.spriteshape"
:
"3.0.14"
,
"com.unity.2d.spriteshape"
:
"3.0.14"
,
"com.unity.2d.tilemap"
:
"1.0.0"
,
"com.unity.2d.tilemap"
:
"1.0.0"
,
"com.unity.ads"
:
"3.6.1"
,
"com.unity.analytics"
:
"3.3.5"
,
"com.unity.collab-proxy"
:
"1.2.16"
,
"com.unity.collab-proxy"
:
"1.2.16"
,
"com.unity.ide.rider"
:
"1.1.4"
,
"com.unity.ide.rider"
:
"1.1.4"
,
"com.unity.ide.vscode"
:
"1.2.3"
,
"com.unity.ide.vscode"
:
"1.2.3"
,
"com.unity.multiplayer-hlapi"
:
"1.0.8"
,
"com.unity.purchasing"
:
"2.2.1"
,
"com.unity.test-framework"
:
"1.1.20"
,
"com.unity.test-framework"
:
"1.1.20"
,
"com.unity.textmeshpro"
:
"2.1.1"
,
"com.unity.textmeshpro"
:
"2.1.1"
,
"com.unity.timeline"
:
"1.2.17"
,
"com.unity.timeline"
:
"1.2.17"
,
"com.unity.ugui"
:
"1.0.0"
,
"com.unity.ugui"
:
"1.0.0"
,
"com.unity.xr.legacyinputhelpers"
:
"2.1.7"
,
"com.unity.modules.ai"
:
"1.0.0"
,
"com.unity.modules.ai"
:
"1.0.0"
,
"com.unity.modules.androidjni"
:
"1.0.0"
,
"com.unity.modules.androidjni"
:
"1.0.0"
,
"com.unity.modules.animation"
:
"1.0.0"
,
"com.unity.modules.animation"
:
"1.0.0"
,
...
...
Packages/packages-lock.json
View file @
797e4297
...
@@ -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.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"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.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"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.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"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.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"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.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"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.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.2d.tilemap"
:
{
"com.unity.2d.tilemap"
:
{
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
...
@@ -71,19 +71,37 @@
...
@@ -71,19 +71,37 @@
"source"
:
"builtin"
,
"source"
:
"builtin"
,
"dependencies"
:
{}
"dependencies"
:
{}
},
},
"com.unity.ads"
:
{
"version"
:
"3.6.1"
,
"depth"
:
0
,
"source"
:
"registry"
,
"dependencies"
:
{
"com.unity.ugui"
:
"1.0.0"
},
"url"
:
"https://packages.unity.com"
},
"com.unity.analytics"
:
{
"version"
:
"3.3.5"
,
"depth"
:
0
,
"source"
:
"registry"
,
"dependencies"
:
{
"com.unity.ugui"
:
"1.0.0"
},
"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.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"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.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.ide.rider"
:
{
"com.unity.ide.rider"
:
{
"version"
:
"1.1.4"
,
"version"
:
"1.1.4"
,
...
@@ -92,21 +110,39 @@
...
@@ -92,21 +110,39 @@
"dependencies"
:
{
"dependencies"
:
{
"com.unity.test-framework"
:
"1.1.1"
"com.unity.test-framework"
:
"1.1.1"
},
},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"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.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"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"
:
{
"version"
:
"1.0.8"
,
"depth"
:
0
,
"source"
:
"registry"
,
"dependencies"
:
{
"nuget.mono-cecil"
:
"0.1.6-preview"
},
"url"
:
"https://packages.unity.com"
},
"com.unity.purchasing"
:
{
"version"
:
"2.2.1"
,
"depth"
:
0
,
"source"
:
"registry"
,
"dependencies"
:
{
"com.unity.ugui"
:
"1.0.0"
},
"url"
:
"https://packages.unity.com"
},
},
"com.unity.test-framework"
:
{
"com.unity.test-framework"
:
{
"version"
:
"1.1.20"
,
"version"
:
"1.1.20"
,
...
@@ -117,7 +153,7 @@
...
@@ -117,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.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.textmeshpro"
:
{
"com.unity.textmeshpro"
:
{
"version"
:
"2.1.1"
,
"version"
:
"2.1.1"
,
...
@@ -126,14 +162,14 @@
...
@@ -126,14 +162,14 @@
"dependencies"
:
{
"dependencies"
:
{
"com.unity.ugui"
:
"1.0.0"
"com.unity.ugui"
:
"1.0.0"
},
},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"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.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.ugui"
:
{
"com.unity.ugui"
:
{
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
...
@@ -144,6 +180,23 @@
...
@@ -144,6 +180,23 @@
"com.unity.modules.imgui"
:
"1.0.0"
"com.unity.modules.imgui"
:
"1.0.0"
}
}
},
},
"com.unity.xr.legacyinputhelpers"
:
{
"version"
:
"2.1.7"
,
"depth"
:
0
,
"source"
:
"registry"
,
"dependencies"
:
{
"com.unity.modules.vr"
:
"1.0.0"
,
"com.unity.modules.xr"
:
"1.0.0"
},
"url"
:
"https://packages.unity.com"
},
"nuget.mono-cecil"
:
{
"version"
:
"0.1.6-preview"
,
"depth"
:
1
,
"source"
:
"registry"
,
"dependencies"
:
{},
"url"
:
"https://packages.unity.com"
},
"com.unity.modules.ai"
:
{
"com.unity.modules.ai"
:
{
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
"depth"
:
0
,
"depth"
:
0
,
...
...
ProjectSettings/PackageManagerSettings.asset
View file @
797e4297
...
@@ -17,7 +17,7 @@ MonoBehaviour:
...
@@ -17,7 +17,7 @@ MonoBehaviour:
m_Registries
:
m_Registries
:
-
m_Id
:
main
-
m_Id
:
main
m_Name
:
m_Name
:
m_Url
:
https://packages.unity.c
n
m_Url
:
https://packages.unity.c
om
m_Scopes
:
[]
m_Scopes
:
[]
m_IsDefault
:
1
m_IsDefault
:
1
m_UserSelectedRegistryName
:
m_UserSelectedRegistryName
:
...
...
ProjectSettings/ProjectSettings.asset
View file @
797e4297
...
@@ -41,12 +41,6 @@ PlayerSettings:
...
@@ -41,12 +41,6 @@ PlayerSettings:
height
:
1
height
:
1
m_SplashScreenLogos
:
[]
m_SplashScreenLogos
:
[]
m_VirtualRealitySplashScreen
:
{
fileID
:
0
}
m_VirtualRealitySplashScreen
:
{
fileID
:
0
}
m_ShowUnitySplashAds
:
0
m_AdsAndroidGameId
:
m_AdsIosGameId
:
m_ShowSplashAdsSlogan
:
0
m_SloganImage
:
{
fileID
:
0
}
m_SloganHeight
:
150
m_HolographicTrackingLossScreen
:
{
fileID
:
0
}
m_HolographicTrackingLossScreen
:
{
fileID
:
0
}
defaultScreenWidth
:
1024
defaultScreenWidth
:
1024
defaultScreenHeight
:
768
defaultScreenHeight
:
768
...
@@ -124,14 +118,13 @@ PlayerSettings:
...
@@ -124,14 +118,13 @@ PlayerSettings:
vulkanNumSwapchainBuffers
:
3
vulkanNumSwapchainBuffers
:
3
vulkanEnableSetSRGBWrite
:
0
vulkanEnableSetSRGBWrite
:
0
vulkanEnableLateAcquireNextImage
:
0
vulkanEnableLateAcquireNextImage
:
0
useSecurityBuild
:
0
m_SupportedAspectRatios
:
m_SupportedAspectRatios
:
4:3
:
1
4:3
:
1
5:4
:
1
5:4
:
1
16:10
:
1
16:10
:
1
16:9
:
1
16:9
:
1
Others
:
1
Others
:
1
bundleVersion
:
0.1
bundleVersion
:
1.0.0
preloadedAssets
:
[]
preloadedAssets
:
[]
metroInputSource
:
0
metroInputSource
:
0
wsaTransparentSwapchain
:
0
wsaTransparentSwapchain
:
0
...
@@ -176,6 +169,7 @@ PlayerSettings:
...
@@ -176,6 +169,7 @@ PlayerSettings:
androidMaxAspectRatio
:
2.1
androidMaxAspectRatio
:
2.1
applicationIdentifier
:
applicationIdentifier
:
Android
:
com.ym.wdcy
Android
:
com.ym.wdcy
iPhone
:
com.ym.ioswdcy
buildNumber
:
{}
buildNumber
:
{}
AndroidBundleVersionCode
:
1
AndroidBundleVersionCode
:
1
AndroidMinSdkVersion
:
21
AndroidMinSdkVersion
:
21
...
@@ -366,7 +360,6 @@ PlayerSettings:
...
@@ -366,7 +360,6 @@ PlayerSettings:
m_Kind
:
1
m_Kind
:
1
m_SubKind
:
m_SubKind
:
m_BuildTargetBatching
:
[]
m_BuildTargetBatching
:
[]
m_BuildTargetEncrypting
:
[]
m_BuildTargetGraphicsJobs
:
m_BuildTargetGraphicsJobs
:
-
m_BuildTarget
:
MacStandaloneSupport
-
m_BuildTarget
:
MacStandaloneSupport
m_GraphicsJobs
:
0
m_GraphicsJobs
:
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment