-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: JsonUnwrapper on iOS has incorrect key for VendorGrant #57
Conversation
the json return from android is different than the one on IOS Checking the grants list: "grants":{ "liksdhginsehgionwehcgnih":{ "vendorGrant":true, "purposeGrants":{ "fasoifhashfnahfiohioh":true } }, "35252352352352352":{ "vendorGrant":true, "purposeGrants":{ "325235235235235235":true } }, "32525236236423":{ "vendorGrant":true, "purposeGrants":{ "gdsgdsgsdg45346":true } }, "gdwertgerty436346346":{ "vendorGrant":false, "purposeGrants":{ "dgergewr436436346346":false } } }, You can see the key is called vendorGrant, unlike on Android which is called granted "grants":{ "43634634dfgdfg":{ "granted":true, "purposeGrants":{ "43634634gdfsgdfg":true } }, "43634643gsdgdfsg":{ "granted":true, "purposeGrants":{ "3463463464sdgedgerg":true } }, "346346346346":{ "granted":true, "purposeGrants":{ "dfgegwergrwegwre43":true } }, "42643634634634yt":{ "granted":true, "purposeGrants":{ "gssgerwtwt4t3t":true } } },
Hi @OmarVector thank you for submitting this PR! We're reviewing it and will get back to you soon. |
if (vendorGrantValue["granted"] != null) | ||
isGranted = vendorGrantValue["granted"].ToObject<bool>(); | ||
if (vendorGrantValue["vendorGrant"] != null) | ||
isGranted = vendorGrantValue["vendorGrant"].ToObject<bool>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OmarVector let me check if it interferes with Android implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OmarVector let me check if it interferes with Android implementation.
From my tests, its not, also, Android has custom Unwrapper function called UnwrapSpGdprConsentAndroid();
I'm not sure about another platform like PC/Mac if its supported. good luck💪
And thanks for your patiences:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OmarVector I confirm, that's true. Including this PR to the closest release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OmarVector you can merge when ready; we're going to include this to release 2.3.2 today anyway. Thank you for the PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nevazhnovu
Thank you:)
I dont have write access to merge it to your branch:)
however I merged with my forked release one:))
Thanks once again for your patience:))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You welcome! :)
Currently on the latest version sourcepoint SDK for unity . On iOS, it doesnt matter what selection you do inside PrivacyManager, everything return false, all VendorGrant are always false unlike on android.
Did a dive inside the SDK code and json return, I Found the key for vendorGrants on iOS called "vendorGrant", while on Android json its called "granted"
Checking the grants list from IOS:
"grants":{
"liksdhginsehgionwehcgnih":{
"vendorGrant":true,
"purposeGrants":{
"fasoifhashfnahfiohioh":true
}
},
"35252352352352352":{
"vendorGrant":true,
"purposeGrants":{
"325235235235235235":true
}
},
"32525236236423":{
"vendorGrant":true,
"purposeGrants":{
"gdsgdsgsdg45346":true
}
},
"gdwertgerty436346346":{
"vendorGrant":false,
"purposeGrants":{
"dgergewr436436346346":false
}
}
}
You can see the key is called vendorGrant, unlike on Android which is called "granted"
"grants":{
"43634634dfgdfg":{
"granted":true,
"purposeGrants":{
"43634634gdfsgdfg":true
}
},
"43634643gsdgdfsg":{
"granted":true,
"purposeGrants":{
"3463463464sdgedgerg":true
}
},
"346346346346":{
"granted":true,
"purposeGrants":{
"dfgegwergrwegwre43":true
}
},
"42643634634634yt":{
"granted":true,
"purposeGrants":{
"gssgerwtwt4t3t":true
}
}
}
So I added the fix, however, I'm not sure if the json suppose to look different like this or not.
If this not the ideal fix, currently would be great if you could consider a fix for this issue in the upcoming release:)
Thanks for your patience.