I have been working on a Swift/iOS game. I am currently implementing the ads for it and am using the Amazon ads library. I have added it to my project. The sample code given on the quick starter guide is in Objective-C but that isn't too much of an issue. I created the bridge.h file and linked it in the Objective-C Bridging Header.
My bridge file is:
#ifndef Bridge_H
#define Bridge_H
import <AmazonAd/AmazonAdRegistration.h>
import <AmazonAd/AmazonAdOptions.h>
import <AmazonAd/AmazonAdError.h>
import <AmazonAd/AmazonAdInterstitual.h>
#endif
I noticed in the quick guide that the AmazonAd/AmazonAdInterstitual.h file wasn't located in the same location as the other 3 files. But I don't think that would be much of an issue, or is it? Anyways, that last one, AmazonAd/AmazonAdInterstitual.h is the one causing problems. When I try to compile and build I get an error linking to a method in that header:
// Present an interstitial on screen
- (void)presentFromViewController:(UIViewController *)viewController;
And the error states "Expected a Type" Followed by another error stating that it "Failed to import bridging header: "
If I go into that header file, the Amazon Interstitual one, and comment out that specific line, and then compile and build, it does so without issue. The problem is that that specific method call is the call needed to display the ad on screen. Without it I cannot display ads and get impressions.
Is this an issue with the header file? Or could it be an error somewhere else causing it to display these errors?