The method signature is:
- (id)initWithAdUnitId:(NSString *)adUnitId size:(CGSize)size
so you need to supply a CGSize
. That could be done with CGSizeMake(320, 50)
or the constant supplied by MoPub: MOPUB_BANNER_SIZE
.
Writing 320x50
looks like an invalid integer to the compiler and that is the reason for the description of the problem.
So, removing your ARC issue too, you need to import the constants
#import "MPConstants.h"
and your line will be:
self.adView = [[MPAdView alloc] initWithAdUnitId:@"adUnitCode" size:MOPUB_BANNER_SIZE];