I’m receiving three warnings for the code below. The warnings are:
1: “Receiver type ‘const char *’ is not ‘id’ or interface pointer, consider casting it to ‘id'”
2: “Instance method ‘-alloc’ not found (return type defaults to ‘id’)”
3: “Instance method ‘-hideBanner:’ not found (return type defaults to ‘id’)”
Here is my code:
- (void)applicationWillEnterForeground:(UIApplication *)application
{
MoPubManager *obj = [["MoPubManager.h" alloc] init];
if( obj.adView ) {
[self hideBanner:YES];
}
[obj.adView refreshAd];
}
What do these mean?
You are passing a cstring instead of the class. Try this: