To run the example project, clone the repo, and run pod install
from the Example directory first.
MADSSDKiOS-ObjectiveC is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "MADSSDKiOS-ObjectiveC"
Please note that the Application Transport Security has blocked a cleartext HTTP resource load since it is insecure. Adding the following to your Info.plist will disable ATS:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
In order to create and display a banner you need to initiate the MADS AdServer once.
As a handy tip, whenever you are adding Mads SDK calls to a source file, import the MadsSDK main header file into that source code by adding the following line of code:
#import <MadsSDK/MadsSDK.h>
Add to didFinishLaunchingWithOptions and applicationWillEnterForeGround method code:
[MadsAdServer startWithLocationEnabled:YES withLocationPurpose:@”Your location purpose”];
or:
[MadsAdServer startWithLocationEnabled:YES withLocationPurpose:@”Your location purpose” withLocationUpdateTimeInterval:YOUR_PREFERRED_TIME_INTERVAL];
And add to applicationWillTerminate andapplicationWillEnterBackground methods code:
[MadsAdServer stop];
Now the MADS SDK is integrated, let’s move to the process of setting up the AdView.
Create the MadsAdView:
MadsAdView *adView = [[MadsAdView alloc] initWithFrame:adFrame
zone:placementId
delegate:self];
IDFA usage optimizations
Performance improvement
MADS, [email protected]
MADSSDKiOS-ObjectiveC is available under the MIT license. See the LICENSE file for more info.