-fobjc-weak woes

84 views
Skip to first unread message

George Baltatzis

unread,
Sep 30, 2018, 1:45:57 PM9/30/18
to google-adm...@googlegroups.com
I'm trying to update my unity app which used to work fine with GoogleMobileAds, but have been getting this error:

Libraries/Plugins/iOS/GADUNativeCustomTemplateAd.m(29,5):  error: cannot create __weak reference in file using manual reference counting
    __weak GADUNativeCustomTemplateAd *weakSelf = self;

Using the -fobjc-weak extra compiler flag fixes the issue, but then the build crashes on launch on my iPad 3.
After some tests, I realized that even without googlemobileads, the build crashes when using the -fobjc-weak flag, but works fine without it.
Is -fobjc-weak required in the latest versions of the googlemobileads plugin? Is there a workaround?

Not that changing it made a difference, but building for ios version 9

Have been struggling with this for 10 days...

mobileadssdk-a...@google.com

unread,
Oct 1, 2018, 3:43:17 PM10/1/18
to George Baltatzis, Google Mobile Ads SDK Developers
Hi George,

You are not required to use any such flags with our Mobile Ads SDK in iOS. However, it sounds like an implementation issue. Can you make sure that you using the latest version of the Mobile Ads Unity plugin and try again? What version of Unity IDE are you using? See if you are able to reproduce with the latest version and then let us know.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 09/30/18 13:45:57 grafo...@gmail.com wrote:
I'm trying to update my unity app which used to work fine with GoogleMobileAds, but have been getting this error:

Libraries/Plugins/iOS/GADUNativeCustomTemplateAd.m(29,5):  error: cannot create __weak reference in file using manual reference counting
    __weak GADUNativeCustomTemplateAd *weakSelf = self;

Using the -fobjc-weak extra compiler flag fixes the issue, but then the build crashes on launch on my iPad 3.
After some tests, I realized that even without googlemobileads, the build crashes when using the -fobjc-weak flag, but works fine without it.
Is -fobjc-weak required in the latest versions of the ios sdk? Is there a workaround?

Have been struggling with this for 10 days...

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/f214eb02-5547-4383-9cfd-d7a110a880f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages