Conflicting nullability on the UMPConsentForm

166 views
Skip to first unread message

Tiago Queirós

unread,
Jun 10, 2024, 12:08:35 PMJun 10
to Google Mobile Ads SDK Developers


Hi,

On our iOS project we've set the TREAT_WARNINGS_AS_ERRORS flag to YES and we've noticed the following error in the UMPConsentForm:

Conflicting nullability specifier on return types, 'nullable' conflicts with existing specifier 'nonnull'

This error arises from the use of - (nullable instancetype)init NS_UNAVAILABLE;, where the nullable specifier is causing a conflict.

Is there any chance this could be fixed?

I’ve attached an example project to help demonstrate the issue.
UserMessagingExample.zip

Thanks!



Mobile Ads SDK Forum Advisor

unread,
Jun 10, 2024, 4:36:34 PMJun 10
to tiagosp...@gmail.com, google-adm...@googlegroups.com

Hi,

Please note that the presents a privacy options form from the provided viewController if UMPConsentInformation.sharedInstance.privacyOptionsRequirementStatus is UMPPrivacyOptionsRequirementStatusRequired. Calls completionHandler with nil error after the user selects an option and the form is dismissed, or on the next run loop with a non-nil error if no form is presented. Must be called on the main queue. For more information visit this UMPConsentForm document.

The sample project you provided is currently not executable. Kindly share runnable sample project in order for us to proceed with further investigation.

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, kindly provide requested information to us via reply to author option or using the steps below:

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002tJGrdQAG&entry.80707362=00239338

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJGrd:ref" (ADR-00239338)

Thanks,
 
Google Logo Mobile Ads SDK Team


Tiago Queirós

unread,
Jun 11, 2024, 3:37:37 AMJun 11
to Google Mobile Ads SDK Developers
Hi,

If the flag TREAT_WARNINGS_AS_ERRORSis set toYES, Xcode will throw an error every time the project builds, it doesn't matter if UMPConsentForm is used or not. 
This is also regarding the UserMessagingPlatform SDK

I've attached a demo project with a lower iOS target and please let me know if it works. The project should not be able to build successfully

Thank you for the help.
Regards,
Tiago

UserMessagingExample-2.zip

Mobile Ads SDK Forum Advisor

unread,
Jun 11, 2024, 10:24:02 AMJun 11
to tiagosp...@gmail.com, google-adm...@googlegroups.com
Hi,

I will check with our team regarding your query and one of my team members will reach out to you once we have an update on this. Meanwhile, your patience is highly appreciated.

Mobile Ads SDK Forum Advisor

unread,
Jun 11, 2024, 12:37:41 PMJun 11
to tiagosp...@gmail.com, google-adm...@googlegroups.com
Hi,

I have enabled the TREAT_WARNINGS_AS_ERRORS to true in our sample project and haven't observed any such issues, have you tried to reproduce the same issue in our sample? could you please check by switching TREAT_WARNINGS_AS_ERRORS to NO. If you still face the issue elaborate the issue with necessary steps to reproduce.

Tiago Queirós

unread,
Jun 12, 2024, 3:44:25 AMJun 12
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Hi,

The sample project you provided uses Cocoapods to manage the dependencies, while in the sample I sent, we are using SPM.

To replicate the issue we are facing:
1. Set the TREAT_WARNINGS_AS_ERRORS as true
3. Try to build the project. It should fail.

We are only adding to our project GoogleUserMessagingPlatform and not GoogleAds.

On 11 Jun 2024, at 18:36, Mobile Ads SDK Forum Advisor <mobile...@forumsupport.google> wrote:

 Hi,

Mobile Ads SDK Forum Advisor

unread,
Jun 12, 2024, 7:32:59 AMJun 12
to tiagosp...@gmail.com, google-adm...@googlegroups.com
Hi,

TREAT_WARNINGS_AS_ERRORS is used by Xcode build setting to convert warning into error. And since in UserMessagingPlatform.xcframework SDK is having one warning in UMPConsentForm.h file init method, due to this project is not running and showing build error by enabling TREAT_WARNINGS_AS_ERRORS to Yes.

I will raise this concern to the team. Meanwhile, i would suggest to change TREAT_WARNINGS_AS_ERRORS to No for both debug and release, delete the derived data and run the project. it will run and keep and eye on iOS release.

Thanks

Mobile Ads SDK Forum Advisor

unread,
Jun 17, 2024, 7:26:12 AMJun 17
to tiagosp...@gmail.com, google-adm...@googlegroups.com
Hi,

This issue has been fixed now, and update will be available in upcoming version.
Thanks
Reply all
Reply to author
Forward
0 new messages