Skip to content

Commit c4c3eed

Browse files
authored
Merge pull request #10 from SourcePointUSA/develop
Release 2.0.0
2 parents ac8b8ec + 316c924 commit c4c3eed

File tree

72 files changed

+1460
-172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1460
-172
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,6 @@ Thumbs.db.meta
5353
*.DS_Store
5454

5555
# VS Code
56-
*.vscode
56+
*.vscode
57+
58+
*.keystore

Assets/ConsentManagementProvider/Plugins/Android.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/ConsentManagementProvider/Plugins/Android/cmp.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/ConsentManagementProvider/Plugins/iOS/Source/Unity.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ void _addTargetingParamForCampaignType(int campaignType, char * key, char * valu
1919
[unityBridgePlugin addTargetingParamForCampaignType:campaignType :key :value];
2020
}
2121

22-
void _consrtuctLib(int accountId, char* propName, int arrSize, int campaignTypes[], int campaignsEnvironment, long timeOutSeconds)
22+
void _consrtuctLib(int accountId, int propId, char* propName, int arrSize, int campaignTypes[], int campaignsEnvironment, long timeOutSeconds)
2323
{
24-
[unityBridgePlugin consrtuctLib:accountId _:propName _:arrSize _:campaignTypes _: campaignsEnvironment _: timeOutSeconds];
24+
[unityBridgePlugin consrtuctLib:accountId _:propId _:propName _:arrSize _:campaignTypes _: campaignsEnvironment _: timeOutSeconds];
2525
}
2626

2727
void _loadMessage(char * authId)

Assets/ConsentManagementProvider/Plugins/iOS/Source/UnityController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
-(void) setUnityCallback :(const char *)gameObjectName;
99

10-
-(void) consrtuctLib : (int) accountId _:(char*) propName _: (int) arrSize _: (int[]) campaignTypes _: (int) campaignsEnvironment _: (long) timeOutSeconds;
10+
-(void) consrtuctLib : (int) accountId _:(int) propId _:(char*) propName _: (int) arrSize _: (int[]) campaignTypes _: (int) campaignsEnvironment _: (long) timeOutSeconds;
1111

1212
-(void) loadMessage : (char*) authId;
1313

Assets/ConsentManagementProvider/Plugins/iOS/Source/UnityController.m

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ - (void) addTargetingParamForCampaignType : (int) campaignType : (char*) key : (
109109
// NSLog(@"params => %@", params);
110110
}
111111

