googleads-consent-sdk-ios
googleads-consent-sdk-ios copied to clipboard
Consent SDK Version 1.3 BUG!
Hello, when attempt to show form of this 1.3 version of the Consent SDK, Xcode throws a very strange error:
More specifically, this line of code is throwing that error:
** PACConsentStatus *status = PACConsentInformation.sharedInstance.consentStatus;**
Error: *Cannot initialize a variable of type 'PACConsentStatus ' with an rvalue of type 'PACConsentStatus'
Now, what's triggering this error and is that a bug with the Consent SDK?
Xcode Version 10.1 (10B61) used!
Please advice!
got the same issue, for now I just deleted the *
got the same issue, for now I just deleted the *
That's nice, but it now says "unused variable status." Therefore I cannot check the user's consent choice.
I might try to store 'status array' in defaults. Once current status is available in array it will not show that Consent form. If not then we will show form and add that status in defaults status array.
Now I cannot check user's consent choice, and the form will load every time on app load.
This would probably solve the problem, but I do not know how to do that in code. Any suggestions?
Here's the code:
`
[form presentFromViewController:self
dismissCompletion:^(NSError *_Nullable error, BOOL userPrefersAdFree) {
if (error) {
// Handle error.
} else if (userPrefersAdFree) {
// The user prefers to use a paid version of the app.
} else {
// Check the user's consent choice.
PACConsentStatus status =
PACConsentInformation.sharedInstance.consentStatus;
// store status array in defaults
// once current status is available in array we will not show that form
// if not then we will show form and add that status in defaults status array
//Storing publisher managed consent
PACConsentInformation.sharedInstance.consentStatus = PACConsentStatusPersonalized;
}
}];
`
it says "unused variable status" because you have not used it, try using it everything works fine for me