Skip to content

Commit 899b84f

Browse files
committed
v1.5 iOS
1 parent b14433a commit 899b84f

15 files changed

+27574
-8
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,10 @@ sysinfo.txt
3030
Icon?
3131
ehthumbs.db
3232
[Tt]humbs.db
33+
AdTapsyUnitySample/ios.app/Contents/Resources/Data/Managed/UnityEngine.TimelineModule.dll
34+
AdTapsyUnitySample/ios.app/Contents/Resources/Data/Managed/UnityEngine.Timeline.dll
35+
AdTapsyUnitySample/ios.app/Contents/Resources/Data/Managed/UnityEngine.TilemapModule.xml
36+
AdTapsyUnitySample/ios.app/Contents/Resources/Data/Managed/UnityEngine.TilemapModule.dll
37+
AdTapsyUnitySample/ios.app/Contents/Resources/Data/Managed/UnityEngine.TextRenderingModule.xml
38+
AdTapsyUnitySample/ios.app/Contents/Resources/Data/Managed/UnityEngine.TextRenderingModule.dll
39+
AdTapsyUnitySample/ios.app/Contents/Resources/Data/Managed/UnityEngine.TerrainPhysicsModule.xml

AdTapsy-Unity-Plugin.unitypackage

-292 KB
Binary file not shown.

AdTapsyUnitySample/Assets/Plugins/AdTapsy.cs

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static void StartSessionAndroid(string appId){
3030
public static void StartSessionIOS(string appId) {
3131
#if UNITY_IPHONE && !UNITY_EDITOR
3232
AdTapsyIOS.StartSession (appId);
33-
#endif
33+
#endif
3434
}
3535

3636
public static void SetTestMode(bool enabled, params string[] testDevices){
@@ -41,7 +41,7 @@ public static void SetTestMode(bool enabled, params string[] testDevices){
4141
AdTapsyIOS.SetTestMode(enabled, testDevices);
4242
#endif
4343
}
44-
44+
4545
public static void ShowInterstitial(){
4646
#if UNITY_ANDROID && !UNITY_EDITOR
4747
AdTapsyAndroid.ShowInterstitial();
@@ -50,7 +50,7 @@ public static void ShowInterstitial(){
5050
AdTapsyIOS.ShowInterstitial ();
5151
#endif
5252
}
53-
53+
5454
public static bool IsInterstitialReadyToShow(){
5555
#if UNITY_ANDROID && !UNITY_EDITOR
5656
return AdTapsyAndroid.IsInterstitialReadyToShow();
@@ -69,7 +69,7 @@ public static void ShowRewardedVideo(){
6969
AdTapsyIOS.ShowRewardedVideo ();
7070
#endif
7171
}
72-
72+
7373
public static bool IsRewardedVideoReadyToShow(){
7474
#if UNITY_ANDROID && !UNITY_EDITOR
7575
return AdTapsyAndroid.IsRewardedVideoReadyToShow();
@@ -81,7 +81,7 @@ public static bool IsRewardedVideoReadyToShow(){
8181
#endif
8282
}
8383

84-
84+
8585
public static bool CloseAd(){
8686
#if UNITY_ANDROID && !UNITY_EDITOR
8787
return AdTapsyAndroid.CloseAd();
@@ -121,4 +121,20 @@ public static void SetRewardedVideoPostPopupEnabled(bool toShow){
121121
AdTapsyIOS.SetRewardedVideoPrePopupEnabled(toShow);
122122
#endif
123123
}
124-
}
124+
public static void SetUserSubjectToGdpr(bool value){
125+
#if UNITY_ANDROID && !UNITY_EDITOR
126+
AdTapsyAndroid.SetUserSubjectToGdpr(value);
127+
#endif
128+
#if UNITY_IPHONE && !UNITY_EDITOR
129+
AdTapsyIOS.SetUserSubjectToGdpr(value);
130+
#endif
131+
}
132+
public static void SetConsentGrantedGdpr(bool value){
133+
#if UNITY_ANDROID && !UNITY_EDITOR
134+
AdTapsyAndroid.SetConsentGrantedGdpr(value);
135+
#endif
136+
#if UNITY_IPHONE && !UNITY_EDITOR
137+
AdTapsyIOS.SetConsentGrantedGdpr(value);
138+
#endif
139+
}
140+
}

AdTapsyUnitySample/Assets/Plugins/Android/AdTapsyAndroid.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,18 @@ public static void SetRewardedVideoPostPopupEnabled(bool toShow){
7676
getAdTapsy().CallStatic("setRewardedVideoPostPopupEnabled", toShow);
7777
#endif
7878
}
79+
80+
public static void SetUserSubjectToGdpr(bool value){
81+
#if UNITY_ANDROID && !UNITY_EDITOR
82+
getAdTapsy().CallStatic("setUserSubjectToGdpr", value);
83+
#endif
84+
}
85+
public static void SetConsentGrantedGdpr(bool value){
86+
#if UNITY_ANDROID && !UNITY_EDITOR
87+
getAdTapsy().CallStatic("setConsentGrantedGdpr", value);
88+
#endif
89+
}
90+
7991
#if UNITY_ANDROID && !UNITY_EDITOR
8092
private static AndroidJavaObject getCurrentActivity(){
8193
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");

AdTapsyUnitySample/Assets/Plugins/iOS/AdTapsyIOS.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ public class AdTapsyIOS : MonoBehaviour
3636
[DllImport ("__Internal")]
3737
public static extern void AdTapsySetUserIdentifier(string userId);
3838

39+
[DllImport ("__Internal")]
40+
public static extern void AdTapsySetUserSubjectToGdpr(bool value);
41+
42+
[DllImport ("__Internal")]
43+
public static extern void AdTapsySetConsentGrantedGdpr(bool value);
44+
45+
3946
private static AdTapsyIOS instance;
4047

4148
private static void createInstance()
@@ -137,6 +144,18 @@ public static void SetUserIdentifier(string userId){
137144
#endif
138145
}
139146

147+
public static void SetUserSubjectToGdpr(bool value){
148+
#if UNITY_IPHONE && !UNITY_EDITOR
149+
AdTapsySetUserSubjectToGdpr(value);
150+
#endif
151+
}
152+
153+
public static void SetConsentGrantedGdpr(bool value){
154+
#if UNITY_IPHONE && !UNITY_EDITOR
155+
AdTapsySetConsentGrantedGdpr(value);
156+
#endif
157+
}
158+
140159

141160
#if UNITY_IPHONE && !UNITY_EDITOR
142161
public void OnAdCached( string zoneId )

AdTapsyUnitySample/Assets/Plugins/iOS/AdTapsyUnity.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ extern "C" {
2929
void AdTapsySetRewardedVideoPostPopupEnabled(BOOL toShow);
3030

3131
void AdTapsySetUserIdentifier(const char* userId);
32+
33+
void AdTapsySetUserSubjectToGdpr(BOOL value);
34+
35+
void AdTapsySetConsentGrantedGdpr(BOOL value);
3236
}
3337

3438

AdTapsyUnitySample/Assets/Plugins/iOS/AdTapsyUnity.mm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,16 @@ void AdTapsySetUserIdentifier(const char* userId) {
100100
[AdTapsy setUserIdentifier: CreateNSString(userId)];
101101
}
102102

103+
void AdTapsySetUserSubjectToGdpr(BOOL value) {
104+
printf("[AdTapsy Unity] Set User Subject to GDPR\n");
105+
[AdTapsy setUserSubjectToGdpr: value];
106+
}
107+
108+
void AdTapsySetConsentGrantedGdpr(BOOL value) {
109+
printf("[AdTapsy Unity] Set Consent Granted GDPR\n");
110+
[AdTapsy setConsentGrantedGdpr: value];
111+
}
112+
103113

104114
@implementation AdTapsyDelegateImpl
105115

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"dependencies": {
3+
}
4+
}

AdTapsyUnitySample/ProjectSettings/UnityAdsSettings.asset renamed to AdTapsyUnitySample/ProjectSettings/ClusterInputManager.asset

4.02 KB
Binary file not shown.
202 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)