112-
-(void) consrtuctLib : (int) accountId _:(char*) propName _: (int) arrSize _: (int[]) campaignTypes _: (int) campaignsEnvironment _: (long) timeOutSeconds
112+
-(void) consrtuctLib : (int) accountId _:(int) propId _:(char*) propName _: (int) arrSize _: (int[]) campaignTypes _: (int) campaignsEnvironment _: (long) timeOutSeconds
113113
{
114114
SPError * err = [self checkIfPropNameNotNull: propName];
115115
if(err != nil)
@@ -129,6 +129,8 @@ -(void) consrtuctLib : (int) accountId _:(char*) propName _: (int) arrSize _: (i
129129
NSMutableDictionary<NSString *, NSString *> * gdprParams;
130130
NSMutableDictionary<NSString *, NSString *> * ccpaParams;
131131
NSMutableDictionary<NSString *, NSString *> * ios14Params;
132+
133+
132134

133135
for (int index=0; index < arrSize; index++)
134136
{
@@ -149,7 +151,9 @@ -(void) consrtuctLib : (int) accountId _:(char*) propName _: (int) arrSize _: (i
149151
// initWithEnvironment:env
150152
// targetingParams:gdprParams];
151153
gdpr = [[SPCampaign alloc]
152-
initWithTargetingParams:gdprParams];
154+
initWithTargetingParams:gdprParams
155+
groupPmId:nil
156+
gppConfig:nil];
153157

154158
}else if(type == SPCampaignTypeCcpa){
155159
ccpaParams = campaignParams;
@@ -160,7 +164,10 @@ -(void) consrtuctLib : (int) accountId _:(char*) propName _: (int) arrSize _: (i
160164
// initWithEnvironment:env
161165
// targetingParams: ccpaParams];
162166
ccpa = [[SPCampaign alloc]
163-
initWithTargetingParams: ccpaParams];
167+
initWithTargetingParams: ccpaParams
168+
groupPmId:nil
169+
gppConfig:nil];
170+
164171
}else if(type == SPCampaignTypeIos14){
165172
ios14Params = campaignParams;
166173
if([ios14Params count] == 0){
@@ -170,7 +177,10 @@ -(void) consrtuctLib : (int) accountId _:(char*) propName _: (int) arrSize _: (i
170177
// initWithEnvironment:env
171178
// targetingParams: ios14Params];
172179
ios14 = [[SPCampaign alloc]
173-
initWithTargetingParams: ios14Params];
180+
initWithTargetingParams: ios14Params
181+
groupPmId:nil
182+
gppConfig:nil];
183+
174184
}else{
175185
SPError *myErr = [SPError errorWithDomain:@"SPConsentManager"
176186
code:100
@@ -182,19 +192,22 @@ -(void) consrtuctLib : (int) accountId _:(char*) propName _: (int) arrSize _: (i
182192
}
183193
// NSLog(@"%@ ||| %@ ||| %@", gdpr.description, ccpa.description, ios14.description);
184194

195+
SPCampaignEnv * env = campaignsEnvironment;
196+
185197
SPCampaigns * campaigns = [[SPCampaigns alloc]
186198
initWithGdpr: gdpr
187199
ccpa: ccpa
188-
ios14: ios14];
200+
ios14: ios14
201+
environment:env];
189202

190-
SPCampaignEnv * env = campaignsEnvironment;
191203
NSLog(@" ENVIRONMENT: %ld", (long)env);
192204

193205
consentManager = [[SPConsentManager alloc]
194206
initWithAccountId:accountId
207+
propertyId:propId
195208
propertyName: propertyName
196-
campaignsEnv: env
197209
campaigns: campaigns
210+
language: nil
198211
delegate: self];
199212
consentManager.messageTimeoutInSeconds = timeOutSeconds;
200213
} @catch (SPError *exception) {
@@ -209,10 +222,10 @@ -(void) loadMessage : (char*) authId
209222
{
210223
NSString * nsAuthId = [self convertCharToNSString: authId];
211224
if ([nsAuthId isEqual: @""] || authId == nil) {
212-
[consentManager loadMessageForAuthId: NULL];
225+
[consentManager loadMessageForAuthId: NULL publisherData: NULL];
213226
// NSLog(@"loadMessage");
214227
}else{
215-
[consentManager loadMessageForAuthId: nsAuthId];
228+
[consentManager loadMessageForAuthId: nsAuthId publisherData: NULL];
216229
// NSLog(@"loadMessage with authId");
217230
}
218231
}
@@ -222,7 +235,7 @@ - (void) loadGDPRPrivacyManager : (char *) pmId _: (int) tabId{
222235
if([self checkIfConsentManagerNotNull]){
223236
NSString * nsPmId = [self convertCharToNSString:pmId];
224237
SPPrivacyManagerTab tab = tabId;
225-
[consentManager loadGDPRPrivacyManagerWithId:nsPmId tab:tab];
238+
[consentManager loadGDPRPrivacyManagerWithId:nsPmId tab:tab useGroupPmIfAvailable:NULL];
226239
}
227240
}
228241

@@ -231,7 +244,7 @@ - (void) loadCCPAPrivacyManager : (char *) pmId _: (int) tabId{
231244
NSString * nsPmId = [self convertCharToNSString:pmId];
232245
SPPrivacyManagerTab tab = tabId;
233246
// NSLog(@"pmId %s", pmId);
234-
[consentManager loadCCPAPrivacyManagerWithId:nsPmId tab:tab];
247+
[consentManager loadCCPAPrivacyManagerWithId:nsPmId tab:tab useGroupPmIfAvailable:NULL];
235248
}
236249
}
237250

Assets/ConsentManagementProvider/Scripts/facade/CMP.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ public static class CMP
1515
|| Application.platform == RuntimePlatform.WindowsEditor
1616
|| Application.platform == RuntimePlatform.OSXEditor;
1717

18-
1918
public static void Initialize(
2019
List<SpCampaign> spCampaigns,
21-
int accountId, string propertyName,
20+
int accountId,
21+
int propertyId,
22+
string propertyName,
2223
MESSAGE_LANGUAGE language,
2324
CAMPAIGN_ENV campaignsEnvironment,
2425
long messageTimeoutInSeconds = 3)
@@ -39,6 +40,7 @@ public static void Initialize(
3940
}
4041
ConsentWrapperAndroid.Instance.InitializeLib(spCampaigns: spCampaigns,
4142
accountId: accountId,
43+
propertyId: propertyId,
4244
propertyName: propertyName,
4345
language: language,
4446
campaignsEnvironment: campaignsEnvironment,
@@ -50,6 +52,7 @@ public static void Initialize(
5052
CreateBroadcastExecutorGO();
5153
ConsentWrapperIOS.Instance.InitializeLib(spCampaigns: spCampaigns,
5254
accountId: accountId,
55+
propertyId: propertyId,
5356
propertyName: propertyName,
5457
language: language,
5558
campaignsEnvironment: campaignsEnvironment,
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using System;
2+
using ConsentManagementProviderLib.EventHandlerInterface;
3+
using UnityEngine.EventSystems;
4+
5+
namespace ConsentManagementProviderLib
6+
{
7+
public interface IOnConsentSpFinished : IConsentEventHandler
8+
{
9+
void OnConsentSpFinished(SpConsents spConsent);
10+
}
11+
}

Assets/ConsentManagementProvider/Scripts/interface/IOnConsentSpFinished.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)