ARC errors


Hi, i’m a new xcode user and i’ve got some trouble to integrate your latest sdk
When I build I get this error msg:

the current deployment target does not support automated __weak

My IOS deployment target is 8.0, Base sdk 8.0, architectures: arm64 arm7 arm7s, Obective-C Automatic Reference Counting is true.
I’ve tryied to => Refactor -> Convert to Objective-C ARC without success ( error: invalid deployment target for -stdlib=libc++ (requires IOS 5.0 or later (??) ) )

Hope you can help me,
Thank’s for your work :slight_smile:


Can you confirm that you are using the new ARC-compatible version that was just announced?


Yes I confirm i’m using the version 3.0
I’m using Unity 4.6 to test it

Integration fail for mopub-ios-sdk

Hello Tesan,

This answer was posted on stackoverflow:

deleted lines:

__weak typeof(self) _weakSelf = self;

typeof(self) strongSelf = _weakSelf;
and replaced all references strongSelf by self

it works for me

From what I can see from your error message, __weak is no longer supported in the new integration, so this fix would likely work. Please note that I have not tested this yet and a member of our team is looking into the issue.

I posted this as it could likely be a temporary fix before official changes are made.

Edit: Our Solutions Engineer posted the following below, so you should use it as a workaround until an official fix is made:

replace: __weak typeof(self) weakSelf = self; with: __typeof__(self) __weak weakSelf = self;

and replace: typeof(self) strongSelf = weakSelf; with: __typeof__(self) strongSelf = weakSelf;


Thank’s for your answer, I’ll test it. I’m actally back to the previous version :slight_smile: