Skip to content

Commit

Permalink
Update GMA SDK Version, DevApp To Use Interstitial Ads, Add Obj-C Ann…
Browse files Browse the repository at this point in the history
…otations (#8)

* Updating IMA SDK and UID SDK Version Dependencies
* Explicit Objective-C Support For SDK Classes
* Adding StoreKit For SKAdNetwork Support
* Implementing Rewarded Interstitial Example Code
* Adding UID2 Test Data; Reformatting Code
* License & Rename To GameViewController
  • Loading branch information
bleege authored Jul 6, 2023
1 parent 2885131 commit 5f706f3
Show file tree
Hide file tree
Showing 13 changed files with 507 additions and 338 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

/* Begin PBXBuildFile section */
A217470F29E79B5600EC20DF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A217470E29E79B5600EC20DF /* AppDelegate.swift */; };
A217471129E79B5600EC20DF /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A217471029E79B5600EC20DF /* SceneDelegate.swift */; };
A217471329E79B5600EC20DF /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A217471229E79B5600EC20DF /* ViewController.swift */; };
A217471329E79B5600EC20DF /* GameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A217471229E79B5600EC20DF /* GameViewController.swift */; };
A217471629E79B5600EC20DF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A217471429E79B5600EC20DF /* Main.storyboard */; };
A217471829E79B5600EC20DF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A217471729E79B5600EC20DF /* Assets.xcassets */; };
A217471B29E79B5600EC20DF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A217471929E79B5600EC20DF /* LaunchScreen.storyboard */; };
Expand All @@ -18,13 +17,13 @@
E23A114D29E84C4800FAE364 /* uid2identity.json in Resources */ = {isa = PBXBuildFile; fileRef = E23A114929E84C4700FAE364 /* uid2identity.json */; };
E23A114E29E84C4800FAE364 /* String+AppExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23A114A29E84C4800FAE364 /* String+AppExtensions.swift */; };
E23A114F29E84C4800FAE364 /* AppDataLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23A114B29E84C4800FAE364 /* AppDataLoader.swift */; };
E269E12D2A4F518500574FEF /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E269E12C2A4F518500574FEF /* StoreKit.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
A217470B29E79B5600EC20DF /* UID2GoogleGMADevelopmentApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UID2GoogleGMADevelopmentApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
A217470E29E79B5600EC20DF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
A217471029E79B5600EC20DF /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
A217471229E79B5600EC20DF /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
A217471229E79B5600EC20DF /* GameViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameViewController.swift; sourceTree = "<group>"; };
A217471529E79B5600EC20DF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
A217471729E79B5600EC20DF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
A217471A29E79B5600EC20DF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
Expand All @@ -34,6 +33,7 @@
E23A114929E84C4700FAE364 /* uid2identity.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = uid2identity.json; sourceTree = "<group>"; };
E23A114A29E84C4800FAE364 /* String+AppExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+AppExtensions.swift"; sourceTree = "<group>"; };
E23A114B29E84C4800FAE364 /* AppDataLoader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDataLoader.swift; sourceTree = "<group>"; };
E269E12C2A4F518500574FEF /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -42,6 +42,7 @@
buildActionMask = 2147483647;
files = (
A2E7019029E7A5DA00B9DFA1 /* UID2GMAPlugin in Frameworks */,
E269E12D2A4F518500574FEF /* StoreKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -71,8 +72,7 @@
children = (
E23A114729E84C2800FAE364 /* AppData */,
A217470E29E79B5600EC20DF /* AppDelegate.swift */,
A217471029E79B5600EC20DF /* SceneDelegate.swift */,
A217471229E79B5600EC20DF /* ViewController.swift */,
A217471229E79B5600EC20DF /* GameViewController.swift */,
A217471429E79B5600EC20DF /* Main.storyboard */,
A217471729E79B5600EC20DF /* Assets.xcassets */,
A217471929E79B5600EC20DF /* LaunchScreen.storyboard */,
Expand All @@ -92,6 +92,7 @@
A2E7018E29E7A5DA00B9DFA1 /* Frameworks */ = {
isa = PBXGroup;
children = (
E269E12C2A4F518500574FEF /* StoreKit.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -203,12 +204,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
A217471329E79B5600EC20DF /* ViewController.swift in Sources */,
A217471329E79B5600EC20DF /* GameViewController.swift in Sources */,
E23A114E29E84C4800FAE364 /* String+AppExtensions.swift in Sources */,
E23A114F29E84C4800FAE364 /* AppDataLoader.swift in Sources */,
E23A114C29E84C4800FAE364 /* Date+AppExtensions.swift in Sources */,
A217470F29E79B5600EC20DF /* AppDelegate.swift in Sources */,
A217471129E79B5600EC20DF /* SceneDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -361,7 +361,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = UID2GoogleGMADevelopmentApp/Info.plist;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard;
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
Expand Down Expand Up @@ -392,7 +392,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = UID2GoogleGMADevelopmentApp/Info.plist;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard;
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/googleads/swift-package-manager-google-mobile-ads.git",
"state" : {
"revision" : "886501bfff8bd8cc22899de2c1779e479c96f9ff",
"version" : "10.3.0"
"revision" : "a6e24f2167295d95371bfc3049e47381a73a9e43",
"version" : "10.7.0"
}
},
{
Expand All @@ -59,8 +59,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/IABTechLab/uid2-ios-sdk.git",
"state" : {
"revision" : "9706cbc8959593a81e5aea82926bc41ac9bbb9d3",
"version" : "0.1.0"
"revision" : "6204cbc27ef3bd48065e1fbd355958a6f03e248c",
"version" : "0.2.0"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,15 @@ import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.

// Initialize Google Mobile Ads SDK
GADMobileAds.sharedInstance().start(completionHandler: nil)
GADMobileAds.sharedInstance().start()

return true
}

// MARK: UISceneSession Lifecycle

func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}

func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}

}
Original file line number Diff line number Diff line change
@@ -1,48 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13528" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina5_9" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13526"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<!--Game View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="BannerExample" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="GameViewController" customModule="RewardedInterstitialExample" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="TWU-f5-Eu7"/>
<viewControllerLayoutGuide type="bottom" id="3Le-Kg-LNi"/>
<viewControllerLayoutGuide type="top" id="utH-8i-3AW"/>
<viewControllerLayoutGuide type="bottom" id="v0e-zY-aqb"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HpA-oj-RQs" customClass="GADBannerView">
<rect key="frame" x="27.666666666666657" y="728" width="320" height="50"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="320" id="TxW-US-Ckc"/>
<constraint firstAttribute="height" constant="50" id="c8F-jN-qA7"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="The Impossible Game" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6IL-to-DZf">
<rect key="frame" x="12" y="50" width="390" height="36"/>
<fontDescription key="fontDescription" type="system" pointSize="30"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NoO-Ga-hur">
<rect key="frame" x="20" y="482.5" width="374" height="41"/>
<fontDescription key="fontDescription" type="system" pointSize="24"/>
<state key="normal" title="Play Again">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="playAgain:" destination="BYZ-38-t0r" eventType="touchUpInside" id="8PF-rz-hFt"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Game Started" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wpQ-a9-WRd">
<rect key="frame" x="135.5" y="433.5" width="143" height="29"/>
<fontDescription key="fontDescription" type="system" pointSize="24"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Coins: 0" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AIa-H4-RwK" userLabel="Label">
<rect key="frame" x="40" y="855" width="63" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="HpA-oj-RQs" firstAttribute="bottom" secondItem="3Le-Kg-LNi" secondAttribute="top" id="8jY-pF-pXR"/>
<constraint firstAttribute="centerX" secondItem="HpA-oj-RQs" secondAttribute="centerX" id="WpR-yO-ukg"/>
<constraint firstAttribute="trailingMargin" secondItem="NoO-Ga-hur" secondAttribute="trailing" id="0oN-7D-qbb"/>
<constraint firstItem="v0e-zY-aqb" firstAttribute="top" secondItem="AIa-H4-RwK" secondAttribute="bottom" constant="20" id="LXH-0h-fnd"/>
<constraint firstItem="wpQ-a9-WRd" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="Rj7-wA-EE9"/>
<constraint firstItem="6IL-to-DZf" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" constant="-8" id="WGr-Js-IQC"/>
<constraint firstItem="6IL-to-DZf" firstAttribute="top" secondItem="utH-8i-3AW" secondAttribute="bottom" constant="50" id="XtW-vs-4Pk"/>
<constraint firstAttribute="leadingMargin" secondItem="NoO-Ga-hur" secondAttribute="leading" id="ZYv-Kl-Jml"/>
<constraint firstItem="NoO-Ga-hur" firstAttribute="top" secondItem="wpQ-a9-WRd" secondAttribute="bottom" constant="20" id="c67-gY-PSX"/>
<constraint firstAttribute="trailingMargin" secondItem="6IL-to-DZf" secondAttribute="trailing" constant="-8" id="hCf-OY-DWm"/>
<constraint firstItem="wpQ-a9-WRd" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="t4z-bx-Lo4"/>
<constraint firstItem="AIa-H4-RwK" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" constant="20" id="tiQ-7b-xtL"/>
</constraints>
</view>
<connections>
<outlet property="bannerView" destination="HpA-oj-RQs" id="fFs-Wi-V7a"/>
<outlet property="coinCountLabel" destination="AIa-H4-RwK" id="pwz-Kn-Y5S"/>
<outlet property="gameText" destination="wpQ-a9-WRd" id="jgH-bl-10i"/>
<outlet property="playAgainButton" destination="NoO-Ga-hur" id="NmL-nh-1EK"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="128" y="406.59333333333331"/>
<point key="canvasLocation" x="181.15942028985509" y="246.42857142857142"/>
</scene>
</scenes>
</document>
</document>
Loading

0 comments on commit 5f706f3

Please sign in to comment.