├── .gitignore ├── CHANGELOG-6x.md ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── Sample ├── Images │ ├── VungleLogo.png │ └── VungleLogoIcon.png ├── Vungle Sample App.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── Vungle Sample App.xccheckout │ └── xcshareddata │ │ └── xcschemes │ │ └── Vungle Sample App.xcscheme ├── Vungle Sample App │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── BannerTableViewCell.h │ ├── BannerTableViewCell.m │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Constants.h │ ├── FirstViewController.h │ ├── FirstViewController.m │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── icon _120x120.png │ │ │ ├── icon_152x152.png │ │ │ ├── icon_29x29.png │ │ │ ├── icon_40x40.png │ │ │ ├── icon_58x58-1.png │ │ │ ├── icon_58x58.png │ │ │ ├── icon_76x76.png │ │ │ ├── icon_80x80-1.png │ │ │ └── icon_80x80.png │ │ ├── Contents.json │ │ ├── LaunchImage.launchimage │ │ │ └── Contents.json │ │ ├── VungleLogo.imageset │ │ │ ├── Contents.json │ │ │ └── VungleLogo.png │ │ ├── first.imageset │ │ │ ├── Contents.json │ │ │ ├── first.png │ │ │ └── first@2x.png │ │ ├── second.imageset │ │ │ ├── Contents.json │ │ │ ├── second.png │ │ │ └── second@2x.png │ │ └── vungle_logo_aqua_mango_banner.imageset │ │ │ ├── Contents.json │ │ │ └── vungle_logo_aqua_mango_banner.png │ ├── LaunchScreen.storyboard │ ├── MRECTableViewCell.h │ ├── MRECTableViewCell.m │ ├── MultiAdViewController.h │ ├── MultiAdViewController.m │ ├── Vungle Sample App-Info.plist │ ├── Vungle Sample App-Prefix.pch │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m ├── Vungle Sample AppTests │ ├── Vungle Sample AppTests-Info.plist │ ├── Vungle_Sample_AppTests.m │ └── en.lproj │ │ └── InfoPlist.strings └── VungleSDK.xcframework │ ├── Info.plist │ ├── ios-arm64_armv7 │ └── VungleSDK.framework │ │ ├── Headers │ │ ├── VungleMediaView.h │ │ ├── VungleNativeAd.h │ │ ├── VungleSDK.h │ │ ├── VungleSDKCreativeTracking.h │ │ └── VungleSDKHeaderBidding.h │ │ ├── Info.plist │ │ ├── Modules │ │ └── module.modulemap │ │ └── VungleSDK │ └── ios-arm64_i386_x86_64-simulator │ └── VungleSDK.framework │ ├── Headers │ ├── VungleMediaView.h │ ├── VungleNativeAd.h │ ├── VungleSDK.h │ ├── VungleSDKCreativeTracking.h │ └── VungleSDKHeaderBidding.h │ ├── Info.plist │ ├── Modules │ └── module.modulemap │ └── VungleSDK └── VungleSDK-iOS.podspec /.gitignore: -------------------------------------------------------------------------------- 1 | Sample/Vungle Sample App.xcodeproj/project.xcworkspace/xcuserdata 2 | Sample/Vungle Sample App.xcodeproj/xcuserdata 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /CHANGELOG-6x.md: -------------------------------------------------------------------------------- 1 | ### Changelog 2 | 3 | ## VERSION 6.12.3 (Mar 4, 2023) 4 | * Bug fixes 5 | 6 | ## VERSION 6.12.2 (Feb 9, 2023) 7 | * Performance optimizations & bug fixes 8 | 9 | ## VERSION 6.12.1 (Nov 7, 2022) 10 | * iOS 16 support 11 | * Bug fixes and improvements 12 | 13 | ## VERSION 6.12.0 (Aug 1, 2022) 14 | * New ad format: Rewarded Interstitial (closed beta) 15 | * In-app bidding enhancements 16 | * Performance optimizations 17 | * Fixed memory leaks 18 | * Removal of ordinal view play option 19 | 20 | ## VERSION 6.11.0 (May 2, 2022) 21 | * Added support for Native Ads format for non-HB placements (closed beta) 22 | * Support for custom App Store product pages 23 | * COPPA API support (advanced setting) 24 | * Support of deep-linking URLs into other apps 25 | * In-app bidding enhancements 26 | * Caching improvements for HB placements 27 | * Fixed an issue to prevent HB banners from auto refreshing in mediated scenarios 28 | * Removed the unused VungleSDKNativeAds public header 29 | 30 | ## VERSION 6.10.6 (January 31, 2022) 31 | * Addressed a race condition that prevented SDK from bidding with valid tokens for banner ads. 32 | * Updated SDK prevents playability callbacks from firing with nil admarkups. 33 | * Fixed an issue that could prevent ad requests from sending when the app was resumed from background. 34 | * Updated the way SDK handles bad URLs and ad assets that fail to load as expected. 35 | 36 | ## VERSION 6.10.5 (December 1, 2021) 37 | * Addressed a race condition occurring on iOS 15.1 that was preventing SDK from initializing. 38 | * Addressed instances where adMarkup can be nil for VungleSDKHBDelegate callbacks 39 | * SDK compiled using Xcode 12.5 40 | 41 | ## VERSION 6.10.4 (November 8, 2021) 42 | * Fixed crashes related to SDK upgrades. 43 | * Fixed an issue where the publisher dashboard mute setting was getting reset at the SDK level. 44 | * Other minor bug fixes and stability improvements. 45 | 46 | ## VERSION 6.10.3 (September 23, 2021) 47 | * SDK version fully compatible with iOS 15 and Xcode 13. 48 | * For apps using Xcode 13, upgrading to this version is REQUIRED as older SDKs don’t support Xcode 13 for iOS 15 devices. 49 | * Updated the minimum iOS version to 10. SDK won’t support iOS versions 9 and below. 50 | 51 | ## VERSION 6.10.1 (Aug 12, 2021) 52 | * SKAdNetwork 2.2 & XCode12.5 - This update supports view-through attribution for interactive and video advertisement formats. This allows you to display your choice of advertising formats and measure which creatives are most effective, while preserving user privacy. 53 | * Swift integration - On SDK6.10.1, VungleSDK now contains a module map, so publishers no longer need a bridging-header file to import the VungleSDK. 54 | * Stability improvements 55 | #### Mediation In-App Bidding (Closed Beta) 56 | * Banner / MREC Bidding Support in Bidding 57 | * Caching enhancements for in-app bidding Placements 58 | * New SDK APIs for In-App bidding (Only applicable to mediation partners) 59 | 60 | ## VERSION 6.9.2 (April 14, 2021) 61 | * Thread deadlock issue reported by mediation partners 62 | * Background downloading enabled by default 63 | * Fix for Namespace collision 64 | * Includes the .xcframework bundle type introduced in Xcode 11. This bundle type allows support for multiple architectures, platforms and simulator in one package. 65 | * Stability Improvements 66 | 67 | ## VERSION 6.9.1 (January 21, 2021) 68 | * OM SDK Integration - The Open Measurement Software Development Kit (OM SDK) is designed to facilitate third-party viewability and verification measurement for ads served by Vungle. 69 | * Stability Improvements 70 | 71 | ## VERSION 6.8.1 (October 14, 2020) 72 | * SKOverlay Support: Using Apple's new SKOverlay to improve user's ad experience with a seamless presentation of the app store for app recommendation. 73 | * vungleAdViewedForPlacement - new callback introduced to more accurately track ad impressions 74 | * Stability Improvements 75 | 76 | ## VERSION 6.8.0 (September 15, 2020) 77 | * iOS 14 Support, built on Xcode 12 - Connect to all iOS users including those on the latest version, iOS 14. Xcode 12 required. 78 | * SkAdNetwork Support - Access all data sources to better understand your audience 79 | * AppTrackingTransparency Support - Prepare for upcoming privacy changes and ensure users have more controls on their data usage. 80 | * Updated StoreKit to be available for all formats - Create a seamless ad experience within your app in all formats. 81 | * Removed Flex Feed and Flex View formats 82 | * Stability improvements - Backend performance improvements to continually optimize your monetization efforts 83 | 84 | ## VERSION 6.7.1 (August 13, 2020) 85 | * Removal of Moat framework 86 | * Fixed issue with FMDB duplicate symbol 87 | * Various bug fixes 88 | 89 | ## VERSION 6.7.0 (June 22, 2020) 90 | * CCPA Support – Compliance with new government regulations while assuring your users their personal data is being used the way they want 91 | * Multiple banner ad support – Display multiple banners on the screen txo leverage more ways to monetize your inventory and attract Premium Buyers 92 | * Stability enhancements to continually ensure high performance 93 | * Improved real-time ad play callbacks for click and rewarded events for a better end-user experience 94 | * Improvements to orientation handling to improve end-user experience 95 | * Backend performance improvements to continually optimize your monetization efforts 96 | * Various bug fixes 97 | 98 | ## VERSION 6.5.3 (March 24, 2020) 99 | * Bugs and issues resolved. 100 | 101 | ## VERSION 6.5.1 102 | * Optimized caching logic to reduce data usage 103 | * Added additional support for new banner sizes (320x50, 300x50, 728x90) 104 | * Improved user experience and fixed issues related to Apple's StoreKit on iOS 13 105 | * Improved how our SDK handles orientation settings and changes 106 | * Eliminated main thread checker warnings 107 | * Updated device information provider 108 | * Made background webview of banner transparent 109 | * Ad reporting improvements 110 | * Removed VunglePlayAdOptionKeyBannerViewSize from pladAdOption 111 | * Updated Moat version to 3.7.5 112 | * Various bugs squashed and stability improvements 113 | 114 | ## VERSION 6.5.0 115 | * Introduction of Banner Format 116 | * Continuous improvements to ad caching 117 | * Updated Moat framework 118 | * Squashed many other bugs 119 | 120 | ## VERSION 6.4.6 121 | * Bug Fixes 122 | 123 | ## VERSION 6.4.5 124 | * Updated Moat 125 | * Bug Fixes 126 | 127 | ## VERSION 6.4.3 128 | * iOS 13 Support and Enhancements 129 | * Cache Optimization — Automatically optimizes ad caching to ensure ads are available faster. No additional work from developer needed. 130 | * Introduced new MREC Video placement type to serve higher performing banners. 131 | * Privacy by Design — Removed latitude and longitude collection to protect users. 132 | * Updated Moat to no longer collect location data. 133 | * Reduced App Store loading delay to reduce blank loading screens. 134 | * Removed UIWebView references due to Apple no longer accepting submissions of apps that use UIWebView APIs. 135 | * Publisher controls to override minimum disk requirements, helping to ensure good user experiences. 136 | 137 | ## VERSION 6.3.2 138 | * Support for iOS 12 139 | * StoreKit support for fullscreen MRAID ads 140 | * Improved Moat viewability tracking 141 | * Publishers can now track custom GDPR consent message versions 142 | * MRAID ads now mute according to SDK option 143 | 144 | ## VERSION 6.3.1 145 | * iOS 12 Compatibility 146 | * Improved ad display on iPhone X 147 | * Improved ad handling for placements 148 | * Bug Fixes 149 | 150 | ## VERSION 6.3.0 151 | * StoreKit support for MRAID ads 152 | * Extend additional Moat support for our exchange 153 | * Stability improvements 154 | 155 | ## VERSION 6.2.0 156 | * GDPR compliance 157 | * License updated 158 | * Removed the requirement to have an auto-cached placement 159 | * Removed the requirement to initialize Vungle SDK with all placements 160 | * Includes .xcframework to support multiple architectures or device types. 161 | * Bug fixes 162 | 163 | ## VERSION 5.4.0 164 | * Fixed crashes on iOS 7 165 | * Fixed crashes around Flex View layout logic 166 | * Improved Flex View and Flex Feed stability 167 | * Resolved duplicate symbol error on zipOpen4 168 | 169 | ## VERSION 5.3.2 170 | * Sleep code to be enforced at placement level 171 | * Ordinal data reporting 172 | * iOS 11 API for safeAreaLayoutGuide for iPhone X 173 | * Ability to close Flex-View ads through API or timer 174 | * Bug fixes and performance improvements 175 | 176 | ## VERSION 5.3.0 177 | * Allow cached ad to play when other placements are downloading 178 | * Allow cached ad to play when there is no reception 179 | * Fixed Flex View (ad unit) scaling issue 180 | * Removed background dim in an interactive ad unit 181 | 182 | ## VERSION 5.2.0 183 | * Fixed a regression of clickedThrough in internal reporting. Advertiser will see accurate clicks in dashboard 184 | * Fixed user agent format for internal reporting 185 | * Fixed an issue with application lifecycle that can result in black screens 186 | 187 | ## VERSION 5.1.1 188 | * Made cache improvements 189 | * Updated MOAT framework 190 | * Added code to prevent SDK from initializing in iOS 7 191 | 192 | ## VERSION 5.1.0 193 | * Launched new Placements feature. 194 | * Added Native Flex View ad unit. 195 | * Added Moat Viewability technology. 196 | * Added GZIP for faster network transfers. 197 | * Migrate MRAID to WKWebView on iOS 9 and 10 to address memory leak in UIWebView. 198 | * Disabled iOS 7 support. 199 | 200 | ## VERSION 4.1.0 201 | * Fix for occurrence of a black screen at the end of video. 202 | * Cache improvements. 203 | * Migrate to WKWebView for end cards on iOS 9 and 10 to address memory leak in UIWebView. 204 | * Set user-agent in HTTP header to platform user agent for all external requests. 205 | * StoreKit support for MRAID ads. 206 | 207 | ## VERSION 4.0.9 208 | * Fix wrong behavior for the willCloseAdWithViewInfo: delegate method 209 | * Improved SDK initialization 210 | * Minor fixes and performance improvements 211 | * Fix user-agent field on requests 212 | 213 | ## VERSION 4.0.8 214 | * Refresh the IDFA when app comes to foreground 215 | * Minor fixes 216 | 217 | ## VERSION 4.0.6 218 | * Add cache early check to initial operation chain 219 | * Prefix 3rd party zip/unzip lib functions 220 | * Track and use the didDownload state for legacy ads 221 | 222 | ## VERSION 4.0.5 223 | * Bug fixes 224 | * Performance improvement 225 | 226 | ## VERSION 4.0.4 227 | * iOS 10 OS performance optimizations 228 | * CloudUX functionality support 229 | * Vungle unique id implementation to maintain publisher frequency capping 230 | * Fix click area around CTA button 231 | * Resume video when app comes to foreground 232 | * Add logging when the publisher uses a wrong appId 233 | 234 | 235 | ## VERSION 3.2.2 236 | * Fix presenting modal view controller exception 237 | 238 | ## VERSION 3.2.1 239 | * Bitcode support! 240 | * Initialization prevention for devices under iOS 7.0 241 | * Multiple initialization crash fix 242 | 243 | ## VERSION 3.2.0 244 | * This SDK supports iOS 7+ devices only 245 | * Enabled SSL as default for all internal network requests 246 | * Improved caching performance 247 | * Resolved race-condition crash around fetchConfig request 248 | * Unified adPlayable behavior across flags & events 249 | * Fix for playAd return code inconsistency during streaming ad plays 250 | * Fix for progress bar location on smaller screens 251 | * Fix for AppStore failing to load on some occasions 252 | * Fix for issues resulting in inaccessible postroll 253 | 254 | ## VERSION 3.1.2 255 | * Bug fixes 256 | 257 | ## VERSION 3.1.0 258 | * API changed in Vungle delegate protocol: `vungleSDKhasCachedAdAvailable` changed to `vungleSDKAdPlayableChanged:` 259 | * API changed in Vungle singleton: `isCachedAdAvailable` deprecated in favor of `isAdPlayable` 260 | * New UI while playing video 261 | * Bug fixes (background related bug, networking improvements) 262 | 263 | ## VERSION 3.0.13 264 | * Minor Bug Fixes 265 | 266 | ## VERSION 3.0.12 267 | * Fixes crash that happened on rare occasions when sending the app to the background 268 | * Improves re-queuing of network requests. It should improve the ability to re-send requests even after they failed. 269 | * Move saved /reportAds from cache directory to app support directory 270 | * Option to modify incentivized alert text (title, body, close button, and continue button) 271 | 272 | ## VERSION 3.0.11 273 | * Deprecated VunglePlayAdOptionKeyShowClose 274 | * Deprecated VungleSDK#playAd: & VungleSDK#playAd:withOptions: 275 | * Fixed some minor memory leaks 276 | * Fixed orientations issues on iOS 8 277 | * Fixed some random crashes on very limited edge cases 278 | * Moved internal database from Documents to App Support 279 | 280 | ## VERSION 3.0.10 281 | * Fixed crash that killed the app when sent to the background (in rare conditions) 282 | * Fixed postroll and corrupted video bugs 283 | * Improved support for iOS 8 284 | 285 | ## VERSION 3.0.9 286 | 287 | * improved iOS 5 support 288 | * fixed TPAT bugs 289 | 290 | ## VERSION 3.0.8 291 | 292 | * added global playAd options 293 | * added placements for each play, as well as dev-defined extra keys 294 | * Fix a few mem leaks 295 | * Send post params instead of query params for /sessionEnd 296 | * miniz symbols no longer exposed 297 | * Delegate methods are optional now 298 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## Version 7.4.1 (September 3, 2024) 4 | - Optimization in SDK initialization 5 | - Update OMSDK to version 1.5.0 6 | - Bug fixes and stability improvements 7 | 8 | ## Version 7.4.0 (June 26, 2024) 9 | - InLine ads support 10 | - AppOpen ads Support 11 | - First Party Data Support 12 | - Bug fixes and stability improvements 13 | 14 | ## Version 7.3.2 (May 1, 2024) 15 | - Bug fixes and improvements 16 | 17 | ## Version 7.3.1 (April 4, 2024) 18 | - Updated the content of the Privacy Manifest 19 | 20 | ## Version 7.3.0 (Mar 25, 2024) 21 | - Performance improvements 22 | - Updated OMSDK to 1.4.12 23 | 24 | ## Version 7.2.2 (Feb 5, 2024) 25 | - Introduced Privacy Manifest support and code signed SDK 26 | - Stability improvements and bug fixes 27 | 28 | ## Version 7.2.0 (Nov 20, 2023) 29 | - Improved error handling 30 | - OMSDK support for Native ads 31 | - Stability improvements and bug fixes 32 | 33 | ## Version 7.1.0 (Sep 13, 2023) 34 | - SKAN 4.0 Support 35 | - Improved StoreKit handling 36 | - Enhanced ad asset caching 37 | - Various smaller enhancements and bug fixes 38 | - Minimum Xcode version updated to 14.1 39 | - Minimum iOS deployment target increased to 11.0 40 | 41 | ## Version 7.0.1 (June 15, 2023) 42 | - Bug fixes 43 | - Addressed conflict with third party library 44 | - Stability improvements 45 | 46 | ## Version 7.0.0 (Mar 22, 2023) 47 | - Swift SDK 48 | - Instance based public APIs and delegate callbacks 49 | - New API changes 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vungle's iOS SDK 2 | 3 | [![Version](https://img.shields.io/cocoapods/v/VungleAds.svg?style=flat)](http://cocoapods.org/pods/VungleAds) 4 | [![License](https://img.shields.io/cocoapods/l/VungleAds.svg?style=flat)](http://cocoapods.org/pods/VungleAds) 5 | [![Platform](https://img.shields.io/cocoapods/p/VungleAds.svg?style=flat)](http://cocoapods.org/pods/VungleAds) 6 | 7 | ## Getting Started 8 | Explore the [Vungle iOS SDK Documentation](https://support.vungle.com/hc/en-us/articles/360002925791) to get started with Vungle's SDK for iOS. 9 | 10 | ## Vungle SDK for iOS 11 | 12 | Welcome to the Vungle SDK! It's battle-tested to unlock amazing monetization opportunities for you. The Vungle SDK enables the very best creatives in mobile advertising. 13 | 14 | ## Attributions 15 | | Component | Description | License | 16 | |------------|-----------------------------------------------------|--------------------------------------------------| 17 | | Webkit | Provides classes to display web content | [LGPL BSD](https://webkit.org/licensing-webkit) | 18 | | zlib | Compression library | [ZLIB](https://www.zlib.net/zlib_license.html) | 19 | | libsqlite | Self-contained SQL database engine | [PD](https://www.sqlite.org/copyright.html) | 20 | 21 | ## License 22 | The Vungle iOS SDK is available under a commercial license. See the LICENSE file for more info. 23 | -------------------------------------------------------------------------------- /Sample/Images/VungleLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Images/VungleLogo.png -------------------------------------------------------------------------------- /Sample/Images/VungleLogoIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Images/VungleLogoIcon.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 52; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8C82483329B42A2600E6369D /* VungleSDK.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C82483229B42A2600E6369D /* VungleSDK.xcframework */; }; 11 | 90113F122492C80D00805B8C /* BannerTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 90113F112492C80D00805B8C /* BannerTableViewCell.m */; }; 12 | 90113F152492C81900805B8C /* MRECTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 90113F142492C81900805B8C /* MRECTableViewCell.m */; }; 13 | 903A22C4243BF10F00365E15 /* MultiAdViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 903A22C3243BF10F00365E15 /* MultiAdViewController.m */; }; 14 | DE8F42381BBB0BC9009EC672 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DE8F42371BBB0BC9009EC672 /* LaunchScreen.storyboard */; }; 15 | E319A21B230CE6D200EE8EC8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E319A219230CE6D200EE8EC8 /* Main.storyboard */; }; 16 | F45D5FCF18E0F05300329123 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F45D5FCD18E0F05300329123 /* InfoPlist.strings */; }; 17 | F45D5FD118E0F05300329123 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F45D5FD018E0F05300329123 /* main.m */; }; 18 | F45D5FD518E0F05300329123 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F45D5FD418E0F05300329123 /* AppDelegate.m */; }; 19 | F45D5FDE18E0F05300329123 /* FirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F45D5FDD18E0F05300329123 /* FirstViewController.m */; }; 20 | F45D5FE318E0F05300329123 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F45D5FE218E0F05300329123 /* Images.xcassets */; }; 21 | F45D5FF418E0F05300329123 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F45D5FF218E0F05300329123 /* InfoPlist.strings */; }; 22 | F45D5FF618E0F05300329123 /* Vungle_Sample_AppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F45D5FF518E0F05300329123 /* Vungle_Sample_AppTests.m */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXContainerItemProxy section */ 26 | F45D5FED18E0F05300329123 /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = F45D5FB918E0F05300329123 /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = F45D5FC018E0F05300329123; 31 | remoteInfo = "Vungle Sample App"; 32 | }; 33 | /* End PBXContainerItemProxy section */ 34 | 35 | /* Begin PBXFileReference section */ 36 | 8C82483229B42A2600E6369D /* VungleSDK.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = VungleSDK.xcframework; sourceTree = ""; }; 37 | 90113F102492C80D00805B8C /* BannerTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BannerTableViewCell.h; sourceTree = ""; }; 38 | 90113F112492C80D00805B8C /* BannerTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BannerTableViewCell.m; sourceTree = ""; }; 39 | 90113F132492C81900805B8C /* MRECTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MRECTableViewCell.h; sourceTree = ""; }; 40 | 90113F142492C81900805B8C /* MRECTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MRECTableViewCell.m; sourceTree = ""; }; 41 | 903A22C2243BF10F00365E15 /* MultiAdViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MultiAdViewController.h; sourceTree = ""; }; 42 | 903A22C3243BF10F00365E15 /* MultiAdViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MultiAdViewController.m; sourceTree = ""; }; 43 | DE8F42351BBB09C7009EC672 /* LICENSE.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = LICENSE.md; path = ../LICENSE.md; sourceTree = ""; }; 44 | DE8F42371BBB0BC9009EC672 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; 45 | DEFCFF601BA34127006414B2 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 46 | E319A21A230CE6D200EE8EC8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 47 | E319A514230E2A0D00EE8EC8 /* Constants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Constants.h; sourceTree = ""; }; 48 | F45D5FC118E0F05300329123 /* Vungle Sample App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Vungle Sample App.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | F45D5FCC18E0F05300329123 /* Vungle Sample App-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Vungle Sample App-Info.plist"; sourceTree = ""; }; 50 | F45D5FCE18E0F05300329123 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 51 | F45D5FD018E0F05300329123 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 52 | F45D5FD218E0F05300329123 /* Vungle Sample App-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Vungle Sample App-Prefix.pch"; sourceTree = ""; }; 53 | F45D5FD318E0F05300329123 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 54 | F45D5FD418E0F05300329123 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 55 | F45D5FDC18E0F05300329123 /* FirstViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FirstViewController.h; sourceTree = ""; }; 56 | F45D5FDD18E0F05300329123 /* FirstViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FirstViewController.m; sourceTree = ""; }; 57 | F45D5FE218E0F05300329123 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 58 | F45D5FE818E0F05300329123 /* Vungle Sample AppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Vungle Sample AppTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | F45D5FF118E0F05300329123 /* Vungle Sample AppTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Vungle Sample AppTests-Info.plist"; sourceTree = ""; }; 60 | F45D5FF318E0F05300329123 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 61 | F45D5FF518E0F05300329123 /* Vungle_Sample_AppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Vungle_Sample_AppTests.m; sourceTree = ""; }; 62 | /* End PBXFileReference section */ 63 | 64 | /* Begin PBXFrameworksBuildPhase section */ 65 | F45D5FBE18E0F05300329123 /* Frameworks */ = { 66 | isa = PBXFrameworksBuildPhase; 67 | buildActionMask = 2147483647; 68 | files = ( 69 | 8C82483329B42A2600E6369D /* VungleSDK.xcframework in Frameworks */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | F45D5FE518E0F05300329123 /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | /* End PBXFrameworksBuildPhase section */ 81 | 82 | /* Begin PBXGroup section */ 83 | F45D5FB818E0F05300329123 = { 84 | isa = PBXGroup; 85 | children = ( 86 | DE8F42351BBB09C7009EC672 /* LICENSE.md */, 87 | DEFCFF601BA34127006414B2 /* README.md */, 88 | F45D5FCA18E0F05300329123 /* Vungle Sample App */, 89 | F45D5FEF18E0F05300329123 /* Vungle Sample AppTests */, 90 | F45D5FC318E0F05300329123 /* Frameworks */, 91 | F45D5FC218E0F05300329123 /* Products */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | F45D5FC218E0F05300329123 /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | F45D5FC118E0F05300329123 /* Vungle Sample App.app */, 99 | F45D5FE818E0F05300329123 /* Vungle Sample AppTests.xctest */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | F45D5FC318E0F05300329123 /* Frameworks */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 8C82483229B42A2600E6369D /* VungleSDK.xcframework */, 108 | ); 109 | name = Frameworks; 110 | sourceTree = ""; 111 | }; 112 | F45D5FCA18E0F05300329123 /* Vungle Sample App */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | E319A219230CE6D200EE8EC8 /* Main.storyboard */, 116 | F45D5FD318E0F05300329123 /* AppDelegate.h */, 117 | F45D5FD418E0F05300329123 /* AppDelegate.m */, 118 | DE8F42371BBB0BC9009EC672 /* LaunchScreen.storyboard */, 119 | F45D5FDC18E0F05300329123 /* FirstViewController.h */, 120 | F45D5FDD18E0F05300329123 /* FirstViewController.m */, 121 | E319A514230E2A0D00EE8EC8 /* Constants.h */, 122 | F45D5FE218E0F05300329123 /* Images.xcassets */, 123 | F45D5FCB18E0F05300329123 /* Supporting Files */, 124 | 903A22C2243BF10F00365E15 /* MultiAdViewController.h */, 125 | 903A22C3243BF10F00365E15 /* MultiAdViewController.m */, 126 | 90113F102492C80D00805B8C /* BannerTableViewCell.h */, 127 | 90113F112492C80D00805B8C /* BannerTableViewCell.m */, 128 | 90113F132492C81900805B8C /* MRECTableViewCell.h */, 129 | 90113F142492C81900805B8C /* MRECTableViewCell.m */, 130 | ); 131 | path = "Vungle Sample App"; 132 | sourceTree = ""; 133 | }; 134 | F45D5FCB18E0F05300329123 /* Supporting Files */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | F45D5FCC18E0F05300329123 /* Vungle Sample App-Info.plist */, 138 | F45D5FCD18E0F05300329123 /* InfoPlist.strings */, 139 | F45D5FD018E0F05300329123 /* main.m */, 140 | F45D5FD218E0F05300329123 /* Vungle Sample App-Prefix.pch */, 141 | ); 142 | name = "Supporting Files"; 143 | sourceTree = ""; 144 | }; 145 | F45D5FEF18E0F05300329123 /* Vungle Sample AppTests */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | F45D5FF518E0F05300329123 /* Vungle_Sample_AppTests.m */, 149 | F45D5FF018E0F05300329123 /* Supporting Files */, 150 | ); 151 | path = "Vungle Sample AppTests"; 152 | sourceTree = ""; 153 | }; 154 | F45D5FF018E0F05300329123 /* Supporting Files */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | F45D5FF118E0F05300329123 /* Vungle Sample AppTests-Info.plist */, 158 | F45D5FF218E0F05300329123 /* InfoPlist.strings */, 159 | ); 160 | name = "Supporting Files"; 161 | sourceTree = ""; 162 | }; 163 | /* End PBXGroup section */ 164 | 165 | /* Begin PBXNativeTarget section */ 166 | F45D5FC018E0F05300329123 /* Vungle Sample App */ = { 167 | isa = PBXNativeTarget; 168 | buildConfigurationList = F45D5FF918E0F05300329123 /* Build configuration list for PBXNativeTarget "Vungle Sample App" */; 169 | buildPhases = ( 170 | F45D5FBD18E0F05300329123 /* Sources */, 171 | F45D5FBE18E0F05300329123 /* Frameworks */, 172 | F45D5FBF18E0F05300329123 /* Resources */, 173 | ); 174 | buildRules = ( 175 | ); 176 | dependencies = ( 177 | ); 178 | name = "Vungle Sample App"; 179 | productName = "Vungle Sample App"; 180 | productReference = F45D5FC118E0F05300329123 /* Vungle Sample App.app */; 181 | productType = "com.apple.product-type.application"; 182 | }; 183 | F45D5FE718E0F05300329123 /* Vungle Sample AppTests */ = { 184 | isa = PBXNativeTarget; 185 | buildConfigurationList = F45D5FFC18E0F05300329123 /* Build configuration list for PBXNativeTarget "Vungle Sample AppTests" */; 186 | buildPhases = ( 187 | F45D5FE418E0F05300329123 /* Sources */, 188 | F45D5FE518E0F05300329123 /* Frameworks */, 189 | F45D5FE618E0F05300329123 /* Resources */, 190 | ); 191 | buildRules = ( 192 | ); 193 | dependencies = ( 194 | F45D5FEE18E0F05300329123 /* PBXTargetDependency */, 195 | ); 196 | name = "Vungle Sample AppTests"; 197 | productName = "Vungle Sample AppTests"; 198 | productReference = F45D5FE818E0F05300329123 /* Vungle Sample AppTests.xctest */; 199 | productType = "com.apple.product-type.bundle.unit-test"; 200 | }; 201 | /* End PBXNativeTarget section */ 202 | 203 | /* Begin PBXProject section */ 204 | F45D5FB918E0F05300329123 /* Project object */ = { 205 | isa = PBXProject; 206 | attributes = { 207 | LastUpgradeCheck = 0940; 208 | ORGANIZATIONNAME = "Jordyn Chuhaloff"; 209 | TargetAttributes = { 210 | F45D5FC018E0F05300329123 = { 211 | DevelopmentTeam = GTA9LK7P23; 212 | ProvisioningStyle = Automatic; 213 | }; 214 | F45D5FE718E0F05300329123 = { 215 | TestTargetID = F45D5FC018E0F05300329123; 216 | }; 217 | }; 218 | }; 219 | buildConfigurationList = F45D5FBC18E0F05300329123 /* Build configuration list for PBXProject "Vungle Sample App" */; 220 | compatibilityVersion = "Xcode 3.2"; 221 | developmentRegion = English; 222 | hasScannedForEncodings = 0; 223 | knownRegions = ( 224 | English, 225 | en, 226 | Base, 227 | ); 228 | mainGroup = F45D5FB818E0F05300329123; 229 | productRefGroup = F45D5FC218E0F05300329123 /* Products */; 230 | projectDirPath = ""; 231 | projectRoot = ""; 232 | targets = ( 233 | F45D5FC018E0F05300329123 /* Vungle Sample App */, 234 | F45D5FE718E0F05300329123 /* Vungle Sample AppTests */, 235 | ); 236 | }; 237 | /* End PBXProject section */ 238 | 239 | /* Begin PBXResourcesBuildPhase section */ 240 | F45D5FBF18E0F05300329123 /* Resources */ = { 241 | isa = PBXResourcesBuildPhase; 242 | buildActionMask = 2147483647; 243 | files = ( 244 | F45D5FE318E0F05300329123 /* Images.xcassets in Resources */, 245 | E319A21B230CE6D200EE8EC8 /* Main.storyboard in Resources */, 246 | F45D5FCF18E0F05300329123 /* InfoPlist.strings in Resources */, 247 | DE8F42381BBB0BC9009EC672 /* LaunchScreen.storyboard in Resources */, 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | }; 251 | F45D5FE618E0F05300329123 /* Resources */ = { 252 | isa = PBXResourcesBuildPhase; 253 | buildActionMask = 2147483647; 254 | files = ( 255 | F45D5FF418E0F05300329123 /* InfoPlist.strings in Resources */, 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | }; 259 | /* End PBXResourcesBuildPhase section */ 260 | 261 | /* Begin PBXSourcesBuildPhase section */ 262 | F45D5FBD18E0F05300329123 /* Sources */ = { 263 | isa = PBXSourcesBuildPhase; 264 | buildActionMask = 2147483647; 265 | files = ( 266 | 90113F122492C80D00805B8C /* BannerTableViewCell.m in Sources */, 267 | 903A22C4243BF10F00365E15 /* MultiAdViewController.m in Sources */, 268 | 90113F152492C81900805B8C /* MRECTableViewCell.m in Sources */, 269 | F45D5FD518E0F05300329123 /* AppDelegate.m in Sources */, 270 | F45D5FDE18E0F05300329123 /* FirstViewController.m in Sources */, 271 | F45D5FD118E0F05300329123 /* main.m in Sources */, 272 | ); 273 | runOnlyForDeploymentPostprocessing = 0; 274 | }; 275 | F45D5FE418E0F05300329123 /* Sources */ = { 276 | isa = PBXSourcesBuildPhase; 277 | buildActionMask = 2147483647; 278 | files = ( 279 | F45D5FF618E0F05300329123 /* Vungle_Sample_AppTests.m in Sources */, 280 | ); 281 | runOnlyForDeploymentPostprocessing = 0; 282 | }; 283 | /* End PBXSourcesBuildPhase section */ 284 | 285 | /* Begin PBXTargetDependency section */ 286 | F45D5FEE18E0F05300329123 /* PBXTargetDependency */ = { 287 | isa = PBXTargetDependency; 288 | target = F45D5FC018E0F05300329123 /* Vungle Sample App */; 289 | targetProxy = F45D5FED18E0F05300329123 /* PBXContainerItemProxy */; 290 | }; 291 | /* End PBXTargetDependency section */ 292 | 293 | /* Begin PBXVariantGroup section */ 294 | E319A219230CE6D200EE8EC8 /* Main.storyboard */ = { 295 | isa = PBXVariantGroup; 296 | children = ( 297 | E319A21A230CE6D200EE8EC8 /* Base */, 298 | ); 299 | name = Main.storyboard; 300 | sourceTree = ""; 301 | }; 302 | F45D5FCD18E0F05300329123 /* InfoPlist.strings */ = { 303 | isa = PBXVariantGroup; 304 | children = ( 305 | F45D5FCE18E0F05300329123 /* en */, 306 | ); 307 | name = InfoPlist.strings; 308 | sourceTree = ""; 309 | }; 310 | F45D5FF218E0F05300329123 /* InfoPlist.strings */ = { 311 | isa = PBXVariantGroup; 312 | children = ( 313 | F45D5FF318E0F05300329123 /* en */, 314 | ); 315 | name = InfoPlist.strings; 316 | sourceTree = ""; 317 | }; 318 | /* End PBXVariantGroup section */ 319 | 320 | /* Begin XCBuildConfiguration section */ 321 | F45D5FF718E0F05300329123 /* Debug */ = { 322 | isa = XCBuildConfiguration; 323 | buildSettings = { 324 | ALWAYS_SEARCH_USER_PATHS = NO; 325 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 326 | CLANG_CXX_LIBRARY = "libc++"; 327 | CLANG_ENABLE_MODULES = YES; 328 | CLANG_ENABLE_OBJC_ARC = YES; 329 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 330 | CLANG_WARN_BOOL_CONVERSION = YES; 331 | CLANG_WARN_COMMA = YES; 332 | CLANG_WARN_CONSTANT_CONVERSION = YES; 333 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 334 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 335 | CLANG_WARN_EMPTY_BODY = YES; 336 | CLANG_WARN_ENUM_CONVERSION = YES; 337 | CLANG_WARN_INFINITE_RECURSION = YES; 338 | CLANG_WARN_INT_CONVERSION = YES; 339 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 341 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 342 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 343 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 344 | CLANG_WARN_STRICT_PROTOTYPES = YES; 345 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 346 | CLANG_WARN_UNREACHABLE_CODE = YES; 347 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 348 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 349 | COPY_PHASE_STRIP = NO; 350 | ENABLE_STRICT_OBJC_MSGSEND = YES; 351 | ENABLE_TESTABILITY = YES; 352 | GCC_C_LANGUAGE_STANDARD = gnu99; 353 | GCC_DYNAMIC_NO_PIC = NO; 354 | GCC_NO_COMMON_BLOCKS = YES; 355 | GCC_OPTIMIZATION_LEVEL = 0; 356 | GCC_PREPROCESSOR_DEFINITIONS = ( 357 | "DEBUG=1", 358 | "$(inherited)", 359 | ); 360 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 361 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 362 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 363 | GCC_WARN_UNDECLARED_SELECTOR = YES; 364 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 365 | GCC_WARN_UNUSED_FUNCTION = YES; 366 | GCC_WARN_UNUSED_VARIABLE = YES; 367 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 368 | ONLY_ACTIVE_ARCH = YES; 369 | SDKROOT = iphoneos; 370 | TARGETED_DEVICE_FAMILY = "1,2"; 371 | }; 372 | name = Debug; 373 | }; 374 | F45D5FF818E0F05300329123 /* Release */ = { 375 | isa = XCBuildConfiguration; 376 | buildSettings = { 377 | ALWAYS_SEARCH_USER_PATHS = NO; 378 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 379 | CLANG_CXX_LIBRARY = "libc++"; 380 | CLANG_ENABLE_MODULES = YES; 381 | CLANG_ENABLE_OBJC_ARC = YES; 382 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 383 | CLANG_WARN_BOOL_CONVERSION = YES; 384 | CLANG_WARN_COMMA = YES; 385 | CLANG_WARN_CONSTANT_CONVERSION = YES; 386 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 387 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 388 | CLANG_WARN_EMPTY_BODY = YES; 389 | CLANG_WARN_ENUM_CONVERSION = YES; 390 | CLANG_WARN_INFINITE_RECURSION = YES; 391 | CLANG_WARN_INT_CONVERSION = YES; 392 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 393 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 394 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 395 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 396 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 397 | CLANG_WARN_STRICT_PROTOTYPES = YES; 398 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 399 | CLANG_WARN_UNREACHABLE_CODE = YES; 400 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 401 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 402 | COPY_PHASE_STRIP = YES; 403 | ENABLE_NS_ASSERTIONS = NO; 404 | ENABLE_STRICT_OBJC_MSGSEND = YES; 405 | GCC_C_LANGUAGE_STANDARD = gnu99; 406 | GCC_NO_COMMON_BLOCKS = YES; 407 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 408 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 409 | GCC_WARN_UNDECLARED_SELECTOR = YES; 410 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 411 | GCC_WARN_UNUSED_FUNCTION = YES; 412 | GCC_WARN_UNUSED_VARIABLE = YES; 413 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 414 | SDKROOT = iphoneos; 415 | TARGETED_DEVICE_FAMILY = "1,2"; 416 | VALIDATE_PRODUCT = YES; 417 | }; 418 | name = Release; 419 | }; 420 | F45D5FFA18E0F05300329123 /* Debug */ = { 421 | isa = XCBuildConfiguration; 422 | buildSettings = { 423 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 424 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 425 | CODE_SIGN_IDENTITY = "iPhone Developer"; 426 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 427 | DEVELOPMENT_TEAM = GTA9LK7P23; 428 | FRAMEWORK_SEARCH_PATHS = ( 429 | "$(inherited)", 430 | "$(PROJECT_DIR)/../", 431 | "$(PROJECT_DIR)", 432 | ); 433 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 434 | GCC_PREFIX_HEADER = "Vungle Sample App/Vungle Sample App-Prefix.pch"; 435 | INFOPLIST_FILE = "Vungle Sample App/Vungle Sample App-Info.plist"; 436 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 437 | LD_RUNPATH_SEARCH_PATHS = ( 438 | "$(inherited)", 439 | "@executable_path/Frameworks", 440 | ); 441 | OTHER_LDFLAGS = "-ObjC"; 442 | PRODUCT_BUNDLE_IDENTIFIER = com.vungle.sdksample; 443 | PRODUCT_NAME = "$(TARGET_NAME)"; 444 | PROVISIONING_PROFILE = ""; 445 | PROVISIONING_PROFILE_SPECIFIER = ""; 446 | TARGETED_DEVICE_FAMILY = "1,2"; 447 | WRAPPER_EXTENSION = app; 448 | }; 449 | name = Debug; 450 | }; 451 | F45D5FFB18E0F05300329123 /* Release */ = { 452 | isa = XCBuildConfiguration; 453 | buildSettings = { 454 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 455 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 456 | CODE_SIGN_IDENTITY = "iPhone Developer"; 457 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 458 | DEVELOPMENT_TEAM = GTA9LK7P23; 459 | FRAMEWORK_SEARCH_PATHS = ( 460 | "$(inherited)", 461 | "$(PROJECT_DIR)/../", 462 | "$(PROJECT_DIR)", 463 | ); 464 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 465 | GCC_PREFIX_HEADER = "Vungle Sample App/Vungle Sample App-Prefix.pch"; 466 | INFOPLIST_FILE = "Vungle Sample App/Vungle Sample App-Info.plist"; 467 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 468 | LD_RUNPATH_SEARCH_PATHS = ( 469 | "$(inherited)", 470 | "@executable_path/Frameworks", 471 | ); 472 | OTHER_LDFLAGS = "-ObjC"; 473 | PRODUCT_BUNDLE_IDENTIFIER = com.vungle.sdksample; 474 | PRODUCT_NAME = "$(TARGET_NAME)"; 475 | PROVISIONING_PROFILE = ""; 476 | PROVISIONING_PROFILE_SPECIFIER = ""; 477 | TARGETED_DEVICE_FAMILY = "1,2"; 478 | WRAPPER_EXTENSION = app; 479 | }; 480 | name = Release; 481 | }; 482 | F45D5FFD18E0F05300329123 /* Debug */ = { 483 | isa = XCBuildConfiguration; 484 | buildSettings = { 485 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Vungle Sample App.app/Vungle Sample App"; 486 | FRAMEWORK_SEARCH_PATHS = ( 487 | "$(inherited)", 488 | "$(PROJECT_DIR)", 489 | ); 490 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 491 | GCC_PREFIX_HEADER = "Vungle Sample App/Vungle Sample App-Prefix.pch"; 492 | GCC_PREPROCESSOR_DEFINITIONS = ( 493 | "DEBUG=1", 494 | "$(inherited)", 495 | ); 496 | INFOPLIST_FILE = "Vungle Sample AppTests/Vungle Sample AppTests-Info.plist"; 497 | PRODUCT_BUNDLE_IDENTIFIER = "com.vungle.${PRODUCT_NAME:rfc1034identifier}"; 498 | PRODUCT_NAME = "$(TARGET_NAME)"; 499 | TEST_HOST = "$(BUNDLE_LOADER)"; 500 | WRAPPER_EXTENSION = xctest; 501 | }; 502 | name = Debug; 503 | }; 504 | F45D5FFE18E0F05300329123 /* Release */ = { 505 | isa = XCBuildConfiguration; 506 | buildSettings = { 507 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Vungle Sample App.app/Vungle Sample App"; 508 | FRAMEWORK_SEARCH_PATHS = ( 509 | "$(inherited)", 510 | "$(PROJECT_DIR)", 511 | ); 512 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 513 | GCC_PREFIX_HEADER = "Vungle Sample App/Vungle Sample App-Prefix.pch"; 514 | INFOPLIST_FILE = "Vungle Sample AppTests/Vungle Sample AppTests-Info.plist"; 515 | PRODUCT_BUNDLE_IDENTIFIER = "com.vungle.${PRODUCT_NAME:rfc1034identifier}"; 516 | PRODUCT_NAME = "$(TARGET_NAME)"; 517 | TEST_HOST = "$(BUNDLE_LOADER)"; 518 | WRAPPER_EXTENSION = xctest; 519 | }; 520 | name = Release; 521 | }; 522 | /* End XCBuildConfiguration section */ 523 | 524 | /* Begin XCConfigurationList section */ 525 | F45D5FBC18E0F05300329123 /* Build configuration list for PBXProject "Vungle Sample App" */ = { 526 | isa = XCConfigurationList; 527 | buildConfigurations = ( 528 | F45D5FF718E0F05300329123 /* Debug */, 529 | F45D5FF818E0F05300329123 /* Release */, 530 | ); 531 | defaultConfigurationIsVisible = 0; 532 | defaultConfigurationName = Release; 533 | }; 534 | F45D5FF918E0F05300329123 /* Build configuration list for PBXNativeTarget "Vungle Sample App" */ = { 535 | isa = XCConfigurationList; 536 | buildConfigurations = ( 537 | F45D5FFA18E0F05300329123 /* Debug */, 538 | F45D5FFB18E0F05300329123 /* Release */, 539 | ); 540 | defaultConfigurationIsVisible = 0; 541 | defaultConfigurationName = Release; 542 | }; 543 | F45D5FFC18E0F05300329123 /* Build configuration list for PBXNativeTarget "Vungle Sample AppTests" */ = { 544 | isa = XCConfigurationList; 545 | buildConfigurations = ( 546 | F45D5FFD18E0F05300329123 /* Debug */, 547 | F45D5FFE18E0F05300329123 /* Release */, 548 | ); 549 | defaultConfigurationIsVisible = 0; 550 | defaultConfigurationName = Release; 551 | }; 552 | /* End XCConfigurationList section */ 553 | }; 554 | rootObject = F45D5FB918E0F05300329123 /* Project object */; 555 | } 556 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App.xcodeproj/project.xcworkspace/xcshareddata/Vungle Sample App.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | C282AEA6-9BAA-4B9F-9EE5-E57AF721AF8D 9 | IDESourceControlProjectName 10 | Vungle Sample App 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 3C0B041086E541D319B1EE2BD7F5A10F9002F364 14 | https://github.com/Vungle/iOS-SDK.git 15 | 16 | IDESourceControlProjectPath 17 | Sample/Vungle Sample App.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 3C0B041086E541D319B1EE2BD7F5A10F9002F364 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/Vungle/iOS-SDK.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 3C0B041086E541D319B1EE2BD7F5A10F9002F364 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 3C0B041086E541D319B1EE2BD7F5A10F9002F364 36 | IDESourceControlWCCName 37 | iOS-SDK 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App.xcodeproj/xcshareddata/xcschemes/Vungle Sample App.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Vungle Sample App 4 | // 5 | // Created by Vungle on 3/24/14. 6 | // Copyright (c) 2017 Vungle. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (strong, nonatomic) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Vungle Sample App 4 | // 5 | // Created by Vungle on 3/24/14. 6 | // Copyright (c) 2017 Vungle. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | } 22 | 23 | - (void)applicationDidEnterBackground:(UIApplication *)application 24 | { 25 | } 26 | 27 | - (void)applicationWillEnterForeground:(UIApplication *)application 28 | { 29 | } 30 | 31 | - (void)applicationDidBecomeActive:(UIApplication *)application 32 | { 33 | } 34 | 35 | - (void)applicationWillTerminate:(UIApplication *)application 36 | { 37 | } 38 | 39 | - (void)application:(UIApplication *)application handleEventsForBackgroundURLSession:(NSString *)identifier completionHandler:(void (^)(void))completionHandler { 40 | [VungleSDK sharedSDK].backgroundURLSessionCompletionHandler = completionHandler; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/BannerTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // BannerTableViewCell.h 3 | // Vungle Sample App 4 | // 5 | // Created by John Mai on 6/11/20. 6 | // Copyright © 2020 Jordyn Chuhaloff. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface BannerTableViewCell : UITableViewCell 14 | @property (weak, nonatomic) IBOutlet UIButton *loadBannerButton; 15 | @property (weak, nonatomic) IBOutlet UIButton *playBannerButton; 16 | @property (weak, nonatomic) IBOutlet UIButton *dismissBannerButton; 17 | @property (weak, nonatomic) IBOutlet UILabel *bannerLabel; 18 | @property (retain, nonatomic) IBOutlet UIView *bannerView; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/BannerTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // BannerTableViewCell.m 3 | // Vungle Sample App 4 | // 5 | // Created by John Mai on 6/11/20. 6 | // Copyright © 2020 Jordyn Chuhaloff. All rights reserved. 7 | // 8 | 9 | #import "BannerTableViewCell.h" 10 | 11 | @interface BannerTableViewCell() 12 | 13 | @end 14 | 15 | @implementation BannerTableViewCell 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Constants.h: -------------------------------------------------------------------------------- 1 | #ifndef Constants_h 2 | #define Constants_h 3 | 4 | static NSString *const kVungleAppIDPrefix = @"App ID:"; 5 | static NSString *const kVungleTestAppID = @"5e13cc9d61880b27a65bf735"; 6 | static NSString *const kVunglePlacementID1Prefix = @"PlacementID: "; 7 | static NSString *const kVungleTestPlacementID01 = @"DEFAULT-2227894"; // Auto Cached 8 | static NSString *const kVunglePlacementID2Prefix = @"Interstitial: "; 9 | static NSString *const kVungleTestPlacementID02 = @"INTERSTITIAL01-8573922"; 10 | static NSString *const kVunglePlacementID3Prefix = @"Rewarded: "; 11 | static NSString *const kVungleTestPlacementID03 = @"REWARDED01-4772665"; 12 | static NSString *const kVunglePlacementID4Prefix = @"Rewarded Playable: "; 13 | static NSString *const kVungleTestPlacementID04 = @"REWARDED_PLAYABLE03-6535366"; 14 | static NSString *const kVunglePlacementID5Prefix = @"MREC: "; 15 | static NSString *const kVungleTestPlacementID05 = @"MRECC02-9825235"; 16 | static NSString *const kVunglePlacementID6Prefix = @"Banner Short: "; 17 | static NSString *const kVungleTestPlacementID06 = @"BANNER04-8166553"; 18 | static NSString *const kVunglePlacementID7Prefix = @"Banner: "; 19 | static NSString *const kVungleTestPlacementID07 = @"BANNER3-7051875"; 20 | static NSString *const kVunglePlacementID8Prefix = @"Banner: "; 21 | static NSString *const kVungleTestPlacementID08 = @"BANNER05-4730786"; 22 | static NSString *const kVunglePlacementID9Prefix = @"MREC: "; 23 | static NSString *const kVungleTestPlacementID09 = @"MREC04-8692745"; 24 | 25 | #define SCREEN_HEIGHT [[UIScreen mainScreen] bounds].size.height 26 | #define SCREEN_WIDTH self.view.frame.size.width 27 | #define MREC_AD_HEIGHT 250.0 28 | #define MREC_AD_WIDTH 300 29 | #define BANNER_AD_HEIGHT 50.0 30 | #define BANNER_SHORT_AD_WIDTH 300.0 31 | #define BANNER_AD_WIDTH 320.0 32 | 33 | #endif /* Constants_h */ 34 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/FirstViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FirstViewController.h 3 | // Vungle Sample App 4 | // 5 | // Created by Vungle on 3/24/14. 6 | // Copyright (c) 2017 Vungle. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface FirstViewController : UIViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/FirstViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // FirstViewController.m 3 | // Vungle Sample App 4 | // 5 | // Created by Vungle on 3/24/14. 6 | // Copyright (c) 2017 Vungle. All rights reserved. 7 | // 8 | 9 | #import "FirstViewController.h" 10 | #import "MultiAdViewController.h" 11 | #import "Constants.h" 12 | 13 | #if defined(__IPHONE_14_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_0 14 | #import 15 | #endif 16 | 17 | @interface VungleSDK () 18 | - (void)setPluginName:(NSString *)pluginName version:(NSString *)version; 19 | @end 20 | 21 | @interface FirstViewController () { 22 | CGFloat screenHeight; 23 | CGFloat screenWidth; 24 | } 25 | 26 | @property (weak, nonatomic) IBOutlet UIScrollView *scrollView; 27 | @property (weak, nonatomic) IBOutlet UILabel *appIdLabel; 28 | @property (weak, nonatomic) IBOutlet UILabel *placementIdLabel1; 29 | @property (weak, nonatomic) IBOutlet UILabel *placementIdLabel2; 30 | @property (weak, nonatomic) IBOutlet UILabel *placementIdLabel3; 31 | @property (weak, nonatomic) IBOutlet UILabel *placementIdLabel4; 32 | @property (weak, nonatomic) IBOutlet UILabel *placementIdLabel5; 33 | @property (weak, nonatomic) IBOutlet UILabel *placementIdLabel6; 34 | @property (weak, nonatomic) IBOutlet UILabel *placementIdLabel7; 35 | @property (weak, nonatomic) IBOutlet UIButton *sdkInitButton; 36 | @property (weak, nonatomic) IBOutlet UIButton *loadButton2; 37 | @property (weak, nonatomic) IBOutlet UIButton *loadButton3; 38 | @property (weak, nonatomic) IBOutlet UIButton *loadButton4; 39 | @property (weak, nonatomic) IBOutlet UIButton *loadButton5; 40 | @property (weak, nonatomic) IBOutlet UIButton *loadButton6; 41 | @property (weak, nonatomic) IBOutlet UIButton *loadButton7; 42 | @property (weak, nonatomic) IBOutlet UIButton *playButton1; 43 | @property (weak, nonatomic) IBOutlet UIButton *playButton2; 44 | @property (weak, nonatomic) IBOutlet UIButton *playButton3; 45 | @property (weak, nonatomic) IBOutlet UIButton *playButton4; 46 | @property (weak, nonatomic) IBOutlet UIButton *playButton5; 47 | @property (weak, nonatomic) IBOutlet UIButton *playButton6; 48 | @property (weak, nonatomic) IBOutlet UIButton *playButton7; 49 | @property (weak, nonatomic) IBOutlet UIButton *dismissButton5; 50 | @property (weak, nonatomic) IBOutlet UIButton *dismissButton6; 51 | @property (weak, nonatomic) IBOutlet UIButton *dismissButton7; 52 | @property (weak, nonatomic) IBOutlet UIButton *checkCurrentStatusButton; 53 | @property (weak, nonatomic) IBOutlet UIButton *multiBannerViewButton; 54 | @property (nonatomic, strong) VungleSDK *sdk; 55 | @property (retain, nonatomic) UIView *adView; 56 | @property (nonatomic, assign, getter=isPlayingMREC) BOOL playingMREC; 57 | @property (nonatomic, assign, getter=isPlayingBanner) BOOL playingBanner; 58 | 59 | @end 60 | 61 | @implementation FirstViewController 62 | 63 | #pragma mark - UIViewController 64 | 65 | - (void)viewDidLoad { 66 | [super viewDidLoad]; 67 | [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; 68 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deviceOrientationDidChange) name:UIDeviceOrientationDidChangeNotification object:nil]; 69 | 70 | // Do any additional setup after loading the view. 71 | if (@available(iOS 14, *)) { 72 | [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) { 73 | }]; 74 | } 75 | 76 | [self setViewDefault]; 77 | } 78 | 79 | -(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 80 | MultiAdViewController *multiAdViewController = (MultiAdViewController*)segue.destinationViewController; 81 | if ([self.sdk isInitialized]) { 82 | [multiAdViewController vungleSDKDidInitialize]; 83 | multiAdViewController.isInitialized = YES; 84 | multiAdViewController.sdk = self.sdk; 85 | } 86 | } 87 | 88 | - (IBAction)multiBannerTapped:(id)sender { 89 | [self performSegueWithIdentifier:@"toMultiAd" sender:self]; 90 | } 91 | 92 | - (IBAction)onInitButtonTapped:(id)sender { 93 | [VungleSDK enableBackgroundDownload:YES]; 94 | [self startVungle]; 95 | } 96 | 97 | - (IBAction)onLoadButtonTapped:(id)sender { 98 | if (sender == self.loadButton2) { 99 | NSLog(@"-->> load an ad for placement 02"); 100 | NSError *error = nil; 101 | if ([self.sdk loadPlacementWithID:kVungleTestPlacementID02 error:&error]) { 102 | [self updateButtonState:self.loadButton2 enabled:NO]; 103 | } else { 104 | [self updateButtonState:self.loadButton2 enabled:YES]; 105 | if (error) { 106 | NSLog(@"Unable to load placement with reference ID :%@, Error %@", kVungleTestPlacementID02, error); 107 | } 108 | } 109 | } else if(sender == self.loadButton3) { 110 | NSLog(@"-->> load an ad for placement 03"); 111 | NSError *error = nil; 112 | if ([self.sdk loadPlacementWithID:kVungleTestPlacementID03 error:&error]) { 113 | [self updateButtonState:self.loadButton3 enabled:NO]; 114 | } else { 115 | [self updateButtonState:self.loadButton3 enabled:YES]; 116 | if (error) { 117 | NSLog(@"Unable to load placement with reference ID :%@, Error %@", kVungleTestPlacementID03, error); 118 | } 119 | } 120 | } else if(sender == self.loadButton4) { 121 | NSLog(@"-->> load an ad for placement 04"); 122 | NSError *error = nil; 123 | if ([self.sdk loadPlacementWithID:kVungleTestPlacementID04 error:&error]) { 124 | [self updateButtonState:self.loadButton4 enabled:NO]; 125 | } else { 126 | [self updateButtonState:self.loadButton4 enabled:YES]; 127 | if (error) { 128 | NSLog(@"Unable to load placement with reference ID :%@, Error %@", kVungleTestPlacementID04, error); 129 | } 130 | } 131 | } else if(sender == self.loadButton5) { 132 | NSLog(@"-->> load an ad for placement 05"); 133 | NSError *error = nil; 134 | if ([self.sdk loadPlacementWithID:kVungleTestPlacementID05 error:&error]) { 135 | [self updateButtonState:self.loadButton5 enabled:NO]; 136 | } else { 137 | [self updateButtonState:self.loadButton5 enabled:YES]; 138 | if (error) { 139 | NSLog(@"Unable to load placement with reference ID :%@, Error %@", kVungleTestPlacementID05, error); 140 | } 141 | } 142 | } else if(sender == self.loadButton6) { 143 | NSLog(@"-->> load an ad for placement 06"); 144 | NSError *error = nil; 145 | if ([self.sdk loadPlacementWithID:kVungleTestPlacementID06 withSize:VungleAdSizeBannerShort error:&error]){ 146 | [self updateButtonState:self.loadButton6 enabled:NO]; 147 | } else { 148 | [self updateButtonState:self.loadButton6 enabled:YES]; 149 | if (error) { 150 | NSLog(@"Unable to load placement with reference ID :%@, Error %@", kVungleTestPlacementID06, error); 151 | } 152 | } 153 | } else if(sender == self.loadButton7) { 154 | NSLog(@"-->> load an ad for placement 07"); 155 | NSError *error = nil; 156 | if ([self.sdk loadPlacementWithID:kVungleTestPlacementID07 withSize:VungleAdSizeBanner error:&error]){ 157 | [self updateButtonState:self.loadButton7 enabled:NO]; 158 | } 159 | else { 160 | [self updateButtonState:self.loadButton7 enabled:YES]; 161 | if (error) { 162 | NSLog(@"Unable to load placement with reference ID :%@, Error %@", kVungleTestPlacementID07, error); 163 | } 164 | } 165 | } 166 | } 167 | 168 | - (IBAction)onPlayButtonTapped:(id)sender { 169 | if (sender == self.playButton1) { 170 | NSLog(@"-->> Play an ad for %@", kVungleTestPlacementID01); 171 | [self updateButtonState:self.playButton1 enabled:NO]; 172 | [self showAdForPlacement01]; 173 | } else if (sender == self.playButton2) { 174 | NSLog(@"-->> Play an ad for %@", kVungleTestPlacementID02); 175 | [self updateButtonState:self.playButton2 enabled:NO]; 176 | [self showAdForPlacement02]; 177 | } else if (sender == self.playButton3) { 178 | NSLog(@"-->> Play an ad for %@", kVungleTestPlacementID03); 179 | [self updateButtonState:self.playButton3 enabled:NO]; 180 | [self showAdForPlacement03]; 181 | } else if (sender == self.playButton4) { 182 | NSLog(@"-->> Play an ad for %@", kVungleTestPlacementID04); 183 | [self updateButtonState:self.playButton4 enabled:NO]; 184 | [self showAdForPlacement04]; 185 | } else if (sender == self.playButton5) { 186 | NSLog(@"-->> Play an ad for %@", kVungleTestPlacementID05); 187 | [self updateButtonState:self.playButton5 enabled:NO]; 188 | [self updateButtonState:self.dismissButton5 enabled:YES]; 189 | [self setPlayingMREC:YES]; 190 | [self showAdForPlacement05]; 191 | } else if (sender == self.playButton6) { 192 | NSLog(@"-->> Play an ad for %@", kVungleTestPlacementID06); 193 | [self updateButtonState:self.playButton6 enabled:NO]; 194 | [self updateButtonState:self.dismissButton6 enabled:YES]; 195 | [self setPlayingBanner:YES]; 196 | [self showAdForPlacement06]; 197 | } else if (sender == self.playButton7) { 198 | NSLog(@"-->> Play an ad for %@", kVungleTestPlacementID07); 199 | [self updateButtonState:self.playButton7 enabled:NO]; 200 | [self updateButtonState:self.dismissButton7 enabled:YES]; 201 | [self setPlayingBanner:YES]; 202 | [self showAdForPlacement07]; 203 | } 204 | [self disablePlayLoadButtons]; 205 | } 206 | 207 | - (IBAction)onDismissButtonTapped:(id)sender { 208 | if (sender == self.dismissButton5) { 209 | [self.sdk finishDisplayingAd:kVungleTestPlacementID05]; 210 | [self setPlayingMREC:NO]; 211 | [self.scrollView setContentOffset:CGPointMake(self.scrollView.contentOffset.x, 0) 212 | animated:YES]; 213 | if(self.adView != nil){ 214 | [self.adView removeFromSuperview]; 215 | } 216 | [self updateButtonState:self.dismissButton5 enabled:NO]; 217 | } else if (sender == self.dismissButton6) { 218 | [self.sdk finishDisplayingAd:kVungleTestPlacementID06]; 219 | [self setPlayingBanner:NO]; 220 | [self.scrollView setContentOffset:CGPointMake(self.scrollView.contentOffset.x, 0) 221 | animated:YES]; 222 | if(self.adView != nil){ 223 | [self.adView removeFromSuperview]; 224 | } 225 | [self updateButtonState:self.dismissButton6 enabled:NO]; 226 | } else if (sender == self.dismissButton7) { 227 | [self.sdk finishDisplayingAd:kVungleTestPlacementID07]; 228 | [self setPlayingBanner:NO]; 229 | [self.scrollView setContentOffset:CGPointMake(self.scrollView.contentOffset.x, 0) 230 | animated:YES]; 231 | if(self.adView != nil){ 232 | [self.adView removeFromSuperview]; 233 | } 234 | [self updateButtonState:self.dismissButton7 enabled:NO]; 235 | } 236 | } 237 | 238 | - (IBAction)onCheckCurrentStatusButtonTapped:(id)sender { 239 | NSLog(@"-->> SDK Initialized: %@", (self.sdk.initialized? @"YES":@"NO")); 240 | NSLog(@"-->> %@ - an ad loaded: %@", kVungleTestPlacementID01, ([self.sdk isAdCachedForPlacementID:kVungleTestPlacementID01]? @"YES":@"NO")); 241 | NSLog(@"-->> %@ - an ad loaded: %@", kVungleTestPlacementID02, ([self.sdk isAdCachedForPlacementID:kVungleTestPlacementID02]? @"YES":@"NO")); 242 | NSLog(@"-->> %@ - an ad loaded: %@", kVungleTestPlacementID03, ([self.sdk isAdCachedForPlacementID:kVungleTestPlacementID03]? @"YES":@"NO")); 243 | NSLog(@"-->> %@ - an ad loaded: %@", kVungleTestPlacementID04, ([self.sdk isAdCachedForPlacementID:kVungleTestPlacementID04]? @"YES":@"NO")); 244 | NSLog(@"-->> %@ - an ad loaded: %@", kVungleTestPlacementID05, ([self.sdk isAdCachedForPlacementID:kVungleTestPlacementID05]? @"YES":@"NO")); 245 | NSLog(@"-->> %@ - an ad loaded: %@", kVungleTestPlacementID06, ([self.sdk isAdCachedForPlacementID:kVungleTestPlacementID06]? @"YES":@"NO")); 246 | NSLog(@"-->> %@ - an ad loaded: %@", kVungleTestPlacementID07, ([self.sdk isAdCachedForPlacementID:kVungleTestPlacementID07]? @"YES":@"NO")); 247 | } 248 | 249 | #pragma mark - VungleSDKDelegate Methods 250 | 251 | - (void)vungleRewardUserForPlacementID:(nullable NSString *)placementID { 252 | NSLog(@"-->> Delegate Callback: vungleRewardUserForPlacementID: Rewarded for Placement ID: %@", placementID); 253 | } 254 | 255 | - (void)vungleTrackClickForPlacementID:(nullable NSString *)placementID { 256 | NSLog(@"-->> Delegate Callback: vungleTrackClickForPlacementID %@",placementID); 257 | } 258 | 259 | - (void)vungleAdPlayabilityUpdate:(BOOL)isAdPlayable placementID:(NSString *)placementID error:(NSError *)error { 260 | if (isAdPlayable) { 261 | NSLog(@"-->> Delegate Callback: vungleAdPlayabilityUpdate: Ad is available for Placement ID: %@", placementID); 262 | } else { 263 | NSLog(@"-->> Delegate Callback: vungleAdPlayabilityUpdate: Ad is NOT available for Placement ID: %@", placementID); 264 | } 265 | 266 | if ([placementID isEqualToString:kVungleTestPlacementID01]) { 267 | [self updateButtonState:self.playButton1 enabled:isAdPlayable]; 268 | } else if ([placementID isEqualToString:kVungleTestPlacementID02]) { 269 | [self updateButtonState:self.loadButton2 enabled:!isAdPlayable]; 270 | [self updateButtonState:self.playButton2 enabled:isAdPlayable]; 271 | } else if ([placementID isEqualToString:kVungleTestPlacementID03]) { 272 | [self updateButtonState:self.loadButton3 enabled:!isAdPlayable]; 273 | [self updateButtonState:self.playButton3 enabled:isAdPlayable]; 274 | } else if ([placementID isEqualToString:kVungleTestPlacementID04]) { 275 | [self updateButtonState:self.loadButton4 enabled:!isAdPlayable]; 276 | [self updateButtonState:self.playButton4 enabled:isAdPlayable]; 277 | } else if ([placementID isEqualToString:kVungleTestPlacementID05]) { 278 | if(![self isPlayingMREC]) { 279 | [self updateButtonState:self.loadButton5 enabled:!isAdPlayable]; 280 | } 281 | [self updateButtonState:self.playButton5 enabled:isAdPlayable]; 282 | } else if ([placementID isEqualToString:kVungleTestPlacementID06]) { 283 | if(![self isPlayingBanner]) { 284 | [self updateButtonState:self.loadButton6 enabled:!isAdPlayable]; 285 | } 286 | [self updateButtonState:self.playButton6 enabled:isAdPlayable]; 287 | } else if ([placementID isEqualToString:kVungleTestPlacementID07]) { 288 | if(![self isPlayingBanner]) { 289 | [self updateButtonState:self.loadButton7 enabled:!isAdPlayable]; 290 | } 291 | [self updateButtonState:self.playButton7 enabled:isAdPlayable]; 292 | } 293 | } 294 | 295 | - (void)vungleWillLeaveApplicationForPlacementID:(nullable NSString *)placementID { 296 | NSLog(@"-->> Delegate Callback: vungleWillLeaveApplicationForPlacementId is pressed on %@",placementID); 297 | } 298 | 299 | - (void)vungleDidShowAdForPlacementID:(nullable NSString *)placementID { 300 | NSLog(@"-->> Delegate Callback: vungleDidShowAdForPlacementID for %@",placementID); 301 | } 302 | 303 | - (void)vungleWillShowAdForPlacementID:(nullable NSString *)placementID { 304 | NSLog(@"-->> Delegate Callback: vungleWillShowAdForPlacementID"); 305 | if ([placementID isEqualToString:kVungleTestPlacementID01]) { 306 | NSLog(@"-->> Ad will show for %@", kVungleTestPlacementID01); 307 | [self updateButtonState:self.playButton1 enabled:NO]; 308 | } else if ([placementID isEqualToString:kVungleTestPlacementID02]) { 309 | NSLog(@"-->> Ad will show for %@", kVungleTestPlacementID02); 310 | [self updateButtonState:self.playButton2 enabled:NO]; 311 | } else if ([placementID isEqualToString:kVungleTestPlacementID03]) { 312 | NSLog(@"-->> Ad will show for %@", kVungleTestPlacementID03); 313 | [self updateButtonState:self.playButton3 enabled:NO]; 314 | } else if ([placementID isEqualToString:kVungleTestPlacementID04]) { 315 | NSLog(@"-->> Ad will show for %@", kVungleTestPlacementID04); 316 | [self updateButtonState:self.playButton4 enabled:NO]; 317 | } else if ([placementID isEqualToString:kVungleTestPlacementID05]) { 318 | NSLog(@"-->> Ad will show for %@", kVungleTestPlacementID05); 319 | [self updateButtonState:self.playButton5 enabled:NO]; 320 | [self updateButtonState:self.dismissButton5 enabled:YES]; 321 | } else if ([placementID isEqualToString:kVungleTestPlacementID06]) { 322 | NSLog(@"-->> Ad will show for %@", kVungleTestPlacementID06); 323 | [self updateButtonState:self.playButton6 enabled:NO]; 324 | [self updateButtonState:self.dismissButton6 enabled:YES]; 325 | } else if ([placementID isEqualToString:kVungleTestPlacementID07]) { 326 | NSLog(@"-->> Ad will show for %@", kVungleTestPlacementID07); 327 | [self updateButtonState:self.playButton7 enabled:NO]; 328 | [self updateButtonState:self.dismissButton7 enabled:YES]; 329 | } 330 | } 331 | 332 | - (void)vungleWillCloseAdForPlacementID:(nonnull NSString *)placementID { 333 | NSLog(@"-->> Delegate callback: vungleWillCloseAdForPlacement for %@",placementID); 334 | } 335 | 336 | - (void)vungleDidCloseAdForPlacementID:(NSString *)placementID { 337 | NSLog(@"-->> Delegate callback: vungleDidCloseAdForPlacementID for %@", placementID); 338 | [self updateButtons]; 339 | } 340 | 341 | - (void)vungleSDKDidInitialize { 342 | NSLog(@"-->> Delegate Callback: vungleSDKDidInitialize - SDK initialized SUCCESSFULLY"); 343 | [self updateButtons]; 344 | } 345 | 346 | - (void)vungleAdViewedForPlacement:(NSString *)placementID { 347 | NSLog(@"-->> Delegate Callback: vungleAdViewedForPlacement %@",placementID); 348 | } 349 | 350 | - (void)vungleSDKFailedToInitializeWithError:(NSError *)error { 351 | NSLog(@"-->> Delegate Callback: vungleSDKFailedToInitializeWithError: %@",error); 352 | } 353 | 354 | #pragma mark - FirstView Methods 355 | 356 | - (void)setViewDefault { 357 | self.appIdLabel.text = [kVungleAppIDPrefix stringByAppendingString:kVungleTestAppID]; 358 | self.placementIdLabel1.text = [kVunglePlacementID1Prefix stringByAppendingString:kVungleTestPlacementID01]; 359 | self.placementIdLabel2.text = [kVunglePlacementID2Prefix stringByAppendingString:kVungleTestPlacementID02]; 360 | self.placementIdLabel3.text = [kVunglePlacementID3Prefix stringByAppendingString:kVungleTestPlacementID03]; 361 | self.placementIdLabel4.text = [kVunglePlacementID4Prefix stringByAppendingString:kVungleTestPlacementID04]; 362 | self.placementIdLabel5.text = [kVunglePlacementID5Prefix stringByAppendingString:kVungleTestPlacementID05]; 363 | self.placementIdLabel6.text = [kVunglePlacementID6Prefix stringByAppendingString:kVungleTestPlacementID06]; 364 | self.placementIdLabel7.text = [kVunglePlacementID7Prefix stringByAppendingString:kVungleTestPlacementID07]; 365 | [self updateButtonState:self.loadButton2 enabled:NO]; 366 | [self updateButtonState:self.loadButton3 enabled:NO]; 367 | [self updateButtonState:self.loadButton4 enabled:NO]; 368 | [self updateButtonState:self.loadButton5 enabled:NO]; 369 | [self updateButtonState:self.loadButton6 enabled:NO]; 370 | [self updateButtonState:self.loadButton7 enabled:NO]; 371 | [self updateButtonState:self.playButton1 enabled:NO]; 372 | [self updateButtonState:self.playButton2 enabled:NO]; 373 | [self updateButtonState:self.playButton3 enabled:NO]; 374 | [self updateButtonState:self.playButton4 enabled:NO]; 375 | [self updateButtonState:self.playButton5 enabled:NO]; 376 | [self updateButtonState:self.playButton6 enabled:NO]; 377 | [self updateButtonState:self.playButton7 enabled:NO]; 378 | [self updateButtonState:self.dismissButton5 enabled:NO]; 379 | [self updateButtonState:self.dismissButton6 enabled:NO]; 380 | [self updateButtonState:self.dismissButton7 enabled:NO]; 381 | } 382 | 383 | - (void)startVungle { 384 | [self updateButtonState:self.sdkInitButton enabled:NO]; 385 | self.sdk = [VungleSDK sharedSDK]; 386 | [self.sdk updateConsentStatus:VungleConsentDenied consentMessageVersion:@"Accepted"]; 387 | /**GDPR status option to opt_out 388 | [self.sdk updateConsentStatus:VungleConsentDenied consentMessageVersion:@"Denied"]; 389 | */ 390 | [self.sdk updateCCPAStatus:VungleCCPADenied]; 391 | /**CCPA Status Opt_Out API Call 392 | [self.sdk updateCCPAStatus:VungleCCPADenied]; 393 | */ 394 | [self.sdk setDelegate:self]; 395 | [self.sdk setLoggingEnabled:YES]; 396 | NSError *error = nil; 397 | if(![self.sdk startWithAppId:kVungleTestAppID options:nil error:&error]) { 398 | NSLog(@"Error while starting VungleSDK %@",[error localizedDescription]); 399 | [self updateButtonState:self.sdkInitButton enabled:YES]; 400 | return; 401 | } 402 | } 403 | 404 | #pragma mark - Button Actions 405 | 406 | - (IBAction)showAdForPlacement01 { 407 | NSError *error; 408 | [self.sdk playAd:self options:nil placementID:kVungleTestPlacementID01 error:&error]; 409 | if (error) { 410 | NSLog(@"Error encountered playing ad: %@", error); 411 | } 412 | } 413 | 414 | - (IBAction)showAdForPlacement02 { 415 | NSDictionary *options = @{VunglePlayAdOptionKeyOrientations: @(UIInterfaceOrientationMaskAllButUpsideDown), VunglePlayAdOptionKeyStartMuted:@(1)}; 416 | NSError *error; 417 | [self.sdk playAd:self options:options placementID:kVungleTestPlacementID02 error:&error]; 418 | if (error) { 419 | NSLog(@"Error encountered playing ad: %@", error); 420 | [self updateButtonState:self.loadButton2 enabled:YES]; 421 | } 422 | } 423 | 424 | - (IBAction)showAdForPlacement03 { 425 | NSDictionary *options = @{ 426 | VunglePlayAdOptionKeyOrientations: @(UIInterfaceOrientationMaskAll), VunglePlayAdOptionKeyStartMuted:@(1), VunglePlayAdOptionKeyUser:@"test_user_id", 427 | VunglePlayAdOptionKeyIncentivizedAlertBodyText : @"Complete the video in order to get reward", 428 | VunglePlayAdOptionKeyIncentivizedAlertCloseButtonText : @"Close", 429 | VunglePlayAdOptionKeyIncentivizedAlertContinueButtonText : @"Keep Watching", 430 | VunglePlayAdOptionKeyIncentivizedAlertTitleText : @"Careful!"}; 431 | NSError *error; 432 | [self.sdk playAd:self options:options placementID:kVungleTestPlacementID03 error:&error]; 433 | if (error) { 434 | NSLog(@"Error encountered playing ad: %@", error); 435 | [self updateButtonState:self.loadButton3 enabled:YES]; 436 | } 437 | } 438 | 439 | - (IBAction)showAdForPlacement04 { 440 | NSError *error; 441 | [self.sdk playAd:self options:nil placementID:kVungleTestPlacementID04 error:&error]; 442 | if (error) { 443 | NSLog(@"Error encountered playing ad: %@", error); 444 | [self updateButtonState:self.loadButton4 enabled:YES]; 445 | } 446 | } 447 | 448 | - (IBAction)showAdForPlacement05 { 449 | NSLog(@"showAdForPlacement05"); 450 | CGPoint bottomOffset = CGPointMake(0.0, self.scrollView.contentSize.height - self.scrollView.bounds.size.height-30.0); 451 | [self.scrollView setContentOffset:bottomOffset animated:YES]; 452 | NSError *error; 453 | [self getScreenDimension]; 454 | self.adView = [[UIView alloc]initWithFrame:CGRectMake((screenWidth / 2) - (MREC_AD_WIDTH / 2), screenHeight - MREC_AD_HEIGHT, MREC_AD_WIDTH, MREC_AD_HEIGHT)]; 455 | [self.view addSubview:self.adView]; 456 | [self.sdk addAdViewToView:self.adView withOptions:nil placementID:kVungleTestPlacementID05 error:&error]; 457 | if (error) { 458 | NSLog(@"Error encountered playing ad: %@", error); 459 | [self updateButtonState:self.loadButton5 enabled:YES]; 460 | } else { 461 | [self updateButtonState:self.dismissButton5 enabled:YES]; 462 | } 463 | } 464 | 465 | - (IBAction)showAdForPlacement06 { 466 | NSLog(@"showAdForPlacement06"); 467 | // Scroll the view to see the ad completely 468 | CGPoint bottomOffset = CGPointMake(0.0, self.scrollView.contentSize.height - self.scrollView.bounds.size.height-30.0); 469 | [self.scrollView setContentOffset:bottomOffset animated:YES]; 470 | NSError *error; 471 | [self getScreenDimension]; 472 | CGFloat viewYAxis = screenHeight - BANNER_AD_HEIGHT; 473 | NSLog(@"viewYAxis is %f",viewYAxis); 474 | self.adView = [[UIView alloc]initWithFrame:CGRectMake((screenWidth / 2) - (BANNER_SHORT_AD_WIDTH / 2), screenHeight - BANNER_AD_HEIGHT-20, BANNER_SHORT_AD_WIDTH, BANNER_AD_HEIGHT)]; 475 | [self.view addSubview:self.adView]; 476 | [self.sdk addAdViewToView:self.adView withOptions:nil placementID:kVungleTestPlacementID06 error:&error]; 477 | if (error) { 478 | NSLog(@"Error encountered playing ad: %@", error); 479 | [self updateButtonState:self.loadButton6 enabled:YES]; 480 | } else { 481 | [self updateButtonState:self.dismissButton6 enabled:YES]; 482 | } 483 | } 484 | 485 | - (IBAction)showAdForPlacement07 { 486 | NSLog(@"showAdForPlacement07"); 487 | // Scroll the view to see the ad completely 488 | CGPoint bottomOffset = CGPointMake(0.0, self.scrollView.contentSize.height - self.scrollView.bounds.size.height+50.0); 489 | [self.scrollView setContentOffset:bottomOffset animated:YES]; 490 | NSError *error; 491 | [self getScreenDimension]; 492 | self.adView = [[UIView alloc]initWithFrame:CGRectMake((screenWidth / 2) - (BANNER_AD_WIDTH / 2), screenHeight - BANNER_AD_HEIGHT-20, 320, 50)]; 493 | [self.view addSubview:self.adView]; 494 | [self.sdk addAdViewToView:self.adView withOptions:nil placementID:kVungleTestPlacementID07 error:&error]; 495 | if (error) { 496 | NSLog(@"Error encountered playing ad: %@", error); 497 | [self updateButtonState:self.loadButton7 enabled:YES]; 498 | } else { 499 | [self updateButtonState:self.dismissButton7 enabled:YES]; 500 | } 501 | } 502 | 503 | - (void)updateButtons { 504 | [self updateButtonState:self.playButton1 enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID01]? YES:NO]; 505 | [self updateButtonState:self.loadButton2 enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID02]? NO:YES]; 506 | [self updateButtonState:self.playButton2 enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID02]? YES:NO]; 507 | [self updateButtonState:self.loadButton3 enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID03]? NO:YES]; 508 | [self updateButtonState:self.playButton3 enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID03]? YES:NO]; 509 | [self updateButtonState:self.loadButton4 enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID04]? NO:YES]; 510 | [self updateButtonState:self.playButton4 enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID04]? YES:NO]; 511 | [self updateButtonState:self.loadButton5 enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID05]? NO:YES]; 512 | [self updateButtonState:self.playButton5 enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID05]? YES:NO]; 513 | [self updateButtonState:self.loadButton6 enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID06]? NO:YES]; 514 | [self updateButtonState:self.playButton6 enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID06]? YES:NO]; 515 | [self updateButtonState:self.loadButton7 enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID07]? NO:YES]; 516 | [self updateButtonState:self.playButton7 enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID07]? YES:NO]; 517 | } 518 | 519 | - (void)disablePlayLoadButtons { 520 | [self updateButtonState:self.playButton1 enabled:NO]; 521 | [self updateButtonState:self.loadButton2 enabled:NO]; 522 | [self updateButtonState:self.playButton2 enabled:NO]; 523 | [self updateButtonState:self.loadButton3 enabled:NO]; 524 | [self updateButtonState:self.playButton3 enabled:NO]; 525 | [self updateButtonState:self.loadButton4 enabled:NO]; 526 | [self updateButtonState:self.playButton4 enabled:NO]; 527 | [self updateButtonState:self.loadButton5 enabled:NO]; 528 | [self updateButtonState:self.playButton5 enabled:NO]; 529 | [self updateButtonState:self.loadButton6 enabled:NO]; 530 | [self updateButtonState:self.playButton6 enabled:NO]; 531 | [self updateButtonState:self.loadButton7 enabled:NO]; 532 | [self updateButtonState:self.playButton7 enabled:NO]; 533 | } 534 | 535 | - (void)updateButtonState:(UIButton *) button enabled:(BOOL)enabled { 536 | button.enabled = enabled; 537 | button.alpha = (enabled? 1.0:.5); 538 | } 539 | 540 | #pragma mark - Screen Orientation related helpers 541 | 542 | -(void)deviceOrientationDidChange { 543 | if (UIDeviceOrientationIsPortrait([UIDevice currentDevice].orientation)) { 544 | [self getScreenDimension]; 545 | } else if (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)) { 546 | [self getScreenDimension]; 547 | } 548 | } 549 | 550 | -(void)getScreenDimension { 551 | screenHeight = SCREEN_HEIGHT; 552 | screenWidth = SCREEN_WIDTH; 553 | } 554 | 555 | -(BOOL)shouldAutorotate { 556 | return YES; 557 | } 558 | 559 | -(UIInterfaceOrientationMask) supportedInterfaceOrientations { 560 | return UIInterfaceOrientationMaskAll; 561 | } 562 | 563 | @end 564 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "size" : "29x29", 15 | "idiom" : "iphone", 16 | "filename" : "icon_58x58.png", 17 | "scale" : "2x" 18 | }, 19 | { 20 | "idiom" : "iphone", 21 | "size" : "29x29", 22 | "scale" : "3x" 23 | }, 24 | { 25 | "size" : "40x40", 26 | "idiom" : "iphone", 27 | "filename" : "icon_80x80.png", 28 | "scale" : "2x" 29 | }, 30 | { 31 | "idiom" : "iphone", 32 | "size" : "40x40", 33 | "scale" : "3x" 34 | }, 35 | { 36 | "size" : "60x60", 37 | "idiom" : "iphone", 38 | "filename" : "icon _120x120.png", 39 | "scale" : "2x" 40 | }, 41 | { 42 | "idiom" : "iphone", 43 | "size" : "60x60", 44 | "scale" : "3x" 45 | }, 46 | { 47 | "idiom" : "ipad", 48 | "size" : "20x20", 49 | "scale" : "1x" 50 | }, 51 | { 52 | "idiom" : "ipad", 53 | "size" : "20x20", 54 | "scale" : "2x" 55 | }, 56 | { 57 | "size" : "29x29", 58 | "idiom" : "ipad", 59 | "filename" : "icon_29x29.png", 60 | "scale" : "1x" 61 | }, 62 | { 63 | "size" : "29x29", 64 | "idiom" : "ipad", 65 | "filename" : "icon_58x58-1.png", 66 | "scale" : "2x" 67 | }, 68 | { 69 | "size" : "40x40", 70 | "idiom" : "ipad", 71 | "filename" : "icon_40x40.png", 72 | "scale" : "1x" 73 | }, 74 | { 75 | "size" : "40x40", 76 | "idiom" : "ipad", 77 | "filename" : "icon_80x80-1.png", 78 | "scale" : "2x" 79 | }, 80 | { 81 | "size" : "76x76", 82 | "idiom" : "ipad", 83 | "filename" : "icon_76x76.png", 84 | "scale" : "1x" 85 | }, 86 | { 87 | "size" : "76x76", 88 | "idiom" : "ipad", 89 | "filename" : "icon_152x152.png", 90 | "scale" : "2x" 91 | }, 92 | { 93 | "idiom" : "ipad", 94 | "size" : "83.5x83.5", 95 | "scale" : "2x" 96 | }, 97 | { 98 | "idiom" : "ios-marketing", 99 | "size" : "1024x1024", 100 | "scale" : "1x" 101 | } 102 | ], 103 | "info" : { 104 | "version" : 1, 105 | "author" : "xcode" 106 | } 107 | } -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon _120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon _120x120.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_152x152.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_29x29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_29x29.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_40x40.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_58x58-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_58x58-1.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_58x58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_58x58.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_76x76.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_80x80-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_80x80-1.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_80x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Vungle Sample App/Images.xcassets/AppIcon.appiconset/icon_80x80.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/VungleLogo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "VungleLogo.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/VungleLogo.imageset/VungleLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Vungle Sample App/Images.xcassets/VungleLogo.imageset/VungleLogo.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/first.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "first.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "first@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/first.imageset/first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Vungle Sample App/Images.xcassets/first.imageset/first.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/first.imageset/first@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Vungle Sample App/Images.xcassets/first.imageset/first@2x.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/second.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "second.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "second@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/second.imageset/second.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Vungle Sample App/Images.xcassets/second.imageset/second.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/second.imageset/second@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Vungle Sample App/Images.xcassets/second.imageset/second@2x.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/vungle_logo_aqua_mango_banner.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "vungle_logo_aqua_mango_banner.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Images.xcassets/vungle_logo_aqua_mango_banner.imageset/vungle_logo_aqua_mango_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/Vungle Sample App/Images.xcassets/vungle_logo_aqua_mango_banner.imageset/vungle_logo_aqua_mango_banner.png -------------------------------------------------------------------------------- /Sample/Vungle Sample App/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/MRECTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MRECTableViewCell.h 3 | // Vungle Sample App 4 | // 5 | // Created by John Mai on 6/11/20. 6 | // Copyright © 2020 Jordyn Chuhaloff. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface MRECTableViewCell : UITableViewCell 14 | @property (weak, nonatomic) IBOutlet UIButton *loadMRECButton; 15 | @property (weak, nonatomic) IBOutlet UIButton *playMRECButton; 16 | @property (weak, nonatomic) IBOutlet UIButton *dismissMRECButton; 17 | @property (weak, nonatomic) IBOutlet UILabel *mrecLabel; 18 | @property (retain, nonatomic) IBOutlet UIView *mrecView; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/MRECTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MRECTableViewCell.m 3 | // Vungle Sample App 4 | // 5 | // Created by John Mai on 6/11/20. 6 | // Copyright © 2020 Jordyn Chuhaloff. All rights reserved. 7 | // 8 | 9 | #import "MRECTableViewCell.h" 10 | 11 | @interface MRECTableViewCell() 12 | 13 | @end 14 | 15 | @implementation MRECTableViewCell 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/MultiAdViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MultiAdViewController.h 3 | // Vungle Sample App 4 | // 5 | // Created by John Mai on 4/6/20. 6 | // Copyright © 2020 Jordyn Chuhaloff. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface MultiAdViewController : UIViewController 15 | @property (weak, nonatomic) IBOutlet UITableView *multiAdTableView; 16 | @property (weak, nonatomic) IBOutlet UIButton *playFullScreen; 17 | @property (weak, nonatomic) IBOutlet UIButton *loadFullScreen; 18 | @property (weak, nonatomic) IBOutlet UILabel *fullScreenLabel; 19 | @property (nonatomic, strong) VungleSDK *sdk; 20 | @property (nonatomic, assign) BOOL isInitialized; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/MultiAdViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MultiAdViewController.m 3 | // Vungle Sample App 4 | // 5 | // Created by John Mai on 4/6/20. 6 | // Copyright © 2020 Jordyn Chuhaloff. All rights reserved. 7 | // 8 | 9 | #import "MultiAdViewController.h" 10 | #import "Constants.h" 11 | #import "BannerTableViewCell.h" 12 | #import "MRECTableViewCell.h" 13 | 14 | @interface MultiAdViewController () { 15 | CGFloat screenHeight; 16 | CGFloat screenWidth; 17 | } 18 | 19 | @property (nonatomic, assign, getter = isPlayingBanner1) BOOL playingBanner1; 20 | @property (nonatomic, assign, getter = isPlayingBanner2) BOOL playingBanner2; 21 | @property (nonatomic, assign, getter = isPlayingMREC1) BOOL playingMREC1; 22 | @property (nonatomic, assign, getter = isPlayingMREC2) BOOL playingMREC2; 23 | 24 | @end 25 | 26 | @implementation MultiAdViewController 27 | 28 | - (void)viewDidLoad { 29 | [super viewDidLoad]; 30 | [self.view addSubview:self.multiAdTableView]; 31 | self.multiAdTableView.delegate = self; 32 | self.multiAdTableView.dataSource = self; 33 | if ([self.sdk isInitialized]) { 34 | NSLog(@"Init transfer is good"); 35 | self.sdk = [VungleSDK sharedSDK]; 36 | self.sdk.delegate = self; 37 | [self updateButtons]; 38 | } else { 39 | [self setDefault]; 40 | } 41 | [self.sdk updateCCPAStatus:VungleCCPAAccepted]; 42 | /**CCPA Status Denied API call 43 | [self.sdk updateCCPAStatus:VungleCCPADenied]; 44 | */ 45 | } 46 | 47 | -(void)viewDidAppear:(BOOL)animated { 48 | [super viewDidAppear:animated]; 49 | [self.multiAdTableView reloadData]; 50 | } 51 | 52 | - (IBAction)startTapped:(id)sender { 53 | [self startVungle]; 54 | } 55 | 56 | - (IBAction)loadFullScreenTapped:(id)sender { 57 | NSError* error; 58 | if (![self.sdk loadPlacementWithID:kVungleTestPlacementID02 error:&error]) { 59 | [self updateButtonState:sender enabled:YES]; 60 | if (error) { 61 | NSLog(@"The loading error is: %@",error); 62 | } 63 | } else { 64 | [self updateButtonState:sender enabled:NO]; 65 | } 66 | } 67 | 68 | - (IBAction)playFullScreenTapped:(id)sender { 69 | NSError* error; 70 | if (![self.sdk playAd:self options:nil placementID:kVungleTestPlacementID02 error:&error]) { 71 | if (error) { 72 | NSLog(@"Error when attempting to play fullscreen ad %@",error); 73 | } 74 | } 75 | } 76 | 77 | #pragma mark - UITableView methods 78 | 79 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 80 | CGFloat height = 200.0; 81 | if (indexPath.row == 1 || indexPath.row == 3) { 82 | height = 400.0; 83 | } 84 | return height; 85 | } 86 | 87 | -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 88 | return 1; 89 | } 90 | 91 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 92 | return 4; 93 | } 94 | 95 | -(UITableViewCell *)tableView:(UITableView*) tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { 96 | self.fullScreenLabel.text = [kVunglePlacementID2Prefix stringByAppendingString:kVungleTestPlacementID02]; 97 | UITableViewCell *cell = [[UITableViewCell alloc] init]; 98 | if (indexPath.row == 0) { 99 | cell = [self.multiAdTableView dequeueReusableCellWithIdentifier:@"bannerCell" forIndexPath:indexPath]; 100 | BannerTableViewCell *bannerCell = (BannerTableViewCell*) cell; 101 | bannerCell.selectionStyle = UITableViewCellSelectionStyleNone; 102 | bannerCell.bannerLabel.text = [kVunglePlacementID7Prefix stringByAppendingString:kVungleTestPlacementID07]; 103 | if (![self.sdk isInitialized]) { 104 | NSLog(@"SDK is not initialized for multi ad display"); 105 | [self updateButtonState:bannerCell.loadBannerButton enabled:NO]; 106 | [self updateButtonState:bannerCell.playBannerButton enabled:NO]; 107 | [self updateButtonState:bannerCell.dismissBannerButton enabled:NO]; 108 | } else { 109 | [self updateButtonState:bannerCell.loadBannerButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID07]? NO:YES]; 110 | [self updateButtonState:bannerCell.playBannerButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID07]? YES:NO]; 111 | [bannerCell.loadBannerButton addTarget:self action:@selector(loadVungleBannerAd) forControlEvents:UIControlEventTouchUpInside]; 112 | [bannerCell.playBannerButton addTarget:self action:@selector(playVungleBannerAd) forControlEvents:UIControlEventTouchUpInside]; 113 | [bannerCell.dismissBannerButton addTarget:self action:@selector(dismissVungleBanner) forControlEvents:UIControlEventTouchUpInside]; 114 | } 115 | } else if (indexPath.row == 1) { 116 | cell = [self.multiAdTableView dequeueReusableCellWithIdentifier:@"mrecCell" forIndexPath:indexPath]; 117 | MRECTableViewCell *mrecCell = (MRECTableViewCell*) cell; 118 | mrecCell.selectionStyle = UITableViewCellSelectionStyleNone; 119 | mrecCell.mrecLabel.text = [kVunglePlacementID5Prefix stringByAppendingString:kVungleTestPlacementID05]; 120 | if (![self.sdk isInitialized]) { 121 | NSLog(@"SDK is not initialized for multi ad display"); 122 | [self updateButtonState:mrecCell.loadMRECButton enabled:NO]; 123 | [self updateButtonState:mrecCell.playMRECButton enabled:NO]; 124 | [self updateButtonState:mrecCell.dismissMRECButton enabled:NO]; 125 | } else { 126 | [self updateButtonState:mrecCell.loadMRECButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID05]? NO:YES]; 127 | [self updateButtonState:mrecCell.playMRECButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID05]? YES:NO]; 128 | [mrecCell.loadMRECButton addTarget:self action:@selector(loadVungleMrecAd) forControlEvents:UIControlEventTouchUpInside]; 129 | [mrecCell.playMRECButton addTarget:self action:@selector(playVungleMrecAd) forControlEvents:UIControlEventTouchUpInside]; 130 | [mrecCell.dismissMRECButton addTarget:self action:@selector(dismissVungleMrec) forControlEvents:UIControlEventTouchUpInside]; 131 | } 132 | } else if (indexPath.row == 2) { 133 | cell = [self.multiAdTableView dequeueReusableCellWithIdentifier:@"bannerCell" forIndexPath:indexPath]; 134 | BannerTableViewCell *bannerCell2 = (BannerTableViewCell*) cell; 135 | bannerCell2.selectionStyle = UITableViewCellSelectionStyleNone; 136 | bannerCell2.bannerLabel.text = [kVunglePlacementID8Prefix stringByAppendingFormat:kVungleTestPlacementID08]; 137 | if (![self.sdk isInitialized]) { 138 | NSLog(@"SDK is not initialized for multi ad display"); 139 | [self updateButtonState:bannerCell2.loadBannerButton enabled:NO]; 140 | [self updateButtonState:bannerCell2.playBannerButton enabled:NO]; 141 | [self updateButtonState:bannerCell2.dismissBannerButton enabled:NO]; 142 | } else { 143 | [self updateButtonState:bannerCell2.loadBannerButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID08]? NO:YES]; 144 | [self updateButtonState:bannerCell2.playBannerButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID08]? YES:NO]; 145 | [bannerCell2.loadBannerButton addTarget:self action:@selector(loadVungleBannerAdBottom) forControlEvents:UIControlEventTouchUpInside]; 146 | [bannerCell2.playBannerButton addTarget:self action:@selector(playVungleBannerAdBottom) forControlEvents:UIControlEventTouchUpInside]; 147 | [bannerCell2.dismissBannerButton addTarget:self action:@selector(dismissVungleBannerBottom) forControlEvents:UIControlEventTouchUpInside]; 148 | } 149 | } else if (indexPath.row == 3) { 150 | cell = [self.multiAdTableView dequeueReusableCellWithIdentifier:@"mrecCell" forIndexPath:indexPath]; 151 | MRECTableViewCell *mrecCell2 = (MRECTableViewCell*) cell; 152 | mrecCell2.selectionStyle = UITableViewCellSelectionStyleNone; 153 | mrecCell2.mrecLabel.text = [kVunglePlacementID9Prefix stringByAppendingFormat:kVungleTestPlacementID09]; 154 | if (![self.sdk isInitialized]) { 155 | NSLog(@"SDK is not initialized for multi ad display"); 156 | [self updateButtonState:mrecCell2.loadMRECButton enabled:NO]; 157 | [self updateButtonState:mrecCell2.playMRECButton enabled:NO]; 158 | [self updateButtonState:mrecCell2.dismissMRECButton enabled:NO]; 159 | } else { 160 | [self updateButtonState:mrecCell2.loadMRECButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID09]? NO:YES]; 161 | [self updateButtonState:mrecCell2.playMRECButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID09]? YES:NO]; 162 | [mrecCell2.loadMRECButton addTarget:self action:@selector(loadVungleMrecAdBottom) forControlEvents:UIControlEventTouchUpInside]; 163 | [mrecCell2.playMRECButton addTarget:self action:@selector(playVungleMrecAdBottom) forControlEvents:UIControlEventTouchUpInside]; 164 | [mrecCell2.dismissMRECButton addTarget:self action:@selector(dismissVungleMrecBottom) forControlEvents:UIControlEventTouchUpInside]; 165 | } 166 | } 167 | return cell; 168 | } 169 | 170 | #pragma mark - VungleSDKDelegate Methods 171 | 172 | - (void)vungleSDKDidInitialize { 173 | NSLog(@"-->> Delegate Callback: vungleSDKDidInitialize - SDK initialized SUCCESSFULLY"); 174 | [self updateButtons]; 175 | } 176 | 177 | -(void)vungleWillShowAdForPlacementID:(NSString *)placementID { 178 | NSLog(@"-->> Delegate Callback: vungleWillShowAdForPlacementID is called for %@", placementID); 179 | } 180 | 181 | -(void)vungleDidShowAdForPlacementID:(NSString *)placementID { 182 | NSLog(@"-->> Delegate Callback: vungleDidShowAdForPlacementID is called for %@", placementID); 183 | } 184 | 185 | -(void)vungleAdPlayabilityUpdate:(BOOL)isAdPlayable placementID:(NSString *)placementID error:(NSError *)error { 186 | if (isAdPlayable) { 187 | NSLog(@"-->> Delegate Callback: vungleAdPlayabilityUpdate is available to be played for %@",placementID); 188 | } else { 189 | NSLog(@"-->> Delegate Callback: vungleAdPlayabilityUpdate is NOT available to be played for %@",placementID); 190 | } 191 | if ([placementID isEqualToString:kVungleTestPlacementID05]) { 192 | NSLog(@"vungleAdPlayability for 05"); 193 | NSIndexPath *indexPath2 = [NSIndexPath indexPathForItem:1 inSection:0]; 194 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath2]; 195 | MRECTableViewCell *mCell = (MRECTableViewCell*)cell; 196 | if(![self isPlayingMREC1]) { 197 | [self updateButtonState:mCell.loadMRECButton enabled:!isAdPlayable]; 198 | } 199 | [self updateButtonState:mCell.playMRECButton enabled:isAdPlayable]; 200 | } else if ([placementID isEqualToString:kVungleTestPlacementID07]) { 201 | NSLog(@"vungleAdPlayability for 07"); 202 | NSIndexPath *indexPath1 = [NSIndexPath indexPathForItem:0 inSection:0]; 203 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath1]; 204 | BannerTableViewCell *bCell = (BannerTableViewCell*)cell; 205 | if (![self isPlayingBanner1]) { 206 | [self updateButtonState:bCell.loadBannerButton enabled:!isAdPlayable]; 207 | } else { 208 | [self updateButtonState:bCell.playBannerButton enabled:NO]; 209 | } 210 | [self updateButtonState:bCell.playBannerButton enabled:isAdPlayable]; 211 | } else if ([placementID isEqualToString:kVungleTestPlacementID08]) { 212 | NSLog(@"vungleAdPlayability for 08"); 213 | NSIndexPath *indexPath3 = [NSIndexPath indexPathForItem:2 inSection:0]; 214 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath3]; 215 | BannerTableViewCell *bCell = (BannerTableViewCell*)cell; 216 | if (![self isPlayingBanner2]) { 217 | [self updateButtonState:bCell.loadBannerButton enabled:!isAdPlayable]; 218 | } 219 | [self updateButtonState:bCell.playBannerButton enabled:isAdPlayable]; 220 | } else if ([placementID isEqualToString:kVungleTestPlacementID09]) { 221 | NSLog(@"vungleAdPlayability for 09"); 222 | NSIndexPath *indexPath4 = [NSIndexPath indexPathForItem:3 inSection:0]; 223 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath4]; 224 | MRECTableViewCell *mCell = (MRECTableViewCell*)cell; 225 | if (![self isPlayingMREC2]) { 226 | [self updateButtonState:mCell.loadMRECButton enabled:!isAdPlayable]; 227 | } 228 | [self updateButtonState:mCell.playMRECButton enabled:isAdPlayable]; 229 | } else if ([placementID isEqualToString:kVungleTestPlacementID02]) { 230 | [self updateButtonState:self.loadFullScreen enabled:!isAdPlayable]; 231 | [self updateButtonState:self.playFullScreen enabled:isAdPlayable]; 232 | } 233 | } 234 | 235 | -(void)vungleWillCloseAdForPlacementID:(nonnull NSString *)placementID { 236 | NSLog(@"-->> Delegate Callback: vungleWillCloseAdForPlacementID for %@",placementID); 237 | } 238 | 239 | - (void)vungleDidCloseAdForPlacementID:(nonnull NSString *)placementID { 240 | NSLog(@"-->> Delegate Callback: vungleDidCloseAdForPlacementID for %@", placementID); 241 | [self updateButtons]; 242 | } 243 | 244 | - (void)vungleTrackClickForPlacementID:(nullable NSString *)placementID { 245 | NSLog(@"-->> Delegate Callback: vungleTrackClickForPlacementID for %@", placementID); 246 | } 247 | 248 | - (void)vungleWillLeaveApplicationForPlacementID:(nullable NSString *)placementID { 249 | NSLog(@"-->> Delegate Callback: vungleWillLeaveApplicationForPlacementID for %@", placementID); 250 | } 251 | 252 | -(void)vungleAdViewedForPlacement:(NSString *)placementID { 253 | NSLog(@"-->> Delegate Callback: vungleAdViewedForPlacement for %@", placementID); 254 | } 255 | 256 | #pragma mark - Helper Methods 257 | 258 | - (void)startVungle { 259 | self.sdk = [VungleSDK sharedSDK]; 260 | [self.sdk setDelegate:self]; 261 | [self.sdk setLoggingEnabled:YES]; 262 | NSError *error = nil; 263 | if(![self.sdk startWithAppId:kVungleTestAppID options:nil error:&error]) { 264 | NSLog(@"Error while starting VungleSDK %@",[error localizedDescription]); 265 | return; 266 | } 267 | } 268 | 269 | -(void)setDefault { 270 | self.fullScreenLabel.text = [kVunglePlacementID2Prefix stringByAppendingString:kVungleTestPlacementID02]; 271 | [self updateButtonState:self.loadFullScreen enabled:NO]; 272 | [self updateButtonState:self.playFullScreen enabled:NO]; 273 | NSIndexPath *indexPath1 = [NSIndexPath indexPathForItem:0 inSection:0]; 274 | NSIndexPath *indexPath2 = [NSIndexPath indexPathForItem:1 inSection:0]; 275 | NSIndexPath *indexPath3 = [NSIndexPath indexPathForItem:2 inSection:0]; 276 | NSIndexPath *indexPath4 = [NSIndexPath indexPathForItem:3 inSection:0]; 277 | UITableViewCell *cell1 = [self.multiAdTableView cellForRowAtIndexPath:indexPath1]; 278 | BannerTableViewCell *bCell1 = (BannerTableViewCell*)cell1; 279 | UITableViewCell *cell2 = [self.multiAdTableView cellForRowAtIndexPath:indexPath2]; 280 | MRECTableViewCell *mCell1 = (MRECTableViewCell*)cell2; 281 | UITableViewCell *cell3 = [self.multiAdTableView cellForRowAtIndexPath:indexPath3]; 282 | BannerTableViewCell *bCell2 = (BannerTableViewCell*)cell3; 283 | UITableViewCell *cell4 = [self.multiAdTableView cellForRowAtIndexPath:indexPath4]; 284 | MRECTableViewCell *mCell2 = (MRECTableViewCell*)cell4; 285 | [self updateButtonState:bCell1.loadBannerButton enabled:NO]; 286 | [self updateButtonState:bCell1.playBannerButton enabled:NO]; 287 | [self updateButtonState:mCell1.loadMRECButton enabled:NO]; 288 | [self updateButtonState:mCell1.playMRECButton enabled:NO]; 289 | [self updateButtonState:bCell2.loadBannerButton enabled:NO]; 290 | [self updateButtonState:bCell2.playBannerButton enabled:NO]; 291 | [self updateButtonState:mCell2.loadMRECButton enabled:NO]; 292 | [self updateButtonState:mCell2.playMRECButton enabled:NO]; 293 | } 294 | 295 | -(void)loadVungleBannerAd { 296 | NSError *error; 297 | NSIndexPath *indexPath = [NSIndexPath indexPathForItem:0 inSection:0]; 298 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath]; 299 | BannerTableViewCell *bCell = (BannerTableViewCell*)cell; 300 | if (![self.sdk loadPlacementWithID:kVungleTestPlacementID07 withSize:VungleAdSizeBanner error:&error]) { 301 | [self updateButtonState:bCell.loadBannerButton enabled:YES]; 302 | if (error) { 303 | NSLog(@"Error encountered trying to load banner ad %@",error); 304 | } 305 | } else { 306 | [self updateButtonState:bCell.loadBannerButton enabled:NO]; 307 | } 308 | } 309 | 310 | -(void)loadVungleMrecAd { 311 | NSError *error; 312 | NSIndexPath *indexPath = [NSIndexPath indexPathForItem:1 inSection:0]; 313 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath]; 314 | MRECTableViewCell *mCell = (MRECTableViewCell*)cell; 315 | if (![self.sdk loadPlacementWithID:kVungleTestPlacementID05 error:&error]) { 316 | [self updateButtonState:mCell.loadMRECButton enabled:YES]; 317 | if (error) { 318 | NSLog(@"Error encountered trying to load MRECad %@",error); 319 | } 320 | } else { 321 | [self updateButtonState:mCell.loadMRECButton enabled:NO]; 322 | } 323 | } 324 | 325 | -(void)loadVungleMrecAdBottom { 326 | NSError *error; 327 | NSIndexPath *indexPath = [NSIndexPath indexPathForItem:3 inSection:0]; 328 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath]; 329 | MRECTableViewCell *mCell = (MRECTableViewCell*)cell; 330 | if (![self.sdk loadPlacementWithID:kVungleTestPlacementID09 error:&error]) { 331 | [self updateButtonState:mCell.loadMRECButton enabled:YES]; 332 | if (error) { 333 | NSLog(@"Error encountered trying to load MRECad %@",error); 334 | } 335 | } else { 336 | [self updateButtonState:mCell.loadMRECButton enabled:NO]; 337 | } 338 | } 339 | 340 | -(void)playVungleBannerAd { 341 | NSError *error; 342 | NSIndexPath *indexPath = [NSIndexPath indexPathForItem:0 inSection:0]; 343 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath]; 344 | BannerTableViewCell *bCell = (BannerTableViewCell*)cell; 345 | CGFloat cellWidth = cell.contentView.frame.size.width; 346 | bCell.bannerView.frame = CGRectMake((cellWidth - 320)/2.0, 121, 320.0, 50.0); 347 | bCell.bannerView = [[UIView alloc] initWithFrame:bCell.bannerView.frame]; 348 | [bCell addSubview:bCell.bannerView]; 349 | if(![self.sdk addAdViewToView:bCell.bannerView withOptions:nil placementID:kVungleTestPlacementID07 error:&error]) { 350 | if(error) { 351 | NSLog(@"Error encountered when trying to display banner %@",error); 352 | [self updateButtonState:bCell.loadBannerButton enabled:YES]; 353 | } 354 | } else { 355 | [self updateButtonState:bCell.playBannerButton enabled:NO]; 356 | [self updateButtonState:bCell.dismissBannerButton enabled:YES]; 357 | } 358 | [self setPlayingBanner1:YES]; 359 | } 360 | 361 | -(void)playVungleMrecAd { 362 | NSError *error; 363 | NSIndexPath *indexPath = [NSIndexPath indexPathForItem:1 inSection:0]; 364 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath]; 365 | MRECTableViewCell *mCell = (MRECTableViewCell*)cell; 366 | CGFloat cellWidth = cell.contentView.frame.size.width; 367 | mCell.mrecView.frame = CGRectMake((cellWidth - 320)/2.0, 118, 300.0, 250.0); 368 | mCell.mrecView = [[UIView alloc] initWithFrame:mCell.mrecView.frame]; 369 | [mCell addSubview:mCell.mrecView]; 370 | if (![self.sdk addAdViewToView:mCell.mrecView withOptions:nil placementID:kVungleTestPlacementID05 error:&error]) { 371 | if (error) { 372 | NSLog(@"Error encountered trying to load ad %@",error); 373 | [self updateButtonState:mCell.loadMRECButton enabled:YES]; 374 | } 375 | } else { 376 | [self updateButtonState:mCell.playMRECButton enabled:NO]; 377 | [self updateButtonState:mCell.dismissMRECButton enabled:YES]; 378 | } 379 | [self setPlayingMREC1:YES]; 380 | } 381 | 382 | -(void)playVungleMrecAdBottom { 383 | NSError *error; 384 | NSIndexPath *indexPath = [NSIndexPath indexPathForItem:3 inSection:0]; 385 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath]; 386 | MRECTableViewCell *mCell = (MRECTableViewCell*)cell; 387 | CGFloat cellWidth = cell.contentView.frame.size.width; 388 | mCell.mrecView.frame = CGRectMake((cellWidth - 320)/2.0, 118, 300.0, 250.0); 389 | mCell.mrecView = [[UIView alloc] initWithFrame:mCell.mrecView.frame]; 390 | [mCell addSubview:mCell.mrecView]; 391 | if (![self.sdk addAdViewToView:mCell.mrecView withOptions:nil placementID:kVungleTestPlacementID09 error:&error]) { 392 | if (error) { 393 | NSLog(@"Error encountered trying to load ad %@",error); 394 | [self updateButtonState:mCell.loadMRECButton enabled:YES]; 395 | } 396 | } else { 397 | [self updateButtonState:mCell.playMRECButton enabled:NO]; 398 | [self updateButtonState:mCell.dismissMRECButton enabled:YES]; 399 | } 400 | [self setPlayingMREC2:YES]; 401 | } 402 | 403 | -(void)loadVungleBannerAdBottom { 404 | NSError *error; 405 | NSIndexPath *indexPath = [NSIndexPath indexPathForItem:2 inSection:0]; 406 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath]; 407 | BannerTableViewCell *bCell = (BannerTableViewCell*)cell; 408 | if(![self.sdk loadPlacementWithID:kVungleTestPlacementID08 withSize:VungleAdSizeBanner error:&error]) { 409 | [self updateButtonState:bCell.loadBannerButton enabled:YES]; 410 | if(error) { 411 | NSLog(@"Error encountered when attempting to load the bottom banner %@",error); 412 | } 413 | } else { 414 | [self updateButtonState:bCell.loadBannerButton enabled:NO]; 415 | } 416 | } 417 | 418 | -(void)playVungleBannerAdBottom { 419 | NSError *error; 420 | NSIndexPath *indexPath = [NSIndexPath indexPathForItem:2 inSection:0]; 421 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath]; 422 | BannerTableViewCell *bCell = (BannerTableViewCell*)cell; 423 | CGFloat cellWidth = cell.contentView.frame.size.width; 424 | bCell.bannerView.frame = CGRectMake((cellWidth - 320)/2.0, 121, 320.0, 50.0); 425 | bCell.bannerView = [[UIView alloc] initWithFrame:bCell.bannerView.frame]; 426 | [bCell addSubview:bCell.bannerView]; 427 | if (![self.sdk addAdViewToView:bCell.bannerView withOptions:nil placementID:kVungleTestPlacementID08 error:&error]) { 428 | if (error) { 429 | NSLog(@"Error encountered trying to load ad %@",error); 430 | [self updateButtonState:bCell.loadBannerButton enabled:YES]; 431 | } 432 | } else { 433 | [self updateButtonState:bCell.playBannerButton enabled:NO]; 434 | [self updateButtonState:bCell.dismissBannerButton enabled:YES]; 435 | } 436 | [self setPlayingBanner2:YES]; 437 | } 438 | 439 | -(void)dismissVungleBanner { 440 | NSIndexPath *indexPath = [NSIndexPath indexPathForItem:0 inSection:0]; 441 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath]; 442 | BannerTableViewCell *bCell = (BannerTableViewCell*)cell; 443 | [self.sdk finishDisplayingAd:kVungleTestPlacementID07]; 444 | if (bCell.bannerView != nil) { 445 | [bCell.bannerView removeFromSuperview]; 446 | [self updateButtonState:bCell.dismissBannerButton enabled:NO]; 447 | } 448 | } 449 | -(void)dismissVungleMrec { 450 | NSIndexPath *indexPath = [NSIndexPath indexPathForItem:1 inSection:0]; 451 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath]; 452 | MRECTableViewCell *mCell = (MRECTableViewCell*)cell; 453 | [self.sdk finishDisplayingAd:kVungleTestPlacementID05]; 454 | if (mCell.mrecView != nil) { 455 | [mCell.mrecView removeFromSuperview]; 456 | [self updateButtonState:mCell.dismissMRECButton enabled:NO]; 457 | } 458 | } 459 | -(void)dismissVungleBannerBottom { 460 | NSIndexPath *indexPath = [NSIndexPath indexPathForItem:2 inSection:0]; 461 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath]; 462 | BannerTableViewCell *bCell = (BannerTableViewCell*)cell; 463 | [self.sdk finishDisplayingAd:kVungleTestPlacementID08]; 464 | if (bCell.bannerView != nil) { 465 | [bCell.bannerView removeFromSuperview]; 466 | [self updateButtonState:bCell.dismissBannerButton enabled:NO]; 467 | } 468 | } 469 | 470 | -(void)dismissVungleMrecBottom { 471 | NSIndexPath *indexPath = [NSIndexPath indexPathForItem:3 inSection:0]; 472 | UITableViewCell *cell = [self.multiAdTableView cellForRowAtIndexPath:indexPath]; 473 | MRECTableViewCell *mCell = (MRECTableViewCell*)cell; 474 | [self.sdk finishDisplayingAd:kVungleTestPlacementID09]; 475 | if (mCell.mrecView != nil) { 476 | [mCell.mrecView removeFromSuperview]; 477 | [self updateButtonState:mCell.dismissMRECButton enabled:NO]; 478 | } 479 | } 480 | 481 | - (void)updateButtons { 482 | [self updateButtonState:self.loadFullScreen enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID02]? NO:YES]; 483 | [self updateButtonState:self.playFullScreen enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID02]? YES:NO]; 484 | NSIndexPath *indexPath1 = [NSIndexPath indexPathForItem:0 inSection:0]; 485 | NSIndexPath *indexPath2 = [NSIndexPath indexPathForItem:1 inSection:0]; 486 | NSIndexPath *indexPath3 = [NSIndexPath indexPathForItem:2 inSection:0]; 487 | NSIndexPath *indexPath4 = [NSIndexPath indexPathForItem:3 inSection:0]; 488 | BannerTableViewCell *bCell1 = (BannerTableViewCell*)([self.multiAdTableView cellForRowAtIndexPath:indexPath1]); 489 | BannerTableViewCell *bCell2 = (BannerTableViewCell*)([self.multiAdTableView cellForRowAtIndexPath:indexPath3]); 490 | MRECTableViewCell *mCell1 = (MRECTableViewCell*)([self.multiAdTableView cellForRowAtIndexPath:indexPath2]); 491 | MRECTableViewCell *mCell2 = (MRECTableViewCell*)([self.multiAdTableView cellForRowAtIndexPath:indexPath4]); 492 | [self updateButtonState:bCell1.loadBannerButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID07]? NO:YES]; 493 | [self updateButtonState:bCell1.playBannerButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID07]? YES:NO]; 494 | [self updateButtonState:mCell1.loadMRECButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID05]? NO:YES]; 495 | [self updateButtonState:mCell1.playMRECButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID05]? YES:NO]; 496 | [self updateButtonState:bCell2.loadBannerButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID08]? NO:YES]; 497 | [self updateButtonState:bCell2.playBannerButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID08]? YES:NO]; 498 | [self updateButtonState:mCell2.loadMRECButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID09]? NO:YES]; 499 | [self updateButtonState:mCell2.playMRECButton enabled:[self.sdk isAdCachedForPlacementID:kVungleTestPlacementID09]? YES:NO]; 500 | } 501 | 502 | - (void)updateButtonState:(UIButton *) button enabled:(BOOL)enabled { 503 | button.enabled = enabled; 504 | button.alpha = (enabled? 1.0:.5); 505 | } 506 | 507 | -(BOOL)shouldAutorotate { 508 | return YES; 509 | } 510 | 511 | -(UIInterfaceOrientationMask) supportedInterfaceOrientations { 512 | return UIInterfaceOrientationMaskAll; 513 | } 514 | 515 | @end 516 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Vungle Sample App-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleGetInfoString 12 | 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0 27 | LSApplicationCategoryType 28 | 29 | LSRequiresIPhoneOS 30 | 31 | NSAppTransportSecurity 32 | 33 | NSAllowsArbitraryLoads 34 | 35 | 36 | NSUserTrackingUsageDescription 37 | Deliver best ad experience 38 | SKAdNetworkItems 39 | 40 | 41 | SKAdNetworkIdentifer 42 | 3rd42ekr43.skadnetwork 43 | 44 | 45 | SKAdNetworkIdentifer 46 | tl55sbb4fm.skadnetwork 47 | 48 | 49 | SKAdNetworkIdentifer 50 | 2u9pt9hc89.skadnetwork 51 | 52 | 53 | SKAdNetworkIdentifer 54 | 8s468mfl3y.skadnetwork 55 | 56 | 57 | SKAdNetworkIdentifer 58 | glqzh8vgby.skadnetwork 59 | 60 | 61 | SKAdNetworkIdentifer 62 | n9x2a789qt.skadnetwork 63 | 64 | 65 | SKAdNetworkIdentifer 66 | prcb7njmu6.skadnetwork 67 | 68 | 69 | SKAdNetworkIdentifer 70 | v72qych5uu.skadnetwork 71 | 72 | 73 | SKAdNetworkIdentifer 74 | mlmmfzh3r3.skadnetwork 75 | 76 | 77 | SKAdNetworkIdentifer 78 | c6k4g5qg8m.skadnetwork 79 | 80 | 81 | SKAdNetworkIdentifer 82 | 22mmun2rn5.skadnetwork 83 | 84 | 85 | SKAdNetworkIdentifer 86 | yclnxrl5pm.skadnetwork 87 | 88 | 89 | SKAdNetworkIdentifer 90 | t38b2kh725.skadnetwork 91 | 92 | 93 | SKAdNetworkIdentifer 94 | 7ug5zh24hu.skadnetwork 95 | 96 | 97 | SKAdNetworkIdentifer 98 | 5lm9lj6jb7.skadnetwork 99 | 100 | 101 | SKAdNetworkIdentifer 102 | 9t245vhmpl.skadnetwork 103 | 104 | 105 | SKAdNetworkIdentifer 106 | n9x2a789qt.skadnetwork 107 | 108 | 109 | SKAdNetworkIdentifier 110 | 4fzdc2evr5.skadnetwork 111 | 112 | 113 | SKAdNetworkIdentifier 114 | gta8lk7p23.skadnetwork 115 | 116 | 117 | SKAdNetworkIdentifier 118 | ydx93a7ass.skadnetwork 119 | 120 | 121 | UILaunchStoryboardName 122 | LaunchScreen 123 | UIMainStoryboardFile 124 | Main 125 | UIMainStoryboardFile~ipad 126 | Main 127 | UIRequiredDeviceCapabilities 128 | 129 | armv7 130 | 131 | UIStatusBarTintParameters 132 | 133 | UINavigationBar 134 | 135 | Style 136 | UIBarStyleDefault 137 | Translucent 138 | 139 | 140 | 141 | UISupportedInterfaceOrientations 142 | 143 | UIInterfaceOrientationPortraitUpsideDown 144 | UIInterfaceOrientationPortrait 145 | UIInterfaceOrientationLandscapeLeft 146 | UIInterfaceOrientationLandscapeRight 147 | 148 | UISupportedInterfaceOrientations~ipad 149 | 150 | UIInterfaceOrientationPortrait 151 | UIInterfaceOrientationPortraitUpsideDown 152 | UIInterfaceOrientationLandscapeLeft 153 | UIInterfaceOrientationLandscapeRight 154 | 155 | UIViewControllerBasedStatusBarAppearance 156 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/Vungle Sample App-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Sample/Vungle Sample App/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Vungle Sample App 4 | // 5 | // Created by Vungle on 3/24/14. 6 | // Copyright (c) 2017 Vungle. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sample/Vungle Sample AppTests/Vungle Sample AppTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Sample/Vungle Sample AppTests/Vungle_Sample_AppTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // Vungle_Sample_AppTests.m 3 | // Vungle Sample AppTests 4 | // 5 | // Created by Vungle on 3/24/14. 6 | // Copyright (c) 2014 Vungle. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface Vungle_Sample_AppTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation Vungle_Sample_AppTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Sample/Vungle Sample AppTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AvailableLibraries 6 | 7 | 8 | LibraryIdentifier 9 | ios-arm64_i386_x86_64-simulator 10 | LibraryPath 11 | VungleSDK.framework 12 | SupportedArchitectures 13 | 14 | arm64 15 | i386 16 | x86_64 17 | 18 | SupportedPlatform 19 | ios 20 | SupportedPlatformVariant 21 | simulator 22 | 23 | 24 | LibraryIdentifier 25 | ios-arm64_armv7 26 | LibraryPath 27 | VungleSDK.framework 28 | SupportedArchitectures 29 | 30 | arm64 31 | armv7 32 | 33 | SupportedPlatform 34 | ios 35 | 36 | 37 | CFBundlePackageType 38 | XFWK 39 | XCFrameworkFormatVersion 40 | 1.0 41 | 42 | 43 | -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_armv7/VungleSDK.framework/Headers/VungleMediaView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VungleMediaView.h 3 | // Vungle iOS SDK 4 | // 5 | // Copyright © 2021 Vungle Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | /** 13 | * The VungleMediaView loads media content from a given VNGNativeAd. 14 | * This view takes the place of manually loading a cover image. 15 | */ 16 | @interface VungleMediaView : UIView 17 | 18 | /** 19 | * Method that load an image from a local path. 20 | * @param path A local path of the image. 21 | */ 22 | - (BOOL)loadImageFromLocalPath:(NSString *)path; 23 | 24 | /** 25 | * Method that load an image from a remote URL. 26 | * @param urlPath A remote path of the image. 27 | */ 28 | - (BOOL)loadImageFromRemoteURL:(NSString *)urlPath; 29 | 30 | /** 31 | * Method that cleans up the currently displayed image. 32 | */ 33 | - (void)cleanupImage; 34 | 35 | @end 36 | 37 | NS_ASSUME_NONNULL_END 38 | -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_armv7/VungleSDK.framework/Headers/VungleNativeAd.h: -------------------------------------------------------------------------------- 1 | // 2 | // VungleNativeAd.h 3 | // Vungle iOS SDK 4 | // 5 | // Copyright (c) 2013-Present Vungle Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @protocol VungleNativeAdDelegate; 14 | @class VungleMediaView; 15 | 16 | typedef NS_ENUM (NSInteger, NativeAdOptionsPosition) { 17 | NativeAdOptionsPositionTopLeft = 1, 18 | NativeAdOptionsPositionTopRight, 19 | NativeAdOptionsPositionBottomLeft, 20 | NativeAdOptionsPositionBottomRight, 21 | }; 22 | 23 | @interface VungleNativeAd : NSObject 24 | 25 | /** 26 | * The delegate to receive Native Ad callbacks (VungleNativeAdDelegate). 27 | */ 28 | @property (nonatomic, weak, nullable) id delegate; 29 | 30 | /** 31 | * The application name that the ad advertises. 32 | */ 33 | @property (nonatomic, copy, readonly) NSString *title; 34 | 35 | /** 36 | * The description of the application that the ad advertises. 37 | */ 38 | @property (nonatomic, copy, readonly) NSString *bodyText; 39 | 40 | /** 41 | * The call to action phrase of the ad. 42 | */ 43 | @property (nonatomic, copy, readonly) NSString *callToAction; 44 | 45 | /** 46 | * The rating for the application that the ad advertises. 47 | */ 48 | @property (nonatomic, assign, readonly) double adStarRating; 49 | 50 | /** 51 | * The sponsored text, normally "sponsored by". 52 | */ 53 | @property (nonatomic, copy, readonly) NSString *sponsoredText; 54 | 55 | /** 56 | * The app icon image of the ad. 57 | */ 58 | @property (nonatomic, strong, readonly, nullable) UIImage *iconImage; 59 | 60 | /** 61 | * The position for the ad choices icon. Default is TOP_RIGHT. 62 | */ 63 | @property (nonatomic, assign) NativeAdOptionsPosition adOptionsPosition; 64 | 65 | /** 66 | * Initialize a VungleNativeAd with the specified placement id. 67 | * @param placementID the ID of the placement used to present the native ad 68 | */ 69 | - (instancetype)initWithPlacementID:(nonnull NSString *)placementID; 70 | 71 | /** 72 | * Prepare a native ad for the specified placement. 73 | */ 74 | - (void)loadAd; 75 | 76 | /** 77 | * Prepare a native ad for the specified placement. 78 | * @param adMarkup includes the adunit data of the placement 79 | */ 80 | - (void)loadAdWithAdMarkup:(nullable NSString *)adMarkup; 81 | 82 | /** 83 | * Pass UIViews and UIViewController to prepare and display a Native ad. 84 | * @param view a container view in which a native ad will be displayed. This view will be clickable. 85 | * @param mediaView a VungleMediaView to display the ad's image or video 86 | * @param iconImageView a UIImageView to display the app icon 87 | * @param viewController a UIViewController to present SKStoreProductViewController 88 | */ 89 | - (void)registerViewForInteraction:(nonnull UIView *)view 90 | mediaView:(nonnull VungleMediaView *)mediaView 91 | iconImageView:(nullable UIImageView *)iconImageView 92 | viewController:(nullable UIViewController *)viewController; 93 | 94 | /** 95 | * Pass UIViews and UIViewController to prepare and display a Native ad. 96 | * Also, specify clickable area. 97 | * @param view a container view in which a native ad will be displayed 98 | * @param mediaView a VungleMediaView to display the ad's image or video 99 | * @param iconImageView a UIImageView to display the app icon 100 | * @param viewController a UIViewController to present SKStoreProductViewController 101 | * @param clickableViews an array of UIViews that you would like to set clickable. 102 | * If nil or empty, the view will be clickable. 103 | */ 104 | - (void)registerViewForInteraction:(nonnull UIView *)view 105 | mediaView:(nonnull VungleMediaView *)mediaView 106 | iconImageView:(nullable UIImageView *)iconImageView 107 | viewController:(nullable UIViewController *)viewController 108 | clickableViews:(nullable NSArray *)clickableViews; 109 | 110 | /** 111 | * Dismiss the currently displaying Native ad. 112 | */ 113 | - (void)unregisterView; 114 | 115 | @end 116 | 117 | @protocol VungleNativeAdDelegate 118 | @optional 119 | 120 | /** 121 | * If implemented, this method will be called when the SDK loads a native ad successfully. 122 | * @param nativeAd The VungleNativeAd object sending the message. 123 | */ 124 | - (void)nativeAdDidLoad:(VungleNativeAd *)nativeAd; 125 | 126 | /** 127 | * If implemented, this method will be called when the SDK fails to load a native ad. 128 | * @param nativeAd The VungleNativeAd object sending the message. 129 | * @param error An NSError object containing details of the error. 130 | */ 131 | - (void)nativeAd:(VungleNativeAd *)nativeAd didFailWithError:(NSError *)error; 132 | 133 | /** 134 | * If implemented, this method will be called when the SDK fails to present a native ad. 135 | * @param nativeAd The VungleNativeAd object sending the message. 136 | * @param error An NSError object containing details of the error. 137 | */ 138 | - (void)nativeAd:(VungleNativeAd *)nativeAd didFailToPlayWithError:(NSError *)error; 139 | 140 | /** 141 | * If implemented, this method will be called when a native ad is displayed successfully. 142 | * @note Please use this callback to track an impression. 143 | * @param nativeAd The VungleNativeAd object sending the message. 144 | */ 145 | - (void)nativeAdDidTrackImpression:(VungleNativeAd *)nativeAd; 146 | 147 | /** 148 | * If implemented, this method will be called when a user clicks the native ad. 149 | * @param nativeAd The VungleNativeAd object sending the message. 150 | */ 151 | - (void)nativeAdDidClick:(VungleNativeAd *)nativeAd; 152 | 153 | @end 154 | 155 | NS_ASSUME_NONNULL_END 156 | -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_armv7/VungleSDK.framework/Headers/VungleSDK.h: -------------------------------------------------------------------------------- 1 | // 2 | // VungleSDK.h 3 | // Vungle iOS SDK 4 | // SDK Version: 6.12.3 5 | // 6 | // Copyright (c) 2013-Present Vungle Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /** 15 | * VungleViewInfo is a container object for state passed 16 | * indicating how the play experience went 17 | */ 18 | @interface VungleViewInfo : NSObject 19 | 20 | /** 21 | * Represents a BOOL whether or not the video can be considered a full view. 22 | */ 23 | @property (nonatomic, readonly) NSNumber *completedView; 24 | 25 | /** 26 | * The time in seconds that the user watched the video. 27 | */ 28 | @property (nonatomic, readonly) NSNumber *playTime; 29 | 30 | /** 31 | * Represents a BOOL whether or not the user clicked the download button. 32 | */ 33 | @property (nonatomic, readonly) NSNumber *didDownload; 34 | 35 | @end 36 | 37 | extern NSString *VungleSDKInitOptionKeyPriorityPlacementID; 38 | extern NSString *VungleSDKInitOptionKeyPriorityPlacementAdSize; 39 | 40 | extern NSString *VungleSDKVersion; 41 | extern NSString *VunglePlayAdOptionKeyIncentivizedAlertTitleText; 42 | extern NSString *VunglePlayAdOptionKeyIncentivizedAlertBodyText; 43 | extern NSString *VunglePlayAdOptionKeyIncentivizedAlertCloseButtonText; 44 | extern NSString *VunglePlayAdOptionKeyIncentivizedAlertContinueButtonText; 45 | extern NSString *VunglePlayAdOptionKeyOrientations; 46 | extern NSString *VunglePlayAdOptionKeyStartMuted; 47 | extern NSString *VunglePlayAdOptionKeyUser; 48 | extern NSString *VunglePlayAdOptionKeyExtraInfoDictionary; 49 | extern NSString *VunglePlayAdOptionKeyExtra1; 50 | extern NSString *VunglePlayAdOptionKeyExtra2; 51 | extern NSString *VunglePlayAdOptionKeyExtra3; 52 | extern NSString *VunglePlayAdOptionKeyExtra4; 53 | extern NSString *VunglePlayAdOptionKeyExtra5; 54 | extern NSString *VunglePlayAdOptionKeyExtra6; 55 | extern NSString *VunglePlayAdOptionKeyExtra7; 56 | extern NSString *VunglePlayAdOptionKeyExtra8; 57 | extern NSString *VunglePlayAdOptionKeyLargeButtons; 58 | extern NSString *VunglePlayAdOptionKeyFlexViewAutoDismissSeconds; 59 | 60 | typedef enum { 61 | VungleSDKErrorInvalidPlayAdOption = 1, 62 | VungleSDKErrorInvalidPlayAdExtraKey, 63 | VungleSDKErrorCannotPlayAd, 64 | VungleSDKErrorCannotPlayAdAlreadyPlaying, 65 | VungleSDKErrorCannotPlayAdWaiting, 66 | VungleSDKErrorInvalidAdTypeForFeedBasedAdExperience, 67 | VungleSDKErrorNoAppID, 68 | VungleSDKErrorFlexFeedContainerViewSizeError, 69 | VungleSDKErrorFlexFeedContainerViewSizeRatioError, 70 | InvalidPlacementsArray, 71 | VungleSDKErrorInvalidiOSVersion, 72 | VungleSDKErrorTopMostViewControllerMismatch, 73 | VungleSDKErrorUnknownPlacementID, 74 | VungleSDKErrorSDKNotInitialized, 75 | VungleSDKErrorSleepingPlacement, 76 | VungleSDKErrorNoAdsAvailable, 77 | VungleSDKErrorNotEnoughFileSystemSize, 78 | VungleDiscSpaceProviderErrorNoFileSystemAttributes, 79 | VungleSDKErrorUnknownBannerSize, 80 | VungleSDKResetPlacementForDifferentAdSize, 81 | VungleSDKErrorSDKAlreadyInitializing, 82 | VungleSDKErrorInvalidAdTypeForNativeAdExperience, 83 | VungleSDKErrorMissingAdMarkupForPlacement, 84 | VungleSDKErrorInvalidAdMarkupForPlacement, 85 | VungleSDKErrorIllegalAdRequest, 86 | VungleSDKErrorSetNativeAdLoadCompletionBlock, 87 | VungleSDKErrorNativeAdLoad, 88 | } VungleSDKErrorCode; 89 | 90 | typedef NS_ENUM (NSInteger, VungleConsentStatus) { 91 | VungleConsentAccepted = 1, 92 | VungleConsentDenied, 93 | }; 94 | 95 | typedef NS_ENUM (NSInteger, VungleCCPAStatus) { 96 | VungleCCPAAccepted = 1, 97 | VungleCCPADenied, 98 | }; 99 | 100 | typedef NS_ENUM (NSInteger, VungleAdSize) { 101 | VungleAdSizeUnknown = 1, 102 | VungleAdSizeBanner, // width = 320.0f, .height = 50.0f 103 | VungleAdSizeBannerShort, // width = 300.0f, .height = 50.0f 104 | VungleAdSizeBannerLeaderboard, // width = 728.0f, .height = 90.0f 105 | }; 106 | 107 | @protocol VungleSDKLogger 108 | - (void)vungleSDKLog:(NSString *)message; 109 | @end 110 | 111 | @class VungleSDK; 112 | 113 | @protocol VungleSDKDelegate 114 | @optional 115 | 116 | /** 117 | * If implemented, this will get called when the SDK has an ad ready to be displayed. Also it will 118 | * get called with an argument `NO` for `isAdPlayable` when for some reason, there is 119 | * no ad available, for instance there is a corrupt ad or the OS wiped the cache. 120 | * @param isAdPlayable A boolean indicating if an ad is currently in a playable state 121 | * @param placementID The ID of a placement which is ready to be played 122 | * @param error The error that was encountered. This is only sent when the placementID is nil. 123 | */ 124 | - (void)vungleAdPlayabilityUpdate:(BOOL)isAdPlayable placementID:(nullable NSString *)placementID error:(nullable NSError *)error; 125 | 126 | /** 127 | * If implemented, this will get called when the SDK is about to show an ad. This point 128 | * might be a good time to pause your game, and turn off any sound you might be playing. 129 | * @param placementID The placement which is about to be shown. 130 | */ 131 | - (void)vungleWillShowAdForPlacementID:(nullable NSString *)placementID; 132 | 133 | /** 134 | * If implemented, this will get called when the SDK has presented the view controller or the 135 | * view that houses the ad. 136 | * @param placementID The placement which is about to be shown. 137 | */ 138 | - (void)vungleDidShowAdForPlacementID:(nullable NSString *)placementID; 139 | 140 | /** 141 | * If implemented, this will be called when the ad is first rendered for the specified placement. 142 | * @NOTE: Please use this callback to track views. 143 | * @param placementID The placement ID of the advertisement shown 144 | */ 145 | - (void)vungleAdViewedForPlacement:(NSString *)placementID; 146 | 147 | /** 148 | * If implemented, this method gets called when a Vungle Ad Unit is about to be completely dismissed. 149 | * At this point, it's recommended to resume your Game or App. 150 | */ 151 | - (void)vungleWillCloseAdForPlacementID:(nonnull NSString *)placementID; 152 | 153 | /** 154 | * If implemented, this method gets called when a Vungle Ad Unit has been completely dismissed. 155 | * At this point, you can load another ad for non-auto-cached placement if necessary. 156 | */ 157 | - (void)vungleDidCloseAdForPlacementID:(nonnull NSString *)placementID; 158 | 159 | /** 160 | * If implemented, this method gets called when user clicks the Vungle Ad. 161 | * At this point, it's recommended to track the click event. 162 | */ 163 | - (void)vungleTrackClickForPlacementID:(nullable NSString *)placementID; 164 | 165 | /** 166 | * If implemented, this method gets called when user taps the Vungle Ad 167 | * which will cause them to leave the current application(e.g. the ad action 168 | * opens the iTunes store, Mobile Safari, etc). 169 | */ 170 | - (void)vungleWillLeaveApplicationForPlacementID:(nullable NSString *)placementID; 171 | 172 | /** 173 | * This method is called when the user should be rewarded for watching a Rewarded Video Ad. 174 | * At this point, it's recommended to reward the user. 175 | */ 176 | - (void)vungleRewardUserForPlacementID:(nullable NSString *)placementID; 177 | 178 | /** 179 | * If implemented, this will get called when VungleSDK has finished initialization. 180 | * It's only at this point that one can call `playAd:options:placementID:error` 181 | * and `loadPlacementWithID:` without getting initialization errors 182 | */ 183 | - (void)vungleSDKDidInitialize; 184 | 185 | /** 186 | * If implemented, this will get called if the VungleSDK fails to initialize. 187 | * The included NSError object should give some information as to the failure reason. 188 | * @note If initialization fails, you will need to restart the VungleSDK. 189 | */ 190 | - (void)vungleSDKFailedToInitializeWithError:(NSError *)error; 191 | 192 | @end 193 | 194 | @interface VungleSDK : NSObject 195 | @property (strong) NSDictionary *userData; 196 | @property (nullable, strong) id delegate; 197 | @property (atomic, readonly, getter = isInitialized) BOOL initialized; 198 | 199 | /** 200 | * Used when background download has completed. 201 | * @note This is sent by the 202 | * application:handleEventsForBackgroundURLSession:completionHandler: 203 | * and needs to be called in `URLSessionDidFinishEventsForBackgroundURLSession` 204 | */ 205 | @property void (^backgroundURLSessionCompletionHandler)(void); 206 | 207 | /** 208 | * Returns the singleton instance. 209 | */ 210 | + (VungleSDK *)sharedSDK; 211 | 212 | /** 213 | * Sets the publish IDFV flag 214 | * This value is persistent and so may be set once. 215 | * @param publish whether to publish the IDFV value 216 | */ 217 | + (void)setPublishIDFV:(BOOL)publish; 218 | 219 | /** 220 | * Returns the value of the persistent publish IDFV flag. 221 | * @return the current value of the publish IDFV flag 222 | */ 223 | + (BOOL)shouldPublishIDFV; 224 | 225 | /** 226 | * Enable or disable background downloads. 227 | * @note If enabled you must implement the `application:handleEventsForBackgroundURLSession:completionHandler:` 228 | * in your AppDelegate class. Before the AppDelegate method returns, call the VungleSDK completion handler 229 | * `backgroundURLSessionCompletionHandler`. 230 | * @param enable YES to enable, NO to disable 231 | */ 232 | + (void)enableBackgroundDownload:(BOOL)enable; 233 | 234 | /** 235 | * Check to find out if background download is enabled. 236 | * @return YES if background download is enabled, NO if not. 237 | */ 238 | + (BOOL)backgroundDownloadEnabled; 239 | 240 | #pragma mark - Initialization 241 | /** 242 | * Initializes the SDK. You can get your app id on Vungle's dashboard: https://v.vungle.com 243 | * @param appID the unique identifier for your app 244 | * @param error An error object containing information about why initialization failed 245 | * @return YES if the SDK has started, NO otherwise 246 | */ 247 | - (BOOL)startWithAppId:(nonnull NSString *)appID error:(NSError **)error; 248 | 249 | /** 250 | * Initializes the SDK. You can get your app id on Vungle's dashboard: https://v.vungle.com 251 | * @param appID the unique identifier for your app 252 | * @param options A reference to an instance of NSDictionary with customized ad SDK initilize options 253 | * @param error An error object containing information about why initialization failed 254 | * @return YES if the SDK has started, NO otherwise 255 | */ 256 | - (BOOL)startWithAppId:(nonnull NSString *)appID options:(nullable NSDictionary *)options error:(NSError **)error; 257 | 258 | #pragma mark - Interstitial, Flex View Ad playback 259 | /** 260 | * Will play Ad Unit presenting it over the `controller` parameter 261 | * @note This method should only be called using placements with `fullscreen` or `flexview` template types 262 | * @param controller A subclass of UIViewController. Should correspond to the ViewControler at the top of the ViewController hierarchy 263 | * @param options A reference to an instance of NSDictionary with customized ad playback options 264 | * @param placementID The placement defined on the Vungle dashboard 265 | * @param error An optional double reference to an NSError. In case this method returns `NO` it will be non-nil 266 | * @return YES/NO in case of success/error while presenting an AdUnit 267 | * @warning Should be called from the main-thread. 268 | */ 269 | - (BOOL)playAd:(UIViewController *)controller options:(nullable NSDictionary *)options placementID:(nullable NSString *)placementID error:(NSError *__autoreleasing _Nullable *_Nullable)error; 270 | 271 | #pragma mark - MREC / Banner Ad lifecycle 272 | /** 273 | * Pass in an UIView which acts as a container for the ad experience. This view container may be placed in random positions. 274 | * @note This method should only be called using placements that have the `flexfeed` or `mrec` or `banner` template type. For 275 | * the `mrec` template type, note that the UIView must have a width of 300 and a height of 250. If the view is provided without 276 | * these dimensions, an error message will be returned and the ad will not be shown. For the `banner` template type, note that 277 | * the UIView must have the same width and height as the banner size (320x50, 300x50, or 728x90) which you requested. If the 278 | * view is provided with a different banner size, an error message will be returned and the ad will not be shown. 279 | * @param publisherView container view in which an ad will be displayed 280 | * @param options A reference to an instance of NSDictionary with customized ad playback options 281 | * @param placementID The placement defined on the Vungle dashboard 282 | * @param error An optional double reference to an NSError. In case this method returns `NO` it will be non-nil 283 | * @return YES/NO in case of success/error while presenting an AdUnit 284 | */ 285 | - (BOOL)addAdViewToView:(UIView *)publisherView withOptions:(nullable NSDictionary *)options placementID:(nullable NSString *)placementID error:(NSError *__autoreleasing _Nullable *_Nullable)error; 286 | 287 | /** 288 | * This method will dismiss the currently playing Flex View, Flex Feed, Banner or MREC advertisement with the placementId specified. 289 | * If you have added an advertisement with `addAdViewToView:` or you are playing a placement that has been configured as a 290 | * Flex View, Flex Feed, Banner or MREC placement, then this method will remove the advertisement from the screen and perform any 291 | * necessary clean up steps. 292 | * This method will call the existing delegate callbacks as part of the lifecycle. 293 | * @param placementId Thje placement identifier for the ad to dismiss. 294 | */ 295 | - (void)finishDisplayingAd:(NSString *)placementId; 296 | 297 | #pragma mark - Placements support 298 | /** 299 | * Returns YES/NO when there is certainty that an ad will be able to play/can't play for a given placementID. 300 | * @param placementID the specific ID of the placement you are trying to present 301 | */ 302 | - (BOOL)isAdCachedForPlacementID:(nonnull NSString *)placementID; 303 | 304 | /** 305 | * (Overloaded method) 306 | * Returns YES/NO when there is certainty that an ad will be able to play/can't play for a given placementID. 307 | * @param size the VungleAdSize (enum) you would like to request (only for banner ad type at the moment) 308 | * @param placementID the specific ID of the placement you are trying to present 309 | */ 310 | - (BOOL)isAdCachedForPlacementID:(nonnull NSString *)placementID withSize:(VungleAdSize)size; 311 | 312 | /** 313 | * Prepares a placement when you know that you will want 314 | * to show an ad experience tied to a specific placementID. 315 | * @param placementID the specific ID of the placement you would like to present at some point soon 316 | * @param error the NSError object that used to hold error generated 317 | * @return NO if something goes immediately wrong with loading, YES otherwise 318 | */ 319 | - (BOOL)loadPlacementWithID:(NSString *)placementID error:(NSError **)error; 320 | 321 | /** 322 | * (Overloaded method) 323 | * Prepares a placement when you know that you will want 324 | * to show an ad experience tied to a specific placementID. 325 | * @param placementID the specific ID of the placement you would like to present at some point soon 326 | * @param size the VungleAdSize (enum) you would like to request (only for banner ad type at the moment) 327 | * @param error the NSError object that used to hold error generated 328 | * @return NO if something goes immediately wrong with loading, YES otherwise 329 | */ 330 | - (BOOL)loadPlacementWithID:(NSString *)placementID withSize:(VungleAdSize)size error:(NSError **)error; 331 | 332 | #pragma mark - Utility methods 333 | 334 | /** 335 | * @note This method replaces the `muted` property previously included in VungleSDK.h 336 | * @note IT IS HIGHLY RECOMMENDED to set the muted property at the placement level using 337 | * play options (key VunglePlayAdOptionKeyStartMuted). 338 | * Assigning a value to this property will allow all ads played by the SDK to start muted, or 339 | * unmuted. Once called, all ads will use the value provided until the SDK restarts, or until the 340 | * method is called with a different value. 341 | */ 342 | - (void)setMuted:(BOOL)muted; 343 | 344 | /** 345 | * Returns debug info. 346 | */ 347 | - (NSDictionary *)debugInfo; 348 | 349 | /** 350 | * By default, logging is off. 351 | */ 352 | - (void)setLoggingEnabled:(BOOL)enable; 353 | 354 | /** 355 | * Log a new message. The message will be sent to all loggers. 356 | */ 357 | - (void)log:(NSString *)message, ... NS_FORMAT_FUNCTION(1, 2); 358 | 359 | /** 360 | * Attach a new logger. It will get called on every log generated by Vungle (internally and externally). 361 | */ 362 | - (void)attachLogger:(id )logger; 363 | 364 | /** 365 | * Detaches a logger. Make sure to do this, otherwise you might leak memory. 366 | */ 367 | - (void)detachLogger:(id )logger; 368 | 369 | /** 370 | * This only works on the simulator 371 | */ 372 | - (void)clearSleep; 373 | 374 | #pragma mark - GDPR support 375 | /** 376 | * This method takes the consent status of users. If consent is given, Vungle will be able to send targeted ads. 377 | * @param status the enum to be set for user consent status. 378 | * @param version the string to be set for publisher's consent version. It can be any string value. 379 | */ 380 | - (void)updateConsentStatus:(VungleConsentStatus)status consentMessageVersion:(NSString *)version; 381 | 382 | /** 383 | * This method returns the current consent status for the user recorded in the SDK. If no status is found, 384 | * the method returns 0. 385 | */ 386 | - (VungleConsentStatus)getCurrentConsentStatus; 387 | 388 | /** 389 | * This method returns the current consent message version that recorded in the SDK. If not version info found, 390 | * the method returns nil. 391 | */ 392 | - (NSString *)getConsentMessageVersion; 393 | 394 | #pragma mark - CCPA support 395 | /** 396 | * This method takes the CCPA status of users. If CCPA status is accepted, Vungle will be able to send targeted ads. 397 | * @param status the enum to be set for user CCPA status. 398 | */ 399 | - (void)updateCCPAStatus:(VungleCCPAStatus)status; 400 | 401 | /** 402 | * This method returns the current CCPA status for the user recorded in the SDK. If no status is found, 403 | * the method returns 0. 404 | */ 405 | - (VungleCCPAStatus)getCurrentCCPAStatus; 406 | 407 | /** 408 | * This method disables refresh functionality for all banner and MREC placements. 409 | */ 410 | - (void)disableBannerRefresh; 411 | 412 | /** 413 | * This method can be used to provide a user's COPPA status to the Vungle SDK. 414 | * This method should be called before initialization. 415 | * @param status the bool flag to be set for the user's COPPA status. 416 | * status: YES if the user should be treated as 'under 13' and under COPPA regulations. 417 | * status: NO if the user is known to be over the age of 13 and does NOT fall under COPPA regulations. 418 | */ 419 | - (void)updateCOPPAStatus:(BOOL)status; 420 | 421 | @end 422 | 423 | NS_ASSUME_NONNULL_END 424 | -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_armv7/VungleSDK.framework/Headers/VungleSDKCreativeTracking.h: -------------------------------------------------------------------------------- 1 | // 2 | // VungleSDKCreativeTracking.h 3 | // Vungle iOS SDK 4 | // 5 | // Copyright (c) 2013-Present Vungle Inc. All rights reserved. 6 | // 7 | 8 | @protocol VungleSDKCreativeTracking 9 | 10 | @optional 11 | /** 12 | * If implemented, this will get called when the SDK has an ad ready to be displayed. 13 | * The parameters will indicate that an ad associated with the included creative ID is 14 | * ready to play for the specified placement reference ID. Both parameters should return 15 | * a value if an ad is ready to be played. 16 | * @param creativeID The creative ID of the ad unit that is ready to be played 17 | * @param placementID The ID of a placement which is ready to be played 18 | */ 19 | - (void)vungleCreative:(nullable NSString *)creativeID readyForPlacement:(nullable NSString *)placementID; 20 | @end 21 | 22 | @interface VungleSDK () 23 | @property (nullable, weak) NSObject *creativeTrackingDelegate; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_armv7/VungleSDK.framework/Headers/VungleSDKHeaderBidding.h: -------------------------------------------------------------------------------- 1 | // 2 | // VungleSDKHeaderBidding.h 3 | // Vungle iOS SDK 4 | // 5 | // Copyright (c) 2013-Present Vungle Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import "VungleSDK.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @protocol VungleSDKHeaderBidding; 14 | @protocol VungleSDKHBDelegate; 15 | 16 | @interface VungleSDK () 17 | 18 | /** 19 | * Setting this to a non-nil value will enabled header bidding and reporting 20 | */ 21 | @property (nonatomic, weak) NSObject *headerBiddingDelegate; 22 | 23 | /** 24 | * Setting this to a non-nil value will enable header bidding SDK callbacks 25 | */ 26 | @property (nonatomic, weak) NSObject *sdkHBDelegate; 27 | 28 | /** 29 | * This is a synchronous method to fetch a bid token for any placement. This method 30 | * will return nil if it is unable to find a bid token, or a cached placement. 31 | * 32 | * @param placement The ID of a that has already been loaded placement 33 | */ 34 | - (NSString *)bidTokenForPlacement:(NSString *)placement __attribute__((deprecated("Use currentSuperToken to get all the participating bid Tokens."))); 35 | 36 | /** 37 | * Prepares a placement when you know that you will want 38 | * to show an ad experience tied to a specific placementID. 39 | * @param placementID the specific ID of the placement you would like to present at some point soon 40 | * @param adMarkup includes the adunit data of the placement you would like to present at some point soon 41 | * @param error the NSError object that used to hold error generated 42 | * @return NO if something goes immediately wrong with loading, YES otherwise 43 | */ 44 | - (BOOL)loadPlacementWithID:(nonnull NSString *)placementID adMarkup:(nullable NSString *)adMarkup error:(NSError *__autoreleasing _Nullable *_Nullable)error; 45 | 46 | /** 47 | * (Overloaded method) 48 | * Prepares a placement when you know that you will want 49 | * to show an ad experience tied to a specific placementID. 50 | * @param placementID the specific ID of the placement you would like to present at some point soon 51 | * @param adMarkup includes the adunit data of the placement you would like to present at some point soon 52 | * @param size the VungleAdSize (enum) you would like to request (only for banner ad type at the moment) 53 | * @param error the NSError object that used to hold error generated 54 | * @return NO if something goes immediately wrong with loading, YES otherwise 55 | */ 56 | - (BOOL)loadPlacementWithID:(nonnull NSString *)placementID adMarkup:(nullable NSString *)adMarkup withSize:(VungleAdSize)size error:(NSError *__autoreleasing _Nullable *_Nullable)error; 57 | 58 | /** 59 | * Pass in an UIView which acts as a container for the ad experience. This view container may be placed in random positions. 60 | * @note This method should only be called using placements that have the `flexfeed` or `mrec` or `banner` template type. For 61 | * the `mrec` template type, note that the UIView must have a width of 300 and a height of 250. If the view is provided without 62 | * these dimensions, an error message will be returned and the ad will not be shown. For the `banner` template type, note that 63 | * the UIView must have the same width and height as the banner size (320x50, 300x50, or 728x90) which you requested. If the 64 | * view is provided with a different banner size, an error message will be returned and the ad will not be shown. 65 | * @param publisherView container view in which an ad will be displayed 66 | * @param options A reference to an instance of NSDictionary with customized ad playback options 67 | * @param placementID The placement defined on the Vungle dashboard 68 | * @param adMarkup includes the adunit data of the placement 69 | * @param error An optional double reference to an NSError. In case this method returns `NO` it will be non-nil 70 | * @return YES/NO in case of success/error while presenting an AdUnit 71 | */ 72 | - (BOOL)addAdViewToView:(UIView *)publisherView withOptions:(nullable NSDictionary *)options placementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup error:(NSError *__autoreleasing _Nullable *_Nullable)error; 73 | 74 | /** 75 | * Will play Ad Unit presenting it over the `controller` parameter 76 | * @note This method should only be called using placements with `fullscreen` or `flexview` template types 77 | * @param controller A subclass of UIViewController. Should correspond to the ViewControler at the top of the ViewController hierarchy 78 | * @param options A reference to an instance of NSDictionary with customized ad playback options 79 | * @param placementID The placement defined on the Vungle dashboard 80 | * @param adMarkup includes the adunit data of the placement 81 | * @param error An optional double reference to an NSError. In case this method returns `NO` it will be non-nil 82 | * @return YES/NO in case of success/error while presenting an AdUnit 83 | * @warning Should be called from the main-thread. 84 | */ 85 | - (BOOL)playAd:(UIViewController *)controller options:(nullable NSDictionary *)options placementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup error:(NSError *__autoreleasing _Nullable *_Nullable)error; 86 | 87 | /** 88 | * Returns YES/NO when there is certainty that an ad will be able to play/can't play for a given placementID. 89 | * @param placementID the specific ID of the placement 90 | * @param adMarkup includes the adunit data of the placement 91 | */ 92 | - (BOOL)isAdCachedForPlacementID:(nonnull NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 93 | 94 | /** 95 | * (Overloaded method) 96 | * Returns YES/NO when there is certainty that an ad will be able to play/can't play for a given placementID. 97 | * @param placementID the specific ID of the placement 98 | * @param size the VungleAdSize (enum) you would like to request (only for banner ad type at the moment) 99 | * @param adMarkup includes the adunit data of the placement 100 | */ 101 | - (BOOL)isAdCachedForPlacementID:(nonnull NSString *)placementID adMarkup:(nullable NSString *)adMarkup withSize:(VungleAdSize)size; 102 | 103 | /** 104 | * This method will dismiss the currently playing Flex View, Flex Feed, Banner or MREC advertisement with the placementId specified. 105 | * If you have added an advertisement with `addAdViewToView:` or you are playing a placement that has been configured as a 106 | * Flex View, Flex Feed, Banner or MREC placement, then this method will remove the advertisement from the screen and perform any 107 | * necessary clean up steps. 108 | * This method will call the existing delegate callbacks as part of the lifecycle. 109 | * @param placementId the specific ID of the placement 110 | * @param adMarkup includes the adunit data of the placement 111 | */ 112 | - (void)finishDisplayingAd:(nonnull NSString *)placementId adMarkup:(nullable NSString *)adMarkup; 113 | 114 | /** 115 | * This is a synchronous method to fetch super token. This method 116 | * will return nil if it is unable to find an available token. 117 | * 118 | */ 119 | - (NSString *)currentSuperToken __attribute__((deprecated("Use currentSuperTokenForPlacementID:placementID:size: instead."))); 120 | 121 | /** 122 | * This is a synchronous method to fetch super token. This method 123 | * will return nil if it is unable to find an available token. 124 | * @param size Size limit of the supertoken needs to be returned 125 | */ 126 | - (NSString *)currentSuperTokenForSize:(NSInteger)size __attribute__((deprecated("Use currentSuperTokenForPlacementID:placementID:size: instead."))); 127 | 128 | /** 129 | * This is a synchronous method to request super token includes bidTokens 130 | * for specified Placement with size limitation. 131 | * @param placementID the specific ID of the placement. Setting `nil` includes all bidTokens for available Placements. 132 | * @param size size limit applied for the supertoken returned. 0 or negative value sets no size limit. 133 | */ 134 | - (NSString *)currentSuperTokenForPlacementID:(nullable NSString *)placementID forSize:(NSInteger)size; 135 | 136 | @end 137 | 138 | @protocol VungleSDKHeaderBidding 139 | 140 | @optional 141 | /** 142 | * If implemented, this will be called as soon as the SDK receives a bidToken for a particular 143 | * placement. Note that the placement is NOT available to playback until preparation. 144 | * 145 | * @param placement The ID of a placement which is ready to be played 146 | * @param bidToken An encrypted bid token used to identify the placement through the auction 147 | */ 148 | - (void)placementWillBeginCaching:(NSString *)placement 149 | withBidToken:(NSString *)bidToken __attribute__((deprecated("This delegate method will no longer be used in feature releases."))); 150 | 151 | /** 152 | * If implemented, this will be called when the SDK has a placement fully prepared and cached 153 | * to disk with a corresponding bid token. 154 | * 155 | * @param placement The ID of a placement which is ready to be played 156 | * @param bidToken An encrypted bid token used to identify the placement through the auction 157 | */ 158 | - (void)placementPrepared:(NSString *)placement 159 | withBidToken:(NSString *)bidToken __attribute__((deprecated("This delegate method will no longer be used in feature releases."))); 160 | 161 | @end 162 | 163 | @protocol VungleSDKHBDelegate 164 | 165 | @optional 166 | /** 167 | * If implemented, this will get called when the SDK has an ad ready to be displayed. Also it will 168 | * get called with an argument `NO` for `isAdPlayable` when for some reason, there is 169 | * no ad available, for instance there is a corrupt ad or the OS wiped the cache. 170 | * @param isAdPlayable A boolean indicating if an ad is currently in a playable state 171 | * @param placementID The ID of a placement which is ready to be played 172 | * @param adMarkup The ad markup of an adUnit which is ready to be played. 173 | * @param error The error that was encountered. This is only sent when the placementID is nil. 174 | */ 175 | - (void)vungleAdPlayabilityUpdate:(BOOL)isAdPlayable placementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup error:(nullable NSError *)error; 176 | 177 | /** 178 | * If implemented, this will get called when the SDK is about to show an ad. This point 179 | * might be a good time to pause your game, and turn off any sound you might be playing. 180 | * @param placementID The placement which is about to be shown. 181 | * @param adMarkup The ad markup of an adUnit which is about to be shown. 182 | */ 183 | - (void)vungleWillShowAdForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 184 | 185 | /** 186 | * If implemented, this will get called when the SDK has presented the view controller or the 187 | * view that houses the ad. 188 | * @param placementID The placement which is about to be shown. 189 | * @param adMarkup The ad markup of an adUnit which is about to be shown.. 190 | */ 191 | - (void)vungleDidShowAdForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 192 | 193 | /** 194 | * If implemented, this will be called when the ad is first rendered for the specified placement. 195 | * @NOTE: Please use this callback to track views. 196 | * @param placementID The placement ID of the advertisement shown 197 | * @param adMarkup The ad markup of the advertisement shown. 198 | */ 199 | - (void)vungleAdViewedForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 200 | 201 | /** 202 | * If implemented, this method gets called when a Vungle Ad Unit is about to be completely dismissed. 203 | * At this point, it's recommended to resume your Game or App. 204 | * @param placementID The placement ID of the advertisement about to be closed. 205 | * @param adMarkup The ad markup of the advertisement about to be closed. 206 | */ 207 | - (void)vungleWillCloseAdForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 208 | 209 | /** 210 | * If implemented, this method gets called when a Vungle Ad Unit has been completely dismissed. 211 | * At this point, you can load another ad for non-auto-cached placement if necessary. 212 | * @param placementID The placement ID of the advertisement that has been closed. 213 | * @param adMarkup The ad markup of the advertisement that has been closed. 214 | */ 215 | - (void)vungleDidCloseAdForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 216 | 217 | /** 218 | * If implemented, this method gets called when user clicks the Vungle Ad. 219 | * At this point, it's recommended to track the click event. 220 | * @param placementID The placement ID of the advertisement shown. 221 | * @param adMarkup The ad markup of the advertisement shown 222 | */ 223 | - (void)vungleTrackClickForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 224 | 225 | /** 226 | * If implemented, this method gets called when user taps the Vungle Ad 227 | * which will cause them to leave the current application(e.g. the ad action 228 | * opens the iTunes store, Mobile Safari, etc). 229 | * @param placementID The placement ID of the advertisement about to leave the current application. 230 | * @param adMarkup The ad markup of the advertisement about to leave the current application. 231 | */ 232 | - (void)vungleWillLeaveApplicationForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 233 | 234 | /** 235 | * This method is called when the user should be rewarded for watching a Rewarded Video Ad. 236 | * At this point, it's recommended to reward the user. 237 | * @param placementID The placement ID of the advertisement shown. 238 | * @param adMarkup The ad markup of the advertisement shown. 239 | */ 240 | - (void)vungleRewardUserForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 241 | 242 | /** 243 | * This method is called when the publisher changes the placement state from HB to NON-HB or the other way. 244 | * At this point, it's recommended to remove all the delegate object references related to placement. 245 | * @param placementID The unique ID referred to the placement of the advertisement shown 246 | */ 247 | - (void)invalidateObjectsForPlacementID:(nullable NSString *)placementID; 248 | 249 | @end 250 | 251 | NS_ASSUME_NONNULL_END 252 | -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_armv7/VungleSDK.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/VungleSDK.xcframework/ios-arm64_armv7/VungleSDK.framework/Info.plist -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_armv7/VungleSDK.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module VungleSDK { 2 | umbrella header "VungleSDK.h" 3 | 4 | module VungleSDKCreativeTracking { 5 | header "VungleSDKCreativeTracking.h" 6 | } 7 | 8 | module VungleSDKHeaderBidding { 9 | header "VungleSDKHeaderBidding.h" 10 | } 11 | 12 | module VungleSDK { 13 | header "VungleNativeAd.h" 14 | header "VungleMediaView.h" 15 | } 16 | 17 | module * { export * } 18 | } 19 | -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_armv7/VungleSDK.framework/VungleSDK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/VungleSDK.xcframework/ios-arm64_armv7/VungleSDK.framework/VungleSDK -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_i386_x86_64-simulator/VungleSDK.framework/Headers/VungleMediaView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VungleMediaView.h 3 | // Vungle iOS SDK 4 | // 5 | // Copyright © 2021 Vungle Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | /** 13 | * The VungleMediaView loads media content from a given VNGNativeAd. 14 | * This view takes the place of manually loading a cover image. 15 | */ 16 | @interface VungleMediaView : UIView 17 | 18 | /** 19 | * Method that load an image from a local path. 20 | * @param path A local path of the image. 21 | */ 22 | - (BOOL)loadImageFromLocalPath:(NSString *)path; 23 | 24 | /** 25 | * Method that load an image from a remote URL. 26 | * @param urlPath A remote path of the image. 27 | */ 28 | - (BOOL)loadImageFromRemoteURL:(NSString *)urlPath; 29 | 30 | /** 31 | * Method that cleans up the currently displayed image. 32 | */ 33 | - (void)cleanupImage; 34 | 35 | @end 36 | 37 | NS_ASSUME_NONNULL_END 38 | -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_i386_x86_64-simulator/VungleSDK.framework/Headers/VungleNativeAd.h: -------------------------------------------------------------------------------- 1 | // 2 | // VungleNativeAd.h 3 | // Vungle iOS SDK 4 | // 5 | // Copyright (c) 2013-Present Vungle Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @protocol VungleNativeAdDelegate; 14 | @class VungleMediaView; 15 | 16 | typedef NS_ENUM (NSInteger, NativeAdOptionsPosition) { 17 | NativeAdOptionsPositionTopLeft = 1, 18 | NativeAdOptionsPositionTopRight, 19 | NativeAdOptionsPositionBottomLeft, 20 | NativeAdOptionsPositionBottomRight, 21 | }; 22 | 23 | @interface VungleNativeAd : NSObject 24 | 25 | /** 26 | * The delegate to receive Native Ad callbacks (VungleNativeAdDelegate). 27 | */ 28 | @property (nonatomic, weak, nullable) id delegate; 29 | 30 | /** 31 | * The application name that the ad advertises. 32 | */ 33 | @property (nonatomic, copy, readonly) NSString *title; 34 | 35 | /** 36 | * The description of the application that the ad advertises. 37 | */ 38 | @property (nonatomic, copy, readonly) NSString *bodyText; 39 | 40 | /** 41 | * The call to action phrase of the ad. 42 | */ 43 | @property (nonatomic, copy, readonly) NSString *callToAction; 44 | 45 | /** 46 | * The rating for the application that the ad advertises. 47 | */ 48 | @property (nonatomic, assign, readonly) double adStarRating; 49 | 50 | /** 51 | * The sponsored text, normally "sponsored by". 52 | */ 53 | @property (nonatomic, copy, readonly) NSString *sponsoredText; 54 | 55 | /** 56 | * The app icon image of the ad. 57 | */ 58 | @property (nonatomic, strong, readonly, nullable) UIImage *iconImage; 59 | 60 | /** 61 | * The position for the ad choices icon. Default is TOP_RIGHT. 62 | */ 63 | @property (nonatomic, assign) NativeAdOptionsPosition adOptionsPosition; 64 | 65 | /** 66 | * Initialize a VungleNativeAd with the specified placement id. 67 | * @param placementID the ID of the placement used to present the native ad 68 | */ 69 | - (instancetype)initWithPlacementID:(nonnull NSString *)placementID; 70 | 71 | /** 72 | * Prepare a native ad for the specified placement. 73 | */ 74 | - (void)loadAd; 75 | 76 | /** 77 | * Prepare a native ad for the specified placement. 78 | * @param adMarkup includes the adunit data of the placement 79 | */ 80 | - (void)loadAdWithAdMarkup:(nullable NSString *)adMarkup; 81 | 82 | /** 83 | * Pass UIViews and UIViewController to prepare and display a Native ad. 84 | * @param view a container view in which a native ad will be displayed. This view will be clickable. 85 | * @param mediaView a VungleMediaView to display the ad's image or video 86 | * @param iconImageView a UIImageView to display the app icon 87 | * @param viewController a UIViewController to present SKStoreProductViewController 88 | */ 89 | - (void)registerViewForInteraction:(nonnull UIView *)view 90 | mediaView:(nonnull VungleMediaView *)mediaView 91 | iconImageView:(nullable UIImageView *)iconImageView 92 | viewController:(nullable UIViewController *)viewController; 93 | 94 | /** 95 | * Pass UIViews and UIViewController to prepare and display a Native ad. 96 | * Also, specify clickable area. 97 | * @param view a container view in which a native ad will be displayed 98 | * @param mediaView a VungleMediaView to display the ad's image or video 99 | * @param iconImageView a UIImageView to display the app icon 100 | * @param viewController a UIViewController to present SKStoreProductViewController 101 | * @param clickableViews an array of UIViews that you would like to set clickable. 102 | * If nil or empty, the view will be clickable. 103 | */ 104 | - (void)registerViewForInteraction:(nonnull UIView *)view 105 | mediaView:(nonnull VungleMediaView *)mediaView 106 | iconImageView:(nullable UIImageView *)iconImageView 107 | viewController:(nullable UIViewController *)viewController 108 | clickableViews:(nullable NSArray *)clickableViews; 109 | 110 | /** 111 | * Dismiss the currently displaying Native ad. 112 | */ 113 | - (void)unregisterView; 114 | 115 | @end 116 | 117 | @protocol VungleNativeAdDelegate 118 | @optional 119 | 120 | /** 121 | * If implemented, this method will be called when the SDK loads a native ad successfully. 122 | * @param nativeAd The VungleNativeAd object sending the message. 123 | */ 124 | - (void)nativeAdDidLoad:(VungleNativeAd *)nativeAd; 125 | 126 | /** 127 | * If implemented, this method will be called when the SDK fails to load a native ad. 128 | * @param nativeAd The VungleNativeAd object sending the message. 129 | * @param error An NSError object containing details of the error. 130 | */ 131 | - (void)nativeAd:(VungleNativeAd *)nativeAd didFailWithError:(NSError *)error; 132 | 133 | /** 134 | * If implemented, this method will be called when the SDK fails to present a native ad. 135 | * @param nativeAd The VungleNativeAd object sending the message. 136 | * @param error An NSError object containing details of the error. 137 | */ 138 | - (void)nativeAd:(VungleNativeAd *)nativeAd didFailToPlayWithError:(NSError *)error; 139 | 140 | /** 141 | * If implemented, this method will be called when a native ad is displayed successfully. 142 | * @note Please use this callback to track an impression. 143 | * @param nativeAd The VungleNativeAd object sending the message. 144 | */ 145 | - (void)nativeAdDidTrackImpression:(VungleNativeAd *)nativeAd; 146 | 147 | /** 148 | * If implemented, this method will be called when a user clicks the native ad. 149 | * @param nativeAd The VungleNativeAd object sending the message. 150 | */ 151 | - (void)nativeAdDidClick:(VungleNativeAd *)nativeAd; 152 | 153 | @end 154 | 155 | NS_ASSUME_NONNULL_END 156 | -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_i386_x86_64-simulator/VungleSDK.framework/Headers/VungleSDK.h: -------------------------------------------------------------------------------- 1 | // 2 | // VungleSDK.h 3 | // Vungle iOS SDK 4 | // SDK Version: 6.12.3 5 | // 6 | // Copyright (c) 2013-Present Vungle Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /** 15 | * VungleViewInfo is a container object for state passed 16 | * indicating how the play experience went 17 | */ 18 | @interface VungleViewInfo : NSObject 19 | 20 | /** 21 | * Represents a BOOL whether or not the video can be considered a full view. 22 | */ 23 | @property (nonatomic, readonly) NSNumber *completedView; 24 | 25 | /** 26 | * The time in seconds that the user watched the video. 27 | */ 28 | @property (nonatomic, readonly) NSNumber *playTime; 29 | 30 | /** 31 | * Represents a BOOL whether or not the user clicked the download button. 32 | */ 33 | @property (nonatomic, readonly) NSNumber *didDownload; 34 | 35 | @end 36 | 37 | extern NSString *VungleSDKInitOptionKeyPriorityPlacementID; 38 | extern NSString *VungleSDKInitOptionKeyPriorityPlacementAdSize; 39 | 40 | extern NSString *VungleSDKVersion; 41 | extern NSString *VunglePlayAdOptionKeyIncentivizedAlertTitleText; 42 | extern NSString *VunglePlayAdOptionKeyIncentivizedAlertBodyText; 43 | extern NSString *VunglePlayAdOptionKeyIncentivizedAlertCloseButtonText; 44 | extern NSString *VunglePlayAdOptionKeyIncentivizedAlertContinueButtonText; 45 | extern NSString *VunglePlayAdOptionKeyOrientations; 46 | extern NSString *VunglePlayAdOptionKeyStartMuted; 47 | extern NSString *VunglePlayAdOptionKeyUser; 48 | extern NSString *VunglePlayAdOptionKeyExtraInfoDictionary; 49 | extern NSString *VunglePlayAdOptionKeyExtra1; 50 | extern NSString *VunglePlayAdOptionKeyExtra2; 51 | extern NSString *VunglePlayAdOptionKeyExtra3; 52 | extern NSString *VunglePlayAdOptionKeyExtra4; 53 | extern NSString *VunglePlayAdOptionKeyExtra5; 54 | extern NSString *VunglePlayAdOptionKeyExtra6; 55 | extern NSString *VunglePlayAdOptionKeyExtra7; 56 | extern NSString *VunglePlayAdOptionKeyExtra8; 57 | extern NSString *VunglePlayAdOptionKeyLargeButtons; 58 | extern NSString *VunglePlayAdOptionKeyFlexViewAutoDismissSeconds; 59 | 60 | typedef enum { 61 | VungleSDKErrorInvalidPlayAdOption = 1, 62 | VungleSDKErrorInvalidPlayAdExtraKey, 63 | VungleSDKErrorCannotPlayAd, 64 | VungleSDKErrorCannotPlayAdAlreadyPlaying, 65 | VungleSDKErrorCannotPlayAdWaiting, 66 | VungleSDKErrorInvalidAdTypeForFeedBasedAdExperience, 67 | VungleSDKErrorNoAppID, 68 | VungleSDKErrorFlexFeedContainerViewSizeError, 69 | VungleSDKErrorFlexFeedContainerViewSizeRatioError, 70 | InvalidPlacementsArray, 71 | VungleSDKErrorInvalidiOSVersion, 72 | VungleSDKErrorTopMostViewControllerMismatch, 73 | VungleSDKErrorUnknownPlacementID, 74 | VungleSDKErrorSDKNotInitialized, 75 | VungleSDKErrorSleepingPlacement, 76 | VungleSDKErrorNoAdsAvailable, 77 | VungleSDKErrorNotEnoughFileSystemSize, 78 | VungleDiscSpaceProviderErrorNoFileSystemAttributes, 79 | VungleSDKErrorUnknownBannerSize, 80 | VungleSDKResetPlacementForDifferentAdSize, 81 | VungleSDKErrorSDKAlreadyInitializing, 82 | VungleSDKErrorInvalidAdTypeForNativeAdExperience, 83 | VungleSDKErrorMissingAdMarkupForPlacement, 84 | VungleSDKErrorInvalidAdMarkupForPlacement, 85 | VungleSDKErrorIllegalAdRequest, 86 | VungleSDKErrorSetNativeAdLoadCompletionBlock, 87 | VungleSDKErrorNativeAdLoad, 88 | } VungleSDKErrorCode; 89 | 90 | typedef NS_ENUM (NSInteger, VungleConsentStatus) { 91 | VungleConsentAccepted = 1, 92 | VungleConsentDenied, 93 | }; 94 | 95 | typedef NS_ENUM (NSInteger, VungleCCPAStatus) { 96 | VungleCCPAAccepted = 1, 97 | VungleCCPADenied, 98 | }; 99 | 100 | typedef NS_ENUM (NSInteger, VungleAdSize) { 101 | VungleAdSizeUnknown = 1, 102 | VungleAdSizeBanner, // width = 320.0f, .height = 50.0f 103 | VungleAdSizeBannerShort, // width = 300.0f, .height = 50.0f 104 | VungleAdSizeBannerLeaderboard, // width = 728.0f, .height = 90.0f 105 | }; 106 | 107 | @protocol VungleSDKLogger 108 | - (void)vungleSDKLog:(NSString *)message; 109 | @end 110 | 111 | @class VungleSDK; 112 | 113 | @protocol VungleSDKDelegate 114 | @optional 115 | 116 | /** 117 | * If implemented, this will get called when the SDK has an ad ready to be displayed. Also it will 118 | * get called with an argument `NO` for `isAdPlayable` when for some reason, there is 119 | * no ad available, for instance there is a corrupt ad or the OS wiped the cache. 120 | * @param isAdPlayable A boolean indicating if an ad is currently in a playable state 121 | * @param placementID The ID of a placement which is ready to be played 122 | * @param error The error that was encountered. This is only sent when the placementID is nil. 123 | */ 124 | - (void)vungleAdPlayabilityUpdate:(BOOL)isAdPlayable placementID:(nullable NSString *)placementID error:(nullable NSError *)error; 125 | 126 | /** 127 | * If implemented, this will get called when the SDK is about to show an ad. This point 128 | * might be a good time to pause your game, and turn off any sound you might be playing. 129 | * @param placementID The placement which is about to be shown. 130 | */ 131 | - (void)vungleWillShowAdForPlacementID:(nullable NSString *)placementID; 132 | 133 | /** 134 | * If implemented, this will get called when the SDK has presented the view controller or the 135 | * view that houses the ad. 136 | * @param placementID The placement which is about to be shown. 137 | */ 138 | - (void)vungleDidShowAdForPlacementID:(nullable NSString *)placementID; 139 | 140 | /** 141 | * If implemented, this will be called when the ad is first rendered for the specified placement. 142 | * @NOTE: Please use this callback to track views. 143 | * @param placementID The placement ID of the advertisement shown 144 | */ 145 | - (void)vungleAdViewedForPlacement:(NSString *)placementID; 146 | 147 | /** 148 | * If implemented, this method gets called when a Vungle Ad Unit is about to be completely dismissed. 149 | * At this point, it's recommended to resume your Game or App. 150 | */ 151 | - (void)vungleWillCloseAdForPlacementID:(nonnull NSString *)placementID; 152 | 153 | /** 154 | * If implemented, this method gets called when a Vungle Ad Unit has been completely dismissed. 155 | * At this point, you can load another ad for non-auto-cached placement if necessary. 156 | */ 157 | - (void)vungleDidCloseAdForPlacementID:(nonnull NSString *)placementID; 158 | 159 | /** 160 | * If implemented, this method gets called when user clicks the Vungle Ad. 161 | * At this point, it's recommended to track the click event. 162 | */ 163 | - (void)vungleTrackClickForPlacementID:(nullable NSString *)placementID; 164 | 165 | /** 166 | * If implemented, this method gets called when user taps the Vungle Ad 167 | * which will cause them to leave the current application(e.g. the ad action 168 | * opens the iTunes store, Mobile Safari, etc). 169 | */ 170 | - (void)vungleWillLeaveApplicationForPlacementID:(nullable NSString *)placementID; 171 | 172 | /** 173 | * This method is called when the user should be rewarded for watching a Rewarded Video Ad. 174 | * At this point, it's recommended to reward the user. 175 | */ 176 | - (void)vungleRewardUserForPlacementID:(nullable NSString *)placementID; 177 | 178 | /** 179 | * If implemented, this will get called when VungleSDK has finished initialization. 180 | * It's only at this point that one can call `playAd:options:placementID:error` 181 | * and `loadPlacementWithID:` without getting initialization errors 182 | */ 183 | - (void)vungleSDKDidInitialize; 184 | 185 | /** 186 | * If implemented, this will get called if the VungleSDK fails to initialize. 187 | * The included NSError object should give some information as to the failure reason. 188 | * @note If initialization fails, you will need to restart the VungleSDK. 189 | */ 190 | - (void)vungleSDKFailedToInitializeWithError:(NSError *)error; 191 | 192 | @end 193 | 194 | @interface VungleSDK : NSObject 195 | @property (strong) NSDictionary *userData; 196 | @property (nullable, strong) id delegate; 197 | @property (atomic, readonly, getter = isInitialized) BOOL initialized; 198 | 199 | /** 200 | * Used when background download has completed. 201 | * @note This is sent by the 202 | * application:handleEventsForBackgroundURLSession:completionHandler: 203 | * and needs to be called in `URLSessionDidFinishEventsForBackgroundURLSession` 204 | */ 205 | @property void (^backgroundURLSessionCompletionHandler)(void); 206 | 207 | /** 208 | * Returns the singleton instance. 209 | */ 210 | + (VungleSDK *)sharedSDK; 211 | 212 | /** 213 | * Sets the publish IDFV flag 214 | * This value is persistent and so may be set once. 215 | * @param publish whether to publish the IDFV value 216 | */ 217 | + (void)setPublishIDFV:(BOOL)publish; 218 | 219 | /** 220 | * Returns the value of the persistent publish IDFV flag. 221 | * @return the current value of the publish IDFV flag 222 | */ 223 | + (BOOL)shouldPublishIDFV; 224 | 225 | /** 226 | * Enable or disable background downloads. 227 | * @note If enabled you must implement the `application:handleEventsForBackgroundURLSession:completionHandler:` 228 | * in your AppDelegate class. Before the AppDelegate method returns, call the VungleSDK completion handler 229 | * `backgroundURLSessionCompletionHandler`. 230 | * @param enable YES to enable, NO to disable 231 | */ 232 | + (void)enableBackgroundDownload:(BOOL)enable; 233 | 234 | /** 235 | * Check to find out if background download is enabled. 236 | * @return YES if background download is enabled, NO if not. 237 | */ 238 | + (BOOL)backgroundDownloadEnabled; 239 | 240 | #pragma mark - Initialization 241 | /** 242 | * Initializes the SDK. You can get your app id on Vungle's dashboard: https://v.vungle.com 243 | * @param appID the unique identifier for your app 244 | * @param error An error object containing information about why initialization failed 245 | * @return YES if the SDK has started, NO otherwise 246 | */ 247 | - (BOOL)startWithAppId:(nonnull NSString *)appID error:(NSError **)error; 248 | 249 | /** 250 | * Initializes the SDK. You can get your app id on Vungle's dashboard: https://v.vungle.com 251 | * @param appID the unique identifier for your app 252 | * @param options A reference to an instance of NSDictionary with customized ad SDK initilize options 253 | * @param error An error object containing information about why initialization failed 254 | * @return YES if the SDK has started, NO otherwise 255 | */ 256 | - (BOOL)startWithAppId:(nonnull NSString *)appID options:(nullable NSDictionary *)options error:(NSError **)error; 257 | 258 | #pragma mark - Interstitial, Flex View Ad playback 259 | /** 260 | * Will play Ad Unit presenting it over the `controller` parameter 261 | * @note This method should only be called using placements with `fullscreen` or `flexview` template types 262 | * @param controller A subclass of UIViewController. Should correspond to the ViewControler at the top of the ViewController hierarchy 263 | * @param options A reference to an instance of NSDictionary with customized ad playback options 264 | * @param placementID The placement defined on the Vungle dashboard 265 | * @param error An optional double reference to an NSError. In case this method returns `NO` it will be non-nil 266 | * @return YES/NO in case of success/error while presenting an AdUnit 267 | * @warning Should be called from the main-thread. 268 | */ 269 | - (BOOL)playAd:(UIViewController *)controller options:(nullable NSDictionary *)options placementID:(nullable NSString *)placementID error:(NSError *__autoreleasing _Nullable *_Nullable)error; 270 | 271 | #pragma mark - MREC / Banner Ad lifecycle 272 | /** 273 | * Pass in an UIView which acts as a container for the ad experience. This view container may be placed in random positions. 274 | * @note This method should only be called using placements that have the `flexfeed` or `mrec` or `banner` template type. For 275 | * the `mrec` template type, note that the UIView must have a width of 300 and a height of 250. If the view is provided without 276 | * these dimensions, an error message will be returned and the ad will not be shown. For the `banner` template type, note that 277 | * the UIView must have the same width and height as the banner size (320x50, 300x50, or 728x90) which you requested. If the 278 | * view is provided with a different banner size, an error message will be returned and the ad will not be shown. 279 | * @param publisherView container view in which an ad will be displayed 280 | * @param options A reference to an instance of NSDictionary with customized ad playback options 281 | * @param placementID The placement defined on the Vungle dashboard 282 | * @param error An optional double reference to an NSError. In case this method returns `NO` it will be non-nil 283 | * @return YES/NO in case of success/error while presenting an AdUnit 284 | */ 285 | - (BOOL)addAdViewToView:(UIView *)publisherView withOptions:(nullable NSDictionary *)options placementID:(nullable NSString *)placementID error:(NSError *__autoreleasing _Nullable *_Nullable)error; 286 | 287 | /** 288 | * This method will dismiss the currently playing Flex View, Flex Feed, Banner or MREC advertisement with the placementId specified. 289 | * If you have added an advertisement with `addAdViewToView:` or you are playing a placement that has been configured as a 290 | * Flex View, Flex Feed, Banner or MREC placement, then this method will remove the advertisement from the screen and perform any 291 | * necessary clean up steps. 292 | * This method will call the existing delegate callbacks as part of the lifecycle. 293 | * @param placementId Thje placement identifier for the ad to dismiss. 294 | */ 295 | - (void)finishDisplayingAd:(NSString *)placementId; 296 | 297 | #pragma mark - Placements support 298 | /** 299 | * Returns YES/NO when there is certainty that an ad will be able to play/can't play for a given placementID. 300 | * @param placementID the specific ID of the placement you are trying to present 301 | */ 302 | - (BOOL)isAdCachedForPlacementID:(nonnull NSString *)placementID; 303 | 304 | /** 305 | * (Overloaded method) 306 | * Returns YES/NO when there is certainty that an ad will be able to play/can't play for a given placementID. 307 | * @param size the VungleAdSize (enum) you would like to request (only for banner ad type at the moment) 308 | * @param placementID the specific ID of the placement you are trying to present 309 | */ 310 | - (BOOL)isAdCachedForPlacementID:(nonnull NSString *)placementID withSize:(VungleAdSize)size; 311 | 312 | /** 313 | * Prepares a placement when you know that you will want 314 | * to show an ad experience tied to a specific placementID. 315 | * @param placementID the specific ID of the placement you would like to present at some point soon 316 | * @param error the NSError object that used to hold error generated 317 | * @return NO if something goes immediately wrong with loading, YES otherwise 318 | */ 319 | - (BOOL)loadPlacementWithID:(NSString *)placementID error:(NSError **)error; 320 | 321 | /** 322 | * (Overloaded method) 323 | * Prepares a placement when you know that you will want 324 | * to show an ad experience tied to a specific placementID. 325 | * @param placementID the specific ID of the placement you would like to present at some point soon 326 | * @param size the VungleAdSize (enum) you would like to request (only for banner ad type at the moment) 327 | * @param error the NSError object that used to hold error generated 328 | * @return NO if something goes immediately wrong with loading, YES otherwise 329 | */ 330 | - (BOOL)loadPlacementWithID:(NSString *)placementID withSize:(VungleAdSize)size error:(NSError **)error; 331 | 332 | #pragma mark - Utility methods 333 | 334 | /** 335 | * @note This method replaces the `muted` property previously included in VungleSDK.h 336 | * @note IT IS HIGHLY RECOMMENDED to set the muted property at the placement level using 337 | * play options (key VunglePlayAdOptionKeyStartMuted). 338 | * Assigning a value to this property will allow all ads played by the SDK to start muted, or 339 | * unmuted. Once called, all ads will use the value provided until the SDK restarts, or until the 340 | * method is called with a different value. 341 | */ 342 | - (void)setMuted:(BOOL)muted; 343 | 344 | /** 345 | * Returns debug info. 346 | */ 347 | - (NSDictionary *)debugInfo; 348 | 349 | /** 350 | * By default, logging is off. 351 | */ 352 | - (void)setLoggingEnabled:(BOOL)enable; 353 | 354 | /** 355 | * Log a new message. The message will be sent to all loggers. 356 | */ 357 | - (void)log:(NSString *)message, ... NS_FORMAT_FUNCTION(1, 2); 358 | 359 | /** 360 | * Attach a new logger. It will get called on every log generated by Vungle (internally and externally). 361 | */ 362 | - (void)attachLogger:(id )logger; 363 | 364 | /** 365 | * Detaches a logger. Make sure to do this, otherwise you might leak memory. 366 | */ 367 | - (void)detachLogger:(id )logger; 368 | 369 | /** 370 | * This only works on the simulator 371 | */ 372 | - (void)clearSleep; 373 | 374 | #pragma mark - GDPR support 375 | /** 376 | * This method takes the consent status of users. If consent is given, Vungle will be able to send targeted ads. 377 | * @param status the enum to be set for user consent status. 378 | * @param version the string to be set for publisher's consent version. It can be any string value. 379 | */ 380 | - (void)updateConsentStatus:(VungleConsentStatus)status consentMessageVersion:(NSString *)version; 381 | 382 | /** 383 | * This method returns the current consent status for the user recorded in the SDK. If no status is found, 384 | * the method returns 0. 385 | */ 386 | - (VungleConsentStatus)getCurrentConsentStatus; 387 | 388 | /** 389 | * This method returns the current consent message version that recorded in the SDK. If not version info found, 390 | * the method returns nil. 391 | */ 392 | - (NSString *)getConsentMessageVersion; 393 | 394 | #pragma mark - CCPA support 395 | /** 396 | * This method takes the CCPA status of users. If CCPA status is accepted, Vungle will be able to send targeted ads. 397 | * @param status the enum to be set for user CCPA status. 398 | */ 399 | - (void)updateCCPAStatus:(VungleCCPAStatus)status; 400 | 401 | /** 402 | * This method returns the current CCPA status for the user recorded in the SDK. If no status is found, 403 | * the method returns 0. 404 | */ 405 | - (VungleCCPAStatus)getCurrentCCPAStatus; 406 | 407 | /** 408 | * This method disables refresh functionality for all banner and MREC placements. 409 | */ 410 | - (void)disableBannerRefresh; 411 | 412 | /** 413 | * This method can be used to provide a user's COPPA status to the Vungle SDK. 414 | * This method should be called before initialization. 415 | * @param status the bool flag to be set for the user's COPPA status. 416 | * status: YES if the user should be treated as 'under 13' and under COPPA regulations. 417 | * status: NO if the user is known to be over the age of 13 and does NOT fall under COPPA regulations. 418 | */ 419 | - (void)updateCOPPAStatus:(BOOL)status; 420 | 421 | @end 422 | 423 | NS_ASSUME_NONNULL_END 424 | -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_i386_x86_64-simulator/VungleSDK.framework/Headers/VungleSDKCreativeTracking.h: -------------------------------------------------------------------------------- 1 | // 2 | // VungleSDKCreativeTracking.h 3 | // Vungle iOS SDK 4 | // 5 | // Copyright (c) 2013-Present Vungle Inc. All rights reserved. 6 | // 7 | 8 | @protocol VungleSDKCreativeTracking 9 | 10 | @optional 11 | /** 12 | * If implemented, this will get called when the SDK has an ad ready to be displayed. 13 | * The parameters will indicate that an ad associated with the included creative ID is 14 | * ready to play for the specified placement reference ID. Both parameters should return 15 | * a value if an ad is ready to be played. 16 | * @param creativeID The creative ID of the ad unit that is ready to be played 17 | * @param placementID The ID of a placement which is ready to be played 18 | */ 19 | - (void)vungleCreative:(nullable NSString *)creativeID readyForPlacement:(nullable NSString *)placementID; 20 | @end 21 | 22 | @interface VungleSDK () 23 | @property (nullable, weak) NSObject *creativeTrackingDelegate; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_i386_x86_64-simulator/VungleSDK.framework/Headers/VungleSDKHeaderBidding.h: -------------------------------------------------------------------------------- 1 | // 2 | // VungleSDKHeaderBidding.h 3 | // Vungle iOS SDK 4 | // 5 | // Copyright (c) 2013-Present Vungle Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import "VungleSDK.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @protocol VungleSDKHeaderBidding; 14 | @protocol VungleSDKHBDelegate; 15 | 16 | @interface VungleSDK () 17 | 18 | /** 19 | * Setting this to a non-nil value will enabled header bidding and reporting 20 | */ 21 | @property (nonatomic, weak) NSObject *headerBiddingDelegate; 22 | 23 | /** 24 | * Setting this to a non-nil value will enable header bidding SDK callbacks 25 | */ 26 | @property (nonatomic, weak) NSObject *sdkHBDelegate; 27 | 28 | /** 29 | * This is a synchronous method to fetch a bid token for any placement. This method 30 | * will return nil if it is unable to find a bid token, or a cached placement. 31 | * 32 | * @param placement The ID of a that has already been loaded placement 33 | */ 34 | - (NSString *)bidTokenForPlacement:(NSString *)placement __attribute__((deprecated("Use currentSuperToken to get all the participating bid Tokens."))); 35 | 36 | /** 37 | * Prepares a placement when you know that you will want 38 | * to show an ad experience tied to a specific placementID. 39 | * @param placementID the specific ID of the placement you would like to present at some point soon 40 | * @param adMarkup includes the adunit data of the placement you would like to present at some point soon 41 | * @param error the NSError object that used to hold error generated 42 | * @return NO if something goes immediately wrong with loading, YES otherwise 43 | */ 44 | - (BOOL)loadPlacementWithID:(nonnull NSString *)placementID adMarkup:(nullable NSString *)adMarkup error:(NSError *__autoreleasing _Nullable *_Nullable)error; 45 | 46 | /** 47 | * (Overloaded method) 48 | * Prepares a placement when you know that you will want 49 | * to show an ad experience tied to a specific placementID. 50 | * @param placementID the specific ID of the placement you would like to present at some point soon 51 | * @param adMarkup includes the adunit data of the placement you would like to present at some point soon 52 | * @param size the VungleAdSize (enum) you would like to request (only for banner ad type at the moment) 53 | * @param error the NSError object that used to hold error generated 54 | * @return NO if something goes immediately wrong with loading, YES otherwise 55 | */ 56 | - (BOOL)loadPlacementWithID:(nonnull NSString *)placementID adMarkup:(nullable NSString *)adMarkup withSize:(VungleAdSize)size error:(NSError *__autoreleasing _Nullable *_Nullable)error; 57 | 58 | /** 59 | * Pass in an UIView which acts as a container for the ad experience. This view container may be placed in random positions. 60 | * @note This method should only be called using placements that have the `flexfeed` or `mrec` or `banner` template type. For 61 | * the `mrec` template type, note that the UIView must have a width of 300 and a height of 250. If the view is provided without 62 | * these dimensions, an error message will be returned and the ad will not be shown. For the `banner` template type, note that 63 | * the UIView must have the same width and height as the banner size (320x50, 300x50, or 728x90) which you requested. If the 64 | * view is provided with a different banner size, an error message will be returned and the ad will not be shown. 65 | * @param publisherView container view in which an ad will be displayed 66 | * @param options A reference to an instance of NSDictionary with customized ad playback options 67 | * @param placementID The placement defined on the Vungle dashboard 68 | * @param adMarkup includes the adunit data of the placement 69 | * @param error An optional double reference to an NSError. In case this method returns `NO` it will be non-nil 70 | * @return YES/NO in case of success/error while presenting an AdUnit 71 | */ 72 | - (BOOL)addAdViewToView:(UIView *)publisherView withOptions:(nullable NSDictionary *)options placementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup error:(NSError *__autoreleasing _Nullable *_Nullable)error; 73 | 74 | /** 75 | * Will play Ad Unit presenting it over the `controller` parameter 76 | * @note This method should only be called using placements with `fullscreen` or `flexview` template types 77 | * @param controller A subclass of UIViewController. Should correspond to the ViewControler at the top of the ViewController hierarchy 78 | * @param options A reference to an instance of NSDictionary with customized ad playback options 79 | * @param placementID The placement defined on the Vungle dashboard 80 | * @param adMarkup includes the adunit data of the placement 81 | * @param error An optional double reference to an NSError. In case this method returns `NO` it will be non-nil 82 | * @return YES/NO in case of success/error while presenting an AdUnit 83 | * @warning Should be called from the main-thread. 84 | */ 85 | - (BOOL)playAd:(UIViewController *)controller options:(nullable NSDictionary *)options placementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup error:(NSError *__autoreleasing _Nullable *_Nullable)error; 86 | 87 | /** 88 | * Returns YES/NO when there is certainty that an ad will be able to play/can't play for a given placementID. 89 | * @param placementID the specific ID of the placement 90 | * @param adMarkup includes the adunit data of the placement 91 | */ 92 | - (BOOL)isAdCachedForPlacementID:(nonnull NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 93 | 94 | /** 95 | * (Overloaded method) 96 | * Returns YES/NO when there is certainty that an ad will be able to play/can't play for a given placementID. 97 | * @param placementID the specific ID of the placement 98 | * @param size the VungleAdSize (enum) you would like to request (only for banner ad type at the moment) 99 | * @param adMarkup includes the adunit data of the placement 100 | */ 101 | - (BOOL)isAdCachedForPlacementID:(nonnull NSString *)placementID adMarkup:(nullable NSString *)adMarkup withSize:(VungleAdSize)size; 102 | 103 | /** 104 | * This method will dismiss the currently playing Flex View, Flex Feed, Banner or MREC advertisement with the placementId specified. 105 | * If you have added an advertisement with `addAdViewToView:` or you are playing a placement that has been configured as a 106 | * Flex View, Flex Feed, Banner or MREC placement, then this method will remove the advertisement from the screen and perform any 107 | * necessary clean up steps. 108 | * This method will call the existing delegate callbacks as part of the lifecycle. 109 | * @param placementId the specific ID of the placement 110 | * @param adMarkup includes the adunit data of the placement 111 | */ 112 | - (void)finishDisplayingAd:(nonnull NSString *)placementId adMarkup:(nullable NSString *)adMarkup; 113 | 114 | /** 115 | * This is a synchronous method to fetch super token. This method 116 | * will return nil if it is unable to find an available token. 117 | * 118 | */ 119 | - (NSString *)currentSuperToken __attribute__((deprecated("Use currentSuperTokenForPlacementID:placementID:size: instead."))); 120 | 121 | /** 122 | * This is a synchronous method to fetch super token. This method 123 | * will return nil if it is unable to find an available token. 124 | * @param size Size limit of the supertoken needs to be returned 125 | */ 126 | - (NSString *)currentSuperTokenForSize:(NSInteger)size __attribute__((deprecated("Use currentSuperTokenForPlacementID:placementID:size: instead."))); 127 | 128 | /** 129 | * This is a synchronous method to request super token includes bidTokens 130 | * for specified Placement with size limitation. 131 | * @param placementID the specific ID of the placement. Setting `nil` includes all bidTokens for available Placements. 132 | * @param size size limit applied for the supertoken returned. 0 or negative value sets no size limit. 133 | */ 134 | - (NSString *)currentSuperTokenForPlacementID:(nullable NSString *)placementID forSize:(NSInteger)size; 135 | 136 | @end 137 | 138 | @protocol VungleSDKHeaderBidding 139 | 140 | @optional 141 | /** 142 | * If implemented, this will be called as soon as the SDK receives a bidToken for a particular 143 | * placement. Note that the placement is NOT available to playback until preparation. 144 | * 145 | * @param placement The ID of a placement which is ready to be played 146 | * @param bidToken An encrypted bid token used to identify the placement through the auction 147 | */ 148 | - (void)placementWillBeginCaching:(NSString *)placement 149 | withBidToken:(NSString *)bidToken __attribute__((deprecated("This delegate method will no longer be used in feature releases."))); 150 | 151 | /** 152 | * If implemented, this will be called when the SDK has a placement fully prepared and cached 153 | * to disk with a corresponding bid token. 154 | * 155 | * @param placement The ID of a placement which is ready to be played 156 | * @param bidToken An encrypted bid token used to identify the placement through the auction 157 | */ 158 | - (void)placementPrepared:(NSString *)placement 159 | withBidToken:(NSString *)bidToken __attribute__((deprecated("This delegate method will no longer be used in feature releases."))); 160 | 161 | @end 162 | 163 | @protocol VungleSDKHBDelegate 164 | 165 | @optional 166 | /** 167 | * If implemented, this will get called when the SDK has an ad ready to be displayed. Also it will 168 | * get called with an argument `NO` for `isAdPlayable` when for some reason, there is 169 | * no ad available, for instance there is a corrupt ad or the OS wiped the cache. 170 | * @param isAdPlayable A boolean indicating if an ad is currently in a playable state 171 | * @param placementID The ID of a placement which is ready to be played 172 | * @param adMarkup The ad markup of an adUnit which is ready to be played. 173 | * @param error The error that was encountered. This is only sent when the placementID is nil. 174 | */ 175 | - (void)vungleAdPlayabilityUpdate:(BOOL)isAdPlayable placementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup error:(nullable NSError *)error; 176 | 177 | /** 178 | * If implemented, this will get called when the SDK is about to show an ad. This point 179 | * might be a good time to pause your game, and turn off any sound you might be playing. 180 | * @param placementID The placement which is about to be shown. 181 | * @param adMarkup The ad markup of an adUnit which is about to be shown. 182 | */ 183 | - (void)vungleWillShowAdForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 184 | 185 | /** 186 | * If implemented, this will get called when the SDK has presented the view controller or the 187 | * view that houses the ad. 188 | * @param placementID The placement which is about to be shown. 189 | * @param adMarkup The ad markup of an adUnit which is about to be shown.. 190 | */ 191 | - (void)vungleDidShowAdForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 192 | 193 | /** 194 | * If implemented, this will be called when the ad is first rendered for the specified placement. 195 | * @NOTE: Please use this callback to track views. 196 | * @param placementID The placement ID of the advertisement shown 197 | * @param adMarkup The ad markup of the advertisement shown. 198 | */ 199 | - (void)vungleAdViewedForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 200 | 201 | /** 202 | * If implemented, this method gets called when a Vungle Ad Unit is about to be completely dismissed. 203 | * At this point, it's recommended to resume your Game or App. 204 | * @param placementID The placement ID of the advertisement about to be closed. 205 | * @param adMarkup The ad markup of the advertisement about to be closed. 206 | */ 207 | - (void)vungleWillCloseAdForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 208 | 209 | /** 210 | * If implemented, this method gets called when a Vungle Ad Unit has been completely dismissed. 211 | * At this point, you can load another ad for non-auto-cached placement if necessary. 212 | * @param placementID The placement ID of the advertisement that has been closed. 213 | * @param adMarkup The ad markup of the advertisement that has been closed. 214 | */ 215 | - (void)vungleDidCloseAdForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 216 | 217 | /** 218 | * If implemented, this method gets called when user clicks the Vungle Ad. 219 | * At this point, it's recommended to track the click event. 220 | * @param placementID The placement ID of the advertisement shown. 221 | * @param adMarkup The ad markup of the advertisement shown 222 | */ 223 | - (void)vungleTrackClickForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 224 | 225 | /** 226 | * If implemented, this method gets called when user taps the Vungle Ad 227 | * which will cause them to leave the current application(e.g. the ad action 228 | * opens the iTunes store, Mobile Safari, etc). 229 | * @param placementID The placement ID of the advertisement about to leave the current application. 230 | * @param adMarkup The ad markup of the advertisement about to leave the current application. 231 | */ 232 | - (void)vungleWillLeaveApplicationForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 233 | 234 | /** 235 | * This method is called when the user should be rewarded for watching a Rewarded Video Ad. 236 | * At this point, it's recommended to reward the user. 237 | * @param placementID The placement ID of the advertisement shown. 238 | * @param adMarkup The ad markup of the advertisement shown. 239 | */ 240 | - (void)vungleRewardUserForPlacementID:(nullable NSString *)placementID adMarkup:(nullable NSString *)adMarkup; 241 | 242 | /** 243 | * This method is called when the publisher changes the placement state from HB to NON-HB or the other way. 244 | * At this point, it's recommended to remove all the delegate object references related to placement. 245 | * @param placementID The unique ID referred to the placement of the advertisement shown 246 | */ 247 | - (void)invalidateObjectsForPlacementID:(nullable NSString *)placementID; 248 | 249 | @end 250 | 251 | NS_ASSUME_NONNULL_END 252 | -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_i386_x86_64-simulator/VungleSDK.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/VungleSDK.xcframework/ios-arm64_i386_x86_64-simulator/VungleSDK.framework/Info.plist -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_i386_x86_64-simulator/VungleSDK.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module VungleSDK { 2 | umbrella header "VungleSDK.h" 3 | 4 | module VungleSDKCreativeTracking { 5 | header "VungleSDKCreativeTracking.h" 6 | } 7 | 8 | module VungleSDKHeaderBidding { 9 | header "VungleSDKHeaderBidding.h" 10 | } 11 | 12 | module VungleSDK { 13 | header "VungleNativeAd.h" 14 | header "VungleMediaView.h" 15 | } 16 | 17 | module * { export * } 18 | } 19 | -------------------------------------------------------------------------------- /Sample/VungleSDK.xcframework/ios-arm64_i386_x86_64-simulator/VungleSDK.framework/VungleSDK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vungle/iOS-SDK/5613fdcc04cb4b4e9910127866005fe5cfba9a35/Sample/VungleSDK.xcframework/ios-arm64_i386_x86_64-simulator/VungleSDK.framework/VungleSDK -------------------------------------------------------------------------------- /VungleSDK-iOS.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint VungleSDK-iOS.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | 6 | Pod::Spec.new do |s| 7 | s.name = "VungleSDK-iOS" 8 | s.version = "6.12.3" 9 | s.summary = "Vungle's iOS SDK'" 10 | s.description = <<-DESC 11 | An SDK for video ad based monetization with the Vungle Network 12 | DESC 13 | 14 | s.homepage = "https://www.vungle.com/" 15 | s.license = { :type => "Commercial", :file => "LICENSE.md" } 16 | s.author = { "Vungle" => "tech-support@vungle.com" } 17 | 18 | s.platform = :ios, '10.0' 19 | s.requires_arc = true 20 | 21 | s.source = { :http => "https://vungle2-sdk-dev-scratch.s3.amazonaws.com/ios/6.12.x/vungle6123.zip"} 22 | 23 | s.vendored_frameworks = 'VungleSDK.xcframework' 24 | s.xcconfig = { 'OTHER_LDFLAGS' => '-ObjC' } 25 | 26 | s.frameworks = 'AdSupport', 'AudioToolbox', 'AVFoundation', 'CFNetwork', 'CoreGraphics', 'CoreMedia', 'MediaPlayer', 'QuartzCore', 'StoreKit', 'SystemConfiguration' 27 | s.weak_framework = 'WebKit', 'UIKit', 'Foundation' 28 | s.libraries = 'z' 29 | 30 | end 31 | --------------------------------------------------------------------------------