-
Create an iOS project
-
Add the following libraries:
TapForTap.frameworkSystemConfiguration.frameworklibsqlite3.dyliblibxml2.dylibSocial.frameworkMediaPlayer.frameworkAccounts.frameworkStoreKit.frameworkEventKit.frameworkEventKitUI.frameworkCoreTelephony.frameworkAVFoundation.frameworkAudioToolbox.frameworkiOS_Tutela_SDK.framework(Not required in final release)libz.dylibAdSupport.frameworkMobileCoreServices.frameworkCoreMotion.frameworkKiipSDK.framework(Not required in final release)PassKit.frameworkCoreMedia.framework
-
Add in the following resources:
TapForTapResources.bundleMediaBrix.bundleKiipSDKResources.bundle
-
Set "Bundle display name" in your apps Info.plist
-
Set
mediabrixAppIDin your Info.plist to the MediaBrix app ID that was provided to you -
Set
mediabrixPropertyin your Info.plist to the MediaBrix property that was provided to you -
Set
NSLocationWhenInUseUsageDescriptionto an explanation for permission dialogs asking for location information. -
In the file where you want to show an ad:
#import "TapForTap.framework/Headers/TFTTapForTap.h"- Initialize TapforTap when your app launches:
[TFTTapForTap initializeWithAPIKey: @"3d323e6d58c83e06dba2547ec54f8afc"];- Show a Break interstitial:
[TFTInterstitial loadBreakInterstitialWithCallbackOnReceivedAd:^(TFTInterstitial *interstitial) {
[interstitial showWithViewController:self];
} onAdDidFail:^(TFTInterstitial *interstitial, NSString *reason) {
NSLog(@"Ad failed: %@", reason);
} onAdDidShow:nil onAdWasTapped:nil onAdWasDismissed:nil];- Show a Achievement interstitial:
[TFTInterstitial loadAchievementInterstitialWithDescription:@"You achieved!"
rewardDescription:@"a really shiny nickel"
rewardIcon:[NSURL URLWithString:@"http://wholepunk.com/tmp/pretio/wholepunk_logo.png"]
onReceivedAd:^(TFTInterstitial *interstitial) {
[interstitial showWithViewController:self];
} onAdDidFail:nil onAdDidShow:nil onAdWasTapped:nil onAdWasDismissed:nil];- Show a Rescue interstitial:
[TFTInterstitial loadRescueInterstitialWithTitle:@"Rescue Title"
brandingText: @"Our Brand"
enticementText:@"we'll give you a pony"
rewardDescription:@"It's a really nice pony"
rewardIcon:[NSURL URLWithString:@"http://wholepunk.com/tmp/pretio/wholepunk_logo.png"]
optInButtonText:@"Opt In Please"
onReceivedAd:^(TFTInterstitial *interstitial) {
[interstitial showWithViewController:self];
} onAdDidFail:nil onAdDidShow:nil onAdWasTapped:nil onAdWasDismissed:nil];- Show a Banner:
// Position a banner ad at the bottom of the screen
TFTBanner *bannerAd = [TFTBanner bannerWithFrame:CGRectMake(0, (self.view.frame.size.height - 50), self.view.frame.size.width, 50) delegate:nil];
[self.view addSubview:bannerAd];