demoapp/swift_initial_implementation (#4)
* Project setup * WIP * Add SdkKey in info.plist * Update ALAppDelegate.swift * Fix black screen * More fixes * Storyboard * Update Main.storyboard * Parallel objc demo app changes * Remove test ad unit id * Remove sdk key * Delete IDEWorkspaceChecks.plist * Delete IDEWorkspaceChecks.plist * Pod deintegrate pbxproj file * Update .gitignore * Force unwrap SDK in AppDelegate * Inline initialization of ad objects, remove if let checks
This commit is contained in:
Родитель
81ac0b2501
Коммит
ab0edf4da9
|
@ -18,7 +18,7 @@ DerivedData/
|
|||
xcuserdata/
|
||||
xcworkspace/
|
||||
*.xcworkspacedata
|
||||
DemoApp-ObjC/DemoApp-ObjC.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
|
||||
*IDEWorkspaceChecks.plist
|
||||
|
||||
## Other
|
||||
*.moved-aside
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface ALHomeViewController : UIViewController
|
||||
@interface ALHomeViewController : UITableViewController
|
||||
|
||||
@end
|
||||
|
|
|
@ -21,13 +21,15 @@
|
|||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
self.adView = [[MAAdView alloc] initWithAdUnitIdentifier: @"BANNER_AD_UNIT_ID"];
|
||||
self.adView = [[MAAdView alloc] initWithAdUnitIdentifier: @"YOUR_AD_UNIT_ID"];
|
||||
self.adView.delegate = self;
|
||||
self.adView.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
|
||||
// Set background or background color for banners to be fully functional
|
||||
self.adView.backgroundColor = UIColor.blackColor;
|
||||
|
||||
[self.view addSubview: self.adView];
|
||||
|
||||
// Center the banner and anchor it to the top of the screen.
|
||||
CGFloat height = (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad) ? 90 : 50; // Banner height on iPhone and iPad is 50 and 90, respectively
|
||||
[self.view addConstraints: @[[self constraintWithAdView: self.adView andAttribute: NSLayoutAttributeLeading],
|
||||
|
@ -40,7 +42,6 @@
|
|||
attribute: NSLayoutAttributeNotAnAttribute
|
||||
multiplier: 1.0
|
||||
constant: height]]];
|
||||
[self.view addSubview: self.adView];
|
||||
|
||||
// Load the first ad
|
||||
[self.adView loadAd];
|
||||
|
@ -48,7 +49,7 @@
|
|||
|
||||
- (NSLayoutConstraint *)constraintWithAdView:(MAAdView *)adView andAttribute:(NSLayoutAttribute)attribute
|
||||
{
|
||||
return [NSLayoutConstraint constraintWithItem: self.adView
|
||||
return [NSLayoutConstraint constraintWithItem: adView
|
||||
attribute: attribute
|
||||
relatedBy: NSLayoutRelationEqual
|
||||
toItem: self.view
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="7Ga-dD-PKi">
|
||||
<device id="retina6_1" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="7Ga-dD-PKi">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
@ -13,7 +11,7 @@
|
|||
<!--Home View Controller-->
|
||||
<scene sceneID="kUz-88-3U0">
|
||||
<objects>
|
||||
<tableViewController id="Xhz-da-ENL" customClass="ALHomeViewController" customModule="DemoApp_ObjC" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableViewController id="Xhz-da-ENL" customClass="ALHomeViewController" sceneMemberID="viewController">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="qUe-EF-iqJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
|
@ -26,11 +24,11 @@
|
|||
<rect key="frame" x="0.0" y="55.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="gnk-Wm-cnP" id="UDo-Oe-dll">
|
||||
<rect key="frame" x="0.0" y="0.0" width="376" height="43.5"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="382.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Interstitials" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="8le-fN-BRS">
|
||||
<rect key="frame" x="20" y="0.0" width="356" height="43.5"/>
|
||||
<rect key="frame" x="20" y="0.0" width="354.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
|
@ -46,11 +44,11 @@
|
|||
<rect key="frame" x="0.0" y="99.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="sjX-rW-J4x" id="haN-UP-4gB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="376" height="43.5"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="382.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Rewarded" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="jwg-iU-PjM">
|
||||
<rect key="frame" x="20" y="0.0" width="356" height="43.5"/>
|
||||
<rect key="frame" x="20" y="0.0" width="354.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
|
@ -66,11 +64,11 @@
|
|||
<rect key="frame" x="0.0" y="143.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="McN-1s-PdH" id="uDH-cj-B6x">
|
||||
<rect key="frame" x="0.0" y="0.0" width="376" height="43.5"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="382.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Auto Layout Banners / Leaders" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="sqm-jN-17q">
|
||||
<rect key="frame" x="20" y="0.0" width="356" height="43.5"/>
|
||||
<rect key="frame" x="20" y="0.0" width="354.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
|
@ -86,11 +84,11 @@
|
|||
<rect key="frame" x="0.0" y="187.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="4rA-1a-Qdu" id="rWL-gK-Qk7">
|
||||
<rect key="frame" x="0.0" y="0.0" width="376" height="43.5"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="382.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Frame Layout Banners / Leaders" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="qEz-dE-EJ6" userLabel="Frame Layout Banners / Leaders">
|
||||
<rect key="frame" x="20" y="0.0" width="356" height="43.5"/>
|
||||
<rect key="frame" x="20" y="0.0" width="354.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
|
@ -106,11 +104,11 @@
|
|||
<rect key="frame" x="0.0" y="231.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Sj2-mt-y69" id="DVy-il-4Jg">
|
||||
<rect key="frame" x="0.0" y="0.0" width="376" height="43.5"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="382.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Interface Builder Banners / Leaders" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ibI-wO-fLO">
|
||||
<rect key="frame" x="20" y="0.0" width="356" height="43.5"/>
|
||||
<rect key="frame" x="20" y="0.0" width="354.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AppLovinSdkKey</key>
|
||||
<string>SDK_KEY_HERE</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
|
@ -43,7 +45,5 @@
|
|||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>AppLovinSdkKey</key>
|
||||
<string>SDK_KEY_HERE</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -0,0 +1,401 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 51;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
3763B23723357C4B00E49783 /* ALAppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3763B23623357C4B00E49783 /* ALAppDelegate.swift */; };
|
||||
3763B23923357C4B00E49783 /* ALHomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3763B23823357C4B00E49783 /* ALHomeViewController.swift */; };
|
||||
3763B23C23357C4B00E49783 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3763B23A23357C4B00E49783 /* Main.storyboard */; };
|
||||
3763B23E23357C4D00E49783 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3763B23D23357C4D00E49783 /* Assets.xcassets */; };
|
||||
3763B24123357C4D00E49783 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3763B23F23357C4D00E49783 /* LaunchScreen.storyboard */; };
|
||||
3763B24923357CEC00E49783 /* ALAutoLayoutBannerAdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3763B24823357CEC00E49783 /* ALAutoLayoutBannerAdViewController.swift */; };
|
||||
3763B24C23357D1C00E49783 /* ALFrameLayoutBannerAdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3763B24B23357D1C00E49783 /* ALFrameLayoutBannerAdViewController.swift */; };
|
||||
3763B24E23357D3000E49783 /* ALInterstitialAdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3763B24D23357D3000E49783 /* ALInterstitialAdViewController.swift */; };
|
||||
3763B25023357D3A00E49783 /* ALRewardedAdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3763B24F23357D3A00E49783 /* ALRewardedAdViewController.swift */; };
|
||||
3763B25223357D4A00E49783 /* ALInterfaceBuilderBannerAdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3763B25123357D4A00E49783 /* ALInterfaceBuilderBannerAdViewController.swift */; };
|
||||
37C4D0E8233D834900096894 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37C4D0E7233D834900096894 /* main.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
3763B23323357C4B00E49783 /* DemoApp-Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DemoApp-Swift.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3763B23623357C4B00E49783 /* ALAppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ALAppDelegate.swift; sourceTree = "<group>"; };
|
||||
3763B23823357C4B00E49783 /* ALHomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ALHomeViewController.swift; sourceTree = "<group>"; };
|
||||
3763B23B23357C4B00E49783 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
3763B23D23357C4D00E49783 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
3763B24023357C4D00E49783 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
3763B24223357C4D00E49783 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
3763B24823357CEC00E49783 /* ALAutoLayoutBannerAdViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ALAutoLayoutBannerAdViewController.swift; sourceTree = "<group>"; };
|
||||
3763B24B23357D1C00E49783 /* ALFrameLayoutBannerAdViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ALFrameLayoutBannerAdViewController.swift; sourceTree = "<group>"; };
|
||||
3763B24D23357D3000E49783 /* ALInterstitialAdViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ALInterstitialAdViewController.swift; sourceTree = "<group>"; };
|
||||
3763B24F23357D3A00E49783 /* ALRewardedAdViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ALRewardedAdViewController.swift; sourceTree = "<group>"; };
|
||||
3763B25123357D4A00E49783 /* ALInterfaceBuilderBannerAdViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ALInterfaceBuilderBannerAdViewController.swift; sourceTree = "<group>"; };
|
||||
37C4D0E7233D834900096894 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
3763B23023357C4B00E49783 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
3763B22A23357C4B00E49783 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3763B23523357C4B00E49783 /* DemoApp-Swift */,
|
||||
3763B23423357C4B00E49783 /* Products */,
|
||||
41B2F44DF9EB96E1BC86CD12 /* Pods */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3763B23423357C4B00E49783 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3763B23323357C4B00E49783 /* DemoApp-Swift.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3763B23523357C4B00E49783 /* DemoApp-Swift */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3763B24A23357CFB00E49783 /* Ads */,
|
||||
3763B23623357C4B00E49783 /* ALAppDelegate.swift */,
|
||||
3763B23823357C4B00E49783 /* ALHomeViewController.swift */,
|
||||
3763B25323357D7900E49783 /* Supporting Files */,
|
||||
);
|
||||
path = "DemoApp-Swift";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3763B24A23357CFB00E49783 /* Ads */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3763B24823357CEC00E49783 /* ALAutoLayoutBannerAdViewController.swift */,
|
||||
3763B24B23357D1C00E49783 /* ALFrameLayoutBannerAdViewController.swift */,
|
||||
3763B24D23357D3000E49783 /* ALInterstitialAdViewController.swift */,
|
||||
3763B24F23357D3A00E49783 /* ALRewardedAdViewController.swift */,
|
||||
3763B25123357D4A00E49783 /* ALInterfaceBuilderBannerAdViewController.swift */,
|
||||
);
|
||||
path = Ads;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3763B25323357D7900E49783 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
37C4D0E7233D834900096894 /* main.swift */,
|
||||
3763B24223357C4D00E49783 /* Info.plist */,
|
||||
3763B23D23357C4D00E49783 /* Assets.xcassets */,
|
||||
3763B23F23357C4D00E49783 /* LaunchScreen.storyboard */,
|
||||
3763B23A23357C4B00E49783 /* Main.storyboard */,
|
||||
);
|
||||
path = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
41B2F44DF9EB96E1BC86CD12 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
3763B23223357C4B00E49783 /* DemoApp-Swift */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3763B24523357C4D00E49783 /* Build configuration list for PBXNativeTarget "DemoApp-Swift" */;
|
||||
buildPhases = (
|
||||
3763B22F23357C4B00E49783 /* Sources */,
|
||||
3763B23023357C4B00E49783 /* Frameworks */,
|
||||
3763B23123357C4B00E49783 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "DemoApp-Swift";
|
||||
productName = "DemoApp-Swift";
|
||||
productReference = 3763B23323357C4B00E49783 /* DemoApp-Swift.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
3763B22B23357C4B00E49783 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1030;
|
||||
LastUpgradeCheck = 1030;
|
||||
ORGANIZATIONNAME = AppLovin;
|
||||
TargetAttributes = {
|
||||
3763B23223357C4B00E49783 = {
|
||||
CreatedOnToolsVersion = 10.3;
|
||||
LastSwiftMigration = 1030;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 3763B22E23357C4B00E49783 /* Build configuration list for PBXProject "DemoApp-Swift" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 3763B22A23357C4B00E49783;
|
||||
productRefGroup = 3763B23423357C4B00E49783 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
3763B23223357C4B00E49783 /* DemoApp-Swift */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
3763B23123357C4B00E49783 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3763B24123357C4D00E49783 /* LaunchScreen.storyboard in Resources */,
|
||||
3763B23E23357C4D00E49783 /* Assets.xcassets in Resources */,
|
||||
3763B23C23357C4B00E49783 /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
3763B22F23357C4B00E49783 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3763B25223357D4A00E49783 /* ALInterfaceBuilderBannerAdViewController.swift in Sources */,
|
||||
3763B24C23357D1C00E49783 /* ALFrameLayoutBannerAdViewController.swift in Sources */,
|
||||
37C4D0E8233D834900096894 /* main.swift in Sources */,
|
||||
3763B24923357CEC00E49783 /* ALAutoLayoutBannerAdViewController.swift in Sources */,
|
||||
3763B25023357D3A00E49783 /* ALRewardedAdViewController.swift in Sources */,
|
||||
3763B23923357C4B00E49783 /* ALHomeViewController.swift in Sources */,
|
||||
3763B24E23357D3000E49783 /* ALInterstitialAdViewController.swift in Sources */,
|
||||
3763B23723357C4B00E49783 /* ALAppDelegate.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
3763B23A23357C4B00E49783 /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3763B23B23357C4B00E49783 /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3763B23F23357C4D00E49783 /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3763B24023357C4D00E49783 /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
3763B24323357C4D00E49783 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3763B24423357C4D00E49783 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3763B24623357C4D00E49783 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = LUDVB6Z3BS;
|
||||
INFOPLIST_FILE = "$(SRCROOT)/DemoApp-Swift/Supporting Files/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
OTHER_LDFLAGS = "$(inherited)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.applovin.enterprise.apps.demoapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_INSTALL_OBJC_HEADER = NO;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3763B24723357C4D00E49783 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = LUDVB6Z3BS;
|
||||
INFOPLIST_FILE = "$(SRCROOT)/DemoApp-Swift/Supporting Files/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
OTHER_LDFLAGS = "$(inherited)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.applovin.enterprise.apps.demoapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_INSTALL_OBJC_HEADER = NO;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
3763B22E23357C4B00E49783 /* Build configuration list for PBXProject "DemoApp-Swift" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3763B24323357C4D00E49783 /* Debug */,
|
||||
3763B24423357C4D00E49783 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
3763B24523357C4D00E49783 /* Build configuration list for PBXNativeTarget "DemoApp-Swift" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3763B24623357C4D00E49783 /* Debug */,
|
||||
3763B24723357C4D00E49783 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 3763B22B23357C4B00E49783 /* Project object */;
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// ALAppDelegate.swift
|
||||
// DemoApp-Swift
|
||||
//
|
||||
// Created by Andrew Tian on 9/20/19.
|
||||
// Copyright © 2019 AppLovin. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import AppLovinSDK
|
||||
|
||||
class ALAppDelegate: UIResponder, UIApplicationDelegate
|
||||
{
|
||||
var window: UIWindow?
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool
|
||||
{
|
||||
#warning("Make sure to add your AppLovin SDK key in the Info.plist under the \"AppLovinSDKKey\" key")
|
||||
|
||||
// Initialize the AppLovin SDK
|
||||
ALSdk.shared()!.mediationProvider = ALMediationProviderMAX
|
||||
ALSdk.shared()!.initializeSdk(completionHandler: { configuration in
|
||||
// AppLovin SDK is initialized, start loading ads now or later if ad gate is reached
|
||||
})
|
||||
|
||||
return true
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// ALHomeViewController.swift
|
||||
// DemoApp-Swift
|
||||
//
|
||||
// Created by Andrew Tian on 9/20/19.
|
||||
// Copyright © 2019 AppLovin. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class ALHomeViewController: UITableViewController
|
||||
{
|
||||
override func viewDidLoad()
|
||||
{
|
||||
super.viewDidLoad()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
//
|
||||
// ALAutoLayoutBannerAdViewController.swift
|
||||
// DemoApp-Swift
|
||||
//
|
||||
// Created by Andrew Tian on 9/20/19.
|
||||
// Copyright © 2019 AppLovin. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import AppLovinSDK
|
||||
|
||||
class ALAutoLayoutBannerAdViewController: UIViewController, MAAdViewAdDelegate
|
||||
{
|
||||
private let adView = MAAdView(adUnitIdentifier: "YOUR_AD_UNIT_ID")
|
||||
|
||||
// MARK: View Lifecycle
|
||||
|
||||
override func viewDidLoad()
|
||||
{
|
||||
super.viewDidLoad()
|
||||
|
||||
adView.delegate = self
|
||||
adView.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
// Set background or background color for banners to be fully functional
|
||||
adView.backgroundColor = .black
|
||||
|
||||
view.addSubview(adView)
|
||||
|
||||
// Center the banner and anchor it to the top of the screen.
|
||||
let height: CGFloat = (UIDevice.current.userInterfaceIdiom == .pad) ? 90 : 50 // Banner height on iPhone and iPad is 50 and 90, respectively
|
||||
view.addConstraints([
|
||||
constraint(with: adView, andAttribute: .leading),
|
||||
constraint(with: adView, andAttribute: .trailing),
|
||||
constraint(with: adView, andAttribute: .top),
|
||||
NSLayoutConstraint(item: adView, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: height)])
|
||||
|
||||
// Load the first ad
|
||||
adView.loadAd()
|
||||
}
|
||||
|
||||
func constraint(with adView: MAAdView, andAttribute attribute: NSLayoutConstraint.Attribute) -> NSLayoutConstraint
|
||||
{
|
||||
return NSLayoutConstraint(item: adView, attribute: attribute, relatedBy: .equal, toItem: view, attribute: attribute, multiplier: 1.0, constant: 0.0)
|
||||
}
|
||||
|
||||
// MARK: MAAdDelegate Protocol
|
||||
|
||||
func didLoad(_ ad: MAAd) {}
|
||||
|
||||
func didFailToLoadAd(forAdUnitIdentifier adUnitIdentifier: String, withErrorCode errorCode: Int) {}
|
||||
|
||||
func didDisplay(_ ad: MAAd) {}
|
||||
|
||||
func didHide(_ ad: MAAd) {}
|
||||
|
||||
func didClick(_ ad: MAAd) {}
|
||||
|
||||
func didFail(toDisplay ad: MAAd, withErrorCode errorCode: Int) {}
|
||||
|
||||
// MARK: MAAdViewAdDelegate Protocol
|
||||
|
||||
func didExpand(_ ad: MAAd) {}
|
||||
|
||||
func didCollapse(_ ad: MAAd) {}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
//
|
||||
// ALFrameLayoutBannerAdViewController.swift
|
||||
// DemoApp-Swift
|
||||
//
|
||||
// Created by Andrew Tian on 9/20/19.
|
||||
// Copyright © 2019 AppLovin. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import AppLovinSDK
|
||||
|
||||
class ALFrameLayoutBannerAdViewController: UIViewController, MAAdViewAdDelegate
|
||||
{
|
||||
private let adView = MAAdView(adUnitIdentifier: "YOUR_AD_UNIT_ID")
|
||||
|
||||
// MARK: View Lifecycle
|
||||
|
||||
override func viewDidLoad()
|
||||
{
|
||||
super.viewDidLoad()
|
||||
|
||||
adView.delegate = self
|
||||
|
||||
// Calculate dimensions
|
||||
let width = view.bounds.width // Stretch to the width of the screen for banners to be fully functional
|
||||
let height: CGFloat = (UIDevice.current.userInterfaceIdiom == .pad) ? 90 : 50 // Banner height on iPhone and iPad is 50 and 90, respectively
|
||||
let x: CGFloat = 0
|
||||
let y: CGFloat = 0
|
||||
|
||||
adView.frame = CGRect(x: x, y: y, width: width, height: height)
|
||||
|
||||
// Set background or background color for banners to be fully functional
|
||||
adView.backgroundColor = .black
|
||||
|
||||
view.addSubview(adView)
|
||||
|
||||
// Load the first ad
|
||||
adView.loadAd()
|
||||
}
|
||||
|
||||
// MARK: MAAdDelegate Protocol
|
||||
|
||||
func didLoad(_ ad: MAAd) {}
|
||||
|
||||
func didFailToLoadAd(forAdUnitIdentifier adUnitIdentifier: String, withErrorCode errorCode: Int) {}
|
||||
|
||||
func didDisplay(_ ad: MAAd) {}
|
||||
|
||||
func didHide(_ ad: MAAd) {}
|
||||
|
||||
func didClick(_ ad: MAAd) {}
|
||||
|
||||
func didFail(toDisplay ad: MAAd, withErrorCode errorCode: Int) {}
|
||||
|
||||
// MARK: MAAdViewAdDelegate Protocol
|
||||
|
||||
func didExpand(_ ad: MAAd) {}
|
||||
|
||||
func didCollapse(_ ad: MAAd) {}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
//
|
||||
// ALInterfaceBuilderBannerAdViewController.swift
|
||||
// DemoApp-Swift
|
||||
//
|
||||
// Created by Andrew Tian on 9/20/19.
|
||||
// Copyright © 2019 AppLovin. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import AppLovinSDK
|
||||
|
||||
class ALInterfaceBuilderBannerAdViewController: UIViewController, MAAdViewAdDelegate
|
||||
{
|
||||
@IBOutlet weak var adView: MAAdView!
|
||||
|
||||
// MARK: View Lifecycle
|
||||
|
||||
override func viewDidLoad()
|
||||
{
|
||||
super.viewDidLoad()
|
||||
|
||||
// NOTE: Must set Storyboard "User Defined Runtime Attributes" for banner ad view
|
||||
// Key Path = ad_unit_id
|
||||
// Type = String
|
||||
// Value = YOUR_AD_UNIT_ID
|
||||
|
||||
// Load the first ad
|
||||
adView.loadAd()
|
||||
}
|
||||
|
||||
// MARK: MAAdDelegate Protocol
|
||||
|
||||
func didLoad(_ ad: MAAd) {}
|
||||
|
||||
func didFailToLoadAd(forAdUnitIdentifier adUnitIdentifier: String, withErrorCode errorCode: Int) {}
|
||||
|
||||
func didDisplay(_ ad: MAAd) {}
|
||||
|
||||
func didHide(_ ad: MAAd) {}
|
||||
|
||||
func didClick(_ ad: MAAd) {}
|
||||
|
||||
func didFail(toDisplay ad: MAAd, withErrorCode errorCode: Int) {}
|
||||
|
||||
// MARK: MAAdViewAdDelegate Protocol
|
||||
|
||||
func didExpand(_ ad: MAAd) {}
|
||||
|
||||
func didCollapse(_ ad: MAAd) {}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
//
|
||||
// ALInterstitialAdViewController.swift
|
||||
// DemoApp-Swift
|
||||
//
|
||||
// Created by Andrew Tian on 9/20/19.
|
||||
// Copyright © 2019 AppLovin. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import AppLovinSDK
|
||||
|
||||
class ALInterstitialAdViewController: UIViewController, MAAdViewAdDelegate
|
||||
{
|
||||
private let interstitialAd = MAInterstitialAd(adUnitIdentifier: "YOUR_AD_UNIT_ID")
|
||||
|
||||
// MARK: View Lifecycle
|
||||
|
||||
override func viewDidLoad()
|
||||
{
|
||||
super.viewDidLoad()
|
||||
|
||||
interstitialAd.delegate = self
|
||||
|
||||
// Load the first ad
|
||||
interstitialAd.load()
|
||||
}
|
||||
|
||||
// MARK: IB Actions
|
||||
|
||||
@IBAction func showAd()
|
||||
{
|
||||
interstitialAd.show()
|
||||
}
|
||||
|
||||
// MARK: MAAdDelegate Protocol
|
||||
|
||||
func didLoad(_ ad: MAAd)
|
||||
{
|
||||
// Interstitial ad is ready to be shown. '[self.interstitialAd isReady]' will now return 'YES'
|
||||
}
|
||||
|
||||
func didFailToLoadAd(forAdUnitIdentifier adUnitIdentifier: String, withErrorCode errorCode: Int)
|
||||
{
|
||||
// Interstitial ad failed to load. We recommend re-trying in 3 seconds.
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + Double(3 * Double(NSEC_PER_SEC)), execute: {
|
||||
self.interstitialAd.load()
|
||||
})
|
||||
}
|
||||
|
||||
func didDisplay(_ ad: MAAd) {}
|
||||
|
||||
func didClick(_ ad: MAAd) {}
|
||||
|
||||
func didExpand(_ ad: MAAd) {}
|
||||
|
||||
func didCollapse(_ ad: MAAd) {}
|
||||
|
||||
func didHide(_ ad: MAAd)
|
||||
{
|
||||
// Interstitial ad is hidden. Pre-load the next ad
|
||||
interstitialAd.load()
|
||||
}
|
||||
|
||||
func didFail(toDisplay ad: MAAd, withErrorCode errorCode: Int)
|
||||
{
|
||||
// Interstitial ad failed to display. We recommend loading the next ad
|
||||
interstitialAd.load()
|
||||
}
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
//
|
||||
// ALRewardedAdViewController.swift
|
||||
// DemoApp-Swift
|
||||
//
|
||||
// Created by Andrew Tian on 9/20/19.
|
||||
// Copyright © 2019 AppLovin. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import AppLovinSDK
|
||||
|
||||
class ALRewardedAdViewController: UIViewController, MARewardedAdDelegate
|
||||
{
|
||||
private let rewardedAd = MARewardedAd.shared(withAdUnitIdentifier: "REWARD_AD_UNIT_ID")
|
||||
|
||||
// MARK: View Lifecycle
|
||||
|
||||
override func viewDidLoad()
|
||||
{
|
||||
super.viewDidLoad()
|
||||
|
||||
rewardedAd.delegate = self
|
||||
|
||||
// Load the first ad
|
||||
rewardedAd.load()
|
||||
}
|
||||
|
||||
// MARK: IB Actions
|
||||
|
||||
@IBAction func showAd()
|
||||
{
|
||||
rewardedAd.show()
|
||||
}
|
||||
|
||||
// MARK: MAAdDelegate Protocol
|
||||
|
||||
func didLoad(_ ad: MAAd)
|
||||
{
|
||||
// Rewarded ad is ready to be shown. '[self.rewardedAd isReady]' will now return 'YES'
|
||||
}
|
||||
|
||||
func didFailToLoadAd(forAdUnitIdentifier adUnitIdentifier: String, withErrorCode errorCode: Int)
|
||||
{
|
||||
// Rewarded ad failed to load. We recommend re-trying in 3 seconds.
|
||||
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(3 * Double(NSEC_PER_SEC)), execute: {
|
||||
self.rewardedAd.load()
|
||||
})
|
||||
}
|
||||
|
||||
func didDisplay(_ ad: MAAd) {}
|
||||
|
||||
func didClick(_ ad: MAAd) {}
|
||||
|
||||
func didHide(_ ad: MAAd)
|
||||
{
|
||||
// Rewarded ad is hidden. Pre-load the next ad
|
||||
rewardedAd.load()
|
||||
}
|
||||
|
||||
func didFail(toDisplay ad: MAAd, withErrorCode errorCode: Int)
|
||||
{
|
||||
// Rewarded ad failed to display. We recommend loading the next ad
|
||||
rewardedAd.load()
|
||||
}
|
||||
|
||||
// MARK: MARewardedAdDelegate Protocol
|
||||
|
||||
func didStartRewardedVideo(for ad: MAAd) {}
|
||||
|
||||
func didCompleteRewardedVideo(for ad: MAAd) {}
|
||||
|
||||
func didRewardUser(for ad: MAAd, with reward: MAReward)
|
||||
{
|
||||
// Rewarded ad was displayed and user should receive the reward
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "83.5x83.5",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
|
@ -0,0 +1,274 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="7Ga-dD-PKi">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Home View Controller-->
|
||||
<scene sceneID="kUz-88-3U0">
|
||||
<objects>
|
||||
<tableViewController id="Xhz-da-ENL" customClass="ALHomeViewController" customModule="DemoApp_Swift" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="qUe-EF-iqJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<gestureRecognizers/>
|
||||
<sections>
|
||||
<tableViewSection headerTitle="MAX ADS" id="Ppw-xv-c7e">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="rootPrototype" textLabel="8le-fN-BRS" style="IBUITableViewCellStyleDefault" id="gnk-Wm-cnP">
|
||||
<rect key="frame" x="0.0" y="55.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="gnk-Wm-cnP" id="UDo-Oe-dll">
|
||||
<rect key="frame" x="0.0" y="0.0" width="382.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Interstitials" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="8le-fN-BRS">
|
||||
<rect key="frame" x="20" y="0.0" width="354.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<segue destination="hvg-Tw-ebo" kind="show" id="7d2-az-xxt"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="rootPrototype" textLabel="jwg-iU-PjM" style="IBUITableViewCellStyleDefault" id="sjX-rW-J4x">
|
||||
<rect key="frame" x="0.0" y="99.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="sjX-rW-J4x" id="haN-UP-4gB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="382.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Rewarded" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="jwg-iU-PjM">
|
||||
<rect key="frame" x="20" y="0.0" width="354.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<segue destination="Ax6-sK-Kei" kind="show" id="20f-rX-ydW"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="rootPrototype" textLabel="sqm-jN-17q" style="IBUITableViewCellStyleDefault" id="McN-1s-PdH">
|
||||
<rect key="frame" x="0.0" y="143.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="McN-1s-PdH" id="uDH-cj-B6x">
|
||||
<rect key="frame" x="0.0" y="0.0" width="382.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Auto Layout Banners / Leaders" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="sqm-jN-17q">
|
||||
<rect key="frame" x="20" y="0.0" width="354.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<segue destination="t4N-CR-C81" kind="show" id="8jR-qK-Bq5"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="rootPrototype" textLabel="qEz-dE-EJ6" style="IBUITableViewCellStyleDefault" id="4rA-1a-Qdu">
|
||||
<rect key="frame" x="0.0" y="187.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="4rA-1a-Qdu" id="rWL-gK-Qk7">
|
||||
<rect key="frame" x="0.0" y="0.0" width="382.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Frame Layout Banners / Leaders" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="qEz-dE-EJ6" userLabel="Frame Layout Banners / Leaders">
|
||||
<rect key="frame" x="20" y="0.0" width="354.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<segue destination="0nG-y1-jZJ" kind="show" id="wnR-dp-cdX"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="rootPrototype" textLabel="ibI-wO-fLO" style="IBUITableViewCellStyleDefault" id="Sj2-mt-y69">
|
||||
<rect key="frame" x="0.0" y="231.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Sj2-mt-y69" id="DVy-il-4Jg">
|
||||
<rect key="frame" x="0.0" y="0.0" width="382.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Interface Builder Banners / Leaders" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ibI-wO-fLO">
|
||||
<rect key="frame" x="20" y="0.0" width="354.5" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<segue destination="Lhe-mt-J8Q" kind="show" id="943-b8-KqA"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
</sections>
|
||||
</tableView>
|
||||
<navigationItem key="navigationItem" id="e1i-r7-ONc"/>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="0eV-wE-SZP" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-277" y="171"/>
|
||||
</scene>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="xQE-Gg-Qfm">
|
||||
<objects>
|
||||
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="7Ga-dD-PKi" sceneMemberID="viewController">
|
||||
<toolbarItems/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="Pkd-by-cEc">
|
||||
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<nil name="viewControllers"/>
|
||||
<connections>
|
||||
<segue destination="Xhz-da-ENL" kind="relationship" relationship="rootViewController" id="eu1-lC-4dr"/>
|
||||
</connections>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="lXr-9K-gJw" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-1030.4347826086957" y="170.75892857142856"/>
|
||||
</scene>
|
||||
<!--Interstitial Ads-->
|
||||
<scene sceneID="jqw-xY-VjK">
|
||||
<objects>
|
||||
<viewController title="Interstitial Ads" id="hvg-Tw-ebo" customClass="ALInterstitialAdViewController" customModule="DemoApp_Swift" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="cMa-q4-eJl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dDc-3C-PhG">
|
||||
<rect key="frame" x="0.0" y="88" width="414" height="774"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" title="Show"/>
|
||||
<connections>
|
||||
<action selector="showAd" destination="hvg-Tw-ebo" eventType="touchUpInside" id="q6T-AM-u99"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<viewLayoutGuide key="safeArea" id="tt7-7E-5dX"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="6mE-Fk-JPR" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="470" y="-500"/>
|
||||
</scene>
|
||||
<!--Rewarded Ads-->
|
||||
<scene sceneID="n68-Er-1n0">
|
||||
<objects>
|
||||
<viewController title="Rewarded Ads" id="Ax6-sK-Kei" customClass="ALRewardedAdViewController" customModule="DemoApp_Swift" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="NfR-Km-vOC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="crr-D9-EXc">
|
||||
<rect key="frame" x="0.0" y="61" width="414" height="774"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" title="Show"/>
|
||||
<connections>
|
||||
<action selector="showAd" destination="hvg-Tw-ebo" eventType="touchUpInside" id="RM4-p2-hIu"/>
|
||||
<action selector="showAd" destination="Ax6-sK-Kei" eventType="touchUpInside" id="zED-Qh-dqg"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<viewLayoutGuide key="safeArea" id="P0W-JD-8nB"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="g63-20-XpD" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="471" y="171"/>
|
||||
</scene>
|
||||
<!--Auto Layout Banner Ads-->
|
||||
<scene sceneID="whl-QQ-Von">
|
||||
<objects>
|
||||
<viewController title="Auto Layout Banner Ads" id="t4N-CR-C81" customClass="ALAutoLayoutBannerAdViewController" customModule="DemoApp_Swift" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="uUJ-XM-qql">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="808"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<viewLayoutGuide key="safeArea" id="mAF-qa-bfO"/>
|
||||
</view>
|
||||
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="hAI-8Y-gAP" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="470" y="841"/>
|
||||
</scene>
|
||||
<!--Frame Layout Banner Ads-->
|
||||
<scene sceneID="U9h-UA-DzG">
|
||||
<objects>
|
||||
<viewController title="Frame Layout Banner Ads" id="0nG-y1-jZJ" customClass="ALFrameLayoutBannerAdViewController" customModule="DemoApp_Swift" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="3Wt-xw-LQM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="808"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<viewLayoutGuide key="safeArea" id="5d1-qc-8SX"/>
|
||||
</view>
|
||||
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="SaY-Tu-Pxg" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1197" y="840"/>
|
||||
</scene>
|
||||
<!--Delegate-->
|
||||
<scene sceneID="xhy-cf-ZfV">
|
||||
<objects>
|
||||
<viewController title="Interface Builder Banner Ads" id="Lhe-mt-J8Q" customClass="ALInterfaceBuilderBannerAdViewController" customModule="DemoApp_Swift" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="W3k-OJ-EjN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="808"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="R5C-91-3ir" customClass="MAAdView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="50"/>
|
||||
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="KOc-zK-MqA"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="ad_unit_id" value="BANNER_AD_UNIT_ID"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="Lhe-mt-J8Q" id="7gx-Rn-iry"/>
|
||||
</connections>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="R5C-91-3ir" firstAttribute="top" secondItem="W3k-OJ-EjN" secondAttribute="top" id="3vc-81-DKA"/>
|
||||
<constraint firstItem="kyo-bA-O0z" firstAttribute="trailing" secondItem="R5C-91-3ir" secondAttribute="trailing" id="Cz2-ZK-Xl9"/>
|
||||
<constraint firstItem="R5C-91-3ir" firstAttribute="leading" secondItem="kyo-bA-O0z" secondAttribute="leading" id="f0U-cg-ZKR"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="kyo-bA-O0z"/>
|
||||
</view>
|
||||
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
|
||||
<connections>
|
||||
<outlet property="adView" destination="R5C-91-3ir" id="WCn-2m-59X"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="MII-Ur-vbY" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1920" y="840"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AppLovinSdkKey</key>
|
||||
<string>SDK_KEY_HERE</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1000000</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,12 @@
|
|||
//
|
||||
// main.swift
|
||||
// DemoApp-Swift
|
||||
//
|
||||
// Created by Andrew Tian on 9/20/19.
|
||||
// Copyright © 2019 AppLovin. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
UIApplicationMain(CommandLine.argc, CommandLine.unsafeArgv, nil, NSStringFromClass(ALAppDelegate.self))
|
|
@ -0,0 +1,6 @@
|
|||
use_frameworks!
|
||||
inhibit_all_warnings!
|
||||
|
||||
target 'DemoApp-Swift' do
|
||||
pod 'AppLovinSDK'
|
||||
end
|
Загрузка…
Ссылка в новой задаче