diff --git a/.gitignore b/.gitignore index 1ba48340..b63b2f56 100755 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,10 @@ DerivedData # Ignoring App folder for # ease of implementation App +/App-dev/ +/App-src/ +/App-web/ +/App-tools/ +/AppTools/ +/_*/ +Appodeal/ diff --git a/App-Example/RENAME this folder TO App b/App-Example/RENAME this folder TO App new file mode 100644 index 00000000..945c9b46 --- /dev/null +++ b/App-Example/RENAME this folder TO App @@ -0,0 +1 @@ +. \ No newline at end of file diff --git a/App-Example/example/ad/e-adcolony.js b/App-Example/example/ad/e-adcolony.js new file mode 100644 index 00000000..83c14f00 --- /dev/null +++ b/App-Example/example/ad/e-adcolony.js @@ -0,0 +1,46 @@ +"use strict"; + +(function() { + + var width = window.innerWidth; + var height = window.innerHeight; + + var zones = [ + "vz31b549794672442889", // Test + "vze12a0248564b49fc93", // video + "vzc1be88f0d438475c84", // rewardedVideo + ]; + var debug = true; + var adColony = new Ejecta.AdColony("appc3f406f4c59344238f", zones, debug); + + + var id = setInterval(function() { + console.log("adColony.isReady", adColony.isReady("video", { + zone: "vzc1be88f0d438475c84" + })); + if (adColony.isReady("video", { + zone: "vzc1be88f0d438475c84" + })) { + showAd(); + clearInterval(id); + } + }, 2000); + + // showAd(); + function showAd() { + adColony.show("video", { + zone: "vzc1be88f0d438475c84", + + onDisplay: function() { + console.log("video onDisplay"); + }, + onClose: function(info) { + console.log("video onClose", JSON.stringify(info)); + }, + onFinish: function(info) { + console.log("video onFinish", JSON.stringify(info)); + }, + }); + } + +}()); diff --git a/App-Example/example/ad/e-admob.js b/App-Example/example/ad/e-admob.js new file mode 100644 index 00000000..342d344b --- /dev/null +++ b/App-Example/example/ad/e-admob.js @@ -0,0 +1,66 @@ +"use strict"; + +(function() { + + + var width = window.innerWidth; + var height = window.innerHeight; + + // var adMob = new Ejecta.AdMob("a15318cc08698ce"); + + // banner + var adMobBanner = new Ejecta.AdMob("ca-app-pub-9274896770936398/4438046668"); + adMobBanner.load("banner"); + + // image + // var adMob = new Ejecta.AdMob("ca-app-pub-9274896770936398/4856849060"); + // video + // var adMob = new Ejecta.AdMob("ca-app-pub-9274896770936398/3380115869"); + // image & video + var adMob = new Ejecta.AdMob("ca-app-pub-9274896770936398/1763781865"); + adMob.load("interstitial"); + + var id = setInterval(function() { + if (showAd()) { + // clearInterval(id); + } + }, 3000); + + // showAd(); + var bannerDisplayed; + var interstitialDisplayed; + + function showAd() { + if (!bannerDisplayed && adMobBanner.isReady("banner")) { + adMobBanner.show("banner", { + onDisplay: function() { + bannerDisplayed = true; + console.log("banner onDisplay"); + + }, + onClose: function() { + bannerDisplayed = false; + adMobBanner.load("banner"); + console.log("banner onClose"); + } + }); + } + if (!interstitialDisplayed && adMob.isReady("interstitial")) { + adMob.show("interstitial", { + onDisplay: function() { + interstitialDisplayed = true; + console.log("interstitial onDisplay"); + }, + onClose: function() { + interstitialDisplayed = false; + adMob.load("interstitial"); + console.log("interstitial onClose"); + } + }); + } + } + + + console.log("AdMob Test."); + +}()); diff --git a/App-Example/example/ad/e-appodeal.js b/App-Example/example/ad/e-appodeal.js new file mode 100644 index 00000000..2884dbbd --- /dev/null +++ b/App-Example/example/ad/e-appodeal.js @@ -0,0 +1,32 @@ +"use strict"; + +(function() { + + var width = window.innerWidth; + var height = window.innerHeight; + + var appodeal = new Ejecta.Appodeal("101b42e17b72058ee41c21ac172e734d814dd0f947a22cf4"); + appodeal.setDebugEnabled(true); + + function startCheck() { + var id = setInterval(function() { + if (appodeal.isReady("videoOrInterstitial")) { + clearInterval(id); + showAd(); + } + }, 1500); + } + + function showAd() { + + appodeal.show("videoOrInterstitial", { + afterClose: function() { + startCheck(); + } + }); + } + + + startCheck(); + +}()); diff --git a/App-Example/example/ad/e-chartboost.js b/App-Example/example/ad/e-chartboost.js new file mode 100644 index 00000000..2ff2108d --- /dev/null +++ b/App-Example/example/ad/e-chartboost.js @@ -0,0 +1,36 @@ +"use strict"; + +(function() { + + + var width = window.innerWidth; + var height = window.innerHeight; + + var chartboost = new Ejecta.Chartboost("56050a2d04b0165979d18668", "c9da6b2e27e6d6fcc8716ecdf271b616af652726"); + + chartboost.load("interstitial"); + chartboost.load("rewardedVideo"); + chartboost.load("moreApps"); + + var id = setInterval(function() { + if (showAd()) { + clearInterval(id); + } + }, 2000); + + // showAd(); + function showAd() { + if (chartboost.isReady("interstitial")) { + chartboost.show("interstitial"); + return true; + } + if (chartboost.isReady("rewardedVideo")) { + chartboost.show("rewardedVideo"); + return true; + } + if (chartboost.isReady("moreApps")) { + chartboost.show("moreApps"); + return true; + } + } +}()); diff --git a/App-Example/example/ad/e-unityads.js b/App-Example/example/ad/e-unityads.js new file mode 100644 index 00000000..204f9296 --- /dev/null +++ b/App-Example/example/ad/e-unityads.js @@ -0,0 +1,35 @@ +"use strict"; + +(function() { + + var width = window.innerWidth; + var height = window.innerHeight; + + // var unityAds = new Ejecta.Vungle("phoena"); + var unityAds = new Ejecta.UnityAds("1012821"); + // unityAds.debug = true; + + var id = setInterval(function() { + console.log("unityAds.isReady", unityAds.isReady("video")); + if (unityAds.isReady("video")) { + showAd(); + clearInterval(id); + } + }, 2000); + + // showAd(); + function showAd() { + unityAds.show("video", { + onDisplay: function() { + console.log("rewardedVideo onDisplay"); + }, + onClose: function(info) { + console.log("rewardedVideo onClose", JSON.stringify(info)); + }, + onFinish: function(info) { + console.log("rewardedVideo onFinish", JSON.stringify(info)); + }, + }); + } + +}()); diff --git a/App-Example/example/ad/e-vungle.js b/App-Example/example/ad/e-vungle.js new file mode 100644 index 00000000..c8158f64 --- /dev/null +++ b/App-Example/example/ad/e-vungle.js @@ -0,0 +1,73 @@ +"use strict"; + +(function() { + + var width = window.innerWidth; + var height = window.innerHeight; + + // var adVungle = new Ejecta.Vungle("phoena"); + var adVungle = new Ejecta.Vungle("5632ff9e2969297047000010"); + adVungle.debug = true; + + var id = setInterval(function() { + console.log("adVungle.isReady", adVungle.isReady("video")); + if (adVungle.isReady("video")) { + showAd(); + clearInterval(id); + } + }, 2000); + + // showAd(); + function showAd() { + /* Options : + incentivized boolean + incentivizedAlertTitleText string + incentivizedAlertBodyText string + incentivizedAlertCloseButtonText string + incentivizedAlertContinueButtonText string + orientations string // portrait / landscape / auto + placement string + user string + beforeShow function + afterClose function + * extraInfoDictionary (don't support) + */ + + // adVungle.show("video", { + // orientations: "landscape", + // placement: "Placement-A", + // // user: "test-user-1", + // onDisplay: function() { + // console.log("video onDisplay"); + // }, + // onClose: function(info) { + // console.log("video onClose", JSON.stringify(info)); + // }, + // onFinish: function(info) { + // console.log("video onFinish", JSON.stringify(info)); + // }, + // }); + + adVungle.show("video", { + incentivized: true, + incentivizedAlertTitleText: "title", + incentivizedAlertBodyText: "body", + incentivizedAlertCloseButtonText: "close-button", + incentivizedAlertContinueButtonText: "continue-button", + + orientations: "landscape", + placement: "Placement-A", + // user: "test-user-1", + onDisplay: function() { + console.log("rewardedVideo onDisplay"); + }, + onClose: function(info) { + console.log("rewardedVideo onClose", JSON.stringify(info)); + }, + onFinish: function(info) { + console.log("rewardedVideo onFinish", JSON.stringify(info)); + }, + }); + } + +}()); diff --git a/App-Example/example/bunnymark/bunnies-1.png b/App-Example/example/bunnymark/bunnies-1.png new file mode 100644 index 00000000..7010eb27 Binary files /dev/null and b/App-Example/example/bunnymark/bunnies-1.png differ diff --git a/App-Example/example/bunnymark/bunnies-2.png b/App-Example/example/bunnymark/bunnies-2.png new file mode 100644 index 00000000..4ff8bc29 Binary files /dev/null and b/App-Example/example/bunnymark/bunnies-2.png differ diff --git a/App-Example/example/bunnymark/bunnies-3.png b/App-Example/example/bunnymark/bunnies-3.png new file mode 100644 index 00000000..91cd7272 Binary files /dev/null and b/App-Example/example/bunnymark/bunnies-3.png differ diff --git a/App-Example/example/bunnymark/e-bunnymark.js b/App-Example/example/bunnymark/e-bunnymark.js new file mode 100644 index 00000000..2036245b --- /dev/null +++ b/App-Example/example/bunnymark/e-bunnymark.js @@ -0,0 +1,352 @@ +// "use strict"; +var width, height; +var canvas; + +if (window.ejecta) { + + // relative to index.js . + var relativePath = "example/bunnymark/"; + + width = window.innerWidth // * window.devicePixelRatio; + height = window.innerHeight // * window.devicePixelRatio; + canvas = document.getElementById('canvas'); + canvas.width = width; + canvas.height = height; + canvas.style.width = window.innerWidth + "px"; + canvas.style.height = window.innerHeight + "px"; + + console.log("screen canvas : ", width, height); + + window.resImagePath = relativePath + ""; + ejecta.include(relativePath + "pixi.min.js"); + + setTimeout(function() { + onReady(); + }, 100); +} + + + +var useWebGL = true; +var multiTexture = false; + +var maxBunnyCount = 1000 * 200; +// var startBunnyCount = 10; +var startBunnyCount = 1000 * 20; + + +var particleMaxSize = 2500 * 1; +var particleBatchSize = 2500 * 1; + +var bunnies = []; +var bunnyTextures; +var bunnyTextureIndex; +var currentTexture; + +var gravity = 0.75 //1.5 ; + +var isAdding = 0; +var addingGap = 35; +var amount = 100; + +var bunnyCount = 0; +var container; +var stats, counter; +var renderer; + + +width = width || 640; +height = height || 960; +var aspectRatio = width / height; +var minX, maxX; +var minY, maxY; +var screenWidth, screenHeight; + +function onReady() { + console.log("ready"); + + doResize(); + + canvas = canvas || document.getElementById("canvas"); + canvas.style.transform = "translatez(0)"; + canvas.style.position = "absolute"; + + + if (typeof Stats != "undefined") { + stats = new Stats(); + stats.domElement.style.position = "absolute"; + stats.domElement.style.top = "0px"; + document.body.appendChild(stats.domElement); + + counter = document.createElement("div"); + counter.className = "counter"; + document.body.appendChild(counter); + } + + doReLocation(); + + + if ("ontouchstart" in window) { + window.addEventListener("touchstart", onTouchStart, true); + window.addEventListener("touchend", onTouchEnd, true); + } else { + window.addEventListener("mousedown", onTouchStart, true); + window.addEventListener("mouseup", onTouchEnd, true); + } + + + // return; + var options = { view: canvas, backgroundColor: 0xFFFFFF }; + + if (useWebGL) { + renderer = new PIXI.WebGLRenderer(width, height, options); + } else if (useWebGL === false) { + renderer = new PIXI.CanvasRenderer(width, height, options); + } else { + renderer = new PIXI.autoDetectRenderer(width, height, options); + } + + createContainer(); + + initBunnyTextures(); + + bunnyTextureIndex = -1; + + nextTexture(); + + addMoreBunnies(startBunnyCount); + + requestAnimationFrame(update); + +} + +function initBunnyTextures() { + + bunnyTextures = []; + + var textures = [ + new PIXI.Texture.fromImage(window.resImagePath + "bunnies-1.png"), + new PIXI.Texture.fromImage(window.resImagePath + "bunnies-2.png"), + new PIXI.Texture.fromImage(window.resImagePath + "bunnies-3.png"), + ]; + + var textureCount = 1; + if (multiTexture) { + textureCount = textures.length; + } + + var rects = []; + for (var i = 0; i < textureCount; i++) { + var baseTexture = textures[i].baseTexture; + // console.log(baseTexture.imageUrl); + rects.push(new PIXI.Texture(baseTexture, new PIXI.Rectangle(0, 0, 30, 46))); + rects.push(new PIXI.Texture(baseTexture, new PIXI.Rectangle(0, 46 + 39 * 0, 30, 39))); + rects.push(new PIXI.Texture(baseTexture, new PIXI.Rectangle(0, 46 + 39 * 1, 30, 39))); + rects.push(new PIXI.Texture(baseTexture, new PIXI.Rectangle(0, 46 + 39 * 2, 30, 39))); + rects.push(new PIXI.Texture(baseTexture, new PIXI.Rectangle(0, 46 + 39 * 3, 30, 39))); + } + + var count = rects.length * 3; + for (var i = 0; i < count; i++) { + bunnyTextures.push(rects[i % rects.length]); + } + +} + +var pressed = false; + +function onTouchStart(event) { + isAdding = 0; + pressed = true; +} + +function onTouchEnd(event) { + + if (isAdding !== -1) { + // nextTexture(); + addMoreBunnies(amount); + } + pressed = false; +} + +function resize() { + setTimeout(function() { + doResize(); + doReLocation(); + + renderer.resize(width, height); + }, 10); +} + +function doResize() { + + screenWidth = window.innerWidth; + screenHeight = window.innerHeight; + + if (screenWidth / screenHeight >= aspectRatio) { + height = screenHeight; + width = height * aspectRatio; + } else if (screenWidth / screenHeight < aspectRatio) { + width = screenWidth; + height = width / aspectRatio; + } + + maxX = width; + minX = 0; + maxY = height - 10; + minY = 0; + +} + +function doReLocation() { + + var w = screenWidth / 2 - width / 2; + var h = screenHeight / 2 - height / 2; + + canvas.style.left = w + "px" + canvas.style.top = h + "px" + + if (stats) { + stats.domElement.style.left = w + "px"; + stats.domElement.style.top = h + "px"; + + counter.style.left = w + "px"; + counter.style.top = h + 40 + "px"; + } + +} + + +function nextTexture() { + bunnyTextureIndex = (bunnyTextureIndex + 1) % bunnyTextures.length; + currentTexture = bunnyTextures[bunnyTextureIndex]; +} + +function update() { + stats && stats.begin(); + + if (pressed) { + isAdding++; + } + if (isAdding >= addingGap) { + addMoreBunnies(amount); + isAdding = -1; + } + + for (var i = 0, len = bunnies.length; i < len; i++) { + var bunny = bunnies[i]; + bunny.rotation += bunny.speedR; + var x = bunny.position.x += bunny.speedX; + var y = bunny.position.y += bunny.speedY; + bunny.speedY += gravity; + + if (x > maxX) { + bunny.speedX *= -1; + bunny.position.x = maxX; + } else if (x < minX) { + bunny.speedX *= -1; + bunny.position.x = minX; + } + + if (y > maxY) { + bunny.speedY *= -0.85; + bunny.position.y = maxY; + bunny.spin = (Math.random() - 0.5) * 0.2 + if (Math.random() > 0.5) { + bunny.speedY -= Math.random() * 6; + } + } else if (y < minY) { + bunny.speedY = 0; + bunny.position.y = minY; + } + + } + + renderer.render(container); + requestAnimationFrame(update); + + stats && stats.end(); +} + + +function addMoreBunnies(count) { + var i = 0; + while (bunnyCount < maxBunnyCount && i < count) { + var bunny = createBunny(currentTexture); + + bunnies.push(bunny); + //bunny.rotation = Math.random() - 0.5; + container.addChild(bunny); + // var random = randomInt(0, container.children.length - 2); + // container.addChildAt(bunny, random); + + nextTexture(); + + i++; + bunnyCount++; + } + if (counter) { + counter.innerHTML = bunnyCount + " BUNNIES"; + } +} + + +function createBunny(currentTexture) { + var bunny = new PIXI.Sprite(currentTexture); + + bunny.anchor.x = 0.5; + bunny.anchor.y = 1; + bunny.scale.set(0.5 + Math.random() * 0.5); + bunny.rotation = (Math.random() - 0.5); + //bunny.alpha = 0.3 + Math.random() * 0.7; + bunny.speedX = Math.random() * 5; + bunny.speedY = (Math.random() * 6) - 4; + bunny.speedR = ((1 + Math.random() * 10) >> 0) / 50; + + return bunny; +} + + +function createContainer() { + + var options = { + position: true, + rotation: true, + scale: true, + + alpha: true, + uvs: true, + }; + + container = new PIXI.particles.ParticleContainer(particleMaxSize, options, particleBatchSize); + // container = new PIXI.Container(); + + if (!useWebGL) { + container = new PIXI.Container(); + } + +} + + + +///////////////////////////////////////////////////////// +///////////////////////////////////////////////////////// +///////////////////////////////////////////////////////// +///////////////////////////////////////////////////////// +///////////////////////////////////////////////////////// + + +function randomInt(from, to) { + return Math.floor(Math.random() * (to - from + 1) + from); +} + +window.resImagePath = window.resImagePath || ""; +window.onload = function() { + onReady(); +}; +window.onresize = function() { + resize(); +}; +window.onorientationchange = function() { + resize(); +}; diff --git a/App-Example/example/bunnymark/pixi.min.js b/App-Example/example/bunnymark/pixi.min.js new file mode 100644 index 00000000..7e2c313a --- /dev/null +++ b/App-Example/example/bunnymark/pixi.min.js @@ -0,0 +1,18 @@ +/*! + * pixi.js - v4.0.3 + * Compiled Thu Sep 29 2016 12:09:36 GMT-0400 (EDT) + * + * pixi.js is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.PIXI=t()}}(function(){var t;return function t(e,r,i){function n(o,a){if(!r[o]){if(!e[o]){var h="function"==typeof require&&require;if(!a&&h)return h(o,!0);if(s)return s(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[o]={exports:{}};e[o][0].call(l.exports,function(t){var r=e[o][1][t];return n(r?r:t)},l,l.exports,t,e,r,i)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o0)-(t<0)},r.abs=function(t){var e=t>>n-1;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,e|=r,e|t>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return t-=t>>>1&1431655765,t=(858993459&t)+(t>>>2&858993459),16843009*(t+(t>>>4)&252645135)>>>24},r.countTrailingZeros=i,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,t&=15,27030>>>t&1};var s=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,i=e,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=1&r,--n;t[e]=i<>>8&255]<<16|s[t>>>16&255]<<8|s[t>>>24&255]},r.interleave2=function(t,e){return t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},r.deinterleave2=function(t,e){return t=t>>>e&1431655765,t=858993459&(t|t>>>1),t=252645135&(t|t>>>2),t=16711935&(t|t>>>4),t=65535&(t|t>>>16),t<<16>>16},r.interleave3=function(t,e,r){return t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t|=e<<1,r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),t|r<<2},r.deinterleave3=function(t,e){return t=t>>>e&1227133513,t=3272356035&(t|t>>>2),t=251719695&(t|t>>>4),t=4278190335&(t|t>>>8),t=1023&(t|t>>>16),t<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>i(t)+1}},{}],2:[function(t,e,r){"use strict";function i(t,e,r){r=r||2;var i=e&&e.length,s=i?e[0]*r:t.length,a=n(t,0,s,r,!0),h=[];if(!a)return h;var u,l,d,p,f,v,g;if(i&&(a=c(t,e,a,r)),t.length>80*r){u=d=t[0],l=p=t[1];for(var y=r;yd&&(d=f),v>p&&(p=v);g=Math.max(d-u,p-l)}return o(a,h,r,u,l,g),h}function n(t,e,r,i,n){var s,o;if(n===D(t,e,r,i)>0)for(s=e;s=e;s-=i)o=M(s,t[s],t[s+1],o);return o&&T(o,o.next)&&(A(o),o=o.next),o}function s(t,e){if(!t)return t;e||(e=t);var r,i=t;do if(r=!1,i.steiner||!T(i,i.next)&&0!==b(i.prev,i,i.next))i=i.next;else{if(A(i),i=e=i.prev,i===i.next)return null;r=!0}while(r||i!==e);return e}function o(t,e,r,i,n,c,d){if(t){!d&&c&&v(t,i,n,c);for(var p,f,g=t;t.prev!==t.next;)if(p=t.prev,f=t.next,c?h(t,i,n,c):a(t))e.push(p.i/r),e.push(t.i/r),e.push(f.i/r),A(t),t=f.next,g=f.next;else if(t=f,t===g){d?1===d?(t=u(t,e,r),o(t,e,r,i,n,c,2)):2===d&&l(t,e,r,i,n,c):o(s(t),e,r,i,n,c,1);break}}}function a(t){var e=t.prev,r=t,i=t.next;if(b(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(m(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&b(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function h(t,e,r,i){var n=t.prev,s=t,o=t.next;if(b(n,s,o)>=0)return!1;for(var a=n.xs.x?n.x>o.x?n.x:o.x:s.x>o.x?s.x:o.x,l=n.y>s.y?n.y>o.y?n.y:o.y:s.y>o.y?s.y:o.y,c=y(a,h,e,r,i),d=y(u,l,e,r,i),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&m(n.x,n.y,s.x,s.y,o.x,o.y,p.x,p.y)&&b(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&m(n.x,n.y,s.x,s.y,o.x,o.y,p.x,p.y)&&b(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function u(t,e,r){var i=t;do{var n=i.prev,s=i.next.next;!T(n,s)&&E(n,i,i.next,s)&&S(n,s)&&S(s,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(s.i/r),A(i),A(i.next),i=t=s),i=i.next}while(i!==t);return i}function l(t,e,r,i,n,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&_(h,u)){var l=R(h,u);return h=s(h,h.next),l=s(l,l.next),o(h,e,r,i,n,a),void o(l,e,r,i,n,a)}u=u.next}h=h.next}while(h!==t)}function c(t,e,r,i){var o,a,h,u,l,c=[];for(o=0,a=e.length;o=i.next.y){var a=i.x+(s-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=n&&a>o){if(o=a,a===n){if(s===i.y)return i;if(s===i.next.y)return i.next}r=i.x=i.x&&i.x>=l&&m(sr.x)&&S(i,t)&&(r=i,d=h)),i=i.next;return r}function v(t,e,r,i){var n=t;do null===n.z&&(n.z=y(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,g(n)}function g(t){var e,r,i,n,s,o,a,h,u=1;do{for(r=t,t=null,s=null,o=0;r;){for(o++,i=r,a=0,e=0;e0||h>0&&i;)0===a?(n=i,i=i.nextZ,h--):0!==h&&i?r.z<=i.z?(n=r,r=r.nextZ,a--):(n=i,i=i.nextZ,h--):(n=r,r=r.nextZ,a--),s?s.nextZ=n:t=n,n.prevZ=s,s=n;r=i}s.nextZ=null,u*=2}while(o>1);return t}function y(t,e,r,i,n){return t=32767*(t-r)/n,e=32767*(e-i)/n,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function x(t){var e=t,r=t;do e.x=0&&(t-o)*(i-a)-(r-o)*(e-a)>=0&&(r-o)*(s-a)-(n-o)*(i-a)>=0}function _(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!w(t,e)&&S(t,e)&&S(e,t)&&C(t,e)}function b(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function T(t,e){return t.x===e.x&&t.y===e.y}function E(t,e,r,i){return!!(T(t,e)&&T(r,i)||T(t,i)&&T(r,e))||b(t,e,r)>0!=b(t,e,i)>0&&b(r,i,t)>0!=b(r,i,e)>0}function w(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&E(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function S(t,e){return b(t.prev,t,t.next)<0?b(t,e,t.next)>=0&&b(t,t.prev,e)>=0:b(t,e,t.prev)<0||b(t,t.next,e)<0}function C(t,e){var r=t,i=!1,n=(t.x+e.x)/2,s=(t.y+e.y)/2;do r.y>s!=r.next.y>s&&n<(r.next.x-r.x)*(s-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==t);return i}function R(t,e){var r=new O(t.i,t.x,t.y),i=new O(e.i,e.x,e.y),n=t.next,s=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,s.next=i,i.prev=s,i}function M(t,e,r,i){var n=new O(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function O(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function D(t,e,r,i){for(var n=0,s=e,o=r-i;s0&&(i+=t[n-1].length,r.holes.push(i))}return r}},{}],3:[function(t,e,r){"use strict";function i(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function n(){}var s=Object.prototype.hasOwnProperty,o="function"!=typeof Object.create&&"~";n.prototype._events=void 0,n.prototype.eventNames=function(){var t,e=this._events,r=[];if(!e)return r;for(t in e)s.call(e,t)&&r.push(o?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},n.prototype.listeners=function(t,e){var r=o?o+t:t,i=this._events&&this._events[r];if(e)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var n=0,s=i.length,a=new Array(s);n=t.byteLength?i.bufferSubData(this.type,e,t):i.bufferData(this.type,t,this.drawType),this.data=t},n.prototype.bind=function(){var t=this.gl;t.bindBuffer(this.type,this.buffer)},n.createVertexBuffer=function(t,e,r){return new n(t,t.ARRAY_BUFFER,e,r)},n.createIndexBuffer=function(t,e,r){return new n(t,t.ELEMENT_ARRAY_BUFFER,e,r)},n.create=function(t,e,r,i){return new n(t,e,i)},n.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)},e.exports=n},{}],7:[function(t,e,r){var i=t("./GLTexture"),n=function(t,e,r){this.gl=t,this.framebuffer=t.createFramebuffer(),this.stencil=null,this.texture=null,this.width=e||100,this.height=r||100};n.prototype.enableTexture=function(t){var e=this.gl;this.texture=t||new i(e),this.texture.bind(),this.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture.texture,0)},n.prototype.enableStencil=function(){if(!this.stencil){var t=this.gl;this.stencil=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.stencil),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,this.stencil),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.width,this.height)}},n.prototype.clear=function(t,e,r,i){this.bind();var n=this.gl;n.clearColor(t,e,r,i),n.clear(n.COLOR_BUFFER_BIT)},n.prototype.bind=function(){var t=this.gl;this.texture&&this.texture.unbind(),t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer)},n.prototype.unbind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},n.prototype.resize=function(t,e){var r=this.gl;this.width=t,this.height=e,this.texture&&this.texture.uploadData(null,t,e),this.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,this.stencil),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e))},n.prototype.destroy=function(){var t=this.gl;this.texture&&this.texture.destroy(),t.deleteFramebuffer(this.framebuffer),this.gl=null,this.stencil=null,this.texture=null},n.createRGBA=function(t,e,r){var s=i.fromData(t,null,e,r);s.enableNearestScaling(),s.enableWrapClamp();var o=new n(t,e,r);return o.enableTexture(s),o.unbind(),o},n.createFloat32=function(t,e,r,s){var o=new i.fromData(t,s,e,r);o.enableNearestScaling(),o.enableWrapClamp();var a=new n(t,e,r);return a.enableTexture(o),a.unbind(),a},e.exports=n},{"./GLTexture":9}],8:[function(t,e,r){var i=t("./shader/compileProgram"),n=t("./shader/extractAttributes"),s=t("./shader/extractUniforms"),o=t("./shader/generateUniformAccessObject"),a=function(t,e,r){this.gl=t,this.program=i(t,e,r),this.attributes=n(t,this.program);var a=s(t,this.program);this.uniforms=o(t,a)};a.prototype.bind=function(){this.gl.useProgram(this.program)},a.prototype.destroy=function(){},e.exports=a},{"./shader/compileProgram":14,"./shader/extractAttributes":16,"./shader/extractUniforms":17,"./shader/generateUniformAccessObject":18}],9:[function(t,e,r){var i=function(t,e,r,i,n){this.gl=t,this.texture=t.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=e||0,this.height=r||0,this.format=i||t.RGBA,this.type=n||t.UNSIGNED_BYTE};i.prototype.upload=function(t){this.bind();var e=this.gl;this.width=t.videoWidth||t.width,this.height=t.videoHeight||t.height,e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,this.type,t)};var n=!1;i.prototype.uploadData=function(t,e,r){this.bind();var i=this.gl;if(this.width=e||this.width,this.height=r||this.height,t instanceof Float32Array){if(!n){var s=i.getExtension("OES_texture_float");if(!s)throw new Error("floating point textures not available");n=!0}this.type=i.FLOAT}else this.type=i.UNSIGNED_BYTE;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),i.texImage2D(i.TEXTURE_2D,0,this.format,this.width,this.height,0,this.format,this.type,t||null)},i.prototype.bind=function(t){var e=this.gl;void 0!==t&&e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},i.prototype.unbind=function(){var t=this.gl;t.bindTexture(t.TEXTURE_2D,null)},i.prototype.minFilter=function(t){var e=this.gl;this.bind(),this.mipmap?e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.NEAREST_MIPMAP_NEAREST):e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR:e.NEAREST)},i.prototype.magFilter=function(t){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t?e.LINEAR:e.NEAREST)},i.prototype.enableMipmap=function(){var t=this.gl;this.bind(),this.mipmap=!0,t.generateMipmap(t.TEXTURE_2D)},i.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)},i.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)},i.prototype.enableWrapClamp=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)},i.prototype.enableWrapRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT)},i.prototype.enableWrapMirrorRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.MIRRORED_REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.MIRRORED_REPEAT)},i.prototype.destroy=function(){var t=this.gl;t.deleteTexture(this.texture)},i.fromSource=function(t,e,r){var n=new i(t);return n.premultiplyAlpha=r||!1,n.upload(e),n},i.fromData=function(t,e,r,n){var s=new i(t);return s.uploadData(e,r,n),s},e.exports=i},{}],10:[function(t,e,r){function i(t,e){if(this.nativeVaoExtension=null,i.FORCE_NATIVE||(this.nativeVaoExtension=t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object")),this.nativeState=e,this.nativeVaoExtension){this.nativeVao=this.nativeVaoExtension.createVertexArrayOES();var r=t.getParameter(t.MAX_VERTEX_ATTRIBS);this.nativeState={tempAttribState:new Array(r),attribState:new Array(r)}}this.gl=t,this.attributes=[],this.indexBuffer=null,this.dirty=!1}var n=t("./setVertexAttribArrays");i.prototype.constructor=i,e.exports=i,i.FORCE_NATIVE=!1,i.prototype.bind=function(){return this.nativeVao?(this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.dirty&&(this.dirty=!1,this.activate())):this.activate(),this},i.prototype.unbind=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(null),this},i.prototype.activate=function(){for(var t=this.gl,e=null,r=0;r=0;i--){var n=t[i];"."===n?t.splice(i,1):".."===n?(t.splice(i,1),r++):r&&(t.splice(i,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function i(t,e){if(t.filter)return t.filter(e);for(var r=[],i=0;i=-1&&!n;s--){var o=s>=0?arguments[s]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(r=o+"/"+r,n="/"===o.charAt(0))}return r=e(i(r.split("/"),function(t){return!!t}),!n).join("/"),(n?"/":"")+r||"."},r.normalize=function(t){var n=r.isAbsolute(t),s="/"===o(t,-1);return t=e(i(t.split("/"),function(t){return!!t}),!n).join("/"),t||n||(t="."),t&&s&&(t+="/"),(n?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(i(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},r.relative=function(t,e){function i(t){for(var e=0;e=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var n=i(t.split("/")),s=i(e.split("/")),o=Math.min(n.length,s.length),a=o,h=0;h1)for(var r=1;r1&&(i=r[0]+"@",t=r[1]),t=t.replace(I,".");var n=t.split("."),s=o(n,e).join(".");return i+s}function h(t){for(var e,r,i=[],n=0,s=t.length;n=55296&&e<=56319&&n65535&&(t-=65536,e+=N(t>>>10&1023|55296),t=56320|1023&t),e+=N(t)}).join("")}function l(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:E}function c(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function d(t,e,r){var i=0;for(t=r?B(t/R):t>>1,t+=B(t/e);t>F*S>>1;i+=E)t=B(t/F);return B(i+(F+1)*t/(t+C))}function p(t){var e,r,i,n,o,a,h,c,p,f,v=[],g=t.length,y=0,x=A,m=M;for(r=t.lastIndexOf(O),r<0&&(r=0),i=0;i=128&&s("not-basic"),v.push(t.charCodeAt(i));for(n=r>0?r+1:0;n=g&&s("invalid-input"),c=l(t.charCodeAt(n++)),(c>=E||c>B((T-y)/a))&&s("overflow"),y+=c*a,p=h<=m?w:h>=m+S?S:h-m,!(cB(T/f)&&s("overflow"),a*=f;e=v.length+1,m=d(y-o,e,0==o),B(y/e)>T-x&&s("overflow"),x+=B(y/e),y%=e,v.splice(y++,0,x)}return u(v)}function f(t){var e,r,i,n,o,a,u,l,p,f,v,g,y,x,m,_=[];for(t=h(t),g=t.length,e=A,r=0,o=M,a=0;a=e&&vB((T-r)/y)&&s("overflow"),r+=(u-e)*y,e=u,a=0;aT&&s("overflow"),v==e){for(l=r,p=E;f=p<=o?w:p>=o+S?S:p-o,!(l= 0x80 (not a basic code point)","invalid-input":"Invalid input"},F=E-w,B=Math.floor,N=String.fromCharCode;if(_={version:"1.4.1",ucs2:{decode:h,encode:u},decode:p,encode:f,toASCII:g,toUnicode:v},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return _});else if(y&&x)if(r.exports==y)x.exports=_;else for(b in _)_.hasOwnProperty(b)&&(y[b]=_[b]);else n.punycode=_}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],25:[function(t,e,r){"use strict";function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,s){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;var a=/\+/g;t=t.split(e);var h=1e3;s&&"number"==typeof s.maxKeys&&(h=s.maxKeys);var u=t.length;h>0&&u>h&&(u=h);for(var l=0;l=0?(c=v.substr(0,g),d=v.substr(g+1)):(c=v,d=""),p=decodeURIComponent(c),f=decodeURIComponent(d),i(o,p)?n(o[p])?o[p].push(f):o[p]=[o[p],f]:o[p]=f}return o};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],26:[function(t,e,r){"use strict";function i(t,e){if(t.map)return t.map(e);for(var r=[],i=0;i",'"',"`"," ","\r","\n","\t"],f=["{","}","|","\\","^","`"].concat(p),v=["'"].concat(f),g=["%","/","?",";","#"].concat(v),y=["/","?","#"],x=255,m=/^[+a-z0-9A-Z_-]{0,63}$/,_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},T={javascript:!0,"javascript:":!0},E={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=t("querystring");i.prototype.parse=function(t,e,r){if(!u.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),n=i!==-1&&i127?"x":L[B];if(!F.match(m)){var U=P.slice(0,R),k=P.slice(R+1),j=L.match(_);j&&(U.push(j[1]),k.unshift(j[2])),k.length&&(a="/"+k.join(".")+a),this.hostname=U.join(".");break}}}this.hostname.length>x?this.hostname="":this.hostname=this.hostname.toLowerCase(),D||(this.hostname=h.toASCII(this.hostname));var W=this.port?":"+this.port:"",G=this.hostname||"";this.host=G+W,this.href+=this.host,D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!b[f])for(var R=0,I=v.length;R0)&&r.host.split("@");S&&(r.auth=S.shift(),r.host=r.hostname=S.shift())}return r.search=t.search,r.query=t.query,u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!b.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var C=b.slice(-1)[0],R=(r.host||t.host||b.length>1)&&("."===C||".."===C)||""===C,M=0,A=b.length;A>=0;A--)C=b[A],"."===C?b.splice(A,1):".."===C?(b.splice(A,1),M++):M&&(b.splice(A,1),M--);if(!m&&!_)for(;M--;M)b.unshift("..");!m||""===b[0]||b[0]&&"/"===b[0].charAt(0)||b.unshift(""),R&&"/"!==b.join("/").substr(-1)&&b.push("");var O=""===b[0]||b[0]&&"/"===b[0].charAt(0);if(w){r.hostname=r.host=O?"":b.length?b.shift():"";var S=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");S&&(r.auth=S.shift(),r.host=r.hostname=S.shift())}return m=m||r.host&&b.length,m&&!O&&b.unshift(""),b.length?r.pathname=b.join("/"):(r.pathname=null,r.path=null),u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var t=this.host,e=c.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":29,punycode:24,querystring:27}],29:[function(t,e,r){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],30:[function(t,e,r){"use strict";function i(){}function n(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function s(){this._events=new i,this._eventsCount=0}var o=Object.prototype.hasOwnProperty,a="~";Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(a=!1)),s.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)o.call(t,e)&&r.push(a?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},s.prototype.listeners=function(t,e){var r=a?a+t:t,i=this._events[r];if(e)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var n=0,s=i.length,o=new Array(s);n0))return void this.abort("["+t.status+"]"+t.statusText+":"+t.responseURL);if(this.xhrType===i.XHR_RESPONSE_TYPE.TEXT)this.data=t.responseText;else if(this.xhrType===i.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(t.responseText),this.isJson=!0}catch(t){return void this.abort("Error trying to parse loaded json:",t)}else if(this.xhrType===i.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var r=new DOMParser;this.data=r.parseFromString(t.responseText,"text/xml")}else{var n=document.createElement("div");n.innerHTML=t.responseText,this.data=n}this.isXml=!0}catch(t){return void this.abort("Error trying to parse loaded xml:",t)}else this.data=t.response||t.responseText;this.complete()},i.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";e=e||window.location,u||(u=document.createElement("a")),u.href=t,t=a(u.href,{strictMode:!0});var r=!t.port&&""===e.port||t.port===e.port,i=t.protocol?t.protocol+":":"";return t.host===e.hostname&&r&&i===e.protocol?"":"anonymous"},i.prototype._determineXhrType=function(){return i._xhrTypeMap[this._getExtension()]||i.XHR_RESPONSE_TYPE.TEXT},i.prototype._determineLoadType=function(){return i._loadTypeMap[this._getExtension()]||i.LOAD_TYPE.XHR},i.prototype._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var i=t.indexOf("?");i!==-1&&(t=t.substring(0,i)),e=t.substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},i.prototype._getMimeFromXhrType=function(t){switch(t){case i.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case i.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case i.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case i.XHR_RESPONSE_TYPE.JSON:return"application/json";case i.XHR_RESPONSE_TYPE.DEFAULT:case i.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},i.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},i.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},i._loadTypeMap={gif:i.LOAD_TYPE.IMAGE,png:i.LOAD_TYPE.IMAGE,bmp:i.LOAD_TYPE.IMAGE,jpg:i.LOAD_TYPE.IMAGE,jpeg:i.LOAD_TYPE.IMAGE,tif:i.LOAD_TYPE.IMAGE,tiff:i.LOAD_TYPE.IMAGE,webp:i.LOAD_TYPE.IMAGE,tga:i.LOAD_TYPE.IMAGE,"svg+xml":i.LOAD_TYPE.IMAGE},i._xhrTypeMap={xhtml:i.XHR_RESPONSE_TYPE.DOCUMENT,html:i.XHR_RESPONSE_TYPE.DOCUMENT,htm:i.XHR_RESPONSE_TYPE.DOCUMENT,xml:i.XHR_RESPONSE_TYPE.DOCUMENT,tmx:i.XHR_RESPONSE_TYPE.DOCUMENT,tsx:i.XHR_RESPONSE_TYPE.DOCUMENT,svg:i.XHR_RESPONSE_TYPE.DOCUMENT,gif:i.XHR_RESPONSE_TYPE.BLOB,png:i.XHR_RESPONSE_TYPE.BLOB,bmp:i.XHR_RESPONSE_TYPE.BLOB,jpg:i.XHR_RESPONSE_TYPE.BLOB,jpeg:i.XHR_RESPONSE_TYPE.BLOB,tif:i.XHR_RESPONSE_TYPE.BLOB,tiff:i.XHR_RESPONSE_TYPE.BLOB,webp:i.XHR_RESPONSE_TYPE.BLOB,tga:i.XHR_RESPONSE_TYPE.BLOB,json:i.XHR_RESPONSE_TYPE.JSON,text:i.XHR_RESPONSE_TYPE.TEXT,txt:i.XHR_RESPONSE_TYPE.TEXT},i.setExtensionLoadType=function(t,e){s(i._loadTypeMap,t,e)},i.setExtensionXhrType=function(t,e){s(i._xhrTypeMap,t,e)}},{eventemitter3:30,"parse-uri":31}],34:[function(t,e,r){"use strict";function i(){}function n(t,e,r){var i=0,n=t.length;!function s(o){return o||i===n?void(r&&r(o)):void e(t[i++],s)}()}function s(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}function o(t,e){function r(t,e,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(a.started=!0,null==t&&a.idle())return void setTimeout(function(){a.drain()},1);var n={data:t,callback:"function"==typeof r?r:i};e?a._tasks.unshift(n):a._tasks.push(n),setTimeout(function(){a.process()},1)}function n(t){return function(){o-=1,t.callback.apply(t,arguments),null!=arguments[0]&&a.error(arguments[0],t.data),o<=a.concurrency-a.buffer&&a.unsaturated(),a.idle()&&a.drain(),a.process()}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var o=0,a={_tasks:[],concurrency:e,saturated:i,unsaturated:i,buffer:e/4,empty:i,drain:i,error:i,started:!1,paused:!1,push:function(t,e){r(t,!1,e)},kill:function(){a.drain=i,a._tasks=[]},unshift:function(t,e){r(t,!0,e)},process:function(){for(;!a.paused&&o>2,i[1]=(3&e[0])<<4|e[1]>>4,i[2]=(15&e[1])<<2|e[2]>>6,i[3]=63&e[2],o=n-(t.length-1)){case 2:i[3]=64,i[2]=64;break;case 1:i[3]=64}for(s=0;s=0;r--)this.updateAccessibleObjects(e[r])}},i.prototype.update=function(){if(this.renderer.renderingToScreen){this.updateAccessibleObjects(this.renderer._lastObjectRendered);var t=this.renderer.view.getBoundingClientRect(),e=t.width/this.renderer.width,r=t.height/this.renderer.height,i=this.div;i.style.left=t.left+"px",i.style.top=t.top+"px",i.style.width=this.renderer.width+"px",i.style.height=this.renderer.height+"px";for(var s=0;sthis.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},i.prototype.addChild=function(t){var e=this.pool.pop();e||(e=document.createElement("button"),e.style.width="100px",e.style.height="100px",e.style.backgroundColor=this.debug?"rgba(255,0,0,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=2,e.style.borderStyle="none",e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleTitle||t.accessibleHint||(e.title="displayObject "+this.tabIndex),t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},i.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData)},i.prototype._onFocus=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},i.prototype._onFocusOut=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},i.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},i.prototype._onMouseMove=function(){this.deactivate()},i.prototype.destroy=function(){this.div=null;for(var t=0;tthis.maxX||this.minY>this.maxY},i.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-(1/0),this.maxY=-(1/0)},i.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?s.EMPTY:(t=t||new s(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},i.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},i.prototype.addQuad=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY,s=t[0],o=t[1];e=si?s:i,n=o>n?o:n,s=t[2],o=t[3],e=si?s:i,n=o>n?o:n,s=t[4],o=t[5],e=si?s:i,n=o>n?o:n,s=t[6],o=t[7],e=si?s:i,n=o>n?o:n,this.minX=e,this.minY=r,this.maxX=i,this.maxY=n},i.prototype.addFrame=function(t,e,r,i,n){var s=t.worldTransform,o=s.a,a=s.b,h=s.c,u=s.d,l=s.tx,c=s.ty,d=this.minX,p=this.minY,f=this.maxX,v=this.maxY,g=o*e+h*r+l,y=a*e+u*r+c;d=gf?g:f,v=y>v?y:v,g=o*i+h*r+l,y=a*i+u*r+c,d=gf?g:f,v=y>v?y:v,g=o*e+h*n+l,y=a*e+u*n+c,d=gf?g:f,v=y>v?y:v,g=o*i+h*n+l,y=a*i+u*n+c,d=gf?g:f,v=y>v?y:v,this.minX=d,this.minY=p,this.maxX=f,this.maxY=v},i.prototype.addVertices=function(t,e,r,i){for(var n=t.worldTransform,s=n.a,o=n.b,a=n.c,h=n.d,u=n.tx,l=n.ty,c=this.minX,d=this.minY,p=this.maxX,f=this.maxY,v=r;vp?x:p,f=m>f?m:f}this.minX=c,this.minY=d,this.maxX=p,this.maxY=f},i.prototype.addBounds=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY;this.minX=t.minXi?t.maxX:i,this.maxY=t.maxY>n?t.maxY:n}},{"../math":67}],45:[function(t,e,r){function i(){s.call(this),this.children=[]}var n=t("../utils"),s=t("./DisplayObject");i.prototype=Object.create(s.prototype),i.prototype.constructor=i,e.exports=i,Object.defineProperties(i.prototype,{width:{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var e=this.getLocalBounds().width;0!==e?this.scale.x=t/e:this.scale.x=1,this._width=t}},height:{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;0!==e?this.scale.y=t/e:this.scale.y=1,this._height=t}}}),i.prototype.onChildrenChange=function(){},i.prototype.addChild=function(t){var e=arguments.length;if(e>1)for(var r=0;r=0&&e<=this.children.length)return t.parent&&t.parent.removeChild(t),t.parent=this,this.children.splice(e,0,t),this.onChildrenChange(e),t.emit("added",this),t;throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length)},i.prototype.swapChildren=function(t,e){if(t!==e){var r=this.getChildIndex(t),i=this.getChildIndex(e);if(r<0||i<0)throw new Error("swapChildren: Both the supplied DisplayObjects must be children of the caller.");this.children[r]=e,this.children[i]=t,this.onChildrenChange(r=this.children.length)throw new Error("The supplied index is out of bounds");var r=this.getChildIndex(t);n.removeItems(this.children,r,1),this.children.splice(e,0,t),this.onChildrenChange(e)},i.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Supplied index "+t+" does not exist in the child list, or the supplied DisplayObject is not a child of the caller");return this.children[t]},i.prototype.removeChild=function(t){var e=arguments.length;if(e>1)for(var r=0;r0&&o<=s){for(r=this.children.splice(n,o),i=0;i=0;i--){var n=r[i];n.parent=null,n.destroy(t)}}},{"../utils":116,"./DisplayObject":46}],46:[function(t,e,r){function i(){n.call(this);var t=s.TRANSFORM_MODE.DEFAULT===s.TRANSFORM_MODE.STATIC?o:a;this.transform=new t,this.alpha=1,this.visible=!0,this.renderable=!0,this.parent=null,this.worldAlpha=1,this.filterArea=null,this._filters=null,this._enabledFilters=null,this._bounds=new h,this._boundsID=0,this._lastBoundsID=-1,this._boundsRect=null,this._localBoundsRect=null,this._mask=null}var n=t("eventemitter3"),s=t("../const"),o=t("./TransformStatic"),a=t("./Transform"),h=t("./Bounds"),u=t("../math"),l=new i;i.prototype=Object.create(n.prototype),i.prototype.constructor=i,e.exports=i,Object.defineProperties(i.prototype,{x:{get:function(){return this.position.x},set:function(t){this.transform.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.transform.position.y=t}},worldTransform:{get:function(){return this.transform.worldTransform}},localTransform:{get:function(){return this.transform.localTransform}},position:{get:function(){return this.transform.position},set:function(t){this.transform.position.copy(t)}},scale:{get:function(){return this.transform.scale},set:function(t){this.transform.scale.copy(t)}},pivot:{get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copy(t)}},skew:{get:function(){return this.transform.skew},set:function(t){this.transform.skew.copy(t)}},rotation:{get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t}},worldVisible:{get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}},mask:{get:function(){return this._mask},set:function(t){this._mask&&(this._mask.renderable=!0),this._mask=t,this._mask&&(this._mask.renderable=!1)}},filters:{get:function(){return this._filters&&this._filters.slice()},set:function(t){this._filters=t&&t.slice()}}}),i.prototype.updateTransform=function(){this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha,this._bounds.updateID++},i.prototype.displayObjectUpdateTransform=i.prototype.updateTransform,i.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(l.transform)},i.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=l,this.parent.transform._worldID++,this.updateTransform(),this.parent=null)),this._boundsID!==this._lastBoundsID&&this.calculateBounds(),e||(this._boundsRect||(this._boundsRect=new u.Rectangle),e=this._boundsRect),this._bounds.getRectangle(e)},i.prototype.getLocalBounds=function(t){var e=this.transform,r=this.parent;this.parent=null,this.transform=l.transform,t||(this._localBoundsRect||(this._localBoundsRect=new u.Rectangle),t=this._localBoundsRect);var i=this.getBounds(!1,t);return this.parent=r,this.transform=e,i},i.prototype.toGlobal=function(t,e,r){return r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=l,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},i.prototype.toLocal=function(t,e,r,i){return e&&(t=e.toGlobal(t,r,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=l,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,r)},i.prototype.renderWebGL=function(t){},i.prototype.renderCanvas=function(t){},i.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},i.prototype.setTransform=function(t,e,r,i,n,s,o,a,h){return this.position.x=t||0,this.position.y=e||0,this.scale.x=r?r:1,this.scale.y=i?i:1,this.rotation=n||0,this.skew.x=s||0,this.skew.y=o||0,this.pivot.x=a||0,this.pivot.y=h||0,this},i.prototype.destroy=function(){this.removeAllListeners(),this.parent&&this.parent.removeChild(this),this.transform=null,this.parent=null,this._bounds=null,this._currentBounds=null,this._mask=null,this.filterArea=null,this.interactive=!1,this.interactiveChildren=!1}},{"../const":43,"../math":67,"./Bounds":44,"./Transform":47,"./TransformStatic":49,eventemitter3:3}],47:[function(t,e,r){function i(){s.call(this),this.position=new n.Point(0,0),this.scale=new n.Point(1,1),this.skew=new n.ObservablePoint(this.updateSkew,this,0,0),this.pivot=new n.Point(0,0),this._rotation=0,this._sr=Math.sin(0),this._cr=Math.cos(0),this._cy=Math.cos(0),this._sy=Math.sin(0),this._nsx=Math.sin(0),this._cx=Math.cos(0)}var n=t("../math"),s=t("./TransformBase");i.prototype=Object.create(s.prototype),i.prototype.constructor=i,i.prototype.updateSkew=function(){this._cy=Math.cos(this.skew.y),this._sy=Math.sin(this.skew.y),this._nsx=Math.sin(this.skew.x),this._cx=Math.cos(this.skew.x)},i.prototype.updateLocalTransform=function(){var t,e,r,i,n=this.localTransform;t=this._cr*this.scale.x,e=this._sr*this.scale.x,r=-this._sr*this.scale.y,i=this._cr*this.scale.y,n.a=this._cy*t+this._sy*r,n.b=this._cy*e+this._sy*i,n.c=this._nsx*t+this._cx*r,n.d=this._nsx*e+this._cx*i},i.prototype.updateTransform=function(t){var e,r,i,n,s=t.worldTransform,o=this.worldTransform,a=this.localTransform;e=this._cr*this.scale.x,r=this._sr*this.scale.x,i=-this._sr*this.scale.y,n=this._cr*this.scale.y,a.a=this._cy*e+this._sy*i,a.b=this._cy*r+this._sy*n,a.c=this._nsx*e+this._cx*i,a.d=this._nsx*r+this._cx*n,a.tx=this.position.x-(this.pivot.x*a.a+this.pivot.y*a.c),a.ty=this.position.y-(this.pivot.x*a.b+this.pivot.y*a.d),o.a=a.a*s.a+a.b*s.c,o.b=a.a*s.b+a.b*s.d,o.c=a.c*s.a+a.d*s.c,o.d=a.c*s.b+a.d*s.d,o.tx=a.tx*s.a+a.ty*s.c+s.tx,o.ty=a.tx*s.b+a.ty*s.d+s.ty,this._worldID++},i.prototype.setFromMatrix=function(t){t.decompose(this)},Object.defineProperties(i.prototype,{rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this._sr=Math.sin(t),this._cr=Math.cos(t)}}}),e.exports=i},{"../math":67,"./TransformBase":48}],48:[function(t,e,r){function i(){this.worldTransform=new n.Matrix,this.localTransform=new n.Matrix,this._worldID=0}var n=t("../math");i.prototype.constructor=i,i.prototype.updateLocalTransform=function(){},i.prototype.updateTransform=function(t){var e=t.worldTransform,r=this.worldTransform,i=this.localTransform;r.a=i.a*e.a+i.b*e.c,r.b=i.a*e.b+i.b*e.d,r.c=i.c*e.a+i.d*e.c,r.d=i.c*e.b+i.d*e.d,r.tx=i.tx*e.a+i.ty*e.c+e.tx,r.ty=i.tx*e.b+i.ty*e.d+e.ty,this._worldID++},i.prototype.updateWorldTransform=i.prototype.updateTransform,i.IDENTITY=new i,e.exports=i},{"../math":67}],49:[function(t,e,r){function i(){s.call(this),this.position=new n.ObservablePoint(this.onChange,this,0,0),this.scale=new n.ObservablePoint(this.onChange,this,1,1),this.pivot=new n.ObservablePoint(this.onChange,this,0,0),this.skew=new n.ObservablePoint(this.updateSkew,this,0,0),this._rotation=0,this._sr=Math.sin(0),this._cr=Math.cos(0),this._cy=Math.cos(0),this._sy=Math.sin(0),this._nsx=Math.sin(0),this._cx=Math.cos(0),this._localID=0,this._currentLocalID=0}var n=t("../math"),s=t("./TransformBase");i.prototype=Object.create(s.prototype),i.prototype.constructor=i,i.prototype.onChange=function(){this._localID++},i.prototype.updateSkew=function(){this._cy=Math.cos(this.skew._y),this._sy=Math.sin(this.skew._y),this._nsx=Math.sin(this.skew._x),this._cx=Math.cos(this.skew._x),this._localID++},i.prototype.updateLocalTransform=function(){var t=this.localTransform;if(this._localID!==this._currentLocalID){var e,r,i,n;e=this._cr*this.scale._x,r=this._sr*this.scale._x,i=-this._sr*this.scale._y,n=this._cr*this.scale._y,t.a=this._cy*e+this._sy*i,t.b=this._cy*r+this._sy*n,t.c=this._nsx*e+this._cx*i,t.d=this._nsx*r+this._cx*n,t.tx=this.position._x-(this.pivot._x*t.a+this.pivot._y*t.c),t.ty=this.position._y-(this.pivot._x*t.b+this.pivot._y*t.d),this._currentLocalID=this._localID,this._parentID=-1}},i.prototype.updateTransform=function(t){var e=t.worldTransform,r=this.worldTransform,i=this.localTransform;if(this._localID!==this._currentLocalID){var n,s,o,a;n=this._cr*this.scale._x,s=this._sr*this.scale._x,o=-this._sr*this.scale._y,a=this._cr*this.scale._y,i.a=this._cy*n+this._sy*o,i.b=this._cy*s+this._sy*a,i.c=this._nsx*n+this._cx*o,i.d=this._nsx*s+this._cx*a,i.tx=this.position._x-(this.pivot._x*i.a+this.pivot._y*i.c),i.ty=this.position._y-(this.pivot._x*i.b+this.pivot._y*i.d),this._currentLocalID=this._localID,this._parentID=-1}this._parentID!==t._worldID&&(r.a=i.a*e.a+i.b*e.c,r.b=i.a*e.b+i.b*e.d,r.c=i.c*e.a+i.d*e.c,r.d=i.c*e.b+i.d*e.d,r.tx=i.tx*e.a+i.ty*e.c+e.tx,r.ty=i.tx*e.b+i.ty*e.d+e.ty,this._parentID=t._worldID,this._worldID++)},i.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperties(i.prototype,{rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this._sr=Math.sin(t),this._cr=Math.cos(t),this._localID++}}}),e.exports=i},{"../math":67,"./TransformBase":48}],50:[function(t,e,r){function i(){s.call(this),this.fillAlpha=1,this.lineWidth=0,this.lineColor=0,this.graphicsData=[],this.tint=16777215,this._prevTint=16777215,this.blendMode=c.BLEND_MODES.NORMAL,this.currentPath=null,this._webGL={},this.isMask=!1,this.boundsPadding=0,this._localBounds=new p,this.dirty=0,this.fastRectDirty=-1,this.clearDirty=0,this.boundsDirty=-1,this.cachedSpriteDirty=!1,this._spriteRect=null,this._fastRect=!1}var n,s=t("../display/Container"),o=t("../textures/RenderTexture"),a=t("../textures/Texture"),h=t("./GraphicsData"),u=t("../sprites/Sprite"),l=t("../math"),c=t("../const"),d=t("../utils"),p=t("../display/Bounds"),f=t("./utils/bezierCurveTo"),v=t("../renderers/canvas/CanvasRenderer"),g=new l.Matrix,y=new l.Point,x=new Float32Array(4),m=new Float32Array(4);i._SPRITE_TEXTURE=null,i.prototype=Object.create(s.prototype),i.prototype.constructor=i,e.exports=i,i.prototype.clone=function(){var t=new i;t.renderable=this.renderable,t.fillAlpha=this.fillAlpha,t.lineWidth=this.lineWidth,t.lineColor=this.lineColor,t.tint=this.tint,t.blendMode=this.blendMode,t.isMask=this.isMask,t.boundsPadding=this.boundsPadding,t.dirty=0,t.cachedSpriteDirty=this.cachedSpriteDirty;for(var e=0;ec*h)}return this.dirty++,this},i.prototype.arc=function(t,e,r,i,n,s){if(s=s||!1,i===n)return this;!s&&n<=i?n+=2*Math.PI:s&&i<=n&&(i+=2*Math.PI);var o=s?(i-n)*-1:n-i,a=40*Math.ceil(Math.abs(o)/(2*Math.PI));if(0===o)return this;var h=t+Math.cos(i)*r,u=e+Math.sin(i)*r;this.currentPath?this.currentPath.shape.points.push(h,u):this.moveTo(h,u);for(var l=this.currentPath.shape.points,c=o/(2*a),d=2*c,p=Math.cos(c),f=Math.sin(c),v=a-1,g=v%1/v,y=0;y<=v;y++){var x=y+g*y,m=c+i+d*x,_=Math.cos(m),b=-Math.sin(m);l.push((p*_+f*b)*r+t,(p*-b+f*_)*r+e)}return this.dirty++,this},i.prototype.beginFill=function(t,e){return this.filling=!0,this.fillColor=t||0,this.fillAlpha=void 0===e?1:e,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},i.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},i.prototype.drawRect=function(t,e,r,i){return this.drawShape(new l.Rectangle(t,e,r,i)),this},i.prototype.drawRoundedRect=function(t,e,r,i,n){return this.drawShape(new l.RoundedRectangle(t,e,r,i,n)),this},i.prototype.drawCircle=function(t,e,r){return this.drawShape(new l.Circle(t,e,r)),this},i.prototype.drawEllipse=function(t,e,r,i){return this.drawShape(new l.Ellipse(t,e,r,i)),this},i.prototype.drawPolygon=function(t){var e=t,r=!0;if(e instanceof l.Polygon&&(r=e.closed,e=e.points),!Array.isArray(e)){e=new Array(arguments.length);for(var i=0;ie?o+h:e,r=ai?a+u:i;else if(p===c.SHAPES.CIRC)o=n.x,a=n.y,h=n.radius+f/2,u=n.radius+f/2,t=o-he?o+h:e,r=a-ui?a+u:i;else if(p===c.SHAPES.ELIP)o=n.x,a=n.y,h=n.width+f/2,u=n.height+f/2,t=o-he?o+h:e,r=a-ui?a+u:i;else{s=n.points;for(var v=0;ve?o+f:e,r=a-fi?a+f:i}}else t=0,e=0,r=0,i=0;var g=this.boundsPadding;this._localBounds.minX=t-g,this._localBounds.maxX=e+2*g,this._localBounds.minY=r-g,this._localBounds.maxY=i+2*g},i.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var e=new h(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,t);return this.graphicsData.push(e),e.type===c.SHAPES.POLY&&(e.shape.closed=e.shape.closed||this.filling,this.currentPath=e),this.dirty++,e},i.prototype.generateCanvasTexture=function(t,e){e=e||1;var r=this.getLocalBounds(),i=new o.create(r.width*e,r.height*e);n||(n=new v),g.tx=-r.x,g.ty=-r.y,n.render(this,i,!1,g);var s=a.fromCanvas(i.baseTexture._canvasRenderTarget.canvas,t);return s.baseTexture.resolution=e,s},i.prototype.closePath=function(){var t=this.currentPath;return t&&t.shape&&t.shape.close(),this},i.prototype.addHole=function(){var t=this.graphicsData.pop();return this.currentPath=this.graphicsData[this.graphicsData.length-1],this.currentPath.addHole(t.shape),this.currentPath=null,this},i.prototype.destroy=function(){s.prototype.destroy.apply(this,arguments);for(var t=0;tO?O:A,r.beginPath(),r.moveTo(S,C+A),r.lineTo(S,C+M-A),r.quadraticCurveTo(S,C+M,S+A,C+M),r.lineTo(S+R-A,C+M),r.quadraticCurveTo(S+R,C+M,S+R,C+M-A),r.lineTo(S+R,C+A),r.quadraticCurveTo(S+R,C,S+R-A,C),r.lineTo(S+A,C),r.quadraticCurveTo(S,C,S,C+A),r.closePath(),(h.fillColor||0===h.fillColor)&&(r.globalAlpha=h.fillAlpha*i,r.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.fill()),h.lineWidth&&(r.globalAlpha=h.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke())}}},i.prototype.updateGraphicsTint=function(t){t._prevTint=t.tint;for(var e=(t.tint>>16&255)/255,r=(t.tint>>8&255)/255,i=(255&t.tint)/255,n=0;n>16&255)/255*e*255<<16)+((o>>8&255)/255*r*255<<8)+(255&o)/255*i*255,s._lineTint=((a>>16&255)/255*e*255<<16)+((a>>8&255)/255*r*255<<8)+(255&a)/255*i*255}},i.prototype.renderPolygon=function(t,e,r){r.moveTo(t[0],t[1]);for(var i=1;i32e4)&&(r=this.graphicsDataPool.pop()||new h(this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState),r.reset(e),t.data.push(r)),r.dirty=!0,r}},{"../../const":43,"../../renderers/webgl/WebGLRenderer":81,"../../renderers/webgl/utils/ObjectRenderer":91,"../../utils":116,"./WebGLGraphicsData":55,"./shaders/PrimitiveShader":56,"./utils/buildCircle":57,"./utils/buildPoly":59,"./utils/buildRectangle":60,"./utils/buildRoundedRectangle":61}],55:[function(t,e,r){function i(t,e,r){this.gl=t,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=n.GLBuffer.createVertexBuffer(t),this.indexBuffer=n.GLBuffer.createIndexBuffer(t),this.dirty=!0,this.glPoints=null,this.glIndices=null,this.shader=e,this.vao=new n.VertexArrayObject(t,r).addIndex(this.indexBuffer).addAttribute(this.buffer,e.attributes.aVertexPosition,t.FLOAT,!1,24,0).addAttribute(this.buffer,e.attributes.aColor,t.FLOAT,!1,24,8)}var n=t("pixi-gl-core");i.prototype.constructor=i,e.exports=i,i.prototype.reset=function(){this.points.length=0,this.indices.length=0},i.prototype.upload=function(){this.glPoints=new Float32Array(this.points),this.buffer.upload(this.glPoints),this.glIndices=new Uint16Array(this.indices),this.indexBuffer.upload(this.glIndices),this.dirty=!1},i.prototype.destroy=function(){this.color=null,this.points=null,this.indices=null,this.vao.destroy(),this.buffer.destroy(),this.indexBuffer.destroy(),this.gl=null,this.buffer=null,this.indexBuffer=null,this.glPoints=null,this.glIndices=null}},{"pixi-gl-core":12}],56:[function(t,e,r){function i(t){n.call(this,t,["attribute vec2 aVertexPosition;","attribute vec4 aColor;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","uniform float alpha;","uniform vec3 tint;","varying vec4 vColor;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vColor = aColor * vec4(tint * alpha, alpha);","}"].join("\n"),["varying vec4 vColor;","void main(void){"," gl_FragColor = vColor;","}"].join("\n"))}var n=t("../../../Shader");i.prototype=Object.create(n.prototype),i.prototype.constructor=i,e.exports=i},{"../../../Shader":42}],57:[function(t,e,r){var i=t("./buildLine"),n=t("../../../const"),s=t("../../../utils"),o=function(t,e){var r,o,a=t.shape,h=a.x,u=a.y;t.type===n.SHAPES.CIRC?(r=a.radius,o=a.radius):(r=a.width,o=a.height);var l=Math.floor(30*Math.sqrt(a.radius))||Math.floor(15*Math.sqrt(a.width+a.height)),c=2*Math.PI/l,d=0;if(t.fill){var p=s.hex2rgb(t.fillColor),f=t.fillAlpha,v=p[0]*f,g=p[1]*f,y=p[2]*f,x=e.points,m=e.indices,_=x.length/6;for(m.push(_),d=0;d19600?(T=x-_,E=m-b,P=Math.sqrt(T*T+E*E),T/=P,E/=P,T*=U,E*=U,I.push(f-T,v-E),I.push(W,G,X,j),I.push(f+T,v+E),I.push(W,G,X,j),I.push(f-T,v-E),I.push(W,G,X,j),B++):(I.push(l,c),I.push(W,G,X,j),I.push(f-(l-f),v-(c-v)),I.push(W,G,X,j)));for(d=s[2*(F-2)],p=s[2*(F-2)+1],f=s[2*(F-1)],v=s[2*(F-1)+1],x=-(p-v),m=d-f,P=Math.sqrt(x*x+m*m),x/=P,m/=P,x*=U,m*=U,I.push(f-x,v-m),I.push(W,G,X,j),I.push(f+x,v+m),I.push(W,G,X,j),L.push(N),r=0;r=6){for(var o=[],a=t.holes,h=0;h0&&i(t,e)};e.exports=o},{"../../../utils":116,"./buildLine":58,earcut:2}],60:[function(t,e,r){var i=t("./buildLine"),n=t("../../../utils"),s=function(t,e){var r=t.shape,s=r.x,o=r.y,a=r.width,h=r.height;if(t.fill){var u=n.hex2rgb(t.fillColor),l=t.fillAlpha,c=u[0]*l,d=u[1]*l,p=u[2]*l,f=e.points,v=e.indices,g=f.length/6;f.push(s,o),f.push(c,d,p,l),f.push(s+a,o),f.push(c,d,p,l),f.push(s,o+h),f.push(c,d,p,l),f.push(s+a,o+h),f.push(c,d,p,l),v.push(g,g,g+1,g+2,g+3,g+3)}if(t.lineWidth){var y=t.points;t.points=[s,o,s+a,o,s+a,o+h,s,o+h,s,o],i(t,e),t.points=y}};e.exports=s},{"../../../utils":116,"./buildLine":58}],61:[function(t,e,r){var i=t("earcut"),n=t("./buildLine"),s=t("../../../utils"),o=function(t,e){var r=t.shape,o=r.x,h=r.y,u=r.width,l=r.height,c=r.radius,d=[];if(d.push(o,h+c),a(o,h+l-c,o,h+l,o+c,h+l,d),a(o+u-c,h+l,o+u,h+l,o+u,h+l-c,d),a(o+u,h+c,o+u,h,o+u-c,h,d),a(o+c,h,o,h,o,h+c+1e-10,d),t.fill){var p=s.hex2rgb(t.fillColor),f=t.fillAlpha,v=p[0]*f,g=p[1]*f,y=p[2]*f,x=e.points,m=e.indices,_=x.length/6,b=i(d,null,2),T=0;for(T=0;T0?1:0}function n(){for(var t=0;t<16;t++){var e=[];c.push(e);for(var r=0;r<16;r++)for(var n=i(s[t]*s[r]+a[t]*o[r]),d=i(o[t]*s[r]+h[t]*o[r]),p=i(s[t]*a[r]+a[t]*h[r]),f=i(o[t]*a[r]+h[t]*h[r]),v=0;v<16;v++)if(s[v]===n&&o[v]===d&&a[v]===p&&h[v]===f){e.push(v);break}}for(t=0;t<16;t++){var g=new l;g.set(s[t],o[t],a[t],h[t],0,0),u.push(g)}}var s=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],o=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],a=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],h=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],u=[],l=t("./Matrix"),c=[];n();var d={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MIRROR_HORIZONTAL:12,uX:function(t){return s[t]},uY:function(t){return o[t]},vX:function(t){return a[t]},vY:function(t){return h[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return c[t][e]},sub:function(t,e){return c[t][d.inv(e)]},rotate180:function(t){return 4^t},isSwapWidthHeight:function(t){return 2===(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?d.S:d.N:2*Math.abs(e)<=Math.abs(t)?t>0?d.E:d.W:e>0?t>0?d.SE:d.SW:t>0?d.NE:d.NW},matrixAppendRotationInv:function(t,e,r,i){var n=u[d.inv(e)];r=r||0,i=i||0,n.tx=r,n.ty=i,t.append(n)}};e.exports=d},{"./Matrix":64}],64:[function(t,e,r){function i(){this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this.array=null}var n=t("./Point");i.prototype.constructor=i,e.exports=i,i.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},i.prototype.set=function(t,e,r,i,n,s){return this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=s,this},i.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var r=e||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r},i.prototype.apply=function(t,e){e=e||new n;var r=t.x,i=t.y;return e.x=this.a*r+this.c*i+this.tx,e.y=this.b*r+this.d*i+this.ty,e},i.prototype.applyInverse=function(t,e){e=e||new n;var r=1/(this.a*this.d+this.c*-this.b),i=t.x,s=t.y;return e.x=this.d*r*i+-this.c*r*s+(this.ty*this.c-this.tx*this.d)*r,e.y=this.a*r*s+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,e},i.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},i.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},i.prototype.rotate=function(t){var e=Math.cos(t),r=Math.sin(t),i=this.a,n=this.c,s=this.tx;return this.a=i*e-this.b*r,this.b=i*r+this.b*e,this.c=n*e-this.d*r,this.d=n*r+this.d*e,this.tx=s*e-this.ty*r,this.ty=s*r+this.ty*e,this},i.prototype.append=function(t){var e=this.a,r=this.b,i=this.c,n=this.d;return this.a=t.a*e+t.b*i,this.b=t.a*r+t.b*n,this.c=t.c*e+t.d*i,this.d=t.c*r+t.d*n,this.tx=t.tx*e+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*n+this.ty,this},i.prototype.setTransform=function(t,e,r,i,n,s,o,a,h){var u,l,c,d,p,f,v,g,y,x;return p=Math.sin(o),f=Math.cos(o),v=Math.cos(h),g=Math.sin(h),y=-Math.sin(a),x=Math.cos(a),u=f*n,l=p*n,c=-p*s,d=f*s,this.a=v*u+g*c,this.b=v*l+g*d,this.c=y*u+x*c,this.d=y*l+x*d,this.tx=t+(r*u+i*c),this.ty=e+(r*l+i*d),this},i.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},i.prototype.decompose=function(t){var e=this.a,r=this.b,i=this.c,n=this.d,s=Math.atan2(-i,n),o=Math.atan2(r,e),a=Math.abs(1-s/o);return a<1e-5?(t.rotation=o,e<0&&n>=0&&(t.rotation+=t.rotation<=0?Math.PI:-Math.PI),t.skew.x=t.skew.y=0):(t.skew.x=s,t.skew.y=o),t.scale.x=Math.sqrt(e*e+r*r),t.scale.y=Math.sqrt(i*i+n*n),t.position.x=this.tx,t.position.y=this.ty,t},i.prototype.invert=function(){var t=this.a,e=this.b,r=this.c,i=this.d,n=this.tx,s=t*i-e*r;return this.a=i/s,this.b=-e/s,this.c=-r/s,this.d=t/s,this.tx=(r*this.ty-i*n)/s,this.ty=-(t*this.ty-e*n)/s,this},i.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},i.prototype.clone=function(){var t=new i;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},i.prototype.copy=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},i.IDENTITY=new i,i.TEMP_MATRIX=new i},{"./Point":66}],65:[function(t,e,r){function i(t,e,r,i){this._x=r||0,this._y=i||0,this.cb=t,this.scope=e}i.prototype.constructor=i,e.exports=i,Object.defineProperties(i.prototype,{x:{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}},y:{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}}),i.prototype.set=function(t,e){var r=t||0,i=e||(0!==e?r:0);this._x===r&&this._y===i||(this._x=r,this._y=i,this.cb.call(this.scope))},i.prototype.copy=function(t){this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope))}},{}],66:[function(t,e,r){function i(t,e){this.x=t||0,this.y=e||0}i.prototype.constructor=i,e.exports=i,i.prototype.clone=function(){return new i(this.x,this.y)},i.prototype.copy=function(t){this.set(t.x,t.y)},i.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},i.prototype.set=function(t,e){this.x=t||0,this.y=e||(0!==e?this.x:0)}},{}],67:[function(t,e,r){e.exports={Point:t("./Point"),ObservablePoint:t("./ObservablePoint"),Matrix:t("./Matrix"),GroupD8:t("./GroupD8"),Circle:t("./shapes/Circle"),Ellipse:t("./shapes/Ellipse"),Polygon:t("./shapes/Polygon"),Rectangle:t("./shapes/Rectangle"),RoundedRectangle:t("./shapes/RoundedRectangle")}},{"./GroupD8":63,"./Matrix":64,"./ObservablePoint":65,"./Point":66,"./shapes/Circle":68,"./shapes/Ellipse":69,"./shapes/Polygon":70,"./shapes/Rectangle":71,"./shapes/RoundedRectangle":72}],68:[function(t,e,r){function i(t,e,r){this.x=t||0,this.y=e||0,this.radius=r||0,this.type=s.SHAPES.CIRC}var n=t("./Rectangle"),s=t("../../const");i.prototype.constructor=i,e.exports=i,i.prototype.clone=function(){return new i(this.x,this.y,this.radius)},i.prototype.contains=function(t,e){if(this.radius<=0)return!1;var r=this.x-t,i=this.y-e,n=this.radius*this.radius;return r*=r,i*=i,r+i<=n},i.prototype.getBounds=function(){return new n(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)}},{"../../const":43,"./Rectangle":71}],69:[function(t,e,r){function i(t,e,r,i){this.x=t||0,this.y=e||0,this.width=r||0,this.height=i||0,this.type=s.SHAPES.ELIP}var n=t("./Rectangle"),s=t("../../const");i.prototype.constructor=i,e.exports=i,i.prototype.clone=function(){return new i(this.x,this.y,this.width,this.height)},i.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var r=(t-this.x)/this.width,i=(e-this.y)/this.height;return r*=r,i*=i,r+i<=1},i.prototype.getBounds=function(){return new n(this.x-this.width,this.y-this.height,this.width,this.height)}},{"../../const":43,"./Rectangle":71}],70:[function(t,e,r){function i(t){var e=t;if(!Array.isArray(e)){e=new Array(arguments.length);for(var r=0;re!=u>e&&t<(h-o)*(e-a)/(u-a)+o;l&&(r=!r)}return r}},{"../../const":43,"../Point":66}],71:[function(t,e,r){function i(t,e,r,i){this.x=t||0,this.y=e||0,this.width=r||0,this.height=i||0,this.type=n.SHAPES.RECT}var n=t("../../const");i.prototype.constructor=i,e.exports=i,Object.defineProperties(i.prototype,{left:{get:function(){return this.x}},right:{get:function(){return this.x+this.width}},top:{get:function(){return this.y}},bottom:{get:function(){return this.y+this.height}}}),i.EMPTY=new i(0,0,0,0),i.prototype.clone=function(){return new i(this.x,this.y,this.width,this.height)},i.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},i.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t=this.y&&et.x+t.width&&(this.width=t.width-this.x,this.width<0&&(this.width=0)),this.y+this.height>t.y+t.height&&(this.height=t.height-this.y,this.height<0&&(this.height=0))},i.prototype.enlarge=function(t){if(t!==i.EMPTY){var e=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),n=Math.min(this.y,t.y),s=Math.max(this.y+this.height,t.y+t.height);this.x=e,this.width=r-e,this.y=n,this.height=s-n}}},{"../../const":43}],72:[function(t,e,r){function i(t,e,r,i,s){this.x=t||0,this.y=e||0,this.width=r||0,this.height=i||0,this.radius=s||20,this.type=n.SHAPES.RREC}var n=t("../../const");i.prototype.constructor=i,e.exports=i,i.prototype.clone=function(){return new i(this.x,this.y,this.width,this.height,this.radius)},i.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height)}},{"../../const":43}],73:[function(t,e,r){function i(t,e,r,i){if(u.call(this),n.sayHello(t),i)for(var s in o.DEFAULT_RENDER_OPTIONS)"undefined"==typeof i[s]&&(i[s]=o.DEFAULT_RENDER_OPTIONS[s]);else i=o.DEFAULT_RENDER_OPTIONS;this.type=o.RENDERER_TYPE.UNKNOWN,this.width=e||800,this.height=r||600,this.view=i.view||document.createElement("canvas"),this.resolution=i.resolution,this.transparent=i.transparent,this.autoResize=i.autoResize||!1,this.blendModes=null,this.preserveDrawingBuffer=i.preserveDrawingBuffer,this.clearBeforeRender=i.clearBeforeRender,this.roundPixels=i.roundPixels,this._backgroundColor=0,this._backgroundColorRgba=[0,0,0,0],this._backgroundColorString="#000000",this.backgroundColor=i.backgroundColor||this._backgroundColor,this._tempDisplayObjectParent=new a,this._lastObjectRendered=this._tempDisplayObjectParent}var n=t("../utils"),s=t("../math"),o=t("../const"),a=t("../display/Container"),h=t("../textures/RenderTexture"),u=t("eventemitter3"),l=new s.Matrix;i.prototype=Object.create(u.prototype),i.prototype.constructor=i,e.exports=i,Object.defineProperties(i.prototype,{backgroundColor:{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=n.hex2string(t),n.hex2rgb(t,this._backgroundColorRgba)}}}),i.prototype.resize=function(t,e){this.width=t*this.resolution,this.height=e*this.resolution,this.view.width=this.width,this.view.height=this.height,this.autoResize&&(this.view.style.width=this.width/this.resolution+"px",this.view.style.height=this.height/this.resolution+"px")},i.prototype.generateTexture=function(t,e,r){var i=t.getLocalBounds(),n=h.create(0|i.width,0|i.height,e,r);return l.tx=-i.x,l.ty=-i.y,this.render(t,n,!1,l,!0),n},i.prototype.destroy=function(t){t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.type=o.RENDERER_TYPE.UNKNOWN,this.width=0,this.height=0,this.view=null,this.resolution=0,this.transparent=!1,this.autoResize=!1,this.blendModes=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this.roundPixels=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this.backgroundColor=0,this._tempDisplayObjectParent=null,this._lastObjectRendered=null}},{"../const":43,"../display/Container":45,"../math":67,"../textures/RenderTexture":108,"../utils":116,eventemitter3:3}],74:[function(t,e,r){function i(t,e,r){r=r||{},n.call(this,"Canvas",t,e,r),this.type=u.RENDERER_TYPE.CANVAS,this.rootContext=this.view.getContext("2d",{alpha:this.transparent}),this.rootResolution=this.resolution,this.refresh=!0,this.maskManager=new s(this),this.smoothProperty="imageSmoothingEnabled",this.rootContext.imageSmoothingEnabled||(this.rootContext.webkitImageSmoothingEnabled?this.smoothProperty="webkitImageSmoothingEnabled":this.rootContext.mozImageSmoothingEnabled?this.smoothProperty="mozImageSmoothingEnabled":this.rootContext.oImageSmoothingEnabled?this.smoothProperty="oImageSmoothingEnabled":this.rootContext.msImageSmoothingEnabled&&(this.smoothProperty="msImageSmoothingEnabled")),this.initPlugins(),this.blendModes=a(),this._activeBlendMode=null,this.context=null,this.renderingToScreen=!1,this.resize(t,e)}var n=t("../SystemRenderer"),s=t("./utils/CanvasMaskManager"),o=t("./utils/CanvasRenderTarget"),a=t("./utils/mapCanvasBlendModesToPixi"),h=t("../../utils"),u=t("../../const");i.prototype=Object.create(n.prototype),i.prototype.constructor=i,e.exports=i,h.pluginTarget.mixin(i),i.prototype.render=function(t,e,r,i,n){if(this.view){this.renderingToScreen=!e,this.emit("prerender"),e?(e=e.baseTexture||e,e._canvasRenderTarget||(e._canvasRenderTarget=new o(e.width,e.height,e.resolution),e.source=e._canvasRenderTarget.canvas,e.valid=!0),this.context=e._canvasRenderTarget.context,this.resolution=e._canvasRenderTarget.resolution):(this.context=this.rootContext,this.resolution=this.rootResolution);var s=this.context;if(e||(this._lastObjectRendered=t),!n){var a=t.parent,h=this._tempDisplayObjectParent.transform.worldTransform;i?i.copy(h):h.identity(),t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=a}s.setTransform(1,0,0,1,0,0),s.globalAlpha=1,s.globalCompositeOperation=this.blendModes[u.BLEND_MODES.NORMAL],navigator.isCocoonJS&&this.view.screencanvas&&(s.fillStyle="black",s.clear()),(void 0!==r?r:this.clearBeforeRender)&&this.renderingToScreen&&(this.transparent?s.clearRect(0,0,this.width,this.height):(s.fillStyle=this._backgroundColorString,s.fillRect(0,0,this.width,this.height)));var l=this.context;this.context=s,t.renderCanvas(this),this.context=l,this.emit("postrender")}},i.prototype.setBlendMode=function(t){this._activeBlendMode!==t&&(this.context.globalCompositeOperation=this.blendModes[t])},i.prototype.destroy=function(t){this.destroyPlugins(),n.prototype.destroy.call(this,t),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null},i.prototype.resize=function(t,e){n.prototype.resize.call(this,t,e),this.smoothProperty&&(this.rootContext[this.smoothProperty]=u.SCALE_MODES.DEFAULT===u.SCALE_MODES.LINEAR)}},{"../../const":43,"../../utils":116,"../SystemRenderer":73,"./utils/CanvasMaskManager":75,"./utils/CanvasRenderTarget":76,"./utils/mapCanvasBlendModesToPixi":78}],75:[function(t,e,r){function i(t){this.renderer=t}var n=t("../../../const");i.prototype.constructor=i,e.exports=i,i.prototype.pushMask=function(t){var e=this.renderer;e.context.save();var r=t.alpha,i=t.transform.worldTransform,n=e.resolution;e.context.setTransform(i.a*n,i.b*n,i.c*n,i.d*n,i.tx*n,i.ty*n),t._texture||(this.renderGraphicsShape(t),e.context.clip()),t.worldAlpha=r},i.prototype.renderGraphicsShape=function(t){var e=this.renderer.context,r=t.graphicsData.length;if(0!==r){e.beginPath();for(var i=0;iS?S:w,e.moveTo(_,b+w),e.lineTo(_,b+E-w),e.quadraticCurveTo(_,b+E,_+w,b+E),e.lineTo(_+T-w,b+E),e.quadraticCurveTo(_+T,b+E,_+T,b+E-w),e.lineTo(_+T,b+w),e.quadraticCurveTo(_+T,b,_+T-w,b),e.lineTo(_+w,b),e.quadraticCurveTo(_,b,_,b+w),e.closePath()}}}},i.prototype.popMask=function(t){t.context.restore()},i.prototype.destroy=function(){}},{"../../../const":43}],76:[function(t,e,r){function i(t,e,r){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=r||n.RESOLUTION,this.resize(t,e)}var n=t("../../../const");i.prototype.constructor=i,e.exports=i,Object.defineProperties(i.prototype,{width:{get:function(){return this.canvas.width},set:function(t){this.canvas.width=t}},height:{get:function(){return this.canvas.height},set:function(t){this.canvas.height=t}}}),i.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},i.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},i.prototype.destroy=function(){this.context=null,this.canvas=null}},{"../../../const":43}],77:[function(t,e,r){var i=function(t){var e=document.createElement("canvas");e.width=6,e.height=1;var r=e.getContext("2d");return r.fillStyle=t,r.fillRect(0,0,6,1),e},n=function(){if("undefined"==typeof document)return!1;var t=i("#ff00ff"),e=i("#ffff00"),r=document.createElement("canvas");r.width=6,r.height=1;var n=r.getContext("2d");n.globalCompositeOperation="multiply",n.drawImage(t,0,0),n.drawImage(e,2,0);var s=n.getImageData(2,0,1,1);if(!s)return!1;var o=s.data;return 255===o[0]&&0===o[1]&&0===o[2]};e.exports=n},{}],78:[function(t,e,r){function i(t){return t=t||[],s()?(t[n.BLEND_MODES.NORMAL]="source-over",t[n.BLEND_MODES.ADD]="lighter",t[n.BLEND_MODES.MULTIPLY]="multiply",t[n.BLEND_MODES.SCREEN]="screen",t[n.BLEND_MODES.OVERLAY]="overlay",t[n.BLEND_MODES.DARKEN]="darken",t[n.BLEND_MODES.LIGHTEN]="lighten",t[n.BLEND_MODES.COLOR_DODGE]="color-dodge",t[n.BLEND_MODES.COLOR_BURN]="color-burn",t[n.BLEND_MODES.HARD_LIGHT]="hard-light",t[n.BLEND_MODES.SOFT_LIGHT]="soft-light",t[n.BLEND_MODES.DIFFERENCE]="difference",t[n.BLEND_MODES.EXCLUSION]="exclusion",t[n.BLEND_MODES.HUE]="hue",t[n.BLEND_MODES.SATURATION]="saturate",t[n.BLEND_MODES.COLOR]="color",t[n.BLEND_MODES.LUMINOSITY]="luminosity"):(t[n.BLEND_MODES.NORMAL]="source-over",t[n.BLEND_MODES.ADD]="lighter",t[n.BLEND_MODES.MULTIPLY]="source-over",t[n.BLEND_MODES.SCREEN]="source-over",t[n.BLEND_MODES.OVERLAY]="source-over",t[n.BLEND_MODES.DARKEN]="source-over",t[n.BLEND_MODES.LIGHTEN]="source-over",t[n.BLEND_MODES.COLOR_DODGE]="source-over",t[n.BLEND_MODES.COLOR_BURN]="source-over",t[n.BLEND_MODES.HARD_LIGHT]="source-over",t[n.BLEND_MODES.SOFT_LIGHT]="source-over",t[n.BLEND_MODES.DIFFERENCE]="source-over",t[n.BLEND_MODES.EXCLUSION]="source-over",t[n.BLEND_MODES.HUE]="source-over",t[n.BLEND_MODES.SATURATION]="source-over",t[n.BLEND_MODES.COLOR]="source-over",t[n.BLEND_MODES.LUMINOSITY]="source-over"),t}var n=t("../../../const"),s=t("./canUseNewCanvasBlendModes");e.exports=i},{"../../../const":43,"./canUseNewCanvasBlendModes":77}],79:[function(t,e,r){function i(t){this.renderer=t,this.count=0,this.checkCount=0,this.maxIdle=3600,this.checkCountMax=600,this.mode=n.GC_MODES.DEFAULT}var n=t("../../const");i.prototype.constructor=i,e.exports=i,i.prototype.update=function(){this.count++,this.mode!==n.GC_MODES.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run()))},i.prototype.run=function(){var t,e,r=this.renderer.textureManager,i=r._managedTextures,n=!1;for(t=0;tthis.maxIdle&&(r.destroyTexture(s,!0),i[t]=null,n=!0)}if(n){for(e=0,t=0;t=0;r--)this.unload(t.children[r])}},{"../../const":43}],80:[function(t,e,r){var i=t("pixi-gl-core").GLTexture,n=t("../../const"),s=t("./utils/RenderTarget"),o=t("../../utils"),a=function(t){this.renderer=t,this.gl=t.gl,this._managedTextures=[]};a.prototype.bindTexture=function(){},a.prototype.getTexture=function(){},a.prototype.updateTexture=function(t){t=t.baseTexture||t;var e=!!t._glRenderTargets;if(t.hasLoaded){var r=t._glTextures[this.renderer.CONTEXT_UID];if(r)e?t._glRenderTargets[this.renderer.CONTEXT_UID].resize(t.width,t.height):r.upload(t.source);else{if(e){var o=new s(this.gl,t.width,t.height,t.scaleMode,t.resolution);o.resize(t.width,t.height),t._glRenderTargets[this.renderer.CONTEXT_UID]=o,r=o.texture}else r=new i(this.gl),r.premultiplyAlpha=!0,r.upload(t.source);t._glTextures[this.renderer.CONTEXT_UID]=r,t.on("update",this.updateTexture,this),t.on("dispose",this.destroyTexture,this),this._managedTextures.push(t),t.isPowerOfTwo?(t.mipmap&&r.enableMipmap(),t.wrapMode===n.WRAP_MODES.CLAMP?r.enableWrapClamp():t.wrapMode===n.WRAP_MODES.REPEAT?r.enableWrapRepeat():r.enableWrapMirrorRepeat()):r.enableWrapClamp(),t.scaleMode===n.SCALE_MODES.NEAREST?r.enableNearestScaling():r.enableLinearScaling()}return r}},a.prototype.destroyTexture=function(t,e){if(t=t.baseTexture||t,t.hasLoaded&&t._glTextures[this.renderer.CONTEXT_UID]&&(t._glTextures[this.renderer.CONTEXT_UID].destroy(),t.off("update",this.updateTexture,this),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.renderer.CONTEXT_UID],!e)){var r=this._managedTextures.indexOf(t);r!==-1&&o.removeItems(this._managedTextures,r,1)}},a.prototype.removeAll=function(){for(var t=0;t 0.5)"," {"," color = vec4(1.0, 0.0, 0.0, 1.0);"," }"," else"," {"," color = vec4(0.0, 1.0, 0.0, 1.0);"," }"," gl_FragColor = mix(sample, masky, 0.5);"," gl_FragColor *= sample.a;","}"].join("\n")},{"../../../const":43,"../../../utils":116,"./extractUniformsFromSrc":84}],84:[function(t,e,r){function i(t,e,r){var i=n(t,r),s=n(e,r);return Object.assign(i,s)}function n(t){for(var e,r=new RegExp("^(projectionMatrix|uSampler|filterArea)$"),i={},n=t.replace(/\s+/g," ").split(/\s*;\s*/),o=0;o-1){var h=a.split(" "),u=h[1],l=h[2],c=1;l.indexOf("[")>-1&&(e=l.split(/\[|\]/),l=e[0],c*=Number(e[1])),l.match(r)||(i[l]={value:s(u,c),name:l,type:u})}}return i}var s=t("pixi-gl-core").shader.defaultValue;e.exports=i},{"pixi-gl-core":12}],85:[function(t,e,r){var i=t("../../../math"),n=function(t,e,r){var i=t.identity();return i.translate(e.x/r.width,e.y/r.height),i.scale(r.width,r.height),i},s=function(t,e,r){var i=t.identity();i.translate(e.x/r.width,e.y/r.height);var n=r.width/e.width,s=r.height/e.height;return i.scale(n,s),i},o=function(t,e,r,n){var s=n.worldTransform.copy(i.Matrix.TEMP_MATRIX),o=n._texture.baseTexture,a=t.identity(),h=r.height/r.width;a.translate(e.x/r.width,e.y/r.height),a.scale(1,h);var u=r.width/o.width,l=r.height/o.height;return s.tx/=o.width*u,s.ty/=o.width*u,s.invert(),a.prepend(s),a.scale(1,1/h),a.scale(u,l),a.translate(n.anchor.x,n.anchor.y),a};e.exports={calculateScreenSpaceMatrix:n,calculateNormalizedScreenSpaceMatrix:s,calculateSpriteMatrix:o}},{"../../../math":67}],86:[function(t,e,r){function i(t){var e=new s.Matrix;n.call(this,"#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n","#define GLSLIFY 1\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform sampler2D mask;\n\nvoid main(void)\n{\n // check clip! this will stop the mask bleeding out from the edges\n vec2 text = abs( vMaskCoord - 0.5 );\n text = step(0.5, text);\n float clip = 1.0 - max(text.y, text.x);\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 masky = texture2D(mask, vMaskCoord);\n original *= (masky.r * masky.a * alpha * clip);\n gl_FragColor = original;\n}\n"),t.renderable=!1,this.maskSprite=t,this.maskMatrix=e}var n=t("../Filter"),s=t("../../../../math");i.prototype=Object.create(n.prototype),i.prototype.constructor=i,e.exports=i,i.prototype.apply=function(t,e,r){var i=this.maskSprite;this.uniforms.mask=i._texture,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,i),this.uniforms.alpha=i.worldAlpha,t.applyFilter(this,e,r)}},{"../../../../math":67,"../Filter":83}],87:[function(t,e,r){function i(t){n.call(this,t),this.gl=this.renderer.gl,this.quad=new o(this.gl,t.state.attribState),this.shaderCache={},this.pool={},this.filterData=null}var n=t("./WebGLManager"),s=t("../utils/RenderTarget"),o=t("../utils/Quad"),a=t("../../../math"),h=t("../../../Shader"),u=t("../filters/filterTransforms"),l=t("bit-twiddle"),c=function(){this.renderTarget=null,this.sourceFrame=new a.Rectangle,this.destinationFrame=new a.Rectangle,this.filters=[],this.target=null,this.resolution=1};i.prototype=Object.create(n.prototype),i.prototype.constructor=i,e.exports=i,i.prototype.pushFilter=function(t,e){var r=this.renderer,i=this.filterData;if(!i){i=this.renderer._activeRenderTarget.filterStack;var n=new c;n.sourceFrame=n.destinationFrame=this.renderer._activeRenderTarget.size,n.renderTarget=r._activeRenderTarget,this.renderer._activeRenderTarget.filterData=i={index:0,stack:[n]},this.filterData=i}var s=i.stack[++i.index];s||(s=i.stack[i.index]=new c);var o=e[0].resolution,a=e[0].padding,h=t.filterArea||t.getBounds(!0),u=s.sourceFrame,l=s.destinationFrame;u.x=(h.x*o|0)/o,u.y=(h.y*o|0)/o,u.width=(h.width*o|0)/o,u.height=(h.height*o|0)/o,i.stack[0].renderTarget.transform||u.fit(i.stack[0].destinationFrame),u.pad(a),l.width=u.width,l.height=u.height;var d=this.getPotRenderTarget(r.gl,u.width,u.height,o);s.target=t,s.filters=e,s.resolution=o,s.renderTarget=d,d.setFrame(l,u),r.bindRenderTarget(d),r.clear()},i.prototype.popFilter=function(){var t=this.filterData,e=t.stack[t.index-1],r=t.stack[t.index];this.quad.map(r.renderTarget.size,r.sourceFrame).upload();var i=r.filters;if(1===i.length)i[0].apply(this,r.renderTarget,e.renderTarget,!1),this.freePotRenderTarget(r.renderTarget);else{var n=r.renderTarget,s=this.getPotRenderTarget(this.renderer.gl,r.sourceFrame.width,r.sourceFrame.height,1);s.setFrame(r.destinationFrame,r.sourceFrame);for(var o=0;o0&&(e+="\nelse "),r>16)+(65280&t)+((255&t)<<16)}},texture:{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,this.cachedTint=16777215,this._textureID=-1,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}}),i.prototype._onTextureUpdate=function(){this._textureID=-1,this._width&&(this.scale.x=a.sign(this.scale.x)*this._width/this.texture.orig.width),this._height&&(this.scale.y=a.sign(this.scale.y)*this._height/this.texture.orig.height)},i.prototype.onAnchorUpdate=function(){this._transformID=-1},i.prototype.calculateVertices=function(){if(this._transformID!==this.transform._worldID||this._textureID!==this._texture._updateID){this._transformID=this.transform._worldID,this._textureID=this._texture._updateID;var t,e,r,i,n=this._texture,s=this.transform.worldTransform,o=s.a,a=s.b,h=s.c,u=s.d,l=s.tx,c=s.ty,d=this.vertexData,p=n.trim,f=n.orig;p?(e=p.x-this.anchor._x*f.width,t=e+p.width,i=p.y-this.anchor._y*f.height,r=i+p.height):(t=f.width*(1-this.anchor._x),e=f.width*-this.anchor._x,r=f.height*(1-this.anchor._y),i=f.height*-this.anchor._y),d[0]=o*e+h*i+l,d[1]=u*i+a*e+c,d[2]=o*t+h*i+l,d[3]=u*i+a*t+c,d[4]=o*t+h*r+l,d[5]=u*r+a*t+c,d[6]=o*e+h*r+l,d[7]=u*r+a*e+c}},i.prototype.calculateTrimmedVertices=function(){this.vertexTrimmedData||(this.vertexTrimmedData=new Float32Array(8));var t,e,r,i,n=this._texture,s=this.vertexTrimmedData,o=n.orig,a=this.transform.worldTransform,h=a.a,u=a.b,l=a.c,c=a.d,d=a.tx,p=a.ty;t=o.width*(1-this.anchor._x),e=o.width*-this.anchor._x,r=o.height*(1-this.anchor._y),i=o.height*-this.anchor._y,s[0]=h*e+l*i+d,s[1]=c*i+u*e+p,s[2]=h*t+l*i+d,s[3]=c*i+u*t+p,s[4]=h*t+l*r+d,s[5]=c*r+u*t+p,s[6]=h*e+l*r+d,s[7]=c*r+u*e+p},i.prototype._renderWebGL=function(t){this.calculateVertices(),t.setObjectRenderer(t.plugins.sprite),t.plugins.sprite.render(this)},i.prototype._renderCanvas=function(t){t.plugins.sprite.render(this)},i.prototype._calculateBounds=function(){var t=this._texture.trim,e=this._texture.orig;!t||t.width===e.width&&t.height===e.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},i.prototype.getLocalBounds=function(t){return 0===this.children.length?(this._bounds.minX=-this._texture.orig.width*this.anchor._x,this._bounds.minY=-this._texture.orig.height*this.anchor._y,this._bounds.maxX=this._texture.orig.width,this._bounds.maxY=this._texture.orig.height,t||(this._localBoundsRect||(this._localBoundsRect=new n.Rectangle),t=this._localBoundsRect),this._bounds.getRectangle(t)):o.prototype.getLocalBounds.call(this,t)},i.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,u);var e,r=this._texture.orig.width,i=this._texture.orig.height,n=-r*this.anchor.x;return u.x>n&&u.xe&&u.y=this.size&&this.flush(),t.texture._uvs&&(this.sprites[this.currentIndex++]=t)},i.prototype.flush=function(){if(0!==this.currentIndex){var t,e,r,i,n,s,o,h=this.renderer.gl,u=d.nextPow2(this.currentIndex),l=d.log2(u),f=this.buffers[l],v=this.sprites,g=this.groups,y=f.float32View,x=f.uint32View,m=0,_=1,b=0,T=g[0],E=v[0].blendMode;T.textureCount=0,T.start=0,T.blend=E,p++;for(var w=0;w0&&(e+="\nelse "),r0?(this.context.shadowColor=e.dropShadowColor,this.context.shadowBlur=e.dropShadowBlur):this.context.fillStyle=e.dropShadowColor;var v=Math.cos(e.dropShadowAngle)*e.dropShadowDistance,g=Math.sin(e.dropShadowAngle)*e.dropShadowDistance;for(i=0;io;h--){for(u=0;ui)for(var u=o[a].split(""),l=0;ls?(e+="\n"+u[l],s=i-c):(0===l&&(e+=" "),e+=u[l],s-=c)}else{var d=h+this.context.measureText(" ").width;0===a||d>s?(a>0&&(e+="\n"),e+=o[a],s=i-h):(s-=d,e+=" "+o[a])}}n0&&e>0,this.width=t,this.height=e,this.realWidth=this.width*this.resolution,this.realHeight=this.height*this.resolution,this.valid&&this.emit("update",this))},i.prototype.destroy=function(){n.prototype.destroy.call(this,!0),this.renderer=null}},{"../const":43,"./BaseTexture":107}],107:[function(t,e,r){function i(t,e,r){o.call(this), +this.uid=n.uid(),this.touched=0,this.resolution=r||s.RESOLUTION,this.width=100,this.height=100,this.realWidth=100,this.realHeight=100,this.scaleMode=e||s.SCALE_MODES.DEFAULT,this.hasLoaded=!1,this.isLoading=!1,this.source=null,this.premultipliedAlpha=!0,this.imageUrl=null,this.isPowerOfTwo=!1,this.mipmap=s.MIPMAP_TEXTURES,this.wrapMode=s.WRAP_MODES.DEFAULT,this._glTextures=[],this._enabled=0,this._id=0,t&&this.loadSource(t)}var n=t("../utils"),s=t("../const"),o=t("eventemitter3"),a=t("../utils/determineCrossOrigin"),h=t("bit-twiddle");i.prototype=Object.create(o.prototype),i.prototype.constructor=i,e.exports=i,i.prototype.update=function(){this.realWidth=this.source.naturalWidth||this.source.videoWidth||this.source.width,this.realHeight=this.source.naturalHeight||this.source.videoHeight||this.source.height,this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=h.isPow2(this.realWidth)&&h.isPow2(this.realHeight),this.emit("update",this)},i.prototype.loadSource=function(t){var e=this.isLoading;if(this.hasLoaded=!1,this.isLoading=!1,e&&this.source&&(this.source.onload=null,this.source.onerror=null),this.source=t,(this.source.complete||this.source.getContext)&&this.source.width&&this.source.height)this._sourceLoaded();else if(!t.getContext){this.isLoading=!0;var r=this;t.onload=function(){t.onload=null,t.onerror=null,r.isLoading&&(r.isLoading=!1,r._sourceLoaded(),r.emit("loaded",r))},t.onerror=function(){t.onload=null,t.onerror=null,r.isLoading&&(r.isLoading=!1,r.emit("error",r))},t.complete&&t.src&&(this.isLoading=!1,t.onload=null,t.onerror=null,t.width&&t.height?(this._sourceLoaded(),e&&this.emit("loaded",this)):e&&this.emit("error",this))}},i.prototype._sourceLoaded=function(){this.hasLoaded=!0,this.update()},i.prototype.destroy=function(){this.imageUrl?(delete n.BaseTextureCache[this.imageUrl],delete n.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")):this.source&&this.source._pixiId&&delete n.BaseTextureCache[this.source._pixiId],this.source=null,this.dispose()},i.prototype.dispose=function(){this.emit("dispose",this)},i.prototype.updateSourceImage=function(t){this.source.src=t,this.loadSource(this.source)},i.fromImage=function(t,e,r){var s=n.BaseTextureCache[t];if(!s){var o=new Image;void 0===e&&0!==t.indexOf("data:")&&(o.crossOrigin=a(t)),s=new i(o,r),s.imageUrl=t,o.src=t,n.BaseTextureCache[t]=s,s.resolution=n.getResolutionOfUrl(t)}return s},i.fromCanvas=function(t,e){t._pixiId||(t._pixiId="canvas_"+n.uid());var r=n.BaseTextureCache[t._pixiId];return r||(r=new i(t,e),n.BaseTextureCache[t._pixiId]=r),r}},{"../const":43,"../utils":116,"../utils/determineCrossOrigin":115,"bit-twiddle":1,eventemitter3:3}],108:[function(t,e,r){function i(t,e){if(this.legacyRenderer=null,!(t instanceof n)){var r=arguments[1],i=arguments[2],o=arguments[3]||0,a=arguments[4]||1;console.warn("v4 RenderTexture now expects a new BaseRenderTexture. Please use RenderTexture.create("+r+", "+i+")"),this.legacyRenderer=arguments[0],e=null,t=new n(r,i,o,a)}s.call(this,t,e),this.valid=!0,this._updateUvs()}var n=t("./BaseRenderTexture"),s=t("./Texture");i.prototype=Object.create(s.prototype),i.prototype.constructor=i,e.exports=i,i.prototype.resize=function(t,e,r){this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,r||this.baseTexture.resize(t,e),this._updateUvs()},i.create=function(t,e,r,s){return new i(new n(t,e,r,s))}},{"./BaseRenderTexture":106,"./Texture":109}],109:[function(t,e,r){function i(t,e,r,n,s){if(a.call(this),this.noFrame=!1,e||(this.noFrame=!0,e=new h.Rectangle(0,0,1,1)),t instanceof i&&(t=t.baseTexture),this.baseTexture=t,this._frame=e,this.trim=n,this.valid=!1,this.requiresUpdate=!1,this._uvs=null,this.orig=r||e,this._rotate=+(s||0),s===!0)this._rotate=2;else if(this._rotate%2!==0)throw"attempt to use diamond-shaped UVs. If you are sure, set rotation manually";t.hasLoaded?(this.noFrame&&(e=new h.Rectangle(0,0,t.width,t.height),t.on("update",this.onBaseTextureUpdated,this)),this.frame=e):t.once("loaded",this.onBaseTextureLoaded,this),this._updateID=0}var n=t("./BaseTexture"),s=t("./VideoBaseTexture"),o=t("./TextureUvs"),a=t("eventemitter3"),h=t("../math"),u=t("../utils");i.prototype=Object.create(a.prototype),i.prototype.constructor=i,e.exports=i,Object.defineProperties(i.prototype,{frame:{get:function(){return this._frame},set:function(t){if(this._frame=t,this.noFrame=!1,t.x+t.width>this.baseTexture.width||t.y+t.height>this.baseTexture.height)throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this);this.valid=t&&t.width&&t.height&&this.baseTexture.hasLoaded,this.trim||this.rotate||(this.orig=t),this.valid&&this._updateUvs()}},rotate:{get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this._updateUvs()}},width:{get:function(){return this.orig?this.orig.width:0}},height:{get:function(){return this.orig?this.orig.height:0}}}),i.prototype.update=function(){this.baseTexture.update()},i.prototype.onBaseTextureLoaded=function(t){this._updateID++,this.noFrame?this.frame=new h.Rectangle(0,0,t.width,t.height):this.frame=this._frame,this.baseTexture.on("update",this.onBaseTextureUpdated,this),this.emit("update",this)},i.prototype.onBaseTextureUpdated=function(t){this._updateID++,this._frame.width=t.width,this._frame.height=t.height,this.emit("update",this)},i.prototype.destroy=function(t){this.baseTexture&&(t&&(u.TextureCache[this.baseTexture.imageUrl]&&delete u.TextureCache[this.baseTexture.imageUrl],this.baseTexture.destroy()),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture.off("loaded",this.onBaseTextureLoaded,this),this.baseTexture=null),this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,this.off("dispose",this.dispose,this),this.off("update",this.update,this)},i.prototype.clone=function(){return new i(this.baseTexture,this.frame,this.orig,this.trim,this.rotate)},i.prototype._updateUvs=function(){this._uvs||(this._uvs=new o),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},i.fromImage=function(t,e,r){var s=u.TextureCache[t];return s||(s=new i(n.fromImage(t,e,r)),u.TextureCache[t]=s),s},i.fromFrame=function(t){var e=u.TextureCache[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return e},i.fromCanvas=function(t,e){return new i(n.fromCanvas(t,e))},i.fromVideo=function(t,e){return"string"==typeof t?i.fromVideoUrl(t,e):new i(s.fromVideo(t,e))},i.fromVideoUrl=function(t,e){return new i(s.fromUrl(t,e))},i.from=function(t){if("string"==typeof t){var e=u.TextureCache[t];if(!e){var r=null!==t.match(/\.(mp4|webm|ogg|h264|avi|mov)$/);return r?i.fromVideoUrl(t):i.fromImage(t)}return e}return t instanceof HTMLCanvasElement?i.fromCanvas(t):t instanceof HTMLVideoElement?i.fromVideo(t):t instanceof n?new i(n):t},i.addTextureToCache=function(t,e){u.TextureCache[e]=t},i.removeTextureFromCache=function(t){var e=u.TextureCache[t];return delete u.TextureCache[t],delete u.BaseTextureCache[t],e},i.EMPTY=new i(new n),i.EMPTY.destroy=function(){},i.EMPTY.on=function(){},i.EMPTY.once=function(){},i.EMPTY.emit=function(){}},{"../math":67,"../utils":116,"./BaseTexture":107,"./TextureUvs":110,"./VideoBaseTexture":111,eventemitter3:3}],110:[function(t,e,r){function i(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsUint32=new Uint32Array(4)}e.exports=i;var n=t("../math/GroupD8");i.prototype.set=function(t,e,r){var i=e.width,s=e.height;if(r){var o=t.width/2/i,a=t.height/2/s,h=t.x/i+o,u=t.y/s+a;r=n.add(r,n.NW),this.x0=h+o*n.uX(r),this.y0=u+a*n.uY(r),r=n.add(r,2),this.x1=h+o*n.uX(r),this.y1=u+a*n.uY(r),r=n.add(r,2),this.x2=h+o*n.uX(r),this.y2=u+a*n.uY(r),r=n.add(r,2),this.x3=h+o*n.uX(r),this.y3=u+a*n.uY(r)}else this.x0=t.x/i,this.y0=t.y/s,this.x1=(t.x+t.width)/i,this.y1=t.y/s,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/s,this.x3=t.x/i,this.y3=(t.y+t.height)/s;this.uvsUint32[0]=(65535*this.y0&65535)<<16|65535*this.x0&65535,this.uvsUint32[1]=(65535*this.y1&65535)<<16|65535*this.x1&65535,this.uvsUint32[2]=(65535*this.y2&65535)<<16|65535*this.x2&65535,this.uvsUint32[3]=(65535*this.y3&65535)<<16|65535*this.x3&65535}},{"../math/GroupD8":63}],111:[function(t,e,r){function i(t,e){if(!t)throw new Error("No video source element specified.");(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),s.call(this,t,e),this.autoUpdate=!1,this._onUpdate=this._onUpdate.bind(this),this._onCanPlay=this._onCanPlay.bind(this),t.complete||(t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlay),t.addEventListener("play",this._onPlayStart.bind(this)),t.addEventListener("pause",this._onPlayStop.bind(this))),this.__loaded=!1}function n(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var r=document.createElement("source");return r.src=t,r.type=e,r}var s=t("./BaseTexture"),o=t("../utils");i.prototype=Object.create(s.prototype),i.prototype.constructor=i,e.exports=i,i.prototype._onUpdate=function(){this.autoUpdate&&(window.requestAnimationFrame(this._onUpdate),this.update())},i.prototype._onPlayStart=function(){this.hasLoaded||this._onCanPlay(),this.autoUpdate||(window.requestAnimationFrame(this._onUpdate),this.autoUpdate=!0)},i.prototype._onPlayStop=function(){this.autoUpdate=!1},i.prototype._onCanPlay=function(){this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.source.play(),this.__loaded||(this.__loaded=!0,this.emit("loaded",this)))},i.prototype.destroy=function(){this.source&&this.source._pixiId&&(delete o.BaseTextureCache[this.source._pixiId],delete this.source._pixiId),s.prototype.destroy.call(this)},i.fromVideo=function(t,e){t._pixiId||(t._pixiId="video_"+o.uid());var r=o.BaseTextureCache[t._pixiId];return r||(r=new i(t,e),o.BaseTextureCache[t._pixiId]=r),r},i.fromUrl=function(t,e){var r=document.createElement("video");if(Array.isArray(t))for(var s=0;sthis.lastTime?(e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*n.TARGET_FPMS*this.speed,this._emitter.emit(o,this.deltaTime)):this.deltaTime=this.elapsedMS=0,this.lastTime=t},e.exports=i},{"../const":43,eventemitter3:3}],113:[function(t,e,r){var i=t("./Ticker"),n=new i;n.autoStart=!0,e.exports={shared:n,Ticker:i}},{"./Ticker":112}],114:[function(t,e,r){var i=function(t){for(var e=6*t,r=new Uint16Array(e),i=0,n=0;i>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},hex2string:function(t){return t=t.toString(16),t="000000".substr(0,6-t.length)+t,"#"+t},rgb2hex:function(t){return(255*t[0]<<16)+(255*t[1]<<8)+255*t[2]},getResolutionOfUrl:function(t){var e=i.RETINA_PREFIX.exec(t);return e?parseFloat(e[1]):1},sayHello:function(t){if(!n._saidHello){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c Pixi.js "+i.VERSION+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console&&window.console.log("Pixi.js "+i.VERSION+" - "+t+" - http://www.pixijs.com/");n._saidHello=!0}},isWebGLSupported:function(){var t={stencil:!0,failIfMajorPerformanceCaveat:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),i=!(!r||!r.getContextAttributes().stencil);if(r){var n=r.getExtension("WEBGL_lose_context");n&&n.loseContext()}return r=null,i}catch(t){return!1}},sign:function(t){return t?t<0?-1:1:0},removeItems:function(t,e,r){var i=t.length;if(!(e>=i||0===r)){r=e+r>i?i-e:r;for(var n=e,s=i-r;n1?this._fontStyle="italic":t.indexOf("oblique")>-1?this._fontStyle="oblique":this._fontStyle="normal",t.indexOf("small-caps")>-1?this._fontVariant="small-caps":this._fontVariant="normal";var e,r=t.split(" "),i=-1;for(this._fontSize=26,e=0;e-1&&i=0?t:16777215,this.dirty=!0}},align:{get:function(){return this._font.align},set:function(t){this._font.align=t||"left",this.dirty=!0}},anchor:{get:function(){return this._anchor},set:function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copy(t)}},font:{get:function(){return this._font},set:function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):i.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)}},text:{get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}}}),i.prototype.updateText=function(){for(var t=i.fonts[this._font.name],e=new n.Point,r=null,s=[],o=0,a=0,h=[],u=0,l=this._font.size/t.size,c=-1,d=0,p=0,f=0;f0&&e.x*l>this.maxWidth)n.utils.removeItems(s,c,f-c),f=c,c=-1,h.push(d),a=Math.max(a,d),u++,e.x=0,e.y+=t.lineHeight,r=null;else{var g=t.chars[v];g&&(r&&g.kerning[r]&&(e.x+=g.kerning[r]),s.push({texture:g.texture,line:u,charCode:v,position:new n.Point(e.x+g.xOffset,e.y+g.yOffset)}),o=e.x+(g.texture.width+g.xOffset),e.x+=g.xAdvance,p=Math.max(p,g.yOffset+g.texture.height),r=v)}}h.push(o),a=Math.max(a,o);var y=[];for(f=0;f<=u;f++){var x=0;"right"===this._font.align?x=a-h[f]:"center"===this._font.align&&(x=(a-h[f])/2),y.push(x)}var m=s.length,_=this.tint;for(f=0;f=this._durations[this.currentFrame];)r-=this._durations[this.currentFrame]*i,this._currentTime+=i;this._currentTime+=r/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):(this._texture=this._textures[this.currentFrame],this._textureID=-1)},i.prototype.destroy=function(){this.stop(),n.Sprite.prototype.destroy.call(this)},i.fromFrames=function(t){for(var e=[],r=0;re?m:e,e=b>e?b:e,e=E>e?E:e,i=x,i=_>i?_:i,i=T>i?T:i,i=w>i?w:i;var S=this._bounds;return S.x=t,S.width=e-t,S.y=r,S.height=i-r,this._currentBounds=S,S},i.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,s);var e,r=this._width,i=this._height,n=-r*this.anchor.x;return s.x>n&&s.xe&&s.y=s&&(e=t-u-1),l=l.replace("%value%",r[e]),a+=l,a+="\n"}return o=o.replace("%blur%",a),o=o.replace("%size%",t)};e.exports=s},{}],135:[function(t,e,r){var i=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform float strength;","uniform mat3 projectionMatrix;","varying vec2 vBlurTexCoords[%size%];","void main(void)","{","gl_Position = vec4((projectionMatrix * vec3((aVertexPosition), 1.0)).xy, 0.0, 1.0);","%blur%","}"].join("\n"),n=function(t,e){var r,n,s=Math.ceil(t/2),o=i,a="";r=e?"vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);";for(var h=0;h=s&&(n=t-h-1),u=u.replace("%sampleIndex%",h-(s-1)+".0"),a+=u,a+="\n"}return o=o.replace("%blur%",a),o=o.replace("%size%",t)};e.exports=n},{}],136:[function(t,e,r){var i=function(t){for(var e=t.getParameter(t.MAX_VARYING_VECTORS),r=15;r>e;)r-=2;return r};e.exports=i},{}],137:[function(t,e,r){function i(){n.Filter.call(this,"#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","#define GLSLIFY 1\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\n\nvoid main(void)\n{\n\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n gl_FragColor.r = (m[0] * c.r);\n gl_FragColor.r += (m[1] * c.g);\n gl_FragColor.r += (m[2] * c.b);\n gl_FragColor.r += (m[3] * c.a);\n gl_FragColor.r += m[4] * c.a;\n\n gl_FragColor.g = (m[5] * c.r);\n gl_FragColor.g += (m[6] * c.g);\n gl_FragColor.g += (m[7] * c.b);\n gl_FragColor.g += (m[8] * c.a);\n gl_FragColor.g += m[9] * c.a;\n\n gl_FragColor.b = (m[10] * c.r);\n gl_FragColor.b += (m[11] * c.g);\n gl_FragColor.b += (m[12] * c.b);\n gl_FragColor.b += (m[13] * c.a);\n gl_FragColor.b += m[14] * c.a;\n\n gl_FragColor.a = (m[15] * c.r);\n gl_FragColor.a += (m[16] * c.g);\n gl_FragColor.a += (m[17] * c.b);\n gl_FragColor.a += (m[18] * c.a);\n gl_FragColor.a += m[19] * c.a;\n\n// gl_FragColor = vec4(m[0]);\n}\n"),this.uniforms.m=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]}var n=t("../../core");i.prototype=Object.create(n.Filter.prototype),i.prototype.constructor=i,e.exports=i,i.prototype._loadMatrix=function(t,e){e=!!e;var r=t;e&&(this._multiply(r,this.uniforms.m,t),r=this._colorMatrix(r)),this.uniforms.m=r},i.prototype._multiply=function(t,e,r){return t[0]=e[0]*r[0]+e[1]*r[5]+e[2]*r[10]+e[3]*r[15],t[1]=e[0]*r[1]+e[1]*r[6]+e[2]*r[11]+e[3]*r[16],t[2]=e[0]*r[2]+e[1]*r[7]+e[2]*r[12]+e[3]*r[17],t[3]=e[0]*r[3]+e[1]*r[8]+e[2]*r[13]+e[3]*r[18],t[4]=e[0]*r[4]+e[1]*r[9]+e[2]*r[14]+e[3]*r[19],t[5]=e[5]*r[0]+e[6]*r[5]+e[7]*r[10]+e[8]*r[15],t[6]=e[5]*r[1]+e[6]*r[6]+e[7]*r[11]+e[8]*r[16],t[7]=e[5]*r[2]+e[6]*r[7]+e[7]*r[12]+e[8]*r[17],t[8]=e[5]*r[3]+e[6]*r[8]+e[7]*r[13]+e[8]*r[18],t[9]=e[5]*r[4]+e[6]*r[9]+e[7]*r[14]+e[8]*r[19],t[10]=e[10]*r[0]+e[11]*r[5]+e[12]*r[10]+e[13]*r[15],t[11]=e[10]*r[1]+e[11]*r[6]+e[12]*r[11]+e[13]*r[16],t[12]=e[10]*r[2]+e[11]*r[7]+e[12]*r[12]+e[13]*r[17],t[13]=e[10]*r[3]+e[11]*r[8]+e[12]*r[13]+e[13]*r[18],t[14]=e[10]*r[4]+e[11]*r[9]+e[12]*r[14]+e[13]*r[19],t[15]=e[15]*r[0]+e[16]*r[5]+e[17]*r[10]+e[18]*r[15],t[16]=e[15]*r[1]+e[16]*r[6]+e[17]*r[11]+e[18]*r[16],t[17]=e[15]*r[2]+e[16]*r[7]+e[17]*r[12]+e[18]*r[17],t[18]=e[15]*r[3]+e[16]*r[8]+e[17]*r[13]+e[18]*r[18],t[19]=e[15]*r[4]+e[16]*r[9]+e[17]*r[14]+e[18]*r[19],t},i.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},i.prototype.brightness=function(t,e){var r=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},i.prototype.greyscale=function(t,e){var r=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},i.prototype.grayscale=i.prototype.greyscale,i.prototype.blackAndWhite=function(t){var e=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(e,t)},i.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var r=Math.cos(t),i=Math.sin(t),n=Math.sqrt,s=1/3,o=n(s),a=r+(1-r)*s,h=s*(1-r)-o*i,u=s*(1-r)+o*i,l=s*(1-r)+o*i,c=r+s*(1-r),d=s*(1-r)-o*i,p=s*(1-r)-o*i,f=s*(1-r)+o*i,v=r+s*(1-r),g=[a,h,u,0,0,l,c,d,0,0,p,f,v,0,0,0,0,0,1,0];this._loadMatrix(g,e)},i.prototype.contrast=function(t,e){var r=(t||0)+1,i=-128*(r-1),n=[r,0,0,0,i,0,r,0,0,i,0,0,r,0,i,0,0,0,1,0];this._loadMatrix(n,e)},i.prototype.saturate=function(t,e){var r=2*(t||0)/3+1,i=(r-1)*-.5,n=[r,i,i,0,0,i,r,i,0,0,i,i,r,0,0,0,0,0,1,0];this._loadMatrix(n,e)},i.prototype.desaturate=function(){this.saturate(-1)},i.prototype.negative=function(t){var e=[0,1,1,0,0,1,0,1,0,0,1,1,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)},i.prototype.sepia=function(t){var e=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(e,t)},i.prototype.technicolor=function(t){var e=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(e,t)},i.prototype.polaroid=function(t){var e=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(e,t)},i.prototype.toBGR=function(t){var e=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)},i.prototype.kodachrome=function(t){var e=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(e,t)},i.prototype.browni=function(t){var e=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(e,t)},i.prototype.vintage=function(t){var e=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(e,t)},i.prototype.colorTone=function(t,e,r,i,n){t=t||.2,e=e||.15,r=r||16770432,i=i||3375104;var s=(r>>16&255)/255,o=(r>>8&255)/255,a=(255&r)/255,h=(i>>16&255)/255,u=(i>>8&255)/255,l=(255&i)/255,c=[.3,.59,.11,0,0,s,o,a,t,0,h,u,l,e,0,s-h,o-u,a-l,0,0];this._loadMatrix(c,n)},i.prototype.night=function(t,e){t=t||.1;var r=[t*-2,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},i.prototype.predator=function(t,e){var r=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(r,e)},i.prototype.lsd=function(t){var e=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(e,t)},i.prototype.reset=function(){var t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)},Object.defineProperties(i.prototype,{matrix:{get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t}}})},{"../../core":62}],138:[function(t,e,r){function i(t,e){var r=new n.Matrix;t.renderable=!1,n.Filter.call(this,"#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0) ).xy;\n vTextureCoord = aTextureCoord;\n}","#define GLSLIFY 1\nvarying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\n\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy *= scale;\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), filterClamp.xy, filterClamp.zw));\n}\n"),this.maskSprite=t,this.maskMatrix=r,this.uniforms.mapSampler=t.texture,this.uniforms.filterMatrix=r.toArray(!0),this.uniforms.scale={x:1,y:1},null!==e&&void 0!==e||(e=20),this.scale=new n.Point(e,e)}var n=t("../../core");i.prototype=Object.create(n.Filter.prototype),i.prototype.constructor=i,e.exports=i,i.prototype.apply=function(t,e,r){var i=1/r.destinationFrame.width*(r.size.width/e.size.width);this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x*i,this.uniforms.scale.y=this.scale.y*i,t.applyFilter(this,e,r)},Object.defineProperties(i.prototype,{map:{get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t}}})},{"../../core":62}],139:[function(t,e,r){function i(){n.Filter.call(this,"#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nuniform vec4 filterArea;\n\nvarying vec2 vTextureCoord;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvoid texcoords(vec2 fragCoord, vec2 resolution,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n vec2 inverseVP = 1.0 / resolution.xy;\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n\n vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n texcoords(fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}",'#define GLSLIFY 1\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n \n --\n \n From:\n https://github.com/mitsuhiko/webgl-meincraft\n \n Copyright (c) 2011 by Armin Ronacher.\n \n Some rights reserved.\n \n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n \n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n \n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n \n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n \n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 resolution,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n mediump vec2 inverseVP = vec2(1.0 / resolution.x, 1.0 / resolution.y);\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n \n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n \n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n \n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n \n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n \n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n \tvec2 fragCoord = vTextureCoord * filterArea.xy;\n\n \tvec4 color;\n\n color = fxaa(uSampler, fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n \tgl_FragColor = color;\n}\n')}var n=t("../../core");i.prototype=Object.create(n.Filter.prototype),i.prototype.constructor=i,e.exports=i},{"../../core":62}],140:[function(t,e,r){e.exports={FXAAFilter:t("./fxaa/FXAAFilter"),NoiseFilter:t("./noise/NoiseFilter"),DisplacementFilter:t("./displacement/DisplacementFilter"),BlurFilter:t("./blur/BlurFilter"),BlurXFilter:t("./blur/BlurXFilter"),BlurYFilter:t("./blur/BlurYFilter"),ColorMatrixFilter:t("./colormatrix/ColorMatrixFilter"),VoidFilter:t("./void/VoidFilter")}},{"./blur/BlurFilter":131,"./blur/BlurXFilter":132,"./blur/BlurYFilter":133,"./colormatrix/ColorMatrixFilter":137,"./displacement/DisplacementFilter":138,"./fxaa/FXAAFilter":139,"./noise/NoiseFilter":141,"./void/VoidFilter":142}],141:[function(t,e,r){function i(){n.Filter.call(this,"#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision highp float;\n#define GLSLIFY 1\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float noise;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n float diff = (rand(gl_FragCoord.xy) - 0.5) * noise;\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n gl_FragColor = color;\n}\n"),this.noise=.5}var n=t("../../core");i.prototype=Object.create(n.Filter.prototype),i.prototype.constructor=i,e.exports=i,Object.defineProperties(i.prototype,{noise:{get:function(){return this.uniforms.noise},set:function(t){this.uniforms.noise=t}}})},{"../../core":62}],142:[function(t,e,r){function i(){n.Filter.call(this,"#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","#define GLSLIFY 1\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n"),this.glShaderKey="void"}var n=t("../../core");i.prototype=Object.create(n.Filter.prototype),i.prototype.constructor=i,e.exports=i},{"../../core":62}],143:[function(t,e,r){function i(){this.global=new n.Point,this.target=null,this.originalEvent=null}var n=t("../core");i.prototype.constructor=i,e.exports=i,i.prototype.getLocalPosition=function(t,e,r){return t.worldTransform.applyInverse(r||this.global,e)}},{"../core":62}],144:[function(t,e,r){function i(t,e){o.call(this),e=e||{},this.renderer=t,this.autoPreventDefault=void 0===e.autoPreventDefault||e.autoPreventDefault,this.interactionFrequency=e.interactionFrequency||10,this.mouse=new s,this.mouse.global.set(-999999),this.eventData={stopped:!1,target:null,type:null,data:this.mouse,stopPropagation:function(){this.stopped=!0}},this.interactiveDataPool=[],this.interactionDOMElement=null,this.moveWhenInside=!1,this.eventsAdded=!1,this.onMouseUp=this.onMouseUp.bind(this),this.processMouseUp=this.processMouseUp.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.processMouseDown=this.processMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.processMouseMove=this.processMouseMove.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.processMouseOverOut=this.processMouseOverOut.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.processTouchStart=this.processTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.processTouchEnd=this.processTouchEnd.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.processTouchMove=this.processTouchMove.bind(this),this.defaultCursorStyle="inherit",this.currentCursorStyle="inherit",this._tempPoint=new n.Point,this.resolution=1,this.setTargetElement(this.renderer.view,this.renderer.resolution)}var n=t("../core"),s=t("./InteractionData"),o=t("eventemitter3");Object.assign(n.DisplayObject.prototype,t("./interactiveTarget")),i.prototype=Object.create(o.prototype),i.prototype.constructor=i,e.exports=i,i.prototype.setTargetElement=function(t,e){this.removeEvents(),this.interactionDOMElement=t,this.resolution=e||1,this.addEvents()},i.prototype.addEvents=function(){this.interactionDOMElement&&(n.ticker.shared.add(this.update,this),window.navigator.msPointerEnabled&&(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"),window.document.addEventListener("mousemove",this.onMouseMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onMouseDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onMouseOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onMouseOver,!0),this.interactionDOMElement.addEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.addEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.addEventListener("touchmove",this.onTouchMove,!0),window.addEventListener("mouseup",this.onMouseUp,!0),this.eventsAdded=!0)},i.prototype.removeEvents=function(){this.interactionDOMElement&&(n.ticker.shared.remove(this.update),window.navigator.msPointerEnabled&&(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""),window.document.removeEventListener("mousemove",this.onMouseMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onMouseDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onMouseOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onMouseOver,!0),this.interactionDOMElement.removeEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.removeEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onTouchMove,!0),this.interactionDOMElement=null,window.removeEventListener("mouseup",this.onMouseUp,!0),this.eventsAdded=!1)},i.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTime=0;h--){var u=a[h];if(this.processInteractive(t,u,r,i,o)){if(!u.parent)continue;s=!0,o=!1,i=!1}}return n&&(i&&!s&&(e.hitArea?(e.worldTransform.applyInverse(t,this._tempPoint),s=e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)):e.containsPoint&&(s=e.containsPoint(t))),e.interactive&&r(e,s)),s},i.prototype.onMouseDown=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.autoPreventDefault&&this.mouse.originalEvent.preventDefault(),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseDown,!0);var e=2===t.button||3===t.which;this.emit(e?"rightdown":"mousedown",this.eventData)},i.prototype.processMouseDown=function(t,e){var r=this.mouse.originalEvent,i=2===r.button||3===r.which;e&&(t[i?"_isRightDown":"_isLeftDown"]=!0,this.dispatchEvent(t,i?"rightdown":"mousedown",this.eventData))},i.prototype.onMouseUp=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseUp,!0);var e=2===t.button||3===t.which;this.emit(e?"rightup":"mouseup",this.eventData)},i.prototype.processMouseUp=function(t,e){var r=this.mouse.originalEvent,i=2===r.button||3===r.which,n=i?"_isRightDown":"_isLeftDown";e?(this.dispatchEvent(t,i?"rightup":"mouseup",this.eventData),t[n]&&(t[n]=!1,this.dispatchEvent(t,i?"rightclick":"click",this.eventData))):t[n]&&(t[n]=!1,this.dispatchEvent(t,i?"rightupoutside":"mouseupoutside",this.eventData))},i.prototype.onMouseMove=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.didMove=!0,this.cursor=this.defaultCursorStyle,this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseMove,!0),this.emit("mousemove",this.eventData),this.currentCursorStyle!==this.cursor&&(this.currentCursorStyle=this.cursor,this.interactionDOMElement.style.cursor=this.cursor)},i.prototype.processMouseMove=function(t,e){this.processMouseOverOut(t,e),this.moveWhenInside&&!e||this.dispatchEvent(t,"mousemove",this.eventData)},i.prototype.onMouseOut=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.interactionDOMElement.style.cursor=this.defaultCursorStyle,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseOverOut,!1),this.emit("mouseout",this.eventData)},i.prototype.processMouseOverOut=function(t,e){e?(t._over||(t._over=!0,this.dispatchEvent(t,"mouseover",this.eventData)),t.buttonMode&&(this.cursor=t.defaultCursor)):t._over&&(t._over=!1,this.dispatchEvent(t,"mouseout",this.eventData))},i.prototype.onMouseOver=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.emit("mouseover",this.eventData)},i.prototype.onTouchStart=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,r=e.length,i=0;i0){var T=this.canvasPadding/this.worldTransform.a,E=this.canvasPadding/this.worldTransform.d,w=(l+c+d)/3,S=(p+f+v)/3,C=l-w,R=p-S,M=Math.sqrt(C*C+R*R);l=w+C/M*(M+T),p=S+R/M*(M+E),C=c-w,R=f-S,M=Math.sqrt(C*C+R*R),c=w+C/M*(M+T),f=S+R/M*(M+E),C=d-w,R=v-S,M=Math.sqrt(C*C+R*R),d=w+C/M*(M+T),v=S+R/M*(M+E)}t.save(),t.beginPath(),t.moveTo(l,p),t.lineTo(c,f),t.lineTo(d,v),t.closePath(),t.clip();var A=g*_+m*x+y*b-_*x-m*y-g*b,O=l*_+m*d+c*b-_*d-m*c-l*b,D=g*c+l*x+y*d-c*x-l*y-g*d,P=g*_*d+m*c*x+l*y*b-l*_*x-m*y*d-g*c*b,I=p*_+m*v+f*b-_*v-m*f-p*b,L=g*f+p*x+y*v-f*x-p*y-g*v,F=g*_*v+m*f*x+p*y*b-p*_*x-m*y*v-g*f*b;t.transform(O/A,I/A,D/A,L/A,P/A,F/A),t.drawImage(a,0,0,h*o.resolution,u*o.resolution,0,0,h,u),t.restore()},i.prototype.renderMeshFlat=function(t){var e=this.context,r=t.vertices,i=r.length/2;e.beginPath();for(var n=1;n1&&(n=1),s=Math.sqrt(h*h+u*u),o=this._texture.height/2,h/=s,u/=s,h*=o,u*=o,l[i]=r.x+h,l[i+1]=r.y+u,l[i+2]=r.x-h,l[i+3]=r.y-u,a=r;this.containerUpdateTransform()}}},{"../core":62,"./Mesh":152}],156:[function(t,e,r){e.exports={Mesh:t("./Mesh"),Plane:t("./Plane"),NineSlicePlane:t("./NineSlicePlane"),Rope:t("./Rope"),MeshShader:t("./webgl/MeshShader")}},{"./Mesh":152,"./NineSlicePlane":153,"./Plane":154,"./Rope":155,"./webgl/MeshShader":157}],157:[function(t,e,r){function i(t){n.call(this,t,["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;","}"].join("\n"),["varying vec2 vTextureCoord;","uniform float alpha;","uniform vec3 tint;","uniform sampler2D uSampler;","void main(void){"," gl_FragColor = texture2D(uSampler, vTextureCoord) * vec4(tint * alpha, alpha);","}"].join("\n"))}var n=t("../../core/Shader");i.prototype=Object.create(n.prototype),i.prototype.constructor=i,e.exports=i},{"../../core/Shader":42}],158:[function(t,e,r){function i(t,e,r){n.Container.call(this),r=r||15e3,t=t||15e3;var i=16384;r>i&&(r=i),r>t&&(r=t),this._properties=[!1,!0,!1,!1,!1],this._maxSize=t,this._batchSize=r,this._glBuffers=[],this._bufferToUpdate=0,this.interactiveChildren=!1,this.blendMode=n.BLEND_MODES.NORMAL,this.roundPixels=!0,this.baseTexture=null,this.setProperties(e)}var n=t("../core");i.prototype=Object.create(n.Container.prototype),i.prototype.constructor=i,e.exports=i,i.prototype.setProperties=function(t){t&&(this._properties[0]="scale"in t?!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="alpha"in t?!!t.alpha:this._properties[4])},i.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},i.prototype.renderWebGL=function(t){this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.hasLoaded||this.baseTexture.once("update",function(){this.onChildrenChange(0)},this)),t.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},i.prototype.onChildrenChange=function(t){var e=Math.floor(t/this._batchSize);ei&&(r=i);var s=t._glBuffers[this.renderer.CONTEXT_UID];s||(s=t._glBuffers[this.renderer.CONTEXT_UID]=this.generateBuffers(t)),this.renderer.setBlendMode(t.blendMode);var o=this.renderer.gl,a=t.worldTransform.copy(this.tempMatrix);a.prepend(this.renderer._activeRenderTarget.projectionMatrix),this.shader.uniforms.projectionMatrix=a.toArray(!0),this.shader.uniforms.uAlpha=t.worldAlpha;var h=e[0]._texture.baseTexture;this.renderer.bindTexture(h);for(var u=0,l=0;un&&(c=n);var d=s[l];d.uploadDynamic(e,u,c),t._bufferToUpdate===l&&(d.uploadStatic(e,u,c),t._bufferToUpdate=l+1),d.vao.bind().draw(o.TRIANGLES,6*c).unbind()}}},i.prototype.generateBuffers=function(t){var e,r=this.renderer.gl,i=[],n=t._maxSize,s=t._batchSize,a=t._properties;for(e=0;e0?1:-1})},{}],164:[function(t,e,r){Object.assign||(Object.assign=t("object-assign"))},{"object-assign":5}],165:[function(t,e,r){t("./Object.assign"),t("./requestAnimationFrame"),t("./Math.sign"),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array)},{"./Math.sign":163,"./Object.assign":164,"./requestAnimationFrame":166}],166:[function(t,e,r){(function(t){if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!t.performance||!t.performance.now){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}for(var r=Date.now(),i=["ms","moz","webkit","o"],n=0;n0;){var r=this.queue[0],n=!1;for(t=0,e=this.uploadHooks.length;t=0;e--)this.add(t.children[e]);return this},i.prototype.destroy=function(){this.ticking&&u.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null},h.WebGLRenderer.registerPlugin("prepare",i)},{"../../core":62}],170:[function(t,e,r){(function(r){t("./polyfill");var i=e.exports=t("./core");i.extras=t("./extras"),i.filters=t("./filters"),i.interaction=t("./interaction"),i.loaders=t("./loaders"),i.mesh=t("./mesh"),i.particles=t("./particles"),i.accessibility=t("./accessibility"),i.extract=t("./extract"),i.prepare=t("./prepare"),i.loader=new i.loaders.Loader,Object.assign(i,t("./deprecation")),r.PIXI=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./accessibility":41,"./core":62,"./deprecation":119,"./extract":121,"./extras":129,"./filters":140,"./interaction":145,"./loaders":148,"./mesh":156,"./particles":159,"./polyfill":165,"./prepare":168}]},{},[170])(170)}); +//# sourceMappingURL=pixi.min.js.map diff --git a/App-Example/example/bunnymark/stats.min.js b/App-Example/example/bunnymark/stats.min.js new file mode 100644 index 00000000..73744ef7 --- /dev/null +++ b/App-Example/example/bunnymark/stats.min.js @@ -0,0 +1,6 @@ +// stats.js - http://github.com/mrdoob/stats.js +var Stats=function(){var l=Date.now(),m=l,g=0,n=Infinity,o=0,h=0,p=Infinity,q=0,r=0,s=0,f=document.createElement("div");f.id="stats";f.addEventListener("mousedown",function(b){b.preventDefault();t(++s%2)},!1);f.style.cssText="width:80px;opacity:0.9;cursor:pointer";var a=document.createElement("div");a.id="fps";a.style.cssText="padding:0 0 3px 3px;text-align:left;background-color:#002";f.appendChild(a);var i=document.createElement("div");i.id="fpsText";i.style.cssText="color:#0ff;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px"; +i.innerHTML="FPS";a.appendChild(i);var c=document.createElement("div");c.id="fpsGraph";c.style.cssText="position:relative;width:74px;height:30px;background-color:#0ff";for(a.appendChild(c);74>c.children.length;){var j=document.createElement("span");j.style.cssText="width:1px;height:30px;float:left;background-color:#113";c.appendChild(j)}var d=document.createElement("div");d.id="ms";d.style.cssText="padding:0 0 3px 3px;text-align:left;background-color:#020;display:none";f.appendChild(d);var k=document.createElement("div"); +k.id="msText";k.style.cssText="color:#0f0;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px";k.innerHTML="MS";d.appendChild(k);var e=document.createElement("div");e.id="msGraph";e.style.cssText="position:relative;width:74px;height:30px;background-color:#0f0";for(d.appendChild(e);74>e.children.length;)j=document.createElement("span"),j.style.cssText="width:1px;height:30px;float:left;background-color:#131",e.appendChild(j);var t=function(b){s=b;switch(s){case 0:a.style.display= +"block";d.style.display="none";break;case 1:a.style.display="none",d.style.display="block"}};return{REVISION:11,domElement:f,setMode:t,begin:function(){l=Date.now()},end:function(){var b=Date.now();g=b-l;n=Math.min(n,g);o=Math.max(o,g);k.textContent=g+" MS ("+n+"-"+o+")";var a=Math.min(30,30-30*(g/200));e.appendChild(e.firstChild).style.height=a+"px";r++;b>m+1E3&&(h=Math.round(1E3*r/(b-m)),p=Math.min(p,h),q=Math.max(q,h),i.textContent=h+" FPS ("+p+"-"+q+")",a=Math.min(30,30-30*(h/100)),c.appendChild(c.firstChild).style.height= +a+"px",m=b,r=0);return b},update:function(){l=this.end()}}}; diff --git a/App-Example/example/bunnymark/test.html b/App-Example/example/bunnymark/test.html new file mode 100644 index 00000000..be1d79c0 --- /dev/null +++ b/App-Example/example/bunnymark/test.html @@ -0,0 +1,54 @@ + + + + + + pixi.js bunnymark + + + + + + + + + + + + + + + + + + + + diff --git a/App-Example/example/e-ajax.js b/App-Example/example/e-ajax.js new file mode 100644 index 00000000..f01a718d --- /dev/null +++ b/App-Example/example/e-ajax.js @@ -0,0 +1,31 @@ +var testAjax = function(url, async) { + + var output = function() { + console.log("==== start ===="); + console.log(url, async, "\n", xhr.responseText); + console.log("==== end ===="); + }; + + var xhr = new XMLHttpRequest(); + if (async) { + xhr.onreadystatechange = function() { + if (xhr.readyState == 4) { + output(); + } + } + } + xhr.open("GET", url, async); + xhr.send(); + + if (!async) { + output(); + } + +}; + + +testAjax("http://www.apple.com", false); +testAjax("http://www.apple.com", true); + +testAjax("http://www.one-404-page-123.com:8000/abc", false); +testAjax("http://www.one-404-page-123.com:8000/cde", true); diff --git a/App-Example/example/e-alertView.js b/App-Example/example/e-alertView.js new file mode 100644 index 00000000..6eee573c --- /dev/null +++ b/App-Example/example/e-alertView.js @@ -0,0 +1,17 @@ +// The AlertView is not same to window.alert , it's non-block. + +"use strict"; + +// var alertView = new Ejecta.AlertView("title","message","cancelTitle"); +var alertView = new Ejecta.AlertView("title", "message", "cancelTitle", "b1Title", "b2Title"); + +alertView.addEventListener("click", function(buttonIndex) { + console.log("You click button: " + buttonIndex); +}); +alertView.addEventListener("dismiss", function(buttonIndex) { + console.log("You dismiss ALertView via button: " + buttonIndex); +}); +alertView.addEventListener("cancel", function() { + console.log("You cancel AlertView"); +}); +alertView.show(); diff --git a/App-Example/example/e-appUtils.js b/App-Example/example/e-appUtils.js new file mode 100644 index 00000000..fe5db85d --- /dev/null +++ b/App-Example/example/e-appUtils.js @@ -0,0 +1,26 @@ +"use strict"; + +var appUtils = new Ejecta.AppUtils(); +var resolution = new Ejecta.Resolution(); + + +console.log("version", appUtils.version); +console.log("build", appUtils.build); +console.log("uuid : " + appUtils.uuid); +console.log("udid : " + appUtils.udid); +console.log("systemVersion : " + appUtils.systemVersion); +// - , en zh ja fr +console.log("systemLocal : " + appUtils.systemLocal); + +console.log("index.js Exists : " + appUtils.fileExists("index.js")); + +console.log("dpi", resolution.dpi); + +//var fonts = appUtils.getAllFonts(); +var hasPingFang = appUtils.hasFontFamily("PingFang SC"); +var hasPingFangLight = appUtils.hasFont("PingFangSC-Light"); +console.log("hasPingFang", hasPingFang, hasPingFangLight); + + +appUtils.eval("function abc(){return 'eval >> app version : ' + appUtils.version;}"); +console.log(abc()); diff --git a/App-Example/example/e-download.js b/App-Example/example/e-download.js new file mode 100644 index 00000000..c8edf20b --- /dev/null +++ b/App-Example/example/e-download.js @@ -0,0 +1,37 @@ +"use strict"; + +//================================================== +// Init Extensions (In my fork version of Ejecta ). +//================================================== +var appUtils = new Ejecta.AppUtils(); + + +//================================================== +// Download an image. +//================================================== +function downloadEjectaLogo() { + var url = "http://impactjs.com/files/ejecta-logo.png"; + var destPath = "${Documents}/ejecta-logo.png"; + //The download function could download js file, then you could implement update-in-app. + appUtils.download(url, destPath, function(err, filePath) { + if (!err) { + console.log(" >> Download: " + filePath); + // Draw the image. + drawImageFile(destPath); + } + }); +} +downloadEjectaLogo(); + +function drawImageFile(imgPath) { + var img = new Image(); + img.src = imgPath; + img.onload = function() { + var w = img.width; + var h = img.height; + // Draw it at center of canvas. + if (typeof context != "undefined") { + context.drawImage(img, width - w >> 1, height - h >> 1); + } + } +} diff --git a/App-Example/example/e-encrypt.js b/App-Example/example/e-encrypt.js new file mode 100644 index 00000000..dc6993c2 --- /dev/null +++ b/App-Example/example/e-encrypt.js @@ -0,0 +1,16 @@ +"use strict"; + +var decryptor = new Ejecta.DecryptorXOR(); +decryptor.enable(); + +ejecta.include("example/encryption/encrypted-test-log.js"); + +(function() { + + var img = new Image(); + img.src = "example/encryption/encrypted-ejecta-logo.png"; + img.onload = function() { + context.drawImage(img, 100, 100); + } + +}()); diff --git a/App-Example/example/e-gamecenter.js b/App-Example/example/e-gamecenter.js new file mode 100644 index 00000000..2054f87f --- /dev/null +++ b/App-Example/example/e-gamecenter.js @@ -0,0 +1,46 @@ +var gameCenter = new Ejecta.GameCenter(); + +loginGameCenter(false, function() { + loadFriends(); + setTimeout(function() { + showGameCenter(); + }, 1000); +}); + + + +function isAuthedGameCenter() { + return gameCenter.authed; +} + +function loginGameCenter(soft, cb) { + var methodName = soft ? "softAuthenticate" : "authenticate"; + gameCenter[methodName](function() { + console.log("GameCenter authed: " + gameCenter.authed); + if (gameCenter.authed) { + var localPlayer = gameCenter.getLocalPlayerInfo(); + console.log("getLocalPlayerInfo: " + JSON.stringify(localPlayer)); + cb && cb(); + } + }); +} + +function showGameCenter() { + if (isAuthedGameCenter()) { + gameCenter.showGameCenter(); + } else { + console.log("GameCenter not authed! Try later."); + } +} + +function loadFriends() { + if (isAuthedGameCenter()) { + gameCenter.loadFriends(function(error, friends) { + if (error) { + console.log("error: ", error); + return; + } + console.log("loadFriends: " + JSON.stringify(friends)); + }); + } +} diff --git a/App-Example/example/e-gamepad.js b/App-Example/example/e-gamepad.js new file mode 100644 index 00000000..2b1012ba --- /dev/null +++ b/App-Example/example/e-gamepad.js @@ -0,0 +1,138 @@ +// The gamepad we draw below is about 1280px wide. We just +// scale the context so that it fills the actual screen width + +if (canvas.width < canvas.height) { + context.translate(0, canvas.height); + context.rotate(-Math.PI / 2); + width = canvas.height; + height = canvas.width; +} + +context.textAlign = 'left'; +context.font = '32px Helvetica'; +context.strokeStyle = '#222222'; +context.lineWidth = 2; + +console.log("canvas size : ", canvas.width, canvas.height) + +// var scale = width / 1280; +// console.log(scale); +// context.scale(scale, scale); + +var drawButton = function(button, x, y) { + context.fillRect(x - 24, y + 24 - 48 * button.value, 48, 48 * button.value); + + context.strokeStyle = button.pressed ? '#a30' : '#222'; + context.strokeRect(x - 24, y - 24, 48, 48); + context.strokeStyle = '#222'; +}; + +var drawAnalogStick = function(axisX, axisY, x, y) { + context.beginPath(); + context.arc(x, y, 64, 0, 2 * Math.PI); + context.stroke(); + + context.beginPath(); + context.arc(x + axisX * 48, y + axisY * 48, 16, 0, 2 * Math.PI); + context.fill(); +}; + +setInterval(function() { + context.fillStyle = '#ffffff'; + context.fillRect(0, 0, width, height); + + context.fillStyle = '#222222'; + + var tX = 32, + tY = canvas.height - 300; + var x = null, + y = null; + if (TouchInfo.start) { + x = TouchInfo.start.x; + y = TouchInfo.start.y; + context.fillText('Start: ' + x + " , " + y, tX, tY + 0); + } else { + context.fillText('Start: ', tX, tY + 0); + } + if (TouchInfo.move) { + x = TouchInfo.move.x; + y = TouchInfo.move.y; + context.fillText('Move: ' + x + " , " + y, tX, tY + 50); + } else { + context.fillText('Move: ', tX, tY + 50); + } + if (TouchInfo.end) { + var endX = TouchInfo.end.x; + var endY = TouchInfo.end.y; + context.fillText('End: ' + endX + " , " + endY, tX, tY + 50 * 2); + } else { + context.fillText('End: ', tX, tY + 50 * 2); + } + + context.fillText('Motion AG : ' + JSON.stringify(AccelerationGravityInfo), tX, tY + 50 * 3 + 30); + context.fillText('Motion A : ' + JSON.stringify(AccelerationInfo), tX, tY + 50 * 4 + 30); + // console.log(JSON.stringify(gamepad.motion)); + // console.log('Using Gamepad: #' + gamepad.index + ' (' + gamepad.id + ')'); + + context.fillStyle = "rgba(100,150,255,0.4)"; + context.beginPath(); + if (x !== null && y !== null) { + context.arc(x, y, 40, 0, 2 * Math.PI); + } else { + context.arc(width / 2, height / 2, 40, 0, 2 * Math.PI); + } + context.closePath(); + context.fill(); + context.fillStyle = '#222222'; + + var gamepads = navigator.getGamepads(); + + context.save(); + handleGamepad(gamepads[0], context, 30, 50); + context.restore(); + context.save(); + handleGamepad(gamepads[1], context, canvas.width / 2 + 30, canvas.height * 1 / 3 + 50); + context.restore(); + + +}, 16); + +function handleGamepad(gamepad, context, x, y) { + context.translate(x, y); + + if (!gamepad) { + context.fillText('No Gamepads connected', 32, 32); + // console.log('No Gamepads connected'); + // context.translate(-x, -y); + return; + } + + gamepad.allowsRotation = true; + gamepad.exitOnMenuPress = false; + context.fillText('Using Gamepad: #' + gamepad.index + ' (' + gamepad.id + ')', 32, 32); + + + // Button Mappings according to http://www.w3.org/TR/gamepad/#remapping + + drawButton(gamepad.buttons[0], 728, 354); // A + drawButton(gamepad.buttons[1], 794, 288); // B + drawButton(gamepad.buttons[2], 662, 288); // X + drawButton(gamepad.buttons[3], 728, 224); // Y + + drawButton(gamepad.buttons[4], 212, 96); // L1 + drawButton(gamepad.buttons[5], 668, 96); // R1 + drawButton(gamepad.buttons[6], 88, 96); // L2 + drawButton(gamepad.buttons[7], 794, 96); // R2 + + drawButton(gamepad.buttons[12], 152, 224); // Up + drawButton(gamepad.buttons[13], 152, 354); // Down + drawButton(gamepad.buttons[14], 88, 288); // Left + drawButton(gamepad.buttons[15], 216, 288); // Right + + drawButton(gamepad.buttons[16], 440, 196); // Menu + + drawAnalogStick(gamepad.axes[0], gamepad.axes[1], 340, 416); // left stick + drawAnalogStick(gamepad.axes[2], gamepad.axes[3], 536, 416); // right stick + + // context.translate(-x, -y); +} diff --git a/App-Example/example/e-init-event.js b/App-Example/example/e-init-event.js new file mode 100644 index 00000000..fb272ee9 --- /dev/null +++ b/App-Example/example/e-init-event.js @@ -0,0 +1,109 @@ +"use strict"; + +var TouchInfo = { + start: null, + move: null, + end: null, +}; + +window.addEventListener("touchstart", function(event) { + var touches = event.changedTouches; + var firstFinger = touches[0]; + if (firstFinger) { + TouchInfo.end = null; + TouchInfo.start = { + x: firstFinger.pageX * window.devicePixelRatio, + y: firstFinger.pageY * window.devicePixelRatio, + id: firstFinger.identifier + }; + console.log("touchstart", TouchInfo.start.x, TouchInfo.start.y); + } +}); + +window.addEventListener("touchmove", function(event) { + if (TouchInfo.start) { + var touches = event.changedTouches; + for (var i = 0; i < touches.length; i++) { + var finger = touches[i]; + if (finger.identifier === TouchInfo.start.id) { + TouchInfo.move = { + x: finger.pageX * window.devicePixelRatio, + y: finger.pageY * window.devicePixelRatio, + id: finger.identifier + }; + // console.log("touchmove", TouchInfo.move.x, TouchInfo.move.y); + break; + } + } + } +}); + +window.addEventListener("touchend", function(event) { + if (TouchInfo.start) { + var touches = event.changedTouches; + for (var i = 0; i < touches.length; i++) { + var finger = touches[i]; + if (finger.identifier === TouchInfo.start.id) { + TouchInfo.start = null; + TouchInfo.move = null; + TouchInfo.end = { + x: finger.pageX * window.devicePixelRatio, + y: finger.pageY * window.devicePixelRatio, + id: finger.identifier + }; + console.log("touchend", TouchInfo.end.x, TouchInfo.end.y); + break; + } + } + } +}); + + + +var AccelerationGravityInfo = { + x: 0, + y: 0, + z: 0, +}; +var AccelerationInfo = { + x: 0, + y: 0, + z: 0, +}; +var GravityInfo = { + x: 0, + y: 0, + z: 0, +}; + +window.addEventListener("devicemotion", function(event) { + AccelerationGravityInfo.x = event.accelerationIncludingGravity.x; + AccelerationGravityInfo.y = event.accelerationIncludingGravity.y; + AccelerationGravityInfo.z = event.accelerationIncludingGravity.z; + + if (event.acceleration) { + AccelerationInfo.x = event.acceleration.x; + AccelerationInfo.y = event.acceleration.y; + AccelerationInfo.z = event.acceleration.z; + + GravityInfo.x = AccelerationGravityInfo.x - AccelerationInfo.x; + GravityInfo.y = AccelerationGravityInfo.y - AccelerationInfo.y; + GravityInfo.z = AccelerationGravityInfo.z - AccelerationInfo.z; + } + + if (AccelerationGravityInfo.x) { + AccelerationGravityInfo.x = AccelerationGravityInfo.x.toFixed(3); + AccelerationGravityInfo.y = AccelerationGravityInfo.y.toFixed(3); + AccelerationGravityInfo.z = AccelerationGravityInfo.z.toFixed(3); + } + if (AccelerationInfo.x) { + AccelerationInfo.x = AccelerationInfo.x.toFixed(3); + AccelerationInfo.y = AccelerationInfo.y.toFixed(3); + AccelerationInfo.z = AccelerationInfo.z.toFixed(3); + } + if (GravityInfo.x) { + GravityInfo.x = GravityInfo.x.toFixed(3); + GravityInfo.y = GravityInfo.y.toFixed(3); + GravityInfo.z = GravityInfo.z.toFixed(3); + } +}); diff --git a/App-Example/example/e-init-gl.js b/App-Example/example/e-init-gl.js new file mode 100644 index 00000000..f426a81d --- /dev/null +++ b/App-Example/example/e-init-gl.js @@ -0,0 +1,81 @@ +"use strict"; + +var width = window.innerWidth * window.devicePixelRatio; +var height = window.innerHeight * window.devicePixelRatio; +var canvas = document.getElementById('canvas'); +canvas.width = width; +canvas.height = height; +canvas.style.width = window.innerWidth + "px"; +canvas.style.height = window.innerHeight + "px"; + +var gl = canvas.getContext("webgl"); + +//gl.clearColor(0.2, 0, 0.8, 1); +//gl.clear(gl.COLOR_BUFFER_BIT); + + +function renderSomething() { + var v = [ + "attribute vec2 aVertexPosition;", + "void main() {", + "gl_Position = vec4(aVertexPosition, 0.0, 1.0);", + "}", + ].join("\n"); + + var f = [ + "#ifdef GL_ES", + "precision highp float;", + "#endif", + "uniform vec4 uColor;", + "void main() {", + "gl_FragColor = uColor;", + "}", + ].join("\n"); + + var vs = gl.createShader(gl.VERTEX_SHADER); + gl.shaderSource(vs, v); + gl.compileShader(vs); + + var fs = gl.createShader(gl.FRAGMENT_SHADER); + gl.shaderSource(fs, f); + gl.compileShader(fs); + + var program = gl.createProgram(); + gl.attachShader(program, vs); + gl.attachShader(program, fs); + gl.linkProgram(program); + + + // Setup Geometry + var vertices = new Float32Array([-0.5, -0.5, 0.5, -0.5, 0.0, 0.5 // Triangle-Coordinates + ]); + + var vbuffer = gl.createBuffer(); + gl.bindBuffer(gl.ARRAY_BUFFER, vbuffer); + gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW); + + var itemSize = 2; // we have 2 coordinates (x,y) + var numItems = vertices.length / itemSize; // number of triangles + + // Viewport + gl.viewport(0, 0, width, height); + gl.clearColor(0, 0, 0.8, 1); + gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); + + // Setup Geometry: + gl.useProgram(program); + + program.uColor = gl.getUniformLocation(program, "uColor"); + gl.uniform4fv(program.uColor, [0.8, 0.0, 0.0, 1.0]); + + program.aVertexPosition = gl.getAttribLocation(program, "aVertexPosition"); + gl.enableVertexAttribArray(program.aVertexPosition); + gl.vertexAttribPointer(program.aVertexPosition, itemSize, gl.FLOAT, false, 0, 0); + + // Draw: + gl.drawArrays(gl.TRIANGLES, 0, numItems); + //context.drawImage(canvas,10,20); + +} + +renderSomething(); diff --git a/App-Example/example/e-init.js b/App-Example/example/e-init.js new file mode 100644 index 00000000..b24834b4 --- /dev/null +++ b/App-Example/example/e-init.js @@ -0,0 +1,30 @@ +"use strict"; + +var width = window.innerWidth * window.devicePixelRatio; +var height = window.innerHeight * window.devicePixelRatio; +var canvas = document.getElementById('canvas'); +canvas.width = width; +canvas.height = height; +canvas.style.width = window.innerWidth + "px"; +canvas.style.height = window.innerHeight + "px"; + +var context = canvas.getContext("2d"); + +console.log("window.orientation = ", window.orientation); +console.log("window.devicePixelRatio = ", window.devicePixelRatio); + +function renderSomething() { + context.fillStyle = "#999999"; + context.fillRect(0, 0, width, height); + + context.fillStyle = "#ff3300"; + context.fillRect(0, height >> 1, width, 10); + context.fillRect(width >> 1, 0, 10, height); + + context.fillStyle = "#fff9f0"; + context.font = "40px"; + context.textAlign = "right"; + context.fillText("Example", width - 20, 60); +} + +renderSomething(); diff --git a/App-Example/example/e-localNotification.js b/App-Example/example/e-localNotification.js new file mode 100644 index 00000000..4827e6d5 --- /dev/null +++ b/App-Example/example/e-localNotification.js @@ -0,0 +1,8 @@ +"use strict"; + +var localNotice = new Ejecta.LocalNotification(); +setTimeout(function() { + localNotice.schedule(1, "title", "message 1", 10); + localNotice.schedule(1, "title", "message 2", 13); + console.log("LocalNotification has scheduled, please exit App."); +}, 1200); diff --git a/App-Example/example/e-screenshot-share.js b/App-Example/example/e-screenshot-share.js new file mode 100644 index 00000000..a94166b0 --- /dev/null +++ b/App-Example/example/e-screenshot-share.js @@ -0,0 +1,53 @@ +"use strict"; + +//================================================== +// Init Extensions (In my fork version of Ejecta ). +//================================================== +var appUtils = new Ejecta.AppUtils(); +var social = new Ejecta.Social(); + + +//================================================== +// Take a screenshot. +//================================================== +function takeScreenshot() { + // You could use ".jpg" or ".png" as output file's ext-name. + var destPath = "${Documents}/snapshot.png"; + // You could also use a offscreen canvas that you created via document.createElement(). + + // renderSomething(); // ensure that gl isn't be cleared + + appUtils.saveImage(canvas, destPath, function(filePath) { + console.log(" >> Snapshot: " + filePath); + // Share Screenshot Image. + shareImage(destPath); + }); +} + +setTimeout(function() { + takeScreenshot(); +}, 500); + + +//================================================== +// Share the screenshot that you took. +//================================================== +function shareImage(imgPath) { + // You can't open social dialog as soon as app starts. + // You must wait a moment for initialization of SocialSDK. + var snsName = "facebook"; // twitter , facebook , sinaweibo (Chinese twitter) + var message = "test message"; + var shareUrl = "http://impactjs.com"; + + // Test openShare() + social.openShare(message, imgPath); + return; + + // Test showPostDialog() + social.showPostDialog(snsName, message, imgPath, shareUrl, + function(statusCode) { + console.log(" >> Share: " + statusCode + ", " + imgPath); + } + ); + +} diff --git a/App-Example/example/e-screenshot.js b/App-Example/example/e-screenshot.js new file mode 100644 index 00000000..29708cfa --- /dev/null +++ b/App-Example/example/e-screenshot.js @@ -0,0 +1,25 @@ +"use strict"; + +//================================================== +// Init Extensions (In my fork version of Ejecta ). +//================================================== +var appUtils = new Ejecta.AppUtils(); + + +//================================================== +// Take a screenshot. +//================================================== +function takeScreenshot() { + // You could use ".jpg" or ".png" as output file's ext-name. + var destPath = "${Documents}/snapshot.png"; + // You could also use a offscreen canvas that you created via document.createElement(). + + // renderSomething(); // ensure that gl isn't be cleared + + appUtils.saveImage(canvas, destPath, function(filePath) { + console.log(" >> Snapshot: " + filePath); + // Share Screenshot Image. + }); +} + +takeScreenshot(); \ No newline at end of file diff --git a/App-Example/example/e-test.js b/App-Example/example/e-test.js new file mode 100644 index 00000000..335e7ad2 --- /dev/null +++ b/App-Example/example/e-test.js @@ -0,0 +1,17 @@ +console.log("This is e-test.js"); + +(function() { + + var img = new Image(); + console.log("HTMLImageElement: ", img instanceof HTMLImageElement); + + var canvas = document.createElement("canvas"); + console.log("HTMLCanvasElement: ", canvas instanceof HTMLCanvasElement); + + var video = new Video(); + console.log("HTMLVideoElement: ", video instanceof HTMLVideoElement); + + var audio = new Audio(); + console.log("HTMLAudioElement: ", audio instanceof HTMLAudioElement); + +})(); diff --git a/App-Example/example/e-webView.js b/App-Example/example/e-webView.js new file mode 100644 index 00000000..f77791c2 --- /dev/null +++ b/App-Example/example/e-webView.js @@ -0,0 +1,17 @@ +"use strict"; + +var webview = new Ejecta.WebView(); +webview.src = "./example/webview.html"; // http/https url , html-file path +webview.backgroundColor = "rgba(222,111,220,1)"; // "transparent" === "rgba(0,0,0,0)" +webview.addEventListener("load", function() { + webview.show(); + setTimeout(function() { + webview.backgroundColor = "transparent"; + }, 1000); +}); + +function funcInNative() { + var text = "This is a function defined in Native."; + console.log(text); + webview.eval("funcInWebview()"); +} diff --git a/App-Example/example/e-websocket.js b/App-Example/example/e-websocket.js new file mode 100644 index 00000000..bdd0afc4 --- /dev/null +++ b/App-Example/example/e-websocket.js @@ -0,0 +1,47 @@ +"use strict"; + +var url = "ws://192.168.5.101:8082"; +var ws; + +function testWS() { + if (ws && ws.readyState !== WebSocket.CLOSING && ws.readyState !== WebSocket.CLOSED) { + ws.close(); + } + + ws = new WebSocket(url, undefined); + ws.binaryType = "arraybuffer"; + + ws.onmessage = function(event) { + var data = event.data; + console.log(data); + }; + + ws.onopen = function(event) { + console.log("ws opened", event.message); + }; + + ws.onclose = function(event) { + console.log("ws closed"); + }; + + ws.onerror = function(event) { + console.log("ws error:"); + var data = event.data; + console.log(data); + }; +} + + +testWS(); + +var no = 1; +setInterval(function() { + if (!ws) { + return; + } + if (ws.readyState === WebSocket.OPEN) { + ws.send("message " + (no++)); + } else { + console.log("readyState: ", ws.readyState); + } +}, 1000); diff --git a/Resources/Icon.png b/App-Example/example/encryption/ejecta-logo.png similarity index 53% rename from Resources/Icon.png rename to App-Example/example/encryption/ejecta-logo.png index 420ef160..24071943 100644 Binary files a/Resources/Icon.png and b/App-Example/example/encryption/ejecta-logo.png differ diff --git a/App-Example/example/encryption/encrypted-ejecta-logo.png b/App-Example/example/encryption/encrypted-ejecta-logo.png new file mode 100644 index 00000000..3996670b Binary files /dev/null and b/App-Example/example/encryption/encrypted-ejecta-logo.png differ diff --git a/App-Example/example/encryption/encrypted-test-log.js b/App-Example/example/encryption/encrypted-test-log.js new file mode 100644 index 00000000..064ba055 Binary files /dev/null and b/App-Example/example/encryption/encrypted-test-log.js differ diff --git a/App-Example/example/encryption/how-to.md b/App-Example/example/encryption/how-to.md new file mode 100644 index 00000000..1d6dceeb --- /dev/null +++ b/App-Example/example/encryption/how-to.md @@ -0,0 +1,78 @@ +README +==================== + +> A JS & Image File Encryption Tool. + + +This tool use for protect your js & image file in Ejecta-Project + + +Theory: + +* Use this tool to encrypt the js file with a key. +* The encrypted file has a special header. +* When Ejecta loads js-file and finds the code has the special header, Ejecta decode the code. +* Do other things as same as before. + +My english is very poor , so if there are some wrong words please tell me and I am so sorry for that. + + + +------------------- +Command-line +------------------- + $ cd Tools + $ node Encryptor.js input-file output-file HARD-TO-GUESS-KEY + +> Encryptor.js must be runned in Ejecta/Tools folder + +* Info: + * input-file : the original js file that waiting for encrypting. **Only Support JS & Image file** . + * output-file : the new encrypted file's name. It will overwrite the file with the same name. + * HARD-TO-GUESS-KEY : A string without Breakline. It's used for encryption. All files in one Application must use the same key. + +* HARD-TO-GUESS-KEY could include: + * Letter ( a-z , A-Z ) + * Number ( 0 - 9 ) + * ~ @ # $ % ^ * _ - + = + * Double-byte characters (e.g. Chinese , Japanese) + +------------------- +Example +------------------- + +Run the command in terminal: + +Goto App/example/encryption/ Folder, then + + $ node ../../../Tools/Encryptor.js test-log.js encrypted-test-log.js Your_123_Key + + +Then in Ejecta : + + // init Decryptor. + var decryptor = new Ejecta.DecryptorXOR(); + decryptor.enable(); + + ejecta.include("example/encryption/encrypted-test-log.js"); + + +Yes, there is no different from before. + + + +------------------- +NOTE +------------------- + +This tool will CHANGE the "```Extension/EJBindingDecryptorXOR.h```" file. +Because the secret-key must be written into the "EJBindingDecryptorXOR.h". + +Encryptor.js & EJBindingDecryptorXOR.m are just default encode/decode tools, you can implement your own ones. + +And + +NO Perfect Encryption Tool on the earth , So ... :p + + +(over) diff --git a/App-Example/example/encryption/test-log.js b/App-Example/example/encryption/test-log.js new file mode 100755 index 00000000..01b729be --- /dev/null +++ b/App-Example/example/encryption/test-log.js @@ -0,0 +1,2 @@ +console.log("Chinese: 加密测试"); +console.log("English Test encryption"); diff --git a/App-Example/example/websocket-server.js b/App-Example/example/websocket-server.js new file mode 100644 index 00000000..53cd6778 --- /dev/null +++ b/App-Example/example/websocket-server.js @@ -0,0 +1,21 @@ +// NodeJS and node-ws module are required. +// $ npm install ws +// $ node websocket-server.js [port] + +"use strict"; + +var WebSocketServer = require('ws').Server; + +var port = process.argv[2] || 8082; + +var wss = new WebSocketServer({ port: port }); + +wss.on('connection', function connection(ws) { + ws.send('{ "state": "connectioned" }'); + ws.on('message', function incoming(message) { + console.log('received: %s', message); + ws.send('{ "echo": ' + message + ' }'); + }); +}); + +console.log("WebSocketServer started at " + port + " ..."); diff --git a/App-Example/example/webview.html b/App-Example/example/webview.html new file mode 100644 index 00000000..57403a1c --- /dev/null +++ b/App-Example/example/webview.html @@ -0,0 +1,54 @@ + + + + + + + + + + + +webview + + + + + + + + + + +
+This is a webview. + + +
+ + + + + diff --git a/App-Example/index-origin.js b/App-Example/index-origin.js new file mode 100644 index 00000000..f68d10a0 --- /dev/null +++ b/App-Example/index-origin.js @@ -0,0 +1,78 @@ +/* + + INSTRUCTIONS: + This file must be copied into ./App in order to work + +*/ +var w = window.innerWidth; +var h = window.innerHeight; +var scale = window.devicePixelRatio; +var w2 = w/2; +var h2 = h/2; + +var canvas = document.getElementById('canvas'); +canvas.width = w * scale; +canvas.height = h * scale; +canvas.style.width = w; +canvas.style.height = h; + +var ctx = canvas.getContext('2d'); +ctx.scale(scale, scale); + + +var curves = []; +for( var i = 0; i < 200; i++ ) { + curves.push({ + current: Math.random() * 1000, + inc: Math.random() * 0.005 + 0.002, + color: '#'+(Math.random()*0xFFFFFF<<0).toString(16) // Random color + }); +} + +var p = [0,0, 0,0, 0,0, 0,0]; +var animate = function() { + // Clear the screen - note that .globalAlpha is still honored, + // so this will only "darken" the sceen a bit + ctx.globalCompositeOperation = 'source-over'; + ctx.fillRect(0,0,w,h); + + // Use the additive blend mode to draw the bezier curves + ctx.globalCompositeOperation = 'lighter'; + + // Calculate curve positions and draw + for( var i = 0; i < maxCurves; i++ ) { + var curve = curves[i]; + curve.current += curve.inc; + for( var j = 0; j < p.length; j+=2 ) { + var a = Math.sin( curve.current * (j+3) * 373 * 0.0001 ); + var b = Math.sin( curve.current * (j+5) * 927 * 0.0002 ); + var c = Math.sin( curve.current * (j+5) * 573 * 0.0001 ); + p[j] = (a * a * b + c * a + b) * w * c + w2; + p[j+1] = (a * b * b + c - a * b *c) * h2 + h2; + } + + ctx.beginPath(); + ctx.moveTo( p[0], p[1] ); + ctx.bezierCurveTo( p[2], p[3], p[4], p[5], p[6], p[7] ); + ctx.strokeStyle = curve.color; + ctx.stroke(); + } +}; + + +// The vertical touch position controls the number of curves; +// horizontal controls the line width +var maxCurves = 70; +document.addEventListener( 'touchmove', function( ev ) { + ctx.lineWidth = (ev.touches[0].pageX/w) * 20; + maxCurves = Math.floor((ev.touches[0].pageY/h) * curves.length); +}, false ); + + + +ctx.fillStyle = '#000000'; +ctx.fillRect( 0, 0, w, h ); + +ctx.globalAlpha = 0.05; +ctx.lineWidth = 2; +setInterval( animate, 16 ); diff --git a/App-Example/index.js b/App-Example/index.js new file mode 100644 index 00000000..dd7a8669 --- /dev/null +++ b/App-Example/index.js @@ -0,0 +1,47 @@ +//================================================== +// Initialize the screen canvas. +//================================================== + +// ejecta.include("index-origin.js"); + +// ejecta.include("example/e-init.js"); +// ejecta.include("example/e-init-gl.js"); +// ejecta.include("example/e-init-event.js"); + + +ejecta.include("example/bunnymark/e-bunnymark.js"); + +//================================================== +// Examples +//================================================== + +// ejecta.include("example/e-appUtils.js"); + +// ejecta.include("example/e-test.js"); + +// ejecta.include("example/e-gamecenter.js"); + +// ejecta.include("example/e-ajax.js"); +// ejecta.include("example/e-websocket.js"); + +// ejecta.include("example/e-download.js"); +// ejecta.include("example/e-screenshot.js"); +// ejecta.include("example/e-screenshot-share.js"); + + +// ejecta.include("example/ad/e-admob.js"); +// ejecta.include("example/ad/e-chartboost.js"); +// ejecta.include("example/ad/e-vungle.js"); +// ejecta.include("example/ad/e-unityads.js"); +// ejecta.include("example/ad/e-adcolony.js"); + + +// ejecta.include("example/e-encrypt.js"); + +// ejecta.include("example/e-alertView.js"); + +// ejecta.include("example/e-webView.js"); + +// ejecta.include("example/e-localNotification.js"); + +// ejecta.include("example/e-gamepad.js"); diff --git a/Ejecta.xcodeproj/project.pbxproj b/Ejecta.xcodeproj/project.pbxproj index 1a66a540..d403e0a6 100644 --- a/Ejecta.xcodeproj/project.pbxproj +++ b/Ejecta.xcodeproj/project.pbxproj @@ -15,6 +15,302 @@ 3EBC19BE16CECE190036F9F3 /* EJBindingKeyInput.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EBC19BD16CECE190036F9F3 /* EJBindingKeyInput.m */; }; 3EF00C5916C29360004599A4 /* EJJavaScriptView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EF00C5816C29360004599A4 /* EJJavaScriptView.m */; }; 5B7B76761619DB9700691910 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B7B76751619DB9700691910 /* CoreText.framework */; }; + 5C16A8FC1C101C9000698190 /* libxml2.2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A8FB1C101C9000698190 /* libxml2.2.tbd */; }; + 5C16A9021C101D8C00698190 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A9011C101D8C00698190 /* CoreFoundation.framework */; }; + 5C16A9081C101E5200698190 /* CoreImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A9071C101E5200698190 /* CoreImage.framework */; }; + 5C16A90A1C101E5800698190 /* Twitter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A9091C101E5800698190 /* Twitter.framework */; }; + 5C16A90E1C10210B00698190 /* libc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A90D1C10210B00698190 /* libc++.dylib */; }; + 5C16A9101C10211600698190 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A90F1C10211600698190 /* libicucore.dylib */; }; + 5C16A9131C10212E00698190 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A9111C10212E00698190 /* libsqlite3.dylib */; }; + 5C16A9141C10212E00698190 /* libstdc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A9121C10212E00698190 /* libstdc++.dylib */; }; + 5C16A9171C10213D00698190 /* libxml2.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A9151C10213D00698190 /* libxml2.2.dylib */; }; + 5C16A9181C10213D00698190 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A9161C10213D00698190 /* libz.dylib */; }; + 5C2387D818CEFBFD00D0CC1A /* EJBindingTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C2387D718CEFBFD00D0CC1A /* EJBindingTimer.m */; }; + 5C2514921ADAB0A600761DA8 /* GoogleMobileAds.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C2514911ADAB0A600761DA8 /* GoogleMobileAds.framework */; }; + 5C2C25871C32FA92001455E9 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C2C25861C32FA92001455E9 /* GameController.framework */; }; + 5C2C258C1C330540001455E9 /* EJBindingGamepadMotion.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C2C258A1C330540001455E9 /* EJBindingGamepadMotion.m */; }; + 5C2C258D1C33080F001455E9 /* EJBindingGamepadMotion.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C2C258A1C330540001455E9 /* EJBindingGamepadMotion.m */; }; + 5C365FE41CBEE50800E01DD3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5C365FE21CBEE50800E01DD3 /* Assets.xcassets */; }; + 5C365FE51CBEE50800E01DD3 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5C365FE31CBEE50800E01DD3 /* Info.plist */; }; + 5C365FE61CBEE51E00E01DD3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5C365FE21CBEE50800E01DD3 /* Assets.xcassets */; }; + 5C3B72E41ADAB7D3002A3FB5 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C3B72E31ADAB7D3002A3FB5 /* CoreMedia.framework */; }; + 5C3B72E81ADAD976002A3FB5 /* Chartboost.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C3B72E71ADAD976002A3FB5 /* Chartboost.framework */; }; + 5C4214EF1D5DBEEE003243A7 /* SafariServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C4214EE1D5DBEEE003243A7 /* SafariServices.framework */; }; + 5C4214F11D5DC1A1003243A7 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C4214F01D5DC1A1003243A7 /* CoreBluetooth.framework */; }; + 5C4214F31D5DC22F003243A7 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C4214F21D5DC22F003243A7 /* GLKit.framework */; }; + 5C4214F51D5DC367003243A7 /* UnityAds.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C4214F41D5DC367003243A7 /* UnityAds.framework */; }; + 5C4D006F1C1C2642003D718B /* EJDeviceUID.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C4D006D1C1C2642003D718B /* EJDeviceUID.m */; }; + 5C631BFB19110679009AF7F0 /* EJBindingDecryptorXOR.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C631BFA19110679009AF7F0 /* EJBindingDecryptorXOR.m */; }; + 5C631C021911446F009AF7F0 /* EJBindingBaseInterceptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C631BFE1911446F009AF7F0 /* EJBindingBaseInterceptor.m */; }; + 5C631C031911446F009AF7F0 /* EJInterceptorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C631C011911446F009AF7F0 /* EJInterceptorManager.m */; }; + 5C8968C41BE32CAE00AC30E6 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8968BF1BE32CAE00AC30E6 /* libc++.tbd */; }; + 5C8968C51BE32CAE00AC30E6 /* libicucore.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8968C01BE32CAE00AC30E6 /* libicucore.tbd */; }; + 5C8968C61BE32CAE00AC30E6 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8968C11BE32CAE00AC30E6 /* libsqlite3.tbd */; }; + 5C8968C71BE32CAE00AC30E6 /* libstdc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8968C21BE32CAE00AC30E6 /* libstdc++.tbd */; }; + 5C8968C81BE32CAE00AC30E6 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8968C31BE32CAE00AC30E6 /* libz.tbd */; }; + 5C8968D81BE3387C00AC30E6 /* __vungle.db in Resources */ = {isa = PBXBuildFile; fileRef = 5C8968D11BE3387C00AC30E6 /* __vungle.db */; }; + 5C8968D91BE3387C00AC30E6 /* vg_close.png in Resources */ = {isa = PBXBuildFile; fileRef = 5C8968D21BE3387C00AC30E6 /* vg_close.png */; }; + 5C8968DA1BE3387C00AC30E6 /* vg_cta.png in Resources */ = {isa = PBXBuildFile; fileRef = 5C8968D31BE3387C00AC30E6 /* vg_cta.png */; }; + 5C8968DB1BE3387C00AC30E6 /* vg_mute_off.png in Resources */ = {isa = PBXBuildFile; fileRef = 5C8968D41BE3387C00AC30E6 /* vg_mute_off.png */; }; + 5C8968DC1BE3387C00AC30E6 /* vg_mute_on.png in Resources */ = {isa = PBXBuildFile; fileRef = 5C8968D51BE3387C00AC30E6 /* vg_mute_on.png */; }; + 5C8968DD1BE3387C00AC30E6 /* vg_privacy.png in Resources */ = {isa = PBXBuildFile; fileRef = 5C8968D61BE3387C00AC30E6 /* vg_privacy.png */; }; + 5C8968DE1BE3387C00AC30E6 /* VungleSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8968D71BE3387C00AC30E6 /* VungleSDK.framework */; }; + 5C8968E01BE3390D00AC30E6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8968DF1BE3390D00AC30E6 /* WebKit.framework */; }; + 5C8E33F918C4EF1D007206AE /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8E33F818C4EF1D007206AE /* Social.framework */; }; + 5C8E33FB18C4EF23007206AE /* Accounts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8E33FA18C4EF23007206AE /* Accounts.framework */; }; + 5C8E340B18C4EF40007206AE /* EJBindingAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C8E33FE18C4EF40007206AE /* EJBindingAlertView.m */; }; + 5C8E340C18C4EF40007206AE /* EJBindingAppUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C8E340018C4EF40007206AE /* EJBindingAppUtils.m */; }; + 5C8E340D18C4EF40007206AE /* EJBindingLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C8E340218C4EF40007206AE /* EJBindingLocalNotification.m */; }; + 5C8E340E18C4EF40007206AE /* EJBindingSocial.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C8E340418C4EF40007206AE /* EJBindingSocial.m */; }; + 5C8E340F18C4EF40007206AE /* EJBindingWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C8E340618C4EF40007206AE /* EJBindingWebView.m */; }; + 5C91E5AE18E1C45700FCF013 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C91E5AD18E1C45700FCF013 /* MessageUI.framework */; }; + 5C91E5B018E1C47F00FCF013 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C91E5AF18E1C47F00FCF013 /* AdSupport.framework */; }; + 5C91E5B118E1C4A800FCF013 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C91E5AA18E1C43A00FCF013 /* CoreTelephony.framework */; }; + 5C97590B1C1CA7F4004A6EF0 /* AVKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C97590A1C1CA7F4004A6EF0 /* AVKit.framework */; }; + 5C9C36541C19A33200ADF446 /* EJBindingResolution.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C9C36531C19A33200ADF446 /* EJBindingResolution.m */; }; + 5C9CF4B11A58416A00AEE55E /* EventKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C9CF4B01A58416A00AEE55E /* EventKit.framework */; }; + 5C9CF4B31A58419100AEE55E /* EventKitUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C9CF4B21A58419100AEE55E /* EventKitUI.framework */; }; + 5CA813FE1B9E244000172B7A /* WebviewBridge.js in Resources */ = {isa = PBXBuildFile; fileRef = 5CA813FD1B9E244000172B7A /* WebviewBridge.js */; }; + 5CAC7BC91BFEF16800438B74 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CAC7BC81BFEF16800438B74 /* JavaScriptCore.framework */; }; + 5CAE53291C2C240C00FA70DD /* LaunchScreen-Logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 5CF2A6821BFEE2FE00B7EA09 /* LaunchScreen-Logo.png */; }; + 5CAE53301C2C240C00FA70DD /* App in Resources */ = {isa = PBXBuildFile; fileRef = B68C5AEF132E6CD60015092E /* App */; }; + 5CAE53331C2C240C00FA70DD /* Ejecta.js in Resources */ = {isa = PBXBuildFile; fileRef = B64CE63F166682700087CF94 /* Ejecta.js */; }; + 5CAE53361C2C240C00FA70DD /* EJBindingTextMetrics.m in Sources */ = {isa = PBXBuildFile; fileRef = B630048816C1A1960036D8D4 /* EJBindingTextMetrics.m */; }; + 5CAE53371C2C240C00FA70DD /* EJGLProgram2D.m in Sources */ = {isa = PBXBuildFile; fileRef = B64C87A816B80F410097CD5B /* EJGLProgram2D.m */; }; + 5CAE53381C2C240C00FA70DD /* EJGLProgram2DRadialGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = B64C87AA16B80F4C0097CD5B /* EJGLProgram2DRadialGradient.m */; }; + 5CAE53391C2C240C00FA70DD /* EJAppViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE611166682700087CF94 /* EJAppViewController.m */; }; + 5CAE533A1C2C240C00FA70DD /* EJAudioSourceAVAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE615166682700087CF94 /* EJAudioSourceAVAudio.m */; }; + 5CAE533B1C2C240C00FA70DD /* EJBindingDecryptorXOR.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C631BFA19110679009AF7F0 /* EJBindingDecryptorXOR.m */; }; + 5CAE533C1C2C240C00FA70DD /* EJAudioSourceOpenAL.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE617166682700087CF94 /* EJAudioSourceOpenAL.m */; }; + 5CAE533D1C2C240C00FA70DD /* EJBindingAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE619166682700087CF94 /* EJBindingAudio.m */; }; + 5CAE533E1C2C240C00FA70DD /* EJOpenALBuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE61B166682700087CF94 /* EJOpenALBuffer.m */; }; + 5CAE533F1C2C240C00FA70DD /* EJSharedOpenALManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE61D166682700087CF94 /* EJSharedOpenALManager.m */; }; + 5CAE53401C2C240C00FA70DD /* EJBindingBase.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE61F166682700087CF94 /* EJBindingBase.m */; }; + 5CAE53411C2C240C00FA70DD /* EJBindingGlobalUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE621166682700087CF94 /* EJBindingGlobalUtils.m */; }; + 5CAE53421C2C240C00FA70DD /* EJBindingEventedBase.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE623166682700087CF94 /* EJBindingEventedBase.m */; }; + 5CAE53431C2C240C00FA70DD /* EAGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE626166682700087CF94 /* EAGLView.m */; }; + 5CAE53441C2C240C00FA70DD /* EJBindingImage.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE62A166682700087CF94 /* EJBindingImage.m */; }; + 5CAE53461C2C240C00FA70DD /* EJTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE63C166682700087CF94 /* EJTexture.m */; }; + 5CAE53481C2C240C00FA70DD /* EJBindingBaseInterceptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C631BFE1911446F009AF7F0 /* EJBindingBaseInterceptor.m */; }; + 5CAE53491C2C240C00FA70DD /* EJConvert.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE63E166682700087CF94 /* EJConvert.m */; }; + 5CAE534B1C2C240C00FA70DD /* EJTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE641166682700087CF94 /* EJTimer.m */; }; + 5CAE534D1C2C240C00FA70DD /* EJBindingGameCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE648166682700087CF94 /* EJBindingGameCenter.m */; }; + 5CAE534E1C2C240C00FA70DD /* EJBindingAppUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C8E340018C4EF40007206AE /* EJBindingAppUtils.m */; }; + 5CAE53501C2C240C00FA70DD /* EJBindingHttpRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE64A166682700087CF94 /* EJBindingHttpRequest.m */; }; + 5CAE53521C2C240C00FA70DD /* EJBindingLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE64C166682700087CF94 /* EJBindingLocalStorage.m */; }; + 5CAE53531C2C240C00FA70DD /* EJBindingTouchInput.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE64E166682700087CF94 /* EJBindingTouchInput.m */; }; + 5CAE53541C2C240C00FA70DD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE651166682700087CF94 /* AppDelegate.m */; }; + 5CAE53551C2C240C00FA70DD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE661166682700087CF94 /* main.m */; }; + 5CAE53561C2C240C00FA70DD /* EJBindingWindowEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F9AFBF169F81D400ABD91A /* EJBindingWindowEvents.m */; }; + 5CAE53571C2C240C00FA70DD /* EJBindingCanvas.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114DE1676B4FE001F1324 /* EJBindingCanvas.m */; }; + 5CAE53581C2C240C00FA70DD /* EJCanvasContext.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114E21676BAF9001F1324 /* EJCanvasContext.m */; }; + 5CAE53591C2C240C00FA70DD /* EJBindingCanvasContext2D.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114EB1676BD40001F1324 /* EJBindingCanvasContext2D.m */; }; + 5CAE535A1C2C240C00FA70DD /* EJBindingImageData.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114ED1676BD40001F1324 /* EJBindingImageData.m */; }; + 5CAE535B1C2C240C00FA70DD /* EJCanvasContext2D.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114EF1676BD40001F1324 /* EJCanvasContext2D.m */; }; + 5CAE535C1C2C240C00FA70DD /* EJBindingGamepad.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CBFB2471BF47A7800BF2385 /* EJBindingGamepad.m */; }; + 5CAE535D1C2C240C00FA70DD /* EJCanvasContext2DScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114F11676BD40001F1324 /* EJCanvasContext2DScreen.m */; }; + 5CAE535E1C2C240C00FA70DD /* EJCanvasContext2DTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114F31676BD40001F1324 /* EJCanvasContext2DTexture.m */; }; + 5CAE535F1C2C240C00FA70DD /* EJFont.mm in Sources */ = {isa = PBXBuildFile; fileRef = B6F114F51676BD40001F1324 /* EJFont.mm */; }; + 5CAE53601C2C240C00FA70DD /* EJCanvasContextWebGLScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = B668475B182419A500ABCDF9 /* EJCanvasContextWebGLScreen.m */; }; + 5CAE53611C2C240C00FA70DD /* EJBindingResolution.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C9C36531C19A33200ADF446 /* EJBindingResolution.m */; }; + 5CAE53621C2C240C00FA70DD /* EJImageData.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114F71676BD40001F1324 /* EJImageData.m */; }; + 5CAE53631C2C240C00FA70DD /* EJBindingGamepadButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CBFB2491BF47A7800BF2385 /* EJBindingGamepadButton.m */; }; + 5CAE53651C2C240C00FA70DD /* EJPath.mm in Sources */ = {isa = PBXBuildFile; fileRef = B6F114F91676BD40001F1324 /* EJPath.mm */; }; + 5CAE53661C2C240C00FA70DD /* EJConvertColorRGBA.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F115051676BE18001F1324 /* EJConvertColorRGBA.m */; }; + 5CAE53681C2C240C00FA70DD /* EJBindingTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C2387D718CEFBFD00D0CC1A /* EJBindingTimer.m */; }; + 5CAE53691C2C240C00FA70DD /* EJBindingCanvasContextWebGL.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F1154C167A7D17001F1324 /* EJBindingCanvasContextWebGL.m */; }; + 5CAE536A1C2C240C00FA70DD /* EJCanvasContextWebGL.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F1154F167A7DA1001F1324 /* EJCanvasContextWebGL.m */; }; + 5CAE536B1C2C240C00FA70DD /* EJBindingWebGLObjects.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F11555167BD59B001F1324 /* EJBindingWebGLObjects.m */; }; + 5CAE536C1C2C240C00FA70DD /* EJConvertWebGL.m in Sources */ = {isa = PBXBuildFile; fileRef = B68037001682A58200833604 /* EJConvertWebGL.m */; }; + 5CAE536D1C2C240C00FA70DD /* EJBindingCanvasPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = B664B98A1699F3380093E04E /* EJBindingCanvasPattern.m */; }; + 5CAE536E1C2C240C00FA70DD /* EJCanvasContextWebGLTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = B66847581823FEDF00ABCDF9 /* EJCanvasContextWebGLTexture.m */; }; + 5CAE536F1C2C240C00FA70DD /* EJCanvasPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = B664B98D1699F49B0093E04E /* EJCanvasPattern.m */; }; + 5CAE53711C2C240C00FA70DD /* EJDeviceUID.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C4D006D1C1C2642003D718B /* EJDeviceUID.m */; }; + 5CAE53721C2C240C00FA70DD /* EJInterceptorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C631C011911446F009AF7F0 /* EJInterceptorManager.m */; }; + 5CAE53731C2C240C00FA70DD /* EJCanvasGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = B6A0F4AE16A9D86000477789 /* EJCanvasGradient.m */; }; + 5CAE53741C2C240C00FA70DD /* EJBindingCanvasGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = B6A0F4B316AB0B4500477789 /* EJBindingCanvasGradient.m */; }; + 5CAE53751C2C240C00FA70DD /* EJBindingKeyInput.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EBC19BD16CECE190036F9F3 /* EJBindingKeyInput.m */; }; + 5CAE53761C2C240C00FA70DD /* EJFontCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B668FCED1821C08500D4F629 /* EJFontCache.m */; }; + 5CAE53771C2C240C00FA70DD /* EJJavaScriptView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EF00C5816C29360004599A4 /* EJJavaScriptView.m */; }; + 5CAE53781C2C240C00FA70DD /* EJClassLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = B630048B16CB09850036D8D4 /* EJClassLoader.m */; }; + 5CAE53791C2C240C00FA70DD /* EJTextureStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = B699669716CC4E6D006B9456 /* EJTextureStorage.m */; }; + 5CAE537A1C2C240C00FA70DD /* EJSharedTextureCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B699669A16CC55F4006B9456 /* EJSharedTextureCache.m */; }; + 5CAE537C1C2C240C00FA70DD /* EJBindingGamepadProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CBFB24B1BF47A7800BF2385 /* EJBindingGamepadProvider.m */; }; + 5CAE537D1C2C240C00FA70DD /* EJSharedOpenGLContext.m in Sources */ = {isa = PBXBuildFile; fileRef = B699669D16CC579B006B9456 /* EJSharedOpenGLContext.m */; }; + 5CAE537E1C2C240C00FA70DD /* EJNonRetainingProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = B6E02BBF16D4110900616925 /* EJNonRetainingProxy.m */; }; + 5CAE537F1C2C240C00FA70DD /* SRWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = B63D256316E8DE23007E6034 /* SRWebSocket.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; + 5CAE53801C2C240C00FA70DD /* EJBindingWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = B63D256C16E8DFAB007E6034 /* EJBindingWebSocket.m */; }; + 5CAE53811C2C240C00FA70DD /* EJBindingCanvasStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F629D016F353C700F16BAC /* EJBindingCanvasStyle.m */; }; + 5CAE53821C2C240C00FA70DD /* EJBindingWebGLExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = B870BDE816F2E11A00827F01 /* EJBindingWebGLExtensions.m */; }; + 5CAE53831C2C240C00FA70DD /* EJBindingIAPManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B6D6E09F16F7E7B4009AB75F /* EJBindingIAPManager.m */; }; + 5CAE53841C2C240C00FA70DD /* EJBindingIAPTransaction.m in Sources */ = {isa = PBXBuildFile; fileRef = B6D6E0A216F7E7D8009AB75F /* EJBindingIAPTransaction.m */; }; + 5CAE53851C2C240C00FA70DD /* EJBindingIAPProduct.m in Sources */ = {isa = PBXBuildFile; fileRef = B6D6E0A516F7E81B009AB75F /* EJBindingIAPProduct.m */; }; + 5CAE53861C2C240C00FA70DD /* EJBindingVideo.m in Sources */ = {isa = PBXBuildFile; fileRef = B60FA92717021E0900078D20 /* EJBindingVideo.m */; }; + 5CAE538A1C2C240C00FA70DD /* AVKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C97590A1C1CA7F4004A6EF0 /* AVKit.framework */; }; + 5CAE538F1C2C240C00FA70DD /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A90F1C10211600698190 /* libicucore.dylib */; }; + 5CAE53901C2C240C00FA70DD /* libc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A90D1C10210B00698190 /* libc++.dylib */; }; + 5CAE539C1C2C240C00FA70DD /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C3B72E31ADAB7D3002A3FB5 /* CoreMedia.framework */; }; + 5CAE53A71C2C240C00FA70DD /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33BE9DE31868183900E0D16E /* MobileCoreServices.framework */; }; + 5CAE53A81C2C240C00FA70DD /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6D4B282183CF43A008251EB /* CoreLocation.framework */; }; + 5CAE53AA1C2C240C00FA70DD /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6D6E09916F7D03C009AB75F /* StoreKit.framework */; }; + 5CAE53AB1C2C240C00FA70DD /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B63D256916E8DF33007E6034 /* Security.framework */; }; + 5CAE53AC1C2C240C00FA70DD /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B63D256716E8DF23007E6034 /* CFNetwork.framework */; }; + 5CAE53AE1C2C240C00FA70DD /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6F463A31636C3FA00FC89C1 /* SystemConfiguration.framework */; }; + 5CAE53B01C2C240C00FA70DD /* GameKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6074FF215F8E41600D987F9 /* GameKit.framework */; }; + 5CAE53B21C2C240C00FA70DD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 5CAE53B31C2C240C00FA70DD /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 5CAE53B41C2C240C00FA70DD /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; + 5CAE53B51C2C240C00FA70DD /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B607AB66132EA6C300D7C3EA /* OpenAL.framework */; }; + 5CAE53B61C2C240C00FA70DD /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B607AC32132EA75F00D7C3EA /* AudioToolbox.framework */; }; + 5CAE53B71C2C240C00FA70DD /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B607AD09132EB51000D7C3EA /* OpenGLES.framework */; }; + 5CAE53B81C2C240C00FA70DD /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B607AD0F132EB52400D7C3EA /* QuartzCore.framework */; }; + 5CAE53B91C2C240C00FA70DD /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6CFCCD81332F152001F17AF /* AVFoundation.framework */; }; + 5CAE53CA1C2C2C7300FA70DD /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CAE53C81C2C2C0D00FA70DD /* JavaScriptCore.framework */; }; + 5CAE53CC1C2C314700FA70DD /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CAE53CB1C2C314700FA70DD /* CoreText.framework */; }; + 5CBFB24C1BF47A7800BF2385 /* EJBindingGamepad.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CBFB2471BF47A7800BF2385 /* EJBindingGamepad.m */; }; + 5CBFB24D1BF47A7800BF2385 /* EJBindingGamepadButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CBFB2491BF47A7800BF2385 /* EJBindingGamepadButton.m */; }; + 5CBFB24E1BF47A7800BF2385 /* EJBindingGamepadProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CBFB24B1BF47A7800BF2385 /* EJBindingGamepadProvider.m */; }; + 5CBFB2501BF47AC300BF2385 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CBFB24F1BF47AC300BF2385 /* GameController.framework */; }; + 5CF2A6831BFEE2FE00B7EA09 /* LaunchScreen-Logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 5CF2A6821BFEE2FE00B7EA09 /* LaunchScreen-Logo.png */; }; + 5CF2A6851BFEE6D700B7EA09 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5CF2A6841BFEE6D700B7EA09 /* Assets.xcassets */; }; + 5CF6ABB11C3FED0C009C3CF4 /* AdColony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CF6ABAD1C3FED0C009C3CF4 /* AdColony.framework */; }; + 5CF6ABC11C3FED37009C3CF4 /* EJBindingAdBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CF6ABB61C3FED37009C3CF4 /* EJBindingAdBase.m */; }; + 5CF6ABC21C3FED37009C3CF4 /* EJBindingAdColony.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CF6ABB81C3FED37009C3CF4 /* EJBindingAdColony.m */; }; + 5CF6ABC31C3FED37009C3CF4 /* EJBindingAdMob.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CF6ABBA1C3FED37009C3CF4 /* EJBindingAdMob.m */; }; + 5CF6ABC41C3FED37009C3CF4 /* EJBindingChartboost.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CF6ABBC1C3FED37009C3CF4 /* EJBindingChartboost.m */; }; + 5CF6ABC51C3FED37009C3CF4 /* EJBindingUnityAds.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CF6ABBE1C3FED37009C3CF4 /* EJBindingUnityAds.m */; }; + 5CF6ABC61C3FED37009C3CF4 /* EJBindingVungle.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CF6ABC01C3FED37009C3CF4 /* EJBindingVungle.m */; }; + 5CF6ABC91C402FCD009C3CF4 /* LaunchScreen-Logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 5CF2A6821BFEE2FE00B7EA09 /* LaunchScreen-Logo.png */; }; + 5CF6ABCF1C402FCD009C3CF4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5CF2A6841BFEE6D700B7EA09 /* Assets.xcassets */; }; + 5CF6ABD01C402FCD009C3CF4 /* WebviewBridge.js in Resources */ = {isa = PBXBuildFile; fileRef = 5CA813FD1B9E244000172B7A /* WebviewBridge.js */; }; + 5CF6ABD11C402FCD009C3CF4 /* App in Resources */ = {isa = PBXBuildFile; fileRef = B68C5AEF132E6CD60015092E /* App */; }; + 5CF6ABD21C402FCD009C3CF4 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = B637065D1A27BD5600F42B90 /* LaunchScreen.xib */; }; + 5CF6ABD41C402FCD009C3CF4 /* Ejecta.js in Resources */ = {isa = PBXBuildFile; fileRef = B64CE63F166682700087CF94 /* Ejecta.js */; }; + 5CF6ABD71C402FCD009C3CF4 /* EJBindingTextMetrics.m in Sources */ = {isa = PBXBuildFile; fileRef = B630048816C1A1960036D8D4 /* EJBindingTextMetrics.m */; }; + 5CF6ABD81C402FCD009C3CF4 /* EJGLProgram2D.m in Sources */ = {isa = PBXBuildFile; fileRef = B64C87A816B80F410097CD5B /* EJGLProgram2D.m */; }; + 5CF6ABD91C402FCD009C3CF4 /* EJGLProgram2DRadialGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = B64C87AA16B80F4C0097CD5B /* EJGLProgram2DRadialGradient.m */; }; + 5CF6ABDA1C402FCD009C3CF4 /* EJAppViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE611166682700087CF94 /* EJAppViewController.m */; }; + 5CF6ABDB1C402FCD009C3CF4 /* EJAudioSourceAVAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE615166682700087CF94 /* EJAudioSourceAVAudio.m */; }; + 5CF6ABDC1C402FCD009C3CF4 /* EJBindingDecryptorXOR.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C631BFA19110679009AF7F0 /* EJBindingDecryptorXOR.m */; }; + 5CF6ABDD1C402FCD009C3CF4 /* EJAudioSourceOpenAL.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE617166682700087CF94 /* EJAudioSourceOpenAL.m */; }; + 5CF6ABDE1C402FCD009C3CF4 /* EJBindingAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE619166682700087CF94 /* EJBindingAudio.m */; }; + 5CF6ABDF1C402FCD009C3CF4 /* EJOpenALBuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE61B166682700087CF94 /* EJOpenALBuffer.m */; }; + 5CF6ABE11C402FCD009C3CF4 /* EJSharedOpenALManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE61D166682700087CF94 /* EJSharedOpenALManager.m */; }; + 5CF6ABE21C402FCD009C3CF4 /* EJBindingBase.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE61F166682700087CF94 /* EJBindingBase.m */; }; + 5CF6ABE31C402FCD009C3CF4 /* EJBindingGlobalUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE621166682700087CF94 /* EJBindingGlobalUtils.m */; }; + 5CF6ABE41C402FCD009C3CF4 /* EJBindingEventedBase.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE623166682700087CF94 /* EJBindingEventedBase.m */; }; + 5CF6ABE51C402FCD009C3CF4 /* EAGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE626166682700087CF94 /* EAGLView.m */; }; + 5CF6ABE61C402FCD009C3CF4 /* EJBindingImage.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE62A166682700087CF94 /* EJBindingImage.m */; }; + 5CF6ABE71C402FCD009C3CF4 /* EJBindingAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C8E33FE18C4EF40007206AE /* EJBindingAlertView.m */; }; + 5CF6ABE91C402FCD009C3CF4 /* EJTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE63C166682700087CF94 /* EJTexture.m */; }; + 5CF6ABEB1C402FCD009C3CF4 /* EJBindingBaseInterceptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C631BFE1911446F009AF7F0 /* EJBindingBaseInterceptor.m */; }; + 5CF6ABEC1C402FCD009C3CF4 /* EJConvert.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE63E166682700087CF94 /* EJConvert.m */; }; + 5CF6ABED1C402FCD009C3CF4 /* EJBindingSocial.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C8E340418C4EF40007206AE /* EJBindingSocial.m */; }; + 5CF6ABEE1C402FCD009C3CF4 /* EJTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE641166682700087CF94 /* EJTimer.m */; }; + 5CF6ABF01C402FCD009C3CF4 /* EJBindingGameCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE648166682700087CF94 /* EJBindingGameCenter.m */; }; + 5CF6ABF11C402FCD009C3CF4 /* EJBindingAppUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C8E340018C4EF40007206AE /* EJBindingAppUtils.m */; }; + 5CF6ABF21C402FCD009C3CF4 /* EJBindingGamepadMotion.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C2C258A1C330540001455E9 /* EJBindingGamepadMotion.m */; }; + 5CF6ABF41C402FCD009C3CF4 /* EJBindingHttpRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE64A166682700087CF94 /* EJBindingHttpRequest.m */; }; + 5CF6ABF61C402FCD009C3CF4 /* EJBindingImagePicker.m in Sources */ = {isa = PBXBuildFile; fileRef = 33BE9DE1186817D900E0D16E /* EJBindingImagePicker.m */; }; + 5CF6ABF71C402FCD009C3CF4 /* EJBindingLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE64C166682700087CF94 /* EJBindingLocalStorage.m */; }; + 5CF6ABF81C402FCD009C3CF4 /* EJBindingTouchInput.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE64E166682700087CF94 /* EJBindingTouchInput.m */; }; + 5CF6ABF91C402FCD009C3CF4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE651166682700087CF94 /* AppDelegate.m */; }; + 5CF6ABFA1C402FCD009C3CF4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE661166682700087CF94 /* main.m */; }; + 5CF6ABFB1C402FCD009C3CF4 /* EJBindingWindowEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F9AFBF169F81D400ABD91A /* EJBindingWindowEvents.m */; }; + 5CF6ABFC1C402FCD009C3CF4 /* EJBindingCanvas.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114DE1676B4FE001F1324 /* EJBindingCanvas.m */; }; + 5CF6ABFD1C402FCD009C3CF4 /* EJCanvasContext.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114E21676BAF9001F1324 /* EJCanvasContext.m */; }; + 5CF6ABFE1C402FCD009C3CF4 /* EJBindingCanvasContext2D.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114EB1676BD40001F1324 /* EJBindingCanvasContext2D.m */; }; + 5CF6ABFF1C402FCD009C3CF4 /* EJBindingImageData.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114ED1676BD40001F1324 /* EJBindingImageData.m */; }; + 5CF6AC001C402FCD009C3CF4 /* EJCanvasContext2D.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114EF1676BD40001F1324 /* EJCanvasContext2D.m */; }; + 5CF6AC011C402FCD009C3CF4 /* EJBindingGamepad.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CBFB2471BF47A7800BF2385 /* EJBindingGamepad.m */; }; + 5CF6AC021C402FCD009C3CF4 /* EJCanvasContext2DScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114F11676BD40001F1324 /* EJCanvasContext2DScreen.m */; }; + 5CF6AC031C402FCD009C3CF4 /* EJCanvasContext2DTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114F31676BD40001F1324 /* EJCanvasContext2DTexture.m */; }; + 5CF6AC041C402FCD009C3CF4 /* EJFont.mm in Sources */ = {isa = PBXBuildFile; fileRef = B6F114F51676BD40001F1324 /* EJFont.mm */; }; + 5CF6AC051C402FCD009C3CF4 /* EJCanvasContextWebGLScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = B668475B182419A500ABCDF9 /* EJCanvasContextWebGLScreen.m */; }; + 5CF6AC061C402FCD009C3CF4 /* EJBindingResolution.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C9C36531C19A33200ADF446 /* EJBindingResolution.m */; }; + 5CF6AC071C402FCD009C3CF4 /* EJImageData.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F114F71676BD40001F1324 /* EJImageData.m */; }; + 5CF6AC081C402FCD009C3CF4 /* EJBindingGamepadButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CBFB2491BF47A7800BF2385 /* EJBindingGamepadButton.m */; }; + 5CF6AC091C402FCD009C3CF4 /* EJBindingWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C8E340618C4EF40007206AE /* EJBindingWebView.m */; }; + 5CF6AC0A1C402FCD009C3CF4 /* EJPath.mm in Sources */ = {isa = PBXBuildFile; fileRef = B6F114F91676BD40001F1324 /* EJPath.mm */; }; + 5CF6AC0B1C402FCD009C3CF4 /* EJConvertColorRGBA.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F115051676BE18001F1324 /* EJConvertColorRGBA.m */; }; + 5CF6AC0C1C402FCD009C3CF4 /* EJBindingDeviceMotion.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F115191677F088001F1324 /* EJBindingDeviceMotion.m */; }; + 5CF6AC0D1C402FCD009C3CF4 /* EJBindingTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C2387D718CEFBFD00D0CC1A /* EJBindingTimer.m */; }; + 5CF6AC0E1C402FCD009C3CF4 /* EJBindingCanvasContextWebGL.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F1154C167A7D17001F1324 /* EJBindingCanvasContextWebGL.m */; }; + 5CF6AC0F1C402FCD009C3CF4 /* EJCanvasContextWebGL.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F1154F167A7DA1001F1324 /* EJCanvasContextWebGL.m */; }; + 5CF6AC101C402FCD009C3CF4 /* EJBindingWebGLObjects.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F11555167BD59B001F1324 /* EJBindingWebGLObjects.m */; }; + 5CF6AC111C402FCD009C3CF4 /* EJConvertWebGL.m in Sources */ = {isa = PBXBuildFile; fileRef = B68037001682A58200833604 /* EJConvertWebGL.m */; }; + 5CF6AC121C402FCD009C3CF4 /* EJBindingCanvasPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = B664B98A1699F3380093E04E /* EJBindingCanvasPattern.m */; }; + 5CF6AC131C402FCD009C3CF4 /* EJCanvasContextWebGLTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = B66847581823FEDF00ABCDF9 /* EJCanvasContextWebGLTexture.m */; }; + 5CF6AC141C402FCD009C3CF4 /* EJCanvasPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = B664B98D1699F49B0093E04E /* EJCanvasPattern.m */; }; + 5CF6AC151C402FCD009C3CF4 /* EJBindingGeolocation.m in Sources */ = {isa = PBXBuildFile; fileRef = B6D4B280183CDFBB008251EB /* EJBindingGeolocation.m */; }; + 5CF6AC161C402FCD009C3CF4 /* EJDeviceUID.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C4D006D1C1C2642003D718B /* EJDeviceUID.m */; }; + 5CF6AC171C402FCD009C3CF4 /* EJInterceptorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C631C011911446F009AF7F0 /* EJInterceptorManager.m */; }; + 5CF6AC181C402FCD009C3CF4 /* EJCanvasGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = B6A0F4AE16A9D86000477789 /* EJCanvasGradient.m */; }; + 5CF6AC191C402FCD009C3CF4 /* EJBindingCanvasGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = B6A0F4B316AB0B4500477789 /* EJBindingCanvasGradient.m */; }; + 5CF6AC1A1C402FCD009C3CF4 /* EJBindingKeyInput.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EBC19BD16CECE190036F9F3 /* EJBindingKeyInput.m */; }; + 5CF6AC1B1C402FCD009C3CF4 /* EJFontCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B668FCED1821C08500D4F629 /* EJFontCache.m */; }; + 5CF6AC1C1C402FCD009C3CF4 /* EJJavaScriptView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EF00C5816C29360004599A4 /* EJJavaScriptView.m */; }; + 5CF6AC1D1C402FCD009C3CF4 /* EJClassLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = B630048B16CB09850036D8D4 /* EJClassLoader.m */; }; + 5CF6AC1E1C402FCD009C3CF4 /* EJTextureStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = B699669716CC4E6D006B9456 /* EJTextureStorage.m */; }; + 5CF6AC1F1C402FCD009C3CF4 /* EJSharedTextureCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B699669A16CC55F4006B9456 /* EJSharedTextureCache.m */; }; + 5CF6AC201C402FCD009C3CF4 /* EJBindingGamepadProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CBFB24B1BF47A7800BF2385 /* EJBindingGamepadProvider.m */; }; + 5CF6AC211C402FCD009C3CF4 /* EJSharedOpenGLContext.m in Sources */ = {isa = PBXBuildFile; fileRef = B699669D16CC579B006B9456 /* EJSharedOpenGLContext.m */; }; + 5CF6AC221C402FCD009C3CF4 /* EJNonRetainingProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = B6E02BBF16D4110900616925 /* EJNonRetainingProxy.m */; }; + 5CF6AC241C402FCD009C3CF4 /* SRWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = B63D256316E8DE23007E6034 /* SRWebSocket.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; + 5CF6AC251C402FCD009C3CF4 /* EJBindingWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = B63D256C16E8DFAB007E6034 /* EJBindingWebSocket.m */; }; + 5CF6AC261C402FCD009C3CF4 /* EJBindingCanvasStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F629D016F353C700F16BAC /* EJBindingCanvasStyle.m */; }; + 5CF6AC271C402FCD009C3CF4 /* EJBindingWebGLExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = B870BDE816F2E11A00827F01 /* EJBindingWebGLExtensions.m */; }; + 5CF6AC281C402FCD009C3CF4 /* EJBindingIAPManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B6D6E09F16F7E7B4009AB75F /* EJBindingIAPManager.m */; }; + 5CF6AC291C402FCD009C3CF4 /* EJBindingIAPTransaction.m in Sources */ = {isa = PBXBuildFile; fileRef = B6D6E0A216F7E7D8009AB75F /* EJBindingIAPTransaction.m */; }; + 5CF6AC2A1C402FCD009C3CF4 /* EJBindingIAPProduct.m in Sources */ = {isa = PBXBuildFile; fileRef = B6D6E0A516F7E81B009AB75F /* EJBindingIAPProduct.m */; }; + 5CF6AC2B1C402FCD009C3CF4 /* EJBindingVideo.m in Sources */ = {isa = PBXBuildFile; fileRef = B60FA92717021E0900078D20 /* EJBindingVideo.m */; }; + 5CF6AC2C1C402FCD009C3CF4 /* EJBindingLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C8E340218C4EF40007206AE /* EJBindingLocalNotification.m */; }; + 5CF6AC2E1C402FCD009C3CF4 /* AVKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C97590A1C1CA7F4004A6EF0 /* AVKit.framework */; }; + 5CF6AC2F1C402FCD009C3CF4 /* libxml2.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A9151C10213D00698190 /* libxml2.2.dylib */; }; + 5CF6AC301C402FCD009C3CF4 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A9161C10213D00698190 /* libz.dylib */; }; + 5CF6AC311C402FCD009C3CF4 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A9111C10212E00698190 /* libsqlite3.dylib */; }; + 5CF6AC321C402FCD009C3CF4 /* libstdc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A9121C10212E00698190 /* libstdc++.dylib */; }; + 5CF6AC331C402FCD009C3CF4 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A90F1C10211600698190 /* libicucore.dylib */; }; + 5CF6AC341C402FCD009C3CF4 /* libc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A90D1C10210B00698190 /* libc++.dylib */; }; + 5CF6AC351C402FCD009C3CF4 /* Twitter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A9091C101E5800698190 /* Twitter.framework */; }; + 5CF6AC361C402FCD009C3CF4 /* CoreImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A9071C101E5200698190 /* CoreImage.framework */; }; + 5CF6AC371C402FCD009C3CF4 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A9011C101D8C00698190 /* CoreFoundation.framework */; }; + 5CF6AC381C402FCD009C3CF4 /* libxml2.2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C16A8FB1C101C9000698190 /* libxml2.2.tbd */; }; + 5CF6AC391C402FCD009C3CF4 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CBFB24F1BF47AC300BF2385 /* GameController.framework */; }; + 5CF6AC3A1C402FCD009C3CF4 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8968DF1BE3390D00AC30E6 /* WebKit.framework */; }; + 5CF6AC3B1C402FCD009C3CF4 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8968BF1BE32CAE00AC30E6 /* libc++.tbd */; }; + 5CF6AC3D1C402FCD009C3CF4 /* libicucore.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8968C01BE32CAE00AC30E6 /* libicucore.tbd */; }; + 5CF6AC3E1C402FCD009C3CF4 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8968C11BE32CAE00AC30E6 /* libsqlite3.tbd */; }; + 5CF6AC3F1C402FCD009C3CF4 /* libstdc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8968C21BE32CAE00AC30E6 /* libstdc++.tbd */; }; + 5CF6AC401C402FCD009C3CF4 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8968C31BE32CAE00AC30E6 /* libz.tbd */; }; + 5CF6AC411C402FCD009C3CF4 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C3B72E31ADAB7D3002A3FB5 /* CoreMedia.framework */; }; + 5CF6AC421C402FCD009C3CF4 /* EventKitUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C9CF4B21A58419100AEE55E /* EventKitUI.framework */; }; + 5CF6AC431C402FCD009C3CF4 /* EventKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C9CF4B01A58416A00AEE55E /* EventKit.framework */; }; + 5CF6AC441C402FCD009C3CF4 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CAC7BC81BFEF16800438B74 /* JavaScriptCore.framework */; }; + 5CF6AC461C402FCD009C3CF4 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C91E5AA18E1C43A00FCF013 /* CoreTelephony.framework */; }; + 5CF6AC481C402FCD009C3CF4 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C91E5AF18E1C47F00FCF013 /* AdSupport.framework */; }; + 5CF6AC491C402FCD009C3CF4 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C91E5AD18E1C45700FCF013 /* MessageUI.framework */; }; + 5CF6AC4A1C402FCD009C3CF4 /* Accounts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8E33FA18C4EF23007206AE /* Accounts.framework */; }; + 5CF6AC4B1C402FCD009C3CF4 /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C8E33F818C4EF1D007206AE /* Social.framework */; }; + 5CF6AC4D1C402FCD009C3CF4 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33BE9DE31868183900E0D16E /* MobileCoreServices.framework */; }; + 5CF6AC4E1C402FCD009C3CF4 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6D4B282183CF43A008251EB /* CoreLocation.framework */; }; + 5CF6AC4F1C402FCD009C3CF4 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B60FA9291702297C00078D20 /* MediaPlayer.framework */; }; + 5CF6AC501C402FCD009C3CF4 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6D6E09916F7D03C009AB75F /* StoreKit.framework */; }; + 5CF6AC511C402FCD009C3CF4 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B63D256916E8DF33007E6034 /* Security.framework */; }; + 5CF6AC521C402FCD009C3CF4 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B63D256716E8DF23007E6034 /* CFNetwork.framework */; }; + 5CF6AC531C402FCD009C3CF4 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6F1151B1677FCF2001F1324 /* CoreMotion.framework */; }; + 5CF6AC541C402FCD009C3CF4 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6F463A31636C3FA00FC89C1 /* SystemConfiguration.framework */; }; + 5CF6AC551C402FCD009C3CF4 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B7B76751619DB9700691910 /* CoreText.framework */; }; + 5CF6AC561C402FCD009C3CF4 /* GameKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6074FF215F8E41600D987F9 /* GameKit.framework */; }; + 5CF6AC581C402FCD009C3CF4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 5CF6AC591C402FCD009C3CF4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 5CF6AC5A1C402FCD009C3CF4 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; + 5CF6AC5B1C402FCD009C3CF4 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B607AB66132EA6C300D7C3EA /* OpenAL.framework */; }; + 5CF6AC5C1C402FCD009C3CF4 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B607AC32132EA75F00D7C3EA /* AudioToolbox.framework */; }; + 5CF6AC5D1C402FCD009C3CF4 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B607AD09132EB51000D7C3EA /* OpenGLES.framework */; }; + 5CF6AC5E1C402FCD009C3CF4 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B607AD0F132EB52400D7C3EA /* QuartzCore.framework */; }; + 5CF6AC5F1C402FCD009C3CF4 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6CFCCD81332F152001F17AF /* AVFoundation.framework */; }; + 5CF6AC601C402FCD009C3CF4 /* iAd.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6AC4A051359E7A5003C4982 /* iAd.framework */; }; B6074FF315F8E41700D987F9 /* GameKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6074FF215F8E41600D987F9 /* GameKit.framework */; }; B607AB67132EA6C300D7C3EA /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B607AB66132EA6C300D7C3EA /* OpenAL.framework */; }; B607AC33132EA75F00D7C3EA /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B607AC32132EA75F00D7C3EA /* AudioToolbox.framework */; }; @@ -26,12 +322,10 @@ B630048916C1A2390036D8D4 /* EJBindingTextMetrics.m in Sources */ = {isa = PBXBuildFile; fileRef = B630048816C1A1960036D8D4 /* EJBindingTextMetrics.m */; }; B630048C16CB098D0036D8D4 /* EJClassLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = B630048B16CB09850036D8D4 /* EJClassLoader.m */; }; B637065E1A27BD5600F42B90 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = B637065D1A27BD5600F42B90 /* LaunchScreen.xib */; }; - B63706601A27C15200F42B90 /* ejecta-logo.png in Resources */ = {isa = PBXBuildFile; fileRef = B637065F1A27C15200F42B90 /* ejecta-logo.png */; }; B63D256616E8DE23007E6034 /* SRWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = B63D256316E8DE23007E6034 /* SRWebSocket.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; B63D256816E8DF23007E6034 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B63D256716E8DF23007E6034 /* CFNetwork.framework */; }; B63D256A16E8DF33007E6034 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B63D256916E8DF33007E6034 /* Security.framework */; }; B63D256D16E8E0EE007E6034 /* EJBindingWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = B63D256C16E8DFAB007E6034 /* EJBindingWebSocket.m */; }; - B6468006188AB3260087F098 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6468005188AB3260087F098 /* JavaScriptCore.framework */; }; B64C87AC16B81BAA0097CD5B /* EJGLProgram2D.m in Sources */ = {isa = PBXBuildFile; fileRef = B64C87A816B80F410097CD5B /* EJGLProgram2D.m */; }; B64C87AE16B81BAA0097CD5B /* EJGLProgram2DRadialGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = B64C87AA16B80F4C0097CD5B /* EJGLProgram2DRadialGradient.m */; }; B64CE662166682700087CF94 /* EJAppViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE611166682700087CF94 /* EJAppViewController.m */; }; @@ -41,31 +335,24 @@ B64CE666166682700087CF94 /* EJOpenALBuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE61B166682700087CF94 /* EJOpenALBuffer.m */; }; B64CE667166682700087CF94 /* EJSharedOpenALManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE61D166682700087CF94 /* EJSharedOpenALManager.m */; }; B64CE668166682700087CF94 /* EJBindingBase.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE61F166682700087CF94 /* EJBindingBase.m */; }; - B64CE669166682700087CF94 /* EJBindingEjectaCore.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE621166682700087CF94 /* EJBindingEjectaCore.m */; }; + B64CE669166682700087CF94 /* EJBindingGlobalUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE621166682700087CF94 /* EJBindingGlobalUtils.m */; }; B64CE66A166682700087CF94 /* EJBindingEventedBase.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE623166682700087CF94 /* EJBindingEventedBase.m */; }; B64CE66B166682700087CF94 /* EAGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE626166682700087CF94 /* EAGLView.m */; }; B64CE66D166682700087CF94 /* EJBindingImage.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE62A166682700087CF94 /* EJBindingImage.m */; }; B64CE675166682700087CF94 /* EJTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE63C166682700087CF94 /* EJTexture.m */; }; B64CE676166682700087CF94 /* EJConvert.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE63E166682700087CF94 /* EJConvert.m */; }; B64CE678166682700087CF94 /* EJTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE641166682700087CF94 /* EJTimer.m */; }; - B64CE67A166682700087CF94 /* EJBindingAdBanner.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE646166682700087CF94 /* EJBindingAdBanner.m */; }; B64CE67B166682700087CF94 /* EJBindingGameCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE648166682700087CF94 /* EJBindingGameCenter.m */; }; B64CE67C166682700087CF94 /* EJBindingHttpRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE64A166682700087CF94 /* EJBindingHttpRequest.m */; }; B64CE67D166682700087CF94 /* EJBindingLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE64C166682700087CF94 /* EJBindingLocalStorage.m */; }; B64CE67E166682700087CF94 /* EJBindingTouchInput.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE64E166682700087CF94 /* EJBindingTouchInput.m */; }; B64CE67F166682700087CF94 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE651166682700087CF94 /* AppDelegate.m */; }; B64CE682166682700087CF94 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B64CE661166682700087CF94 /* main.m */; }; - B64CE695166682B10087CF94 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = B64CE68A166682B10087CF94 /* Icon-72.png */; }; - B64CE696166682B10087CF94 /* Icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B64CE68B166682B10087CF94 /* Icon-72@2x.png */; }; - B64CE697166682B10087CF94 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = B64CE68C166682B10087CF94 /* Icon.png */; }; - B64CE698166682B10087CF94 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B64CE68D166682B10087CF94 /* Icon@2x.png */; }; - B65A25C119618E5C00CC1744 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = B65A25C019618E5C00CC1744 /* MainWindow.xib */; }; B664B98B1699F3380093E04E /* EJBindingCanvasPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = B664B98A1699F3380093E04E /* EJBindingCanvasPattern.m */; }; B664B98E1699F49C0093E04E /* EJCanvasPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = B664B98D1699F49B0093E04E /* EJCanvasPattern.m */; }; B66847591823FEDF00ABCDF9 /* EJCanvasContextWebGLTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = B66847581823FEDF00ABCDF9 /* EJCanvasContextWebGLTexture.m */; }; B668475C182419A500ABCDF9 /* EJCanvasContextWebGLScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = B668475B182419A500ABCDF9 /* EJCanvasContextWebGLScreen.m */; }; B668FCEE1821C08500D4F629 /* EJFontCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B668FCED1821C08500D4F629 /* EJFontCache.m */; }; - B66F1E811476B6B90090D208 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B66F1E771476B3AC0090D208 /* libicucore.dylib */; }; B68037011682A58300833604 /* EJConvertWebGL.m in Sources */ = {isa = PBXBuildFile; fileRef = B68037001682A58200833604 /* EJConvertWebGL.m */; }; B68C5B95132E6CD60015092E /* App in Resources */ = {isa = PBXBuildFile; fileRef = B68C5AEF132E6CD60015092E /* App */; }; B699669816CC4E6E006B9456 /* EJTextureStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = B699669716CC4E6D006B9456 /* EJTextureStorage.m */; }; @@ -73,8 +360,6 @@ B699669E16CC579E006B9456 /* EJSharedOpenGLContext.m in Sources */ = {isa = PBXBuildFile; fileRef = B699669D16CC579B006B9456 /* EJSharedOpenGLContext.m */; }; B6A0F4AF16A9D86100477789 /* EJCanvasGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = B6A0F4AE16A9D86000477789 /* EJCanvasGradient.m */; }; B6A0F4B416AB0B4600477789 /* EJBindingCanvasGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = B6A0F4B316AB0B4500477789 /* EJBindingCanvasGradient.m */; }; - B6AC4A061359E7A5003C4982 /* iAd.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6AC4A051359E7A5003C4982 /* iAd.framework */; }; - B6CDA16018295A5F00190074 /* libc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B6CDA15F18295A5F00190074 /* libc++.dylib */; }; B6CFCCD91332F152001F17AF /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6CFCCD81332F152001F17AF /* AVFoundation.framework */; }; B6D4B281183CDFBB008251EB /* EJBindingGeolocation.m in Sources */ = {isa = PBXBuildFile; fileRef = B6D4B280183CDFBB008251EB /* EJBindingGeolocation.m */; }; B6D4B283183CF43A008251EB /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6D4B282183CF43A008251EB /* CoreLocation.framework */; }; @@ -103,10 +388,6 @@ B6F629D116F353C800F16BAC /* EJBindingCanvasStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F629D016F353C700F16BAC /* EJBindingCanvasStyle.m */; }; B6F9AFC0169F81D400ABD91A /* EJBindingWindowEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F9AFBF169F81D400ABD91A /* EJBindingWindowEvents.m */; }; B870BDE916F2E11A00827F01 /* EJBindingWebGLExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = B870BDE816F2E11A00827F01 /* EJBindingWebGLExtensions.m */; }; - B99F05C1188C4125002F194D /* Icon-60.png in Resources */ = {isa = PBXBuildFile; fileRef = B99F05BD188C4125002F194D /* Icon-60.png */; }; - B99F05C2188C4125002F194D /* Icon-60@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B99F05BE188C4125002F194D /* Icon-60@2x.png */; }; - B99F05C3188C4125002F194D /* Icon-76.png in Resources */ = {isa = PBXBuildFile; fileRef = B99F05BF188C4125002F194D /* Icon-76.png */; }; - B99F05C4188C4125002F194D /* Icon-76@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B99F05C0188C4125002F194D /* Icon-76@2x.png */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -122,6 +403,100 @@ 3EF00C5716C29360004599A4 /* EJJavaScriptView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJJavaScriptView.h; sourceTree = ""; }; 3EF00C5816C29360004599A4 /* EJJavaScriptView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJJavaScriptView.m; sourceTree = ""; }; 5B7B76751619DB9700691910 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; + 5C16A8FB1C101C9000698190 /* libxml2.2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.2.tbd; path = usr/lib/libxml2.2.tbd; sourceTree = SDKROOT; }; + 5C16A9011C101D8C00698190 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; + 5C16A9071C101E5200698190 /* CoreImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreImage.framework; path = System/Library/Frameworks/CoreImage.framework; sourceTree = SDKROOT; }; + 5C16A9091C101E5800698190 /* Twitter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Twitter.framework; path = System/Library/Frameworks/Twitter.framework; sourceTree = SDKROOT; }; + 5C16A90D1C10210B00698190 /* libc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libc++.dylib"; path = "Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/lib/libc++.dylib"; sourceTree = DEVELOPER_DIR; }; + 5C16A90F1C10211600698190 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/lib/libicucore.dylib; sourceTree = DEVELOPER_DIR; }; + 5C16A9111C10212E00698190 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/lib/libsqlite3.dylib; sourceTree = DEVELOPER_DIR; }; + 5C16A9121C10212E00698190 /* libstdc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libstdc++.dylib"; path = "Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/lib/libstdc++.dylib"; sourceTree = DEVELOPER_DIR; }; + 5C16A9151C10213D00698190 /* libxml2.2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.2.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/lib/libxml2.2.dylib; sourceTree = DEVELOPER_DIR; }; + 5C16A9161C10213D00698190 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/lib/libz.dylib; sourceTree = DEVELOPER_DIR; }; + 5C2387D618CEFBFD00D0CC1A /* EJBindingTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingTimer.h; sourceTree = ""; }; + 5C2387D718CEFBFD00D0CC1A /* EJBindingTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingTimer.m; sourceTree = ""; }; + 5C2514911ADAB0A600761DA8 /* GoogleMobileAds.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GoogleMobileAds.framework; sourceTree = ""; }; + 5C2C25861C32FA92001455E9 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.1.sdk/System/Library/Frameworks/GameController.framework; sourceTree = DEVELOPER_DIR; }; + 5C2C258A1C330540001455E9 /* EJBindingGamepadMotion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingGamepadMotion.m; sourceTree = ""; }; + 5C2C258B1C330540001455E9 /* EJBindingGamepadMotion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingGamepadMotion.h; sourceTree = ""; }; + 5C365FE21CBEE50800E01DD3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 5C365FE31CBEE50800E01DD3 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5C3B72E31ADAB7D3002A3FB5 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; + 5C3B72E71ADAD976002A3FB5 /* Chartboost.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Chartboost.framework; sourceTree = ""; }; + 5C4214EE1D5DBEEE003243A7 /* SafariServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SafariServices.framework; path = System/Library/Frameworks/SafariServices.framework; sourceTree = SDKROOT; }; + 5C4214F01D5DC1A1003243A7 /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = System/Library/Frameworks/CoreBluetooth.framework; sourceTree = SDKROOT; }; + 5C4214F21D5DC22F003243A7 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; }; + 5C4214F41D5DC367003243A7 /* UnityAds.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = UnityAds.framework; sourceTree = ""; }; + 5C4D006D1C1C2642003D718B /* EJDeviceUID.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJDeviceUID.m; sourceTree = ""; }; + 5C4D006E1C1C2642003D718B /* EJDeviceUID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJDeviceUID.h; sourceTree = ""; }; + 5C631BF919110679009AF7F0 /* EJBindingDecryptorXOR.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingDecryptorXOR.h; sourceTree = ""; }; + 5C631BFA19110679009AF7F0 /* EJBindingDecryptorXOR.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingDecryptorXOR.m; sourceTree = ""; }; + 5C631BFD1911446F009AF7F0 /* EJBindingBaseInterceptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingBaseInterceptor.h; sourceTree = ""; }; + 5C631BFE1911446F009AF7F0 /* EJBindingBaseInterceptor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingBaseInterceptor.m; sourceTree = ""; }; + 5C631BFF1911446F009AF7F0 /* EJInterceptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJInterceptor.h; sourceTree = ""; }; + 5C631C001911446F009AF7F0 /* EJInterceptorManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJInterceptorManager.h; sourceTree = ""; }; + 5C631C011911446F009AF7F0 /* EJInterceptorManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJInterceptorManager.m; sourceTree = ""; }; + 5C8968BF1BE32CAE00AC30E6 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; + 5C8968C01BE32CAE00AC30E6 /* libicucore.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libicucore.tbd; path = usr/lib/libicucore.tbd; sourceTree = SDKROOT; }; + 5C8968C11BE32CAE00AC30E6 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; }; + 5C8968C21BE32CAE00AC30E6 /* libstdc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libstdc++.tbd"; path = "usr/lib/libstdc++.tbd"; sourceTree = SDKROOT; }; + 5C8968C31BE32CAE00AC30E6 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; + 5C8968D11BE3387C00AC30E6 /* __vungle.db */ = {isa = PBXFileReference; lastKnownFileType = file; path = __vungle.db; sourceTree = ""; }; + 5C8968D21BE3387C00AC30E6 /* vg_close.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = vg_close.png; sourceTree = ""; }; + 5C8968D31BE3387C00AC30E6 /* vg_cta.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = vg_cta.png; sourceTree = ""; }; + 5C8968D41BE3387C00AC30E6 /* vg_mute_off.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = vg_mute_off.png; sourceTree = ""; }; + 5C8968D51BE3387C00AC30E6 /* vg_mute_on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = vg_mute_on.png; sourceTree = ""; }; + 5C8968D61BE3387C00AC30E6 /* vg_privacy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = vg_privacy.png; sourceTree = ""; }; + 5C8968D71BE3387C00AC30E6 /* VungleSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = VungleSDK.framework; sourceTree = ""; }; + 5C8968DF1BE3390D00AC30E6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; + 5C8E33F818C4EF1D007206AE /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; }; + 5C8E33FA18C4EF23007206AE /* Accounts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accounts.framework; path = System/Library/Frameworks/Accounts.framework; sourceTree = SDKROOT; }; + 5C8E33FD18C4EF40007206AE /* EJBindingAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingAlertView.h; sourceTree = ""; }; + 5C8E33FE18C4EF40007206AE /* EJBindingAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingAlertView.m; sourceTree = ""; }; + 5C8E33FF18C4EF40007206AE /* EJBindingAppUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingAppUtils.h; sourceTree = ""; }; + 5C8E340018C4EF40007206AE /* EJBindingAppUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingAppUtils.m; sourceTree = ""; }; + 5C8E340118C4EF40007206AE /* EJBindingLocalNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingLocalNotification.h; sourceTree = ""; }; + 5C8E340218C4EF40007206AE /* EJBindingLocalNotification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingLocalNotification.m; sourceTree = ""; }; + 5C8E340318C4EF40007206AE /* EJBindingSocial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingSocial.h; sourceTree = ""; }; + 5C8E340418C4EF40007206AE /* EJBindingSocial.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingSocial.m; sourceTree = ""; }; + 5C8E340518C4EF40007206AE /* EJBindingWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingWebView.h; sourceTree = ""; }; + 5C8E340618C4EF40007206AE /* EJBindingWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingWebView.m; sourceTree = ""; }; + 5C91E5AA18E1C43A00FCF013 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; + 5C91E5AD18E1C45700FCF013 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; + 5C91E5AF18E1C47F00FCF013 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; }; + 5C97590A1C1CA7F4004A6EF0 /* AVKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; }; + 5C9C36521C19A33200ADF446 /* EJBindingResolution.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingResolution.h; sourceTree = ""; }; + 5C9C36531C19A33200ADF446 /* EJBindingResolution.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingResolution.m; sourceTree = ""; }; + 5C9CF4B01A58416A00AEE55E /* EventKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = EventKit.framework; path = System/Library/Frameworks/EventKit.framework; sourceTree = SDKROOT; }; + 5C9CF4B21A58419100AEE55E /* EventKitUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = EventKitUI.framework; path = System/Library/Frameworks/EventKitUI.framework; sourceTree = SDKROOT; }; + 5CA813FD1B9E244000172B7A /* WebviewBridge.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = WebviewBridge.js; sourceTree = ""; }; + 5CAC7BC81BFEF16800438B74 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = ""; }; + 5CAE53BE1C2C240C00FA70DD /* Ejecta-TV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Ejecta-TV.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5CAE53C81C2C2C0D00FA70DD /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = ""; }; + 5CAE53CB1C2C314700FA70DD /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.1.sdk/System/Library/Frameworks/CoreText.framework; sourceTree = DEVELOPER_DIR; }; + 5CBFB2461BF47A7800BF2385 /* EJBindingGamepad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingGamepad.h; sourceTree = ""; }; + 5CBFB2471BF47A7800BF2385 /* EJBindingGamepad.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingGamepad.m; sourceTree = ""; }; + 5CBFB2481BF47A7800BF2385 /* EJBindingGamepadButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingGamepadButton.h; sourceTree = ""; }; + 5CBFB2491BF47A7800BF2385 /* EJBindingGamepadButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingGamepadButton.m; sourceTree = ""; }; + 5CBFB24A1BF47A7800BF2385 /* EJBindingGamepadProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingGamepadProvider.h; sourceTree = ""; }; + 5CBFB24B1BF47A7800BF2385 /* EJBindingGamepadProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingGamepadProvider.m; sourceTree = ""; }; + 5CBFB24F1BF47AC300BF2385 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; }; + 5CF2A6821BFEE2FE00B7EA09 /* LaunchScreen-Logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "LaunchScreen-Logo.png"; sourceTree = ""; }; + 5CF2A6841BFEE6D700B7EA09 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 5CF6ABAD1C3FED0C009C3CF4 /* AdColony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AdColony.framework; sourceTree = ""; }; + 5CF6ABB51C3FED37009C3CF4 /* EJBindingAdBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingAdBase.h; sourceTree = ""; }; + 5CF6ABB61C3FED37009C3CF4 /* EJBindingAdBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingAdBase.m; sourceTree = ""; }; + 5CF6ABB71C3FED37009C3CF4 /* EJBindingAdColony.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingAdColony.h; sourceTree = ""; }; + 5CF6ABB81C3FED37009C3CF4 /* EJBindingAdColony.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingAdColony.m; sourceTree = ""; }; + 5CF6ABB91C3FED37009C3CF4 /* EJBindingAdMob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingAdMob.h; sourceTree = ""; }; + 5CF6ABBA1C3FED37009C3CF4 /* EJBindingAdMob.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingAdMob.m; sourceTree = ""; }; + 5CF6ABBB1C3FED37009C3CF4 /* EJBindingChartboost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingChartboost.h; sourceTree = ""; }; + 5CF6ABBC1C3FED37009C3CF4 /* EJBindingChartboost.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingChartboost.m; sourceTree = ""; }; + 5CF6ABBD1C3FED37009C3CF4 /* EJBindingUnityAds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingUnityAds.h; sourceTree = ""; }; + 5CF6ABBE1C3FED37009C3CF4 /* EJBindingUnityAds.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingUnityAds.m; sourceTree = ""; }; + 5CF6ABBF1C3FED37009C3CF4 /* EJBindingVungle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingVungle.h; sourceTree = ""; }; + 5CF6ABC01C3FED37009C3CF4 /* EJBindingVungle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingVungle.m; sourceTree = ""; }; + 5CF6AC641C402FCD009C3CF4 /* Ejecta-NoAd.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Ejecta-NoAd.app"; sourceTree = BUILT_PRODUCTS_DIR; }; B6074FF215F8E41600D987F9 /* GameKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameKit.framework; path = System/Library/Frameworks/GameKit.framework; sourceTree = SDKROOT; }; B607AB66132EA6C300D7C3EA /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; B607AC32132EA75F00D7C3EA /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; @@ -135,7 +510,6 @@ B630048A16CB097F0036D8D4 /* EJClassLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJClassLoader.h; sourceTree = ""; }; B630048B16CB09850036D8D4 /* EJClassLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJClassLoader.m; sourceTree = ""; }; B637065D1A27BD5600F42B90 /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = ""; }; - B637065F1A27C15200F42B90 /* ejecta-logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ejecta-logo.png"; sourceTree = ""; }; B63D256116E8DE23007E6034 /* SocketRocket-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SocketRocket-Prefix.pch"; sourceTree = ""; }; B63D256216E8DE23007E6034 /* SRWebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SRWebSocket.h; sourceTree = ""; }; B63D256316E8DE23007E6034 /* SRWebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SRWebSocket.m; sourceTree = ""; }; @@ -143,7 +517,6 @@ B63D256916E8DF33007E6034 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; B63D256B16E8DFAB007E6034 /* EJBindingWebSocket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EJBindingWebSocket.h; sourceTree = ""; }; B63D256C16E8DFAB007E6034 /* EJBindingWebSocket.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EJBindingWebSocket.m; sourceTree = ""; }; - B6468005188AB3260087F098 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = ""; }; B64C87A716B80F400097CD5B /* EJGLProgram2D.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EJGLProgram2D.h; sourceTree = ""; }; B64C87A816B80F410097CD5B /* EJGLProgram2D.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EJGLProgram2D.m; sourceTree = ""; }; B64C87A916B80F450097CD5B /* EJGLProgram2DRadialGradient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EJGLProgram2DRadialGradient.h; sourceTree = ""; }; @@ -163,8 +536,8 @@ B64CE61D166682700087CF94 /* EJSharedOpenALManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJSharedOpenALManager.m; sourceTree = ""; }; B64CE61E166682700087CF94 /* EJBindingBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingBase.h; sourceTree = ""; }; B64CE61F166682700087CF94 /* EJBindingBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingBase.m; sourceTree = ""; }; - B64CE620166682700087CF94 /* EJBindingEjectaCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingEjectaCore.h; sourceTree = ""; }; - B64CE621166682700087CF94 /* EJBindingEjectaCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingEjectaCore.m; sourceTree = ""; }; + B64CE620166682700087CF94 /* EJBindingGlobalUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingGlobalUtils.h; sourceTree = ""; }; + B64CE621166682700087CF94 /* EJBindingGlobalUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingGlobalUtils.m; sourceTree = ""; }; B64CE622166682700087CF94 /* EJBindingEventedBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingEventedBase.h; sourceTree = ""; }; B64CE623166682700087CF94 /* EJBindingEventedBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingEventedBase.m; sourceTree = ""; }; B64CE625166682700087CF94 /* EAGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EAGLView.h; sourceTree = ""; }; @@ -179,8 +552,6 @@ B64CE63F166682700087CF94 /* Ejecta.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = Ejecta.js; sourceTree = ""; }; B64CE640166682700087CF94 /* EJTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJTimer.h; sourceTree = ""; }; B64CE641166682700087CF94 /* EJTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJTimer.m; sourceTree = ""; }; - B64CE645166682700087CF94 /* EJBindingAdBanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingAdBanner.h; sourceTree = ""; }; - B64CE646166682700087CF94 /* EJBindingAdBanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = EJBindingAdBanner.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; B64CE647166682700087CF94 /* EJBindingGameCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingGameCenter.h; sourceTree = ""; }; B64CE648166682700087CF94 /* EJBindingGameCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingGameCenter.m; sourceTree = ""; }; B64CE649166682700087CF94 /* EJBindingHttpRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingHttpRequest.h; sourceTree = ""; }; @@ -194,12 +565,7 @@ B64CE651166682700087CF94 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; B64CE661166682700087CF94 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; B64CE689166682B10087CF94 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - B64CE68A166682B10087CF94 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = ""; }; - B64CE68B166682B10087CF94 /* Icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72@2x.png"; sourceTree = ""; }; - B64CE68C166682B10087CF94 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; - B64CE68D166682B10087CF94 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = ""; }; B659D3121A4F6FE300B9AEF9 /* EJCanvasShaders.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EJCanvasShaders.h; sourceTree = ""; }; - B65A25C019618E5C00CC1744 /* MainWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = MainWindow.xib; path = Resources/MainWindow.xib; sourceTree = SOURCE_ROOT; }; B664B9891699F3370093E04E /* EJBindingCanvasPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingCanvasPattern.h; sourceTree = ""; }; B664B98A1699F3380093E04E /* EJBindingCanvasPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingCanvasPattern.m; sourceTree = ""; }; B664B98C1699F49B0093E04E /* EJCanvasPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJCanvasPattern.h; sourceTree = ""; }; @@ -210,8 +576,6 @@ B668475B182419A500ABCDF9 /* EJCanvasContextWebGLScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EJCanvasContextWebGLScreen.m; path = WebGL/EJCanvasContextWebGLScreen.m; sourceTree = ""; }; B668FCEC1821C08500D4F629 /* EJFontCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJFontCache.h; sourceTree = ""; }; B668FCED1821C08500D4F629 /* EJFontCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJFontCache.m; sourceTree = ""; }; - B66F1E771476B3AC0090D208 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = usr/lib/libicucore.dylib; sourceTree = SDKROOT; }; - B66F1E7F1476B6A40090D208 /* libstdc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libstdc++.dylib"; path = "usr/lib/libstdc++.dylib"; sourceTree = SDKROOT; }; B68036FF1682A58200833604 /* EJConvertWebGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EJConvertWebGL.h; path = WebGL/EJConvertWebGL.h; sourceTree = ""; }; B68037001682A58200833604 /* EJConvertWebGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EJConvertWebGL.m; path = WebGL/EJConvertWebGL.m; sourceTree = ""; }; B68C5AEF132E6CD60015092E /* App */ = {isa = PBXFileReference; lastKnownFileType = folder; path = App; sourceTree = ""; }; @@ -226,7 +590,6 @@ B6A0F4B216AB0B4500477789 /* EJBindingCanvasGradient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingCanvasGradient.h; sourceTree = ""; }; B6A0F4B316AB0B4500477789 /* EJBindingCanvasGradient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingCanvasGradient.m; sourceTree = ""; }; B6AC4A051359E7A5003C4982 /* iAd.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iAd.framework; path = System/Library/Frameworks/iAd.framework; sourceTree = SDKROOT; }; - B6CDA15F18295A5F00190074 /* libc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libc++.dylib"; path = "usr/lib/libc++.dylib"; sourceTree = SDKROOT; }; B6CFCCD81332F152001F17AF /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; B6D4B27F183CDFBB008251EB /* EJBindingGeolocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingGeolocation.h; sourceTree = ""; }; B6D4B280183CDFBB008251EB /* EJBindingGeolocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingGeolocation.m; sourceTree = ""; }; @@ -280,10 +643,6 @@ B6F9AFBF169F81D400ABD91A /* EJBindingWindowEvents.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingWindowEvents.m; sourceTree = ""; }; B870BDE716F2E10400827F01 /* EJBindingWebGLExtensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = EJBindingWebGLExtensions.h; path = WebGL/EJBindingWebGLExtensions.h; sourceTree = ""; }; B870BDE816F2E11A00827F01 /* EJBindingWebGLExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EJBindingWebGLExtensions.m; path = WebGL/EJBindingWebGLExtensions.m; sourceTree = ""; }; - B99F05BD188C4125002F194D /* Icon-60.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-60.png"; sourceTree = ""; }; - B99F05BE188C4125002F194D /* Icon-60@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-60@2x.png"; sourceTree = ""; }; - B99F05BF188C4125002F194D /* Icon-76.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-76.png"; sourceTree = ""; }; - B99F05C0188C4125002F194D /* Icon-76@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-76@2x.png"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -291,9 +650,42 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 5C4214F31D5DC22F003243A7 /* GLKit.framework in Frameworks */, + 5C4214F11D5DC1A1003243A7 /* CoreBluetooth.framework in Frameworks */, + 5C4214EF1D5DBEEE003243A7 /* SafariServices.framework in Frameworks */, + 5C97590B1C1CA7F4004A6EF0 /* AVKit.framework in Frameworks */, + 5C16A9171C10213D00698190 /* libxml2.2.dylib in Frameworks */, + 5C16A9181C10213D00698190 /* libz.dylib in Frameworks */, + 5C16A9131C10212E00698190 /* libsqlite3.dylib in Frameworks */, + 5C16A9141C10212E00698190 /* libstdc++.dylib in Frameworks */, + 5C16A9101C10211600698190 /* libicucore.dylib in Frameworks */, + 5C16A90E1C10210B00698190 /* libc++.dylib in Frameworks */, + 5C16A90A1C101E5800698190 /* Twitter.framework in Frameworks */, + 5C16A9081C101E5200698190 /* CoreImage.framework in Frameworks */, + 5C16A9021C101D8C00698190 /* CoreFoundation.framework in Frameworks */, + 5C16A8FC1C101C9000698190 /* libxml2.2.tbd in Frameworks */, + 5CBFB2501BF47AC300BF2385 /* GameController.framework in Frameworks */, + 5C8968E01BE3390D00AC30E6 /* WebKit.framework in Frameworks */, + 5C8968C41BE32CAE00AC30E6 /* libc++.tbd in Frameworks */, + 5C4214F51D5DC367003243A7 /* UnityAds.framework in Frameworks */, + 5C8968C51BE32CAE00AC30E6 /* libicucore.tbd in Frameworks */, + 5C8968C61BE32CAE00AC30E6 /* libsqlite3.tbd in Frameworks */, + 5C8968C71BE32CAE00AC30E6 /* libstdc++.tbd in Frameworks */, + 5C8968C81BE32CAE00AC30E6 /* libz.tbd in Frameworks */, + 5C3B72E41ADAB7D3002A3FB5 /* CoreMedia.framework in Frameworks */, + 5C9CF4B31A58419100AEE55E /* EventKitUI.framework in Frameworks */, + 5C9CF4B11A58416A00AEE55E /* EventKit.framework in Frameworks */, + 5CAC7BC91BFEF16800438B74 /* JavaScriptCore.framework in Frameworks */, + 5C2514921ADAB0A600761DA8 /* GoogleMobileAds.framework in Frameworks */, + 5C91E5B118E1C4A800FCF013 /* CoreTelephony.framework in Frameworks */, + 5C8968DE1BE3387C00AC30E6 /* VungleSDK.framework in Frameworks */, + 5C91E5B018E1C47F00FCF013 /* AdSupport.framework in Frameworks */, + 5C91E5AE18E1C45700FCF013 /* MessageUI.framework in Frameworks */, + 5C8E33FB18C4EF23007206AE /* Accounts.framework in Frameworks */, + 5C8E33F918C4EF1D007206AE /* Social.framework in Frameworks */, + 5CF6ABB11C3FED0C009C3CF4 /* AdColony.framework in Frameworks */, 33BE9DE41868183900E0D16E /* MobileCoreServices.framework in Frameworks */, B6D4B283183CF43A008251EB /* CoreLocation.framework in Frameworks */, - B6CDA16018295A5F00190074 /* libc++.dylib in Frameworks */, B60FA92A1702297C00078D20 /* MediaPlayer.framework in Frameworks */, B6D6E09A16F7D03F009AB75F /* StoreKit.framework in Frameworks */, B63D256A16E8DF33007E6034 /* Security.framework in Frameworks */, @@ -302,7 +694,7 @@ B6F463A41636C3FB00FC89C1 /* SystemConfiguration.framework in Frameworks */, 5B7B76761619DB9700691910 /* CoreText.framework in Frameworks */, B6074FF315F8E41700D987F9 /* GameKit.framework in Frameworks */, - B66F1E811476B6B90090D208 /* libicucore.dylib in Frameworks */, + 5C3B72E81ADAD976002A3FB5 /* Chartboost.framework in Frameworks */, 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, @@ -311,8 +703,88 @@ B607AD0A132EB51000D7C3EA /* OpenGLES.framework in Frameworks */, B607AD10132EB52400D7C3EA /* QuartzCore.framework in Frameworks */, B6CFCCD91332F152001F17AF /* AVFoundation.framework in Frameworks */, - B6AC4A061359E7A5003C4982 /* iAd.framework in Frameworks */, - B6468006188AB3260087F098 /* JavaScriptCore.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5CAE53891C2C240C00FA70DD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5C2C25871C32FA92001455E9 /* GameController.framework in Frameworks */, + 5CAE53CC1C2C314700FA70DD /* CoreText.framework in Frameworks */, + 5CAE53CA1C2C2C7300FA70DD /* JavaScriptCore.framework in Frameworks */, + 5CAE538A1C2C240C00FA70DD /* AVKit.framework in Frameworks */, + 5CAE538F1C2C240C00FA70DD /* libicucore.dylib in Frameworks */, + 5CAE53901C2C240C00FA70DD /* libc++.dylib in Frameworks */, + 5CAE539C1C2C240C00FA70DD /* CoreMedia.framework in Frameworks */, + 5CAE53A71C2C240C00FA70DD /* MobileCoreServices.framework in Frameworks */, + 5CAE53A81C2C240C00FA70DD /* CoreLocation.framework in Frameworks */, + 5CAE53AA1C2C240C00FA70DD /* StoreKit.framework in Frameworks */, + 5CAE53AB1C2C240C00FA70DD /* Security.framework in Frameworks */, + 5CAE53AC1C2C240C00FA70DD /* CFNetwork.framework in Frameworks */, + 5CAE53AE1C2C240C00FA70DD /* SystemConfiguration.framework in Frameworks */, + 5CAE53B01C2C240C00FA70DD /* GameKit.framework in Frameworks */, + 5CAE53B21C2C240C00FA70DD /* Foundation.framework in Frameworks */, + 5CAE53B31C2C240C00FA70DD /* UIKit.framework in Frameworks */, + 5CAE53B41C2C240C00FA70DD /* CoreGraphics.framework in Frameworks */, + 5CAE53B51C2C240C00FA70DD /* OpenAL.framework in Frameworks */, + 5CAE53B61C2C240C00FA70DD /* AudioToolbox.framework in Frameworks */, + 5CAE53B71C2C240C00FA70DD /* OpenGLES.framework in Frameworks */, + 5CAE53B81C2C240C00FA70DD /* QuartzCore.framework in Frameworks */, + 5CAE53B91C2C240C00FA70DD /* AVFoundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5CF6AC2D1C402FCD009C3CF4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5CF6AC2E1C402FCD009C3CF4 /* AVKit.framework in Frameworks */, + 5CF6AC2F1C402FCD009C3CF4 /* libxml2.2.dylib in Frameworks */, + 5CF6AC301C402FCD009C3CF4 /* libz.dylib in Frameworks */, + 5CF6AC311C402FCD009C3CF4 /* libsqlite3.dylib in Frameworks */, + 5CF6AC321C402FCD009C3CF4 /* libstdc++.dylib in Frameworks */, + 5CF6AC331C402FCD009C3CF4 /* libicucore.dylib in Frameworks */, + 5CF6AC341C402FCD009C3CF4 /* libc++.dylib in Frameworks */, + 5CF6AC351C402FCD009C3CF4 /* Twitter.framework in Frameworks */, + 5CF6AC361C402FCD009C3CF4 /* CoreImage.framework in Frameworks */, + 5CF6AC371C402FCD009C3CF4 /* CoreFoundation.framework in Frameworks */, + 5CF6AC381C402FCD009C3CF4 /* libxml2.2.tbd in Frameworks */, + 5CF6AC391C402FCD009C3CF4 /* GameController.framework in Frameworks */, + 5CF6AC3A1C402FCD009C3CF4 /* WebKit.framework in Frameworks */, + 5CF6AC3B1C402FCD009C3CF4 /* libc++.tbd in Frameworks */, + 5CF6AC3D1C402FCD009C3CF4 /* libicucore.tbd in Frameworks */, + 5CF6AC3E1C402FCD009C3CF4 /* libsqlite3.tbd in Frameworks */, + 5CF6AC3F1C402FCD009C3CF4 /* libstdc++.tbd in Frameworks */, + 5CF6AC401C402FCD009C3CF4 /* libz.tbd in Frameworks */, + 5CF6AC411C402FCD009C3CF4 /* CoreMedia.framework in Frameworks */, + 5CF6AC421C402FCD009C3CF4 /* EventKitUI.framework in Frameworks */, + 5CF6AC431C402FCD009C3CF4 /* EventKit.framework in Frameworks */, + 5CF6AC441C402FCD009C3CF4 /* JavaScriptCore.framework in Frameworks */, + 5CF6AC461C402FCD009C3CF4 /* CoreTelephony.framework in Frameworks */, + 5CF6AC481C402FCD009C3CF4 /* AdSupport.framework in Frameworks */, + 5CF6AC491C402FCD009C3CF4 /* MessageUI.framework in Frameworks */, + 5CF6AC4A1C402FCD009C3CF4 /* Accounts.framework in Frameworks */, + 5CF6AC4B1C402FCD009C3CF4 /* Social.framework in Frameworks */, + 5CF6AC4D1C402FCD009C3CF4 /* MobileCoreServices.framework in Frameworks */, + 5CF6AC4E1C402FCD009C3CF4 /* CoreLocation.framework in Frameworks */, + 5CF6AC4F1C402FCD009C3CF4 /* MediaPlayer.framework in Frameworks */, + 5CF6AC501C402FCD009C3CF4 /* StoreKit.framework in Frameworks */, + 5CF6AC511C402FCD009C3CF4 /* Security.framework in Frameworks */, + 5CF6AC521C402FCD009C3CF4 /* CFNetwork.framework in Frameworks */, + 5CF6AC531C402FCD009C3CF4 /* CoreMotion.framework in Frameworks */, + 5CF6AC541C402FCD009C3CF4 /* SystemConfiguration.framework in Frameworks */, + 5CF6AC551C402FCD009C3CF4 /* CoreText.framework in Frameworks */, + 5CF6AC561C402FCD009C3CF4 /* GameKit.framework in Frameworks */, + 5CF6AC581C402FCD009C3CF4 /* Foundation.framework in Frameworks */, + 5CF6AC591C402FCD009C3CF4 /* UIKit.framework in Frameworks */, + 5CF6AC5A1C402FCD009C3CF4 /* CoreGraphics.framework in Frameworks */, + 5CF6AC5B1C402FCD009C3CF4 /* OpenAL.framework in Frameworks */, + 5CF6AC5C1C402FCD009C3CF4 /* AudioToolbox.framework in Frameworks */, + 5CF6AC5D1C402FCD009C3CF4 /* OpenGLES.framework in Frameworks */, + 5CF6AC5E1C402FCD009C3CF4 /* QuartzCore.framework in Frameworks */, + 5CF6AC5F1C402FCD009C3CF4 /* AVFoundation.framework in Frameworks */, + 5CF6AC601C402FCD009C3CF4 /* iAd.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -323,6 +795,8 @@ isa = PBXGroup; children = ( 1D6058910D05DD3D006BFB54 /* Ejecta.app */, + 5CAE53BE1C2C240C00FA70DD /* Ejecta-TV.app */, + 5CF6AC641C402FCD009C3CF4 /* Ejecta-NoAd.app */, ); name = Products; sourceTree = ""; @@ -332,6 +806,7 @@ children = ( B68C5AEF132E6CD60015092E /* App */, B64CE60E166682700087CF94 /* Source */, + 5C8E33FC18C4EF40007206AE /* Extension */, B64CE683166682B10087CF94 /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, @@ -342,32 +817,193 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( - 33BE9DE31868183900E0D16E /* MobileCoreServices.framework */, - B6D4B282183CF43A008251EB /* CoreLocation.framework */, - B6CDA15F18295A5F00190074 /* libc++.dylib */, - B66F1E7F1476B6A40090D208 /* libstdc++.dylib */, - B66F1E771476B3AC0090D208 /* libicucore.dylib */, - B60FA9291702297C00078D20 /* MediaPlayer.framework */, - B6D6E09916F7D03C009AB75F /* StoreKit.framework */, - B63D256916E8DF33007E6034 /* Security.framework */, + 5C4214F21D5DC22F003243A7 /* GLKit.framework */, + 5C4214F01D5DC1A1003243A7 /* CoreBluetooth.framework */, + 5C4214EE1D5DBEEE003243A7 /* SafariServices.framework */, + 5C2C25861C32FA92001455E9 /* GameController.framework */, + 5CAE53CB1C2C314700FA70DD /* CoreText.framework */, + 5C16A90D1C10210B00698190 /* libc++.dylib */, + 5C16A90F1C10211600698190 /* libicucore.dylib */, + 5C16A9111C10212E00698190 /* libsqlite3.dylib */, + 5C16A9121C10212E00698190 /* libstdc++.dylib */, + 5C16A9151C10213D00698190 /* libxml2.2.dylib */, + 5C16A9161C10213D00698190 /* libz.dylib */, + 5C8E33FA18C4EF23007206AE /* Accounts.framework */, + 5C91E5AF18E1C47F00FCF013 /* AdSupport.framework */, + B607AC32132EA75F00D7C3EA /* AudioToolbox.framework */, + B6CFCCD81332F152001F17AF /* AVFoundation.framework */, + 5C97590A1C1CA7F4004A6EF0 /* AVKit.framework */, B63D256716E8DF23007E6034 /* CFNetwork.framework */, + 5C16A9011C101D8C00698190 /* CoreFoundation.framework */, + 288765FC0DF74451002DB57D /* CoreGraphics.framework */, + 5C16A9071C101E5200698190 /* CoreImage.framework */, + B6D4B282183CF43A008251EB /* CoreLocation.framework */, + 5C3B72E31ADAB7D3002A3FB5 /* CoreMedia.framework */, B6F1151B1677FCF2001F1324 /* CoreMotion.framework */, - B6F463A31636C3FA00FC89C1 /* SystemConfiguration.framework */, + 5C91E5AA18E1C43A00FCF013 /* CoreTelephony.framework */, 5B7B76751619DB9700691910 /* CoreText.framework */, - B6074FF215F8E41600D987F9 /* GameKit.framework */, - B607AD0F132EB52400D7C3EA /* QuartzCore.framework */, - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 5C9CF4B01A58416A00AEE55E /* EventKit.framework */, + 5C9CF4B21A58419100AEE55E /* EventKitUI.framework */, 1D30AB110D05D00D00671497 /* Foundation.framework */, - 288765FC0DF74451002DB57D /* CoreGraphics.framework */, + 5CBFB24F1BF47AC300BF2385 /* GameController.framework */, + B6074FF215F8E41600D987F9 /* GameKit.framework */, + B6AC4A051359E7A5003C4982 /* iAd.framework */, + B60FA9291702297C00078D20 /* MediaPlayer.framework */, + 5C91E5AD18E1C45700FCF013 /* MessageUI.framework */, + 33BE9DE31868183900E0D16E /* MobileCoreServices.framework */, B607AB66132EA6C300D7C3EA /* OpenAL.framework */, - B607AC32132EA75F00D7C3EA /* AudioToolbox.framework */, B607AD09132EB51000D7C3EA /* OpenGLES.framework */, - B6CFCCD81332F152001F17AF /* AVFoundation.framework */, - B6AC4A051359E7A5003C4982 /* iAd.framework */, + B607AD0F132EB52400D7C3EA /* QuartzCore.framework */, + B63D256916E8DF33007E6034 /* Security.framework */, + 5C8E33F818C4EF1D007206AE /* Social.framework */, + B6D6E09916F7D03C009AB75F /* StoreKit.framework */, + B6F463A31636C3FA00FC89C1 /* SystemConfiguration.framework */, + 5C16A9091C101E5800698190 /* Twitter.framework */, + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 5C8968DF1BE3390D00AC30E6 /* WebKit.framework */, + 5C8968BF1BE32CAE00AC30E6 /* libc++.tbd */, + 5C8968C01BE32CAE00AC30E6 /* libicucore.tbd */, + 5C8968C11BE32CAE00AC30E6 /* libsqlite3.tbd */, + 5C8968C21BE32CAE00AC30E6 /* libstdc++.tbd */, + 5C16A8FB1C101C9000698190 /* libxml2.2.tbd */, + 5C8968C31BE32CAE00AC30E6 /* libz.tbd */, ); name = Frameworks; sourceTree = ""; }; + 5C2514851ADAAF9300761DA8 /* lib */ = { + isa = PBXGroup; + children = ( + 5C4214F41D5DC367003243A7 /* UnityAds.framework */, + 5CF6ABAD1C3FED0C009C3CF4 /* AdColony.framework */, + 5C8968CF1BE3387C00AC30E6 /* VungleSDK.embeddedframework */, + 5C3B72E71ADAD976002A3FB5 /* Chartboost.framework */, + 5C2514911ADAB0A600761DA8 /* GoogleMobileAds.framework */, + ); + path = lib; + sourceTree = ""; + }; + 5C365FE11CBEE50800E01DD3 /* TV */ = { + isa = PBXGroup; + children = ( + 5C365FE21CBEE50800E01DD3 /* Assets.xcassets */, + 5C365FE31CBEE50800E01DD3 /* Info.plist */, + ); + path = TV; + sourceTree = ""; + }; + 5C631BFC1911446F009AF7F0 /* EJInterceptor */ = { + isa = PBXGroup; + children = ( + 5C631BFD1911446F009AF7F0 /* EJBindingBaseInterceptor.h */, + 5C631BFE1911446F009AF7F0 /* EJBindingBaseInterceptor.m */, + 5C631BFF1911446F009AF7F0 /* EJInterceptor.h */, + 5C631C001911446F009AF7F0 /* EJInterceptorManager.h */, + 5C631C011911446F009AF7F0 /* EJInterceptorManager.m */, + ); + path = EJInterceptor; + sourceTree = ""; + }; + 5C8968CF1BE3387C00AC30E6 /* VungleSDK.embeddedframework */ = { + isa = PBXGroup; + children = ( + 5C8968D01BE3387C00AC30E6 /* Resources */, + 5C8968D71BE3387C00AC30E6 /* VungleSDK.framework */, + ); + path = VungleSDK.embeddedframework; + sourceTree = ""; + }; + 5C8968D01BE3387C00AC30E6 /* Resources */ = { + isa = PBXGroup; + children = ( + 5C8968D11BE3387C00AC30E6 /* __vungle.db */, + 5C8968D21BE3387C00AC30E6 /* vg_close.png */, + 5C8968D31BE3387C00AC30E6 /* vg_cta.png */, + 5C8968D41BE3387C00AC30E6 /* vg_mute_off.png */, + 5C8968D51BE3387C00AC30E6 /* vg_mute_on.png */, + 5C8968D61BE3387C00AC30E6 /* vg_privacy.png */, + ); + path = Resources; + sourceTree = ""; + }; + 5C8E33FC18C4EF40007206AE /* Extension */ = { + isa = PBXGroup; + children = ( + 5CF6ABB41C3FED37009C3CF4 /* ad */, + 5C2514851ADAAF9300761DA8 /* lib */, + 5C8E33FD18C4EF40007206AE /* EJBindingAlertView.h */, + 5C8E33FE18C4EF40007206AE /* EJBindingAlertView.m */, + 5C8E33FF18C4EF40007206AE /* EJBindingAppUtils.h */, + 5C8E340018C4EF40007206AE /* EJBindingAppUtils.m */, + 5C631BF919110679009AF7F0 /* EJBindingDecryptorXOR.h */, + 5C631BFA19110679009AF7F0 /* EJBindingDecryptorXOR.m */, + 5C8E340118C4EF40007206AE /* EJBindingLocalNotification.h */, + 5C8E340218C4EF40007206AE /* EJBindingLocalNotification.m */, + 5C9C36521C19A33200ADF446 /* EJBindingResolution.h */, + 5C9C36531C19A33200ADF446 /* EJBindingResolution.m */, + 5C8E340318C4EF40007206AE /* EJBindingSocial.h */, + 5C8E340418C4EF40007206AE /* EJBindingSocial.m */, + 5C2387D618CEFBFD00D0CC1A /* EJBindingTimer.h */, + 5C2387D718CEFBFD00D0CC1A /* EJBindingTimer.m */, + 5C8E340518C4EF40007206AE /* EJBindingWebView.h */, + 5C8E340618C4EF40007206AE /* EJBindingWebView.m */, + 5C4D006E1C1C2642003D718B /* EJDeviceUID.h */, + 5C4D006D1C1C2642003D718B /* EJDeviceUID.m */, + 5CA813FD1B9E244000172B7A /* WebviewBridge.js */, + ); + path = Extension; + sourceTree = ""; + }; + 5CAC7BC71BFEF16800438B74 /* ios */ = { + isa = PBXGroup; + children = ( + 5CAC7BC81BFEF16800438B74 /* JavaScriptCore.framework */, + ); + path = ios; + sourceTree = ""; + }; + 5CAE53C71C2C2C0D00FA70DD /* tvos */ = { + isa = PBXGroup; + children = ( + 5CAE53C81C2C2C0D00FA70DD /* JavaScriptCore.framework */, + ); + path = tvos; + sourceTree = ""; + }; + 5CBFB2451BF47A7800BF2385 /* Gamepad */ = { + isa = PBXGroup; + children = ( + 5C2C258A1C330540001455E9 /* EJBindingGamepadMotion.m */, + 5C2C258B1C330540001455E9 /* EJBindingGamepadMotion.h */, + 5CBFB2461BF47A7800BF2385 /* EJBindingGamepad.h */, + 5CBFB2471BF47A7800BF2385 /* EJBindingGamepad.m */, + 5CBFB2481BF47A7800BF2385 /* EJBindingGamepadButton.h */, + 5CBFB2491BF47A7800BF2385 /* EJBindingGamepadButton.m */, + 5CBFB24A1BF47A7800BF2385 /* EJBindingGamepadProvider.h */, + 5CBFB24B1BF47A7800BF2385 /* EJBindingGamepadProvider.m */, + ); + path = Gamepad; + sourceTree = ""; + }; + 5CF6ABB41C3FED37009C3CF4 /* ad */ = { + isa = PBXGroup; + children = ( + 5CF6ABB51C3FED37009C3CF4 /* EJBindingAdBase.h */, + 5CF6ABB61C3FED37009C3CF4 /* EJBindingAdBase.m */, + 5CF6ABB71C3FED37009C3CF4 /* EJBindingAdColony.h */, + 5CF6ABB81C3FED37009C3CF4 /* EJBindingAdColony.m */, + 5CF6ABB91C3FED37009C3CF4 /* EJBindingAdMob.h */, + 5CF6ABBA1C3FED37009C3CF4 /* EJBindingAdMob.m */, + 5CF6ABBB1C3FED37009C3CF4 /* EJBindingChartboost.h */, + 5CF6ABBC1C3FED37009C3CF4 /* EJBindingChartboost.m */, + 5CF6ABBD1C3FED37009C3CF4 /* EJBindingUnityAds.h */, + 5CF6ABBE1C3FED37009C3CF4 /* EJBindingUnityAds.m */, + 5CF6ABBF1C3FED37009C3CF4 /* EJBindingVungle.h */, + 5CF6ABC01C3FED37009C3CF4 /* EJBindingVungle.m */, + ); + path = ad; + sourceTree = ""; + }; B63D255C16E8DE23007E6034 /* SocketRocket */ = { isa = PBXGroup; children = ( @@ -387,7 +1023,6 @@ B64CE650166682700087CF94 /* AppDelegate.h */, B64CE651166682700087CF94 /* AppDelegate.m */, B64CE661166682700087CF94 /* main.m */, - B65A25C019618E5C00CC1744 /* MainWindow.xib */, ); path = Source; sourceTree = ""; @@ -395,6 +1030,7 @@ B64CE60F166682700087CF94 /* Ejecta */ = { isa = PBXGroup; children = ( + 5C631BFC1911446F009AF7F0 /* EJInterceptor */, B64CE612166682700087CF94 /* EJAudio */, B64CE624166682700087CF94 /* EJCanvas */, B64CE642166682700087CF94 /* EJUtils */, @@ -410,8 +1046,8 @@ B64CE61F166682700087CF94 /* EJBindingBase.m */, B64CE622166682700087CF94 /* EJBindingEventedBase.h */, B64CE623166682700087CF94 /* EJBindingEventedBase.m */, - B64CE620166682700087CF94 /* EJBindingEjectaCore.h */, - B64CE621166682700087CF94 /* EJBindingEjectaCore.m */, + B64CE620166682700087CF94 /* EJBindingGlobalUtils.h */, + B64CE621166682700087CF94 /* EJBindingGlobalUtils.m */, B64CE63D166682700087CF94 /* EJConvert.h */, B64CE63E166682700087CF94 /* EJConvert.m */, B64CE640166682700087CF94 /* EJTimer.h */, @@ -473,13 +1109,12 @@ B64CE642166682700087CF94 /* EJUtils */ = { isa = PBXGroup; children = ( + 5CBFB2451BF47A7800BF2385 /* Gamepad */, B6D6E09D16F7E7B2009AB75F /* IAP */, 3EBC19BC16CECE190036F9F3 /* EJBindingKeyInput.h */, 3EBC19BD16CECE190036F9F3 /* EJBindingKeyInput.m */, B6F115181677F086001F1324 /* EJBindingDeviceMotion.h */, B6F115191677F088001F1324 /* EJBindingDeviceMotion.m */, - B64CE645166682700087CF94 /* EJBindingAdBanner.h */, - B64CE646166682700087CF94 /* EJBindingAdBanner.m */, B64CE647166682700087CF94 /* EJBindingGameCenter.h */, B64CE648166682700087CF94 /* EJBindingGameCenter.m */, B64CE649166682700087CF94 /* EJBindingHttpRequest.h */, @@ -503,7 +1138,8 @@ B64CE652166682700087CF94 /* lib */ = { isa = PBXGroup; children = ( - B6468005188AB3260087F098 /* JavaScriptCore.framework */, + 5CAC7BC71BFEF16800438B74 /* ios */, + 5CAE53C71C2C2C0D00FA70DD /* tvos */, B63D255C16E8DE23007E6034 /* SocketRocket */, ); path = lib; @@ -512,16 +1148,10 @@ B64CE683166682B10087CF94 /* Resources */ = { isa = PBXGroup; children = ( - B637065F1A27C15200F42B90 /* ejecta-logo.png */, - B99F05BD188C4125002F194D /* Icon-60.png */, - B99F05BE188C4125002F194D /* Icon-60@2x.png */, - B99F05BF188C4125002F194D /* Icon-76.png */, - B99F05C0188C4125002F194D /* Icon-76@2x.png */, - B64CE68A166682B10087CF94 /* Icon-72.png */, - B64CE68B166682B10087CF94 /* Icon-72@2x.png */, - B64CE68C166682B10087CF94 /* Icon.png */, - B64CE68D166682B10087CF94 /* Icon@2x.png */, + 5C365FE11CBEE50800E01DD3 /* TV */, + 5CF2A6841BFEE6D700B7EA09 /* Assets.xcassets */, B64CE689166682B10087CF94 /* Info.plist */, + 5CF2A6821BFEE2FE00B7EA09 /* LaunchScreen-Logo.png */, B637065D1A27BD5600F42B90 /* LaunchScreen.xib */, ); path = Resources; @@ -624,16 +1254,61 @@ productReference = 1D6058910D05DD3D006BFB54 /* Ejecta.app */; productType = "com.apple.product-type.application"; }; + 5CAE53271C2C240C00FA70DD /* Ejecta-TV */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5CAE53BB1C2C240C00FA70DD /* Build configuration list for PBXNativeTarget "Ejecta-TV" */; + buildPhases = ( + 5CAE53281C2C240C00FA70DD /* Resources */, + 5CAE53351C2C240C00FA70DD /* Sources */, + 5CAE53891C2C240C00FA70DD /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Ejecta-TV"; + productName = iOSImpact; + productReference = 5CAE53BE1C2C240C00FA70DD /* Ejecta-TV.app */; + productType = "com.apple.product-type.application"; + }; + 5CF6ABC71C402FCD009C3CF4 /* Ejecta-NoAd */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5CF6AC611C402FCD009C3CF4 /* Build configuration list for PBXNativeTarget "Ejecta-NoAd" */; + buildPhases = ( + 5CF6ABC81C402FCD009C3CF4 /* Resources */, + 5CF6ABD61C402FCD009C3CF4 /* Sources */, + 5CF6AC2D1C402FCD009C3CF4 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Ejecta-NoAd"; + productName = iOSImpact; + productReference = 5CF6AC641C402FCD009C3CF4 /* Ejecta-NoAd.app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0610; + LastUpgradeCheck = 0810; TargetAttributes = { 1D6058900D05DD3D006BFB54 = { - DevelopmentTeam = TYQN4X28QA; + DevelopmentTeam = VGH3FADBFA; + }; + 5CAE53271C2C240C00FA70DD = { + DevelopmentTeam = VGH3FADBFA; + SystemCapabilities = { + com.apple.GameControllers.appletvos = { + enabled = 1; + }; + }; + }; + 5CF6ABC71C402FCD009C3CF4 = { + DevelopmentTeam = VGH3FADBFA; }; }; }; @@ -646,12 +1321,15 @@ Japanese, French, German, + Base, ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; projectDirPath = ""; projectRoot = ""; targets = ( 1D6058900D05DD3D006BFB54 /* Ejecta */, + 5CAE53271C2C240C00FA70DD /* Ejecta-TV */, + 5CF6ABC71C402FCD009C3CF4 /* Ejecta-NoAd */, ); }; /* End PBXProject section */ @@ -661,19 +1339,44 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - B65A25C119618E5C00CC1744 /* MainWindow.xib in Resources */, + 5CF2A6831BFEE2FE00B7EA09 /* LaunchScreen-Logo.png in Resources */, + 5C8968D91BE3387C00AC30E6 /* vg_close.png in Resources */, + 5C8968D81BE3387C00AC30E6 /* __vungle.db in Resources */, + 5C365FE41CBEE50800E01DD3 /* Assets.xcassets in Resources */, + 5C8968DB1BE3387C00AC30E6 /* vg_mute_off.png in Resources */, + 5C8968DA1BE3387C00AC30E6 /* vg_cta.png in Resources */, + 5CF2A6851BFEE6D700B7EA09 /* Assets.xcassets in Resources */, + 5C365FE51CBEE50800E01DD3 /* Info.plist in Resources */, + 5CA813FE1B9E244000172B7A /* WebviewBridge.js in Resources */, B68C5B95132E6CD60015092E /* App in Resources */, B637065E1A27BD5600F42B90 /* LaunchScreen.xib in Resources */, - B64CE695166682B10087CF94 /* Icon-72.png in Resources */, - B64CE696166682B10087CF94 /* Icon-72@2x.png in Resources */, - B64CE697166682B10087CF94 /* Icon.png in Resources */, - B63706601A27C15200F42B90 /* ejecta-logo.png in Resources */, - B64CE698166682B10087CF94 /* Icon@2x.png in Resources */, + 5C8968DC1BE3387C00AC30E6 /* vg_mute_on.png in Resources */, B62436681666851E0046B8C7 /* Ejecta.js in Resources */, - B99F05C1188C4125002F194D /* Icon-60.png in Resources */, - B99F05C2188C4125002F194D /* Icon-60@2x.png in Resources */, - B99F05C3188C4125002F194D /* Icon-76.png in Resources */, - B99F05C4188C4125002F194D /* Icon-76@2x.png in Resources */, + 5C8968DD1BE3387C00AC30E6 /* vg_privacy.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5CAE53281C2C240C00FA70DD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5C365FE61CBEE51E00E01DD3 /* Assets.xcassets in Resources */, + 5CAE53291C2C240C00FA70DD /* LaunchScreen-Logo.png in Resources */, + 5CAE53301C2C240C00FA70DD /* App in Resources */, + 5CAE53331C2C240C00FA70DD /* Ejecta.js in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5CF6ABC81C402FCD009C3CF4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5CF6ABC91C402FCD009C3CF4 /* LaunchScreen-Logo.png in Resources */, + 5CF6ABCF1C402FCD009C3CF4 /* Assets.xcassets in Resources */, + 5CF6ABD01C402FCD009C3CF4 /* WebviewBridge.js in Resources */, + 5CF6ABD11C402FCD009C3CF4 /* App in Resources */, + 5CF6ABD21C402FCD009C3CF4 /* LaunchScreen.xib in Resources */, + 5CF6ABD41C402FCD009C3CF4 /* Ejecta.js in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -689,21 +1392,31 @@ B64C87AE16B81BAA0097CD5B /* EJGLProgram2DRadialGradient.m in Sources */, B64CE662166682700087CF94 /* EJAppViewController.m in Sources */, B64CE663166682700087CF94 /* EJAudioSourceAVAudio.m in Sources */, + 5C631BFB19110679009AF7F0 /* EJBindingDecryptorXOR.m in Sources */, B64CE664166682700087CF94 /* EJAudioSourceOpenAL.m in Sources */, B64CE665166682700087CF94 /* EJBindingAudio.m in Sources */, B64CE666166682700087CF94 /* EJOpenALBuffer.m in Sources */, + 5CF6ABC51C3FED37009C3CF4 /* EJBindingUnityAds.m in Sources */, B64CE667166682700087CF94 /* EJSharedOpenALManager.m in Sources */, B64CE668166682700087CF94 /* EJBindingBase.m in Sources */, - B64CE669166682700087CF94 /* EJBindingEjectaCore.m in Sources */, + B64CE669166682700087CF94 /* EJBindingGlobalUtils.m in Sources */, B64CE66A166682700087CF94 /* EJBindingEventedBase.m in Sources */, B64CE66B166682700087CF94 /* EAGLView.m in Sources */, B64CE66D166682700087CF94 /* EJBindingImage.m in Sources */, + 5C8E340B18C4EF40007206AE /* EJBindingAlertView.m in Sources */, + 5CF6ABC61C3FED37009C3CF4 /* EJBindingVungle.m in Sources */, B64CE675166682700087CF94 /* EJTexture.m in Sources */, + 5CF6ABC21C3FED37009C3CF4 /* EJBindingAdColony.m in Sources */, + 5C631C021911446F009AF7F0 /* EJBindingBaseInterceptor.m in Sources */, B64CE676166682700087CF94 /* EJConvert.m in Sources */, + 5C8E340E18C4EF40007206AE /* EJBindingSocial.m in Sources */, B64CE678166682700087CF94 /* EJTimer.m in Sources */, - B64CE67A166682700087CF94 /* EJBindingAdBanner.m in Sources */, B64CE67B166682700087CF94 /* EJBindingGameCenter.m in Sources */, + 5C8E340C18C4EF40007206AE /* EJBindingAppUtils.m in Sources */, + 5C2C258C1C330540001455E9 /* EJBindingGamepadMotion.m in Sources */, + 5CF6ABC41C3FED37009C3CF4 /* EJBindingChartboost.m in Sources */, B64CE67C166682700087CF94 /* EJBindingHttpRequest.m in Sources */, + 5CF6ABC11C3FED37009C3CF4 /* EJBindingAdBase.m in Sources */, 33BE9DE2186817D900E0D16E /* EJBindingImagePicker.m in Sources */, B64CE67D166682700087CF94 /* EJBindingLocalStorage.m in Sources */, B64CE67E166682700087CF94 /* EJBindingTouchInput.m in Sources */, @@ -715,14 +1428,19 @@ B6F114FA1676BD40001F1324 /* EJBindingCanvasContext2D.m in Sources */, B6F114FB1676BD40001F1324 /* EJBindingImageData.m in Sources */, B6F114FC1676BD40001F1324 /* EJCanvasContext2D.m in Sources */, + 5CBFB24C1BF47A7800BF2385 /* EJBindingGamepad.m in Sources */, B6F114FD1676BD40001F1324 /* EJCanvasContext2DScreen.m in Sources */, B6F114FE1676BD40001F1324 /* EJCanvasContext2DTexture.m in Sources */, B6F114FF1676BD40001F1324 /* EJFont.mm in Sources */, B668475C182419A500ABCDF9 /* EJCanvasContextWebGLScreen.m in Sources */, + 5C9C36541C19A33200ADF446 /* EJBindingResolution.m in Sources */, B6F115001676BD40001F1324 /* EJImageData.m in Sources */, + 5CBFB24D1BF47A7800BF2385 /* EJBindingGamepadButton.m in Sources */, + 5C8E340F18C4EF40007206AE /* EJBindingWebView.m in Sources */, B6F115011676BD40001F1324 /* EJPath.mm in Sources */, B6F115061676BE18001F1324 /* EJConvertColorRGBA.m in Sources */, B6F1151A1677F08A001F1324 /* EJBindingDeviceMotion.m in Sources */, + 5C2387D818CEFBFD00D0CC1A /* EJBindingTimer.m in Sources */, B6F1154D167A7D17001F1324 /* EJBindingCanvasContextWebGL.m in Sources */, B6F11550167A7DA1001F1324 /* EJCanvasContextWebGL.m in Sources */, B6F11556167BD59D001F1324 /* EJBindingWebGLObjects.m in Sources */, @@ -731,6 +1449,8 @@ B66847591823FEDF00ABCDF9 /* EJCanvasContextWebGLTexture.m in Sources */, B664B98E1699F49C0093E04E /* EJCanvasPattern.m in Sources */, B6D4B281183CDFBB008251EB /* EJBindingGeolocation.m in Sources */, + 5C4D006F1C1C2642003D718B /* EJDeviceUID.m in Sources */, + 5C631C031911446F009AF7F0 /* EJInterceptorManager.m in Sources */, B6A0F4AF16A9D86100477789 /* EJCanvasGradient.m in Sources */, B6A0F4B416AB0B4600477789 /* EJBindingCanvasGradient.m in Sources */, 3EBC19BE16CECE190036F9F3 /* EJBindingKeyInput.m in Sources */, @@ -739,8 +1459,10 @@ B630048C16CB098D0036D8D4 /* EJClassLoader.m in Sources */, B699669816CC4E6E006B9456 /* EJTextureStorage.m in Sources */, B699669B16CC55F5006B9456 /* EJSharedTextureCache.m in Sources */, + 5CBFB24E1BF47A7800BF2385 /* EJBindingGamepadProvider.m in Sources */, B699669E16CC579E006B9456 /* EJSharedOpenGLContext.m in Sources */, B6E02BC016D4110D00616925 /* EJNonRetainingProxy.m in Sources */, + 5CF6ABC31C3FED37009C3CF4 /* EJBindingAdMob.m in Sources */, B63D256616E8DE23007E6034 /* SRWebSocket.m in Sources */, B63D256D16E8E0EE007E6034 /* EJBindingWebSocket.m in Sources */, B6F629D116F353C800F16BAC /* EJBindingCanvasStyle.m in Sources */, @@ -749,6 +1471,172 @@ B6D6E0A316F7E7D8009AB75F /* EJBindingIAPTransaction.m in Sources */, B6D6E0A616F7E81B009AB75F /* EJBindingIAPProduct.m in Sources */, B60FA92817021E0900078D20 /* EJBindingVideo.m in Sources */, + 5C8E340D18C4EF40007206AE /* EJBindingLocalNotification.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5CAE53351C2C240C00FA70DD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5C2C258D1C33080F001455E9 /* EJBindingGamepadMotion.m in Sources */, + 5CAE53361C2C240C00FA70DD /* EJBindingTextMetrics.m in Sources */, + 5CAE53371C2C240C00FA70DD /* EJGLProgram2D.m in Sources */, + 5CAE53381C2C240C00FA70DD /* EJGLProgram2DRadialGradient.m in Sources */, + 5CAE53391C2C240C00FA70DD /* EJAppViewController.m in Sources */, + 5CAE533A1C2C240C00FA70DD /* EJAudioSourceAVAudio.m in Sources */, + 5CAE533B1C2C240C00FA70DD /* EJBindingDecryptorXOR.m in Sources */, + 5CAE533C1C2C240C00FA70DD /* EJAudioSourceOpenAL.m in Sources */, + 5CAE533D1C2C240C00FA70DD /* EJBindingAudio.m in Sources */, + 5CAE533E1C2C240C00FA70DD /* EJOpenALBuffer.m in Sources */, + 5CAE533F1C2C240C00FA70DD /* EJSharedOpenALManager.m in Sources */, + 5CAE53401C2C240C00FA70DD /* EJBindingBase.m in Sources */, + 5CAE53411C2C240C00FA70DD /* EJBindingGlobalUtils.m in Sources */, + 5CAE53421C2C240C00FA70DD /* EJBindingEventedBase.m in Sources */, + 5CAE53431C2C240C00FA70DD /* EAGLView.m in Sources */, + 5CAE53441C2C240C00FA70DD /* EJBindingImage.m in Sources */, + 5CAE53461C2C240C00FA70DD /* EJTexture.m in Sources */, + 5CAE53481C2C240C00FA70DD /* EJBindingBaseInterceptor.m in Sources */, + 5CAE53491C2C240C00FA70DD /* EJConvert.m in Sources */, + 5CAE534B1C2C240C00FA70DD /* EJTimer.m in Sources */, + 5CAE534D1C2C240C00FA70DD /* EJBindingGameCenter.m in Sources */, + 5CAE535C1C2C240C00FA70DD /* EJBindingGamepad.m in Sources */, + 5CAE534E1C2C240C00FA70DD /* EJBindingAppUtils.m in Sources */, + 5CAE53501C2C240C00FA70DD /* EJBindingHttpRequest.m in Sources */, + 5CAE53521C2C240C00FA70DD /* EJBindingLocalStorage.m in Sources */, + 5CAE53531C2C240C00FA70DD /* EJBindingTouchInput.m in Sources */, + 5CAE53541C2C240C00FA70DD /* AppDelegate.m in Sources */, + 5CAE53551C2C240C00FA70DD /* main.m in Sources */, + 5CAE53561C2C240C00FA70DD /* EJBindingWindowEvents.m in Sources */, + 5CAE53571C2C240C00FA70DD /* EJBindingCanvas.m in Sources */, + 5CAE53581C2C240C00FA70DD /* EJCanvasContext.m in Sources */, + 5CAE53591C2C240C00FA70DD /* EJBindingCanvasContext2D.m in Sources */, + 5CAE535A1C2C240C00FA70DD /* EJBindingImageData.m in Sources */, + 5CAE535B1C2C240C00FA70DD /* EJCanvasContext2D.m in Sources */, + 5CAE535D1C2C240C00FA70DD /* EJCanvasContext2DScreen.m in Sources */, + 5CAE535E1C2C240C00FA70DD /* EJCanvasContext2DTexture.m in Sources */, + 5CAE535F1C2C240C00FA70DD /* EJFont.mm in Sources */, + 5CAE53601C2C240C00FA70DD /* EJCanvasContextWebGLScreen.m in Sources */, + 5CAE53611C2C240C00FA70DD /* EJBindingResolution.m in Sources */, + 5CAE53621C2C240C00FA70DD /* EJImageData.m in Sources */, + 5CAE53631C2C240C00FA70DD /* EJBindingGamepadButton.m in Sources */, + 5CAE53651C2C240C00FA70DD /* EJPath.mm in Sources */, + 5CAE53661C2C240C00FA70DD /* EJConvertColorRGBA.m in Sources */, + 5CAE53681C2C240C00FA70DD /* EJBindingTimer.m in Sources */, + 5CAE53691C2C240C00FA70DD /* EJBindingCanvasContextWebGL.m in Sources */, + 5CAE536A1C2C240C00FA70DD /* EJCanvasContextWebGL.m in Sources */, + 5CAE536B1C2C240C00FA70DD /* EJBindingWebGLObjects.m in Sources */, + 5CAE536C1C2C240C00FA70DD /* EJConvertWebGL.m in Sources */, + 5CAE536D1C2C240C00FA70DD /* EJBindingCanvasPattern.m in Sources */, + 5CAE536E1C2C240C00FA70DD /* EJCanvasContextWebGLTexture.m in Sources */, + 5CAE536F1C2C240C00FA70DD /* EJCanvasPattern.m in Sources */, + 5CAE53711C2C240C00FA70DD /* EJDeviceUID.m in Sources */, + 5CAE53721C2C240C00FA70DD /* EJInterceptorManager.m in Sources */, + 5CAE53731C2C240C00FA70DD /* EJCanvasGradient.m in Sources */, + 5CAE53741C2C240C00FA70DD /* EJBindingCanvasGradient.m in Sources */, + 5CAE53751C2C240C00FA70DD /* EJBindingKeyInput.m in Sources */, + 5CAE53761C2C240C00FA70DD /* EJFontCache.m in Sources */, + 5CAE53771C2C240C00FA70DD /* EJJavaScriptView.m in Sources */, + 5CAE53781C2C240C00FA70DD /* EJClassLoader.m in Sources */, + 5CAE53791C2C240C00FA70DD /* EJTextureStorage.m in Sources */, + 5CAE537A1C2C240C00FA70DD /* EJSharedTextureCache.m in Sources */, + 5CAE537C1C2C240C00FA70DD /* EJBindingGamepadProvider.m in Sources */, + 5CAE537D1C2C240C00FA70DD /* EJSharedOpenGLContext.m in Sources */, + 5CAE537E1C2C240C00FA70DD /* EJNonRetainingProxy.m in Sources */, + 5CAE537F1C2C240C00FA70DD /* SRWebSocket.m in Sources */, + 5CAE53801C2C240C00FA70DD /* EJBindingWebSocket.m in Sources */, + 5CAE53811C2C240C00FA70DD /* EJBindingCanvasStyle.m in Sources */, + 5CAE53821C2C240C00FA70DD /* EJBindingWebGLExtensions.m in Sources */, + 5CAE53831C2C240C00FA70DD /* EJBindingIAPManager.m in Sources */, + 5CAE53841C2C240C00FA70DD /* EJBindingIAPTransaction.m in Sources */, + 5CAE53851C2C240C00FA70DD /* EJBindingIAPProduct.m in Sources */, + 5CAE53861C2C240C00FA70DD /* EJBindingVideo.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5CF6ABD61C402FCD009C3CF4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5CF6ABD71C402FCD009C3CF4 /* EJBindingTextMetrics.m in Sources */, + 5CF6ABD81C402FCD009C3CF4 /* EJGLProgram2D.m in Sources */, + 5CF6ABD91C402FCD009C3CF4 /* EJGLProgram2DRadialGradient.m in Sources */, + 5CF6ABDA1C402FCD009C3CF4 /* EJAppViewController.m in Sources */, + 5CF6ABDB1C402FCD009C3CF4 /* EJAudioSourceAVAudio.m in Sources */, + 5CF6ABDC1C402FCD009C3CF4 /* EJBindingDecryptorXOR.m in Sources */, + 5CF6ABDD1C402FCD009C3CF4 /* EJAudioSourceOpenAL.m in Sources */, + 5CF6ABDE1C402FCD009C3CF4 /* EJBindingAudio.m in Sources */, + 5CF6ABDF1C402FCD009C3CF4 /* EJOpenALBuffer.m in Sources */, + 5CF6ABE11C402FCD009C3CF4 /* EJSharedOpenALManager.m in Sources */, + 5CF6ABE21C402FCD009C3CF4 /* EJBindingBase.m in Sources */, + 5CF6ABE31C402FCD009C3CF4 /* EJBindingGlobalUtils.m in Sources */, + 5CF6ABE41C402FCD009C3CF4 /* EJBindingEventedBase.m in Sources */, + 5CF6ABE51C402FCD009C3CF4 /* EAGLView.m in Sources */, + 5CF6ABE61C402FCD009C3CF4 /* EJBindingImage.m in Sources */, + 5CF6ABE71C402FCD009C3CF4 /* EJBindingAlertView.m in Sources */, + 5CF6ABE91C402FCD009C3CF4 /* EJTexture.m in Sources */, + 5CF6ABEB1C402FCD009C3CF4 /* EJBindingBaseInterceptor.m in Sources */, + 5CF6ABEC1C402FCD009C3CF4 /* EJConvert.m in Sources */, + 5CF6ABED1C402FCD009C3CF4 /* EJBindingSocial.m in Sources */, + 5CF6ABEE1C402FCD009C3CF4 /* EJTimer.m in Sources */, + 5CF6ABF01C402FCD009C3CF4 /* EJBindingGameCenter.m in Sources */, + 5CF6ABF11C402FCD009C3CF4 /* EJBindingAppUtils.m in Sources */, + 5CF6ABF21C402FCD009C3CF4 /* EJBindingGamepadMotion.m in Sources */, + 5CF6ABF41C402FCD009C3CF4 /* EJBindingHttpRequest.m in Sources */, + 5CF6ABF61C402FCD009C3CF4 /* EJBindingImagePicker.m in Sources */, + 5CF6ABF71C402FCD009C3CF4 /* EJBindingLocalStorage.m in Sources */, + 5CF6ABF81C402FCD009C3CF4 /* EJBindingTouchInput.m in Sources */, + 5CF6ABF91C402FCD009C3CF4 /* AppDelegate.m in Sources */, + 5CF6ABFA1C402FCD009C3CF4 /* main.m in Sources */, + 5CF6ABFB1C402FCD009C3CF4 /* EJBindingWindowEvents.m in Sources */, + 5CF6ABFC1C402FCD009C3CF4 /* EJBindingCanvas.m in Sources */, + 5CF6ABFD1C402FCD009C3CF4 /* EJCanvasContext.m in Sources */, + 5CF6ABFE1C402FCD009C3CF4 /* EJBindingCanvasContext2D.m in Sources */, + 5CF6ABFF1C402FCD009C3CF4 /* EJBindingImageData.m in Sources */, + 5CF6AC001C402FCD009C3CF4 /* EJCanvasContext2D.m in Sources */, + 5CF6AC011C402FCD009C3CF4 /* EJBindingGamepad.m in Sources */, + 5CF6AC021C402FCD009C3CF4 /* EJCanvasContext2DScreen.m in Sources */, + 5CF6AC031C402FCD009C3CF4 /* EJCanvasContext2DTexture.m in Sources */, + 5CF6AC041C402FCD009C3CF4 /* EJFont.mm in Sources */, + 5CF6AC051C402FCD009C3CF4 /* EJCanvasContextWebGLScreen.m in Sources */, + 5CF6AC061C402FCD009C3CF4 /* EJBindingResolution.m in Sources */, + 5CF6AC071C402FCD009C3CF4 /* EJImageData.m in Sources */, + 5CF6AC081C402FCD009C3CF4 /* EJBindingGamepadButton.m in Sources */, + 5CF6AC091C402FCD009C3CF4 /* EJBindingWebView.m in Sources */, + 5CF6AC0A1C402FCD009C3CF4 /* EJPath.mm in Sources */, + 5CF6AC0B1C402FCD009C3CF4 /* EJConvertColorRGBA.m in Sources */, + 5CF6AC0C1C402FCD009C3CF4 /* EJBindingDeviceMotion.m in Sources */, + 5CF6AC0D1C402FCD009C3CF4 /* EJBindingTimer.m in Sources */, + 5CF6AC0E1C402FCD009C3CF4 /* EJBindingCanvasContextWebGL.m in Sources */, + 5CF6AC0F1C402FCD009C3CF4 /* EJCanvasContextWebGL.m in Sources */, + 5CF6AC101C402FCD009C3CF4 /* EJBindingWebGLObjects.m in Sources */, + 5CF6AC111C402FCD009C3CF4 /* EJConvertWebGL.m in Sources */, + 5CF6AC121C402FCD009C3CF4 /* EJBindingCanvasPattern.m in Sources */, + 5CF6AC131C402FCD009C3CF4 /* EJCanvasContextWebGLTexture.m in Sources */, + 5CF6AC141C402FCD009C3CF4 /* EJCanvasPattern.m in Sources */, + 5CF6AC151C402FCD009C3CF4 /* EJBindingGeolocation.m in Sources */, + 5CF6AC161C402FCD009C3CF4 /* EJDeviceUID.m in Sources */, + 5CF6AC171C402FCD009C3CF4 /* EJInterceptorManager.m in Sources */, + 5CF6AC181C402FCD009C3CF4 /* EJCanvasGradient.m in Sources */, + 5CF6AC191C402FCD009C3CF4 /* EJBindingCanvasGradient.m in Sources */, + 5CF6AC1A1C402FCD009C3CF4 /* EJBindingKeyInput.m in Sources */, + 5CF6AC1B1C402FCD009C3CF4 /* EJFontCache.m in Sources */, + 5CF6AC1C1C402FCD009C3CF4 /* EJJavaScriptView.m in Sources */, + 5CF6AC1D1C402FCD009C3CF4 /* EJClassLoader.m in Sources */, + 5CF6AC1E1C402FCD009C3CF4 /* EJTextureStorage.m in Sources */, + 5CF6AC1F1C402FCD009C3CF4 /* EJSharedTextureCache.m in Sources */, + 5CF6AC201C402FCD009C3CF4 /* EJBindingGamepadProvider.m in Sources */, + 5CF6AC211C402FCD009C3CF4 /* EJSharedOpenGLContext.m in Sources */, + 5CF6AC221C402FCD009C3CF4 /* EJNonRetainingProxy.m in Sources */, + 5CF6AC241C402FCD009C3CF4 /* SRWebSocket.m in Sources */, + 5CF6AC251C402FCD009C3CF4 /* EJBindingWebSocket.m in Sources */, + 5CF6AC261C402FCD009C3CF4 /* EJBindingCanvasStyle.m in Sources */, + 5CF6AC271C402FCD009C3CF4 /* EJBindingWebGLExtensions.m in Sources */, + 5CF6AC281C402FCD009C3CF4 /* EJBindingIAPManager.m in Sources */, + 5CF6AC291C402FCD009C3CF4 /* EJBindingIAPTransaction.m in Sources */, + 5CF6AC2A1C402FCD009C3CF4 /* EJBindingIAPProduct.m in Sources */, + 5CF6AC2B1C402FCD009C3CF4 /* EJBindingVideo.m in Sources */, + 5CF6AC2C1C402FCD009C3CF4 /* EJBindingLocalNotification.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -759,10 +1647,17 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "\"$(SRCROOT)/Source/lib\"", + "$(PROJECT_DIR)/Source/lib/ios", + "$(PROJECT_DIR)/Extension/lib", + "$(PROJECT_DIR)/Extension/lib/VungleSDK.embeddedframework", + "$(PROJECT_DIR)/Source/lib/tvos", ); GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -770,13 +1665,18 @@ GCC_PREFIX_HEADER = Source/Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = ""; INFOPLIST_FILE = Resources/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)\"", "\"$(SRCROOT)/Source/lib\"", + "\"$(SRCROOT)/Extension/lib\"", ); OTHER_CFLAGS = "-DDEBUG"; + PRODUCT_BUNDLE_IDENTIFIER = "cn.fattyboy.${PRODUCT_NAME}"; PRODUCT_NAME = Ejecta; + PROVISIONING_PROFILE = ""; + SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -785,20 +1685,180 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; + ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "\"$(SRCROOT)/Source/lib\"", + "$(PROJECT_DIR)/Source/lib/ios", + "$(PROJECT_DIR)/Extension/lib", + "$(PROJECT_DIR)/Extension/lib/VungleSDK.embeddedframework", + "$(PROJECT_DIR)/Source/lib/tvos", ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Source/Prefix.pch; INFOPLIST_FILE = Resources/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)\"", "\"$(SRCROOT)/Source/lib\"", + "\"$(SRCROOT)/Extension/lib\"", ); + PRODUCT_BUNDLE_IDENTIFIER = "cn.fattyboy.${PRODUCT_NAME}"; PRODUCT_NAME = Ejecta; + PROVISIONING_PROFILE = ""; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 5CAE53BC1C2C240C00FA70DD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_BITCODE = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Source/lib/tvos", + "$(PROJECT_DIR)/Extension/lib", + "$(PROJECT_DIR)/Extension/lib/VungleSDK.embeddedframework", + ); + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Source/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ""; + INFOPLIST_FILE = Resources/TV/Info.plist; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + "\"$(SRCROOT)/Source/lib\"", + "\"$(SRCROOT)/Extension/lib\"", + ); + OTHER_CFLAGS = "-DDEBUG"; + PRODUCT_BUNDLE_IDENTIFIER = "cn.fattyboy.${PRODUCT_NAME}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + SDKROOT = appletvos; + SUPPORTED_PLATFORMS = "appletvsimulator appletvos"; + TARGETED_DEVICE_FAMILY = 3; + }; + name = Debug; + }; + 5CAE53BD1C2C240C00FA70DD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_BITCODE = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Source/lib/tvos", + "$(PROJECT_DIR)/Extension/lib", + "$(PROJECT_DIR)/Extension/lib/VungleSDK.embeddedframework", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Source/Prefix.pch; + INFOPLIST_FILE = Resources/TV/Info.plist; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + "\"$(SRCROOT)/Source/lib\"", + "\"$(SRCROOT)/Extension/lib\"", + ); + PRODUCT_BUNDLE_IDENTIFIER = "cn.fattyboy.${PRODUCT_NAME}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + SDKROOT = appletvos; + SUPPORTED_PLATFORMS = "appletvsimulator appletvos"; + TARGETED_DEVICE_FAMILY = 3; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 5CF6AC621C402FCD009C3CF4 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Source/lib/ios", + "$(PROJECT_DIR)/Extension/lib", + "$(PROJECT_DIR)/Extension/lib/VungleSDK.embeddedframework", + "$(PROJECT_DIR)/Source/lib/tvos", + ); + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Source/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ""; + INFOPLIST_FILE = Resources/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + "\"$(SRCROOT)/Source/lib\"", + "\"$(SRCROOT)/Extension/lib\"", + ); + OTHER_CFLAGS = "-DDEBUG"; + PRODUCT_BUNDLE_IDENTIFIER = "cn.fattyboy.${PRODUCT_NAME}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 5CF6AC631C402FCD009C3CF4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Source/lib/ios", + "$(PROJECT_DIR)/Extension/lib", + "$(PROJECT_DIR)/Extension/lib/VungleSDK.embeddedframework", + "$(PROJECT_DIR)/Source/lib/tvos", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Source/Prefix.pch; + INFOPLIST_FILE = Resources/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + "\"$(SRCROOT)/Source/lib\"", + "\"$(SRCROOT)/Extension/lib\"", + ); + PRODUCT_BUNDLE_IDENTIFIER = "cn.fattyboy.${PRODUCT_NAME}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -807,19 +1867,39 @@ C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_BITCODE = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = NS_BLOCK_ASSERTIONS; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - "${SOURCE_ROOT}", - "${SOURCE_ROOT}/Source/lib", + "$(PROJECT_DIR)/Source/lib", + "$(PROJECT_DIR)/Extension/lib", ); INFOPLIST_FILE = ""; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-DDEBUG"; + OTHER_LDFLAGS = "-ObjC"; PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; }; @@ -828,17 +1908,36 @@ C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_BITCODE = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - "${SOURCE_ROOT}", - "${SOURCE_ROOT}/Source/lib", + "$(PROJECT_DIR)/Source/lib", + "$(PROJECT_DIR)/Extension/lib", ); INFOPLIST_FILE = ""; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + OTHER_LDFLAGS = "-ObjC"; PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; @@ -857,6 +1956,24 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 5CAE53BB1C2C240C00FA70DD /* Build configuration list for PBXNativeTarget "Ejecta-TV" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5CAE53BC1C2C240C00FA70DD /* Debug */, + 5CAE53BD1C2C240C00FA70DD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5CF6AC611C402FCD009C3CF4 /* Build configuration list for PBXNativeTarget "Ejecta-NoAd" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5CF6AC621C402FCD009C3CF4 /* Debug */, + 5CF6AC631C402FCD009C3CF4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Ejecta" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Extension/EJBindingAlertView.h b/Extension/EJBindingAlertView.h new file mode 100644 index 00000000..290f5e91 --- /dev/null +++ b/Extension/EJBindingAlertView.h @@ -0,0 +1,8 @@ + +#import "EJBindingEventedBase.h" + +@interface EJBindingAlertView : EJBindingEventedBase +{ + UIAlertView *alertView; +} +@end diff --git a/Extension/EJBindingAlertView.m b/Extension/EJBindingAlertView.m new file mode 100644 index 00000000..49a0a245 --- /dev/null +++ b/Extension/EJBindingAlertView.m @@ -0,0 +1,54 @@ + +#import "EJBindingAlertView.h" + +@implementation EJBindingAlertView + + +- (id)initWithContext:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef [])argv { + if( self = [super initWithContext:ctx argc:argc argv:argv] ) { + NSString *title = JSValueToNSString(ctx, argv[0]); + NSString *message = JSValueToNSString(ctx, argv[1]); + NSString *cancelButtonTitle = JSValueToNSString(ctx, argv[2]); + alertView = [[UIAlertView alloc]initWithTitle:title message:message delegate:self cancelButtonTitle:cancelButtonTitle otherButtonTitles:nil]; + for (int i = 3; i < argc; i++) { + [alertView addButtonWithTitle:JSValueToNSString(ctx, argv[i])]; + } + } + return self; +} + +- (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { + JSValueRef params[] = {JSValueMakeNumber(scriptView.jsGlobalContext, buttonIndex)}; + [self triggerEvent:@"click" argc:1 argv:params]; +} + +-(void) alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex{ + +} + +- (void) alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex { + JSValueRef params[] = {JSValueMakeNumber(scriptView.jsGlobalContext, buttonIndex)}; + [self triggerEvent:@"dismiss" argc:1 argv:params]; +} + +- (void) alertViewCancel:(UIAlertView *)alertView { + [self triggerEvent:@"cancel" argc:0 argv:NULL]; +} + +- (void)dealloc { + [alertView release]; + [super dealloc]; +} + +EJ_BIND_EVENT(click); +EJ_BIND_EVENT(dismiss); +EJ_BIND_EVENT(cancel); + +EJ_BIND_FUNCTION(show, ctx, argc, argv) +{ + [alertView show]; + return NULL; +} + + +@end diff --git a/Extension/EJBindingAppUtils.h b/Extension/EJBindingAppUtils.h new file mode 100644 index 00000000..4f96f79c --- /dev/null +++ b/Extension/EJBindingAppUtils.h @@ -0,0 +1,10 @@ + +#import +#import "EJBindingBase.h" + + + +@interface EJBindingAppUtils : EJBindingBase + + +@end diff --git a/Extension/EJBindingAppUtils.m b/Extension/EJBindingAppUtils.m new file mode 100644 index 00000000..b9494fd3 --- /dev/null +++ b/Extension/EJBindingAppUtils.m @@ -0,0 +1,269 @@ +#import "EJBindingAppUtils.h" +#import "EJDrawable.h" +#import "EJDeviceUID.h" + +@implementation EJBindingAppUtils + + +- (void) download:(NSString *)urlStr destination:(NSString *)destination callback:(JSObjectRef)callback { + + NSString *filePath = [scriptView pathForResource:destination]; + + NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlStr]]; + + NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; + NSURLSession *session = [NSURLSession sessionWithConfiguration:configuration]; + [[session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { + +// NSLog(@"Download data:%@",data); +// NSLog(@"Download response:%@",response); + + NSString *errorDesc = NULL; + if (error) { + NSLog(@"Download Error:%@",error.description); + } + + + if (data) { + [data writeToFile:filePath atomically:YES]; + NSLog(@"File is saved to %@",filePath); + } + + if( callback ) { + JSContextRef gctx = scriptView.jsGlobalContext; + JSStringRef jsFilePath = JSStringCreateWithUTF8CString([filePath UTF8String]); + JSStringRef jsErrorDesc = errorDesc?JSStringCreateWithUTF8CString([errorDesc UTF8String]):NULL; + + JSValueRef params[] = { + error?JSValueMakeString(gctx, jsErrorDesc):JSValueMakeNull(gctx), + JSValueMakeString(gctx, jsFilePath) + }; + [scriptView invokeCallback:callback thisObject:NULL argc:2 argv:params]; + JSValueUnprotectSafe(gctx, callback); + } + + + }] resume]; + + +} + +- (NSArray *) getAllFonts { + NSInteger indFamily, indFont; + NSArray *familyNames = [UIFont familyNames]; + NSMutableArray *allFontNames = [[NSMutableArray new] autorelease]; + for (indFamily=0; indFamily<[familyNames count]; ++indFamily) + { + NSLog(@"Family name: %@", [familyNames objectAtIndex:indFamily]); + NSArray *fontNames = [UIFont fontNamesForFamilyName:[familyNames objectAtIndex:indFamily]]; + for (indFont=0; indFont<[fontNames count]; ++indFont) + { + NSLog(@" Font : %@", [fontNames objectAtIndex:indFont]); + [allFontNames addObject:[fontNames objectAtIndex:indFont]]; + } + } + return allFontNames; +} + +- (BOOL) hasFontFamily:(NSString *)familyName { + NSArray *fontNames = [UIFont fontNamesForFamilyName:familyName]; + if (fontNames && [fontNames count]>0){ + return YES; + } + return NO; +} + +- (BOOL) hasFont:(NSString *)fontName { + UIFont *font = [UIFont fontWithName:fontName size:16.0]; + if (font){ + return YES; + } + return NO; +} + + +- (void) saveImage:(NSObject *)drawable destination:(NSString *)destination callback:(JSObjectRef)callback { + + UIImage *image = [drawable.texture image]; + + NSString *filePath = image ? [scriptView pathForResource:destination] : NULL; + + NSData *raw = nil; + + if (image){ + if ([destination hasSuffix:@".jpg"] || [destination hasSuffix:@".jpeg"]){ + raw = UIImageJPEGRepresentation(image, 0.80); + }else{ + raw = UIImagePNGRepresentation(image); + } + } + + dispatch_queue_t saveFileQueue = dispatch_get_main_queue(); + dispatch_retain(saveFileQueue); + + dispatch_async(saveFileQueue, ^{ + + if (raw) { + [raw writeToFile:filePath atomically:YES]; + } + + if(callback) { + JSContextRef gctx = scriptView.jsGlobalContext; + JSStringRef jsFilePath = JSStringCreateWithUTF8CString([filePath UTF8String]); + + JSValueRef params[] = { + JSValueMakeString(gctx, jsFilePath) + }; + [scriptView invokeCallback:callback thisObject:NULL argc:1 argv:params]; + JSValueUnprotectSafe(gctx, callback); + } + + dispatch_release(saveFileQueue); + }); + +} + +- (void)dealloc { + [super dealloc]; +} + + + + +EJ_BIND_FUNCTION(download, ctx, argc, argv) +{ + + NSString *url = JSValueToNSString(ctx, argv[0]); + NSString *destination = JSValueToNSString(ctx, argv[1]); + JSObjectRef callback = nil; + + if (argc == 3){ + callback = JSValueToObject(ctx, argv[2], NULL); + if (callback) { + JSValueProtect(ctx, callback); + } + } + + [self download:url destination:destination callback:callback]; + + return JSValueMakeBoolean(ctx, true); +} + + +EJ_BIND_FUNCTION(saveImage, ctx, argc, argv) +{ + + NSObject *drawable = (NSObject *)JSValueGetPrivate(argv[0]); + + NSString *destination = JSValueToNSString(ctx, argv[1]); + JSObjectRef callback = nil; + + if (argc == 3){ + callback = JSValueToObject(ctx, argv[2], NULL); + if (callback) { + JSValueProtect(ctx, callback); + } + } + + [self saveImage:drawable destination:destination callback:callback]; + + return JSValueMakeBoolean(ctx, true); +} + + +EJ_BIND_FUNCTION(eval, ctx, argc, argv) +{ + NSString *script = JSValueToNSString(ctx, argv[0]); + + JSValueRef result = [scriptView evaluateScript:script]; + + // JSGlobalContextRef jsGlobalContext=[scriptView jsGlobalContext]; + // JSType type=JSValueGetType(jsGlobalContext,result); + + + return result; +} + + +EJ_BIND_GET(version, ctx) +{ + NSString *ver = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; + return NSStringToJSValue(ctx, ver); +} + +EJ_BIND_GET(build, ctx) +{ + NSString *ver = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]; + return NSStringToJSValue(ctx, ver); +} + +EJ_BIND_GET(udid, ctx) +{ + + NSString* udid = [EJDeviceUID uid]; + + return NSStringToJSValue(ctx, udid); +} + +EJ_BIND_GET(uuid, ctx) +{ + NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; + static NSString *UUID_KEY = @"EJ_APP_UUID"; + + NSString *app_uuid = [userDefaults stringForKey:UUID_KEY]; + + if (app_uuid == nil) { + CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault); + CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef); + + app_uuid = [NSString stringWithString:(NSString *)uuidString]; + [userDefaults setObject:app_uuid forKey:UUID_KEY]; + [userDefaults synchronize]; + + CFRelease(uuidString); + CFRelease(uuidRef); + } + return NSStringToJSValue(ctx, app_uuid); +} + + +EJ_BIND_GET(systemVersion, ctx) +{ + return NSStringToJSValue(ctx, [[UIDevice currentDevice] systemVersion]); +} + + +EJ_BIND_GET(systemLocal, ctx) +{ + NSString *preferredLang = [[NSLocale preferredLanguages] objectAtIndex:0]; + return NSStringToJSValue(ctx, preferredLang); +} + +EJ_BIND_FUNCTION(fileExists, ctx, argc, argv ) { + if(argc > 0) { + NSString *path = JSValueToNSString(ctx, argv[0]); + if ([[NSFileManager defaultManager] fileExistsAtPath:[scriptView pathForResource:path]]){ + return JSValueMakeBoolean(ctx, true); + } + } + return JSValueMakeBoolean(ctx, false); +} + +EJ_BIND_FUNCTION(getAllFonts, ctx, argc, argv ) { + return NSObjectToJSValue(ctx, [self getAllFonts]); +} + +EJ_BIND_FUNCTION(hasFontFamily, ctx, argc, argv ) { + NSString *familyName = JSValueToNSString(ctx, argv[0]); + BOOL exists = [self hasFontFamily:familyName]; + return JSValueMakeBoolean(ctx,exists); +} + +EJ_BIND_FUNCTION(hasFont, ctx, argc, argv ) { + NSString *fontName = JSValueToNSString(ctx, argv[0]); + BOOL exists = [self hasFont:fontName]; + return JSValueMakeBoolean(ctx,exists); +} + + +@end diff --git a/Extension/EJBindingDecryptorXOR.h b/Extension/EJBindingDecryptorXOR.h new file mode 100644 index 00000000..87e3c4e3 --- /dev/null +++ b/Extension/EJBindingDecryptorXOR.h @@ -0,0 +1,9 @@ +#import "EJBindingBaseInterceptor.h" + +//Please Don't change the value of EJ_SECRET_HEADER, unless you understand it. +#define EJ_SECRET_HEADER @"=S=" +#define EJ_SECRET_KEY @"SecretKey (Don't include Breakline)" + +@interface EJBindingDecryptorXOR : EJBindingBaseInterceptor + +@end diff --git a/Extension/EJBindingDecryptorXOR.m b/Extension/EJBindingDecryptorXOR.m new file mode 100644 index 00000000..31ccebd5 --- /dev/null +++ b/Extension/EJBindingDecryptorXOR.m @@ -0,0 +1,39 @@ +#import "EJBindingDecryptorXOR.h" + +@implementation EJBindingDecryptorXOR + + +-(void)interceptData:(NSMutableData *)data { + + if (!data){ + return; + } + + NSData *headData = [EJ_SECRET_HEADER dataUsingEncoding:NSUTF8StringEncoding]; + size_t headLen = headData.length; + char const *head = headData.bytes; + + char const *bytes = data.bytes; + for (int i = 0; i < headLen; i++) { + if (bytes[i]!=head[i]){ + return; + }; + } + + NSData *keyData = [EJ_SECRET_KEY dataUsingEncoding:NSUTF8StringEncoding]; + size_t keyLen = keyData.length; + char const *key = keyData.bytes; + + NSRange range = NSMakeRange(0, headLen); + [data replaceBytesInRange:range withBytes:NULL length:0]; + size_t dataSize = data.length; + char *mutableBytes = data.mutableBytes; + + for (int i = 0; i < dataSize; i++) { + char v = bytes[i]; + char kv = key[i % keyLen]; + mutableBytes[i] = v ^ kv; + } +} + +@end diff --git a/Extension/EJBindingLocalNotification.h b/Extension/EJBindingLocalNotification.h new file mode 100644 index 00000000..80f4d4fd --- /dev/null +++ b/Extension/EJBindingLocalNotification.h @@ -0,0 +1,6 @@ +#import "EJBindingBase.h" + +@interface EJBindingLocalNotification : EJBindingBase { +} + +@end \ No newline at end of file diff --git a/Extension/EJBindingLocalNotification.m b/Extension/EJBindingLocalNotification.m new file mode 100644 index 00000000..a99c623e --- /dev/null +++ b/Extension/EJBindingLocalNotification.m @@ -0,0 +1,117 @@ +#import "EJBindingLocalNotification.h" + +@implementation EJBindingLocalNotification + + +- (id)initWithContext:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef [])argv { + if (self = [super initWithContext:ctx argc:argc argv:argv]) { + // for iOS 8 + if ( [UIUserNotificationSettings class] ){ + UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:nil]; + [UIApplication.sharedApplication registerUserNotificationSettings:settings]; + } + } + return self; +} + +-(void)cancelAlarm: (NSInteger) id { + NSArray *notificaitons = [[UIApplication sharedApplication] scheduledLocalNotifications]; + for (UILocalNotification *notify in notificaitons) { + if (id == [[notify.userInfo objectForKey:@"_id"] intValue]) { + [[UIApplication sharedApplication] cancelLocalNotification:notify]; + NSLog(@"Notification cancel: %ld.", (long)id); + break; + } + } +} + +-(void)scheduleAlarm: (NSInteger) id title: (NSString*) title message: (NSString*) message delay:(NSInteger) delay userInfo:(NSDictionary *)userInfo { + + [self cancelAlarm: id]; //clear any previous alarms + + UILocalNotification *localNotif = [[[UILocalNotification alloc] init]autorelease]; + + + // for iOS 8 + if ( [localNotif respondsToSelector:@selector(alertTitle)] ){ + localNotif.alertTitle = title; + } + localNotif.alertAction = title; + localNotif.alertBody = message; + localNotif.fireDate = [NSDate dateWithTimeIntervalSinceNow: delay]; + localNotif.timeZone = [NSTimeZone defaultTimeZone]; + localNotif.soundName = UILocalNotificationDefaultSoundName; + localNotif.timeZone = [NSTimeZone defaultTimeZone]; + localNotif.userInfo = userInfo; + + if (delay==0){ + [[UIApplication sharedApplication] presentLocalNotificationNow:localNotif]; + }else{ + + localNotif.applicationIconBadgeNumber = [[[UIApplication sharedApplication] scheduledLocalNotifications] count ] + 1 ; + + [[UIApplication sharedApplication] scheduleLocalNotification:localNotif]; + } + +} + +-(void)dealloc { + [super dealloc]; +} + +EJ_BIND_FUNCTION (schedule, ctx, argc, argv) { + if (argc >= 4) { + NSInteger id = JSValueToNumberFast(ctx, argv[0]); + NSString* idStr= [NSString stringWithFormat:@"%ld", (long)id ]; + NSString* title = JSValueToNSString(ctx, argv[1]); + NSString* message = JSValueToNSString(ctx, argv[2]); + NSInteger delay = JSValueToNumberFast(ctx, argv[3]); + NSDictionary *userInfo = nil; + if (argc > 4) { + JSObjectRef jsUserInfo = JSValueToObject(ctx, argv[4], NULL); + userInfo = (NSMutableDictionary *)JSValueToNSObject(ctx, jsUserInfo); + [userInfo setValue:idStr forKey:@"_id"]; + }else{ + userInfo = [NSDictionary dictionaryWithObjectsAndKeys:idStr, @"_id", nil]; + } + [self scheduleAlarm: id title: title message: message delay: delay userInfo:userInfo ]; + + NSLog(@"Notification: #%ld %@. Show in %ld seconds.", (long)id, title, (long)delay); + } + + return NULL; +} + +EJ_BIND_FUNCTION (cancel, ctx, argc, argv) { + if (argc == 1) { + NSInteger id = JSValueToNumberFast(ctx, argv[0]); + [self cancelAlarm: id]; + + NSLog(@"Notification cancelled: #%ld.", (long)id); + } + + return NULL; +} + + +EJ_BIND_FUNCTION(clearAll, ctx, argc, argv) { + [[UIApplication sharedApplication] cancelAllLocalNotifications]; + return NULL; +} + +//EJ_BIND_SET(applicationIconBadgeNumber, ctx, value) { +// [UIApplication sharedApplication].applicationIconBadgeNumber = JSValueToNumberFast(ctx, value); +//} + +EJ_BIND_FUNCTION (logNotifications, ctx, argc, argv) { + for (UILocalNotification *notification in [[[[UIApplication sharedApplication] scheduledLocalNotifications] copy] autorelease]) { + NSDictionary *userInfo = notification.userInfo; + NSLog(@"Notification: #%d %@", [[userInfo objectForKey:@"id"] intValue], [notification alertAction]); + } + + return NULL; +} + + + +@end diff --git a/Extension/EJBindingResolution.h b/Extension/EJBindingResolution.h new file mode 100644 index 00000000..d6eaca50 --- /dev/null +++ b/Extension/EJBindingResolution.h @@ -0,0 +1,9 @@ +#import "EJBindingBase.h" +#import + +@interface EJBindingResolution : EJBindingBase +{ + float dotsPerCentimeter; + float dotsPerInch; +} +@end diff --git a/Extension/EJBindingResolution.m b/Extension/EJBindingResolution.m new file mode 100644 index 00000000..6f3d4957 --- /dev/null +++ b/Extension/EJBindingResolution.m @@ -0,0 +1,160 @@ +#import "EJBindingResolution.h" +#include + + +@implementation EJBindingResolution + +- (id)initWithContext:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + if (self = [super initWithContext:ctx argc:argc argv:argv]) { + struct utsname sysinfo; + + if (uname(&sysinfo) == 0) { + NSString *identifier = [NSString stringWithUTF8String:sysinfo.machine]; + + // group devices with same dots-density + NSArray *iDevices = @[ + + @{@"identifiers": @[ + @"iPad1,1", // iPad + @"iPad2,1", @"iPad2,2", @"iPad2,3", @"iPad2,4", // iPad 2 + ], + @"dotsPerCentimeter": @52.0f, + @"dotsPerInch": @132.0f}, + + + @{@"identifiers": @[ + @"iPad3,1", @"iPad3,2", @"iPad3,3", // iPad 3 + @"iPad3,4", @"iPad3,5", @"iPad3,6", // iPad 4 + @"iPad4,1", @"iPad4,2", @"iPad4,3", // iPad Air + @"iPad5,3", @"iPad5,4", // iPad Air 2 + @"iPad6,3", @"iPad6,4", // iPad Air 2 + ], + @"dotsPerCentimeter": @104.0f, + @"dotsPerInch": @264.0f}, + + + @{@"identifiers": @[ + @"iPad2,5", @"iPad2,6", @"iPad2,7", // iPad Mini + ], + @"dotsPerCentimeter": @64.0f, + @"dotsPerInch": @163.0f}, + + + @{@"identifiers": @[ + @"iPad4,4", @"iPad4,5", @"iPad4,6", // iPad Mini Retina (2) + @"iPad4,7", @"iPad4,8", @"iPad4,9", // iPad Mini 3 + @"iPad5,1", @"iPad5,2", // iPad Mini 4 + ], + @"dotsPerCentimeter": @128.0f, + @"dotsPerInch": @326.0f}, + + + @{@"identifiers": @[ + @"iPad6,7", @"iPad6,8", // iPad Pro + ], + @"dotsPerCentimeter": @104.0f, + @"dotsPerInch": @264.0f}, + + + @{@"identifiers": @[ + @"iPod1,1", // iPod Touch 1 + @"iPod2,1", // iPod Touch 2 + @"iPod3,1", // iPod Touch 3 + @"iPhone1,1", // iPhone 2G + @"iPhone1,2", // iPhone 3G + @"iPhone2,1", // iPhone 3GS + ], + @"dotsPerCentimeter": @64.0f, + @"dotsPerInch": @163.0f}, + + + @{@"identifiers": @[ + @"iPod4,1", // iPod Touch 4 + @"iPhone3,1", @"iPhone3,2", @"iPhone3,3", // iPhone 4 + @"iPhone4,1", // iPhone 4S + ], + @"dotsPerCentimeter": @128.0f, + @"dotsPerInch": @326.0f}, + + + @{@"identifiers": @[ + @"iPod5,1", // iPod Touch 5 + @"iPod7,1", // iPod Touch 6 + @"iPhone5,1", @"iPhone5,2", // iPhone 5 + @"iPhone5,3", @"iPhone5,4", // iPhone 5C + @"iPhone6,1", @"iPhone6,2", // iPhone 5S + @"iPhone8,4", // iPhone SE + ], + @"dotsPerCentimeter": @128.0f, + @"dotsPerInch": @326.0f}, + + + @{@"identifiers": @[ + @"iPhone7,1", // iPhone 6 Plus + @"iPhone8,2", // iPhone 6s Plus + ], + @"dotsPerCentimeter": @158.0f, + @"dotsPerInch": @401.0f}, + + + @{@"identifiers": @[ + @"iPhone7,2", // iPhone 6 + @"iPhone8,1", // iPhone 6s + ], + @"dotsPerCentimeter": @128.0f, + @"dotsPerInch": @326.0f}, + + + @{@"identifiers": @[ + @"i386", @"x86_64", // iOS simulator + ], + @"dotsPerCentimeter": @128.0f, + @"dotsPerInch": @326.0f}, + + ]; + + + for (id deviceClass in iDevices) { + for (NSString *deviceId in [deviceClass objectForKey:@"identifiers"]) { + if ([identifier isEqualToString:deviceId]) { + dotsPerCentimeter = [[deviceClass objectForKey:@"dotsPerCentimeter"] floatValue]; + dotsPerInch = [[deviceClass objectForKey:@"dotsPerInch"] floatValue]; + break; + } + } + } + + NSLog(@"Device name: %s", sysinfo.machine); + if (dotsPerInch == 0){ + NSLog(@"Unknow device, use default values"); + // Default values + dotsPerCentimeter = 104.0f; + dotsPerInch = 264.0f; + } + + } + } + + return self; +} + + +EJ_BIND_GET(dpi, ctx) { + return JSValueMakeNumber(ctx, dotsPerInch); +} + +EJ_BIND_GET(dpc, ctx) { + return JSValueMakeNumber(ctx, dotsPerCentimeter); +} + + +EJ_BIND_GET(ppc, ctx) { + return JSValueMakeNumber(ctx, dotsPerCentimeter); +} + +EJ_BIND_GET(ppi, ctx) { + return JSValueMakeNumber(ctx, dotsPerInch); +} + +@end diff --git a/Extension/EJBindingSocial.h b/Extension/EJBindingSocial.h new file mode 100644 index 00000000..a9cd06b6 --- /dev/null +++ b/Extension/EJBindingSocial.h @@ -0,0 +1,16 @@ +#import "EJBindingBase.h" +#import +#import +#import + + +#define EJECTA_SYSTEM_VERSION_LESS_THAN(v) \ +([UIDevice.currentDevice.systemVersion compare:v options:NSNumericSearch] == NSOrderedAscending) + + +@interface EJBindingSocial : EJBindingBase +{ + UITextView *sharingTextView; +} +@property (nonatomic, strong) ACAccountStore *accountStore; +@end diff --git a/Extension/EJBindingSocial.m b/Extension/EJBindingSocial.m new file mode 100644 index 00000000..4bfa83af --- /dev/null +++ b/Extension/EJBindingSocial.m @@ -0,0 +1,415 @@ +#import "EJBindingSocial.h" + + +@implementation EJBindingSocial + + +- (void)invokeAndUnprotectPostCallback:(JSObjectRef)callback statusCode:(NSInteger)statusCode responseObject:(NSObject *)responseObject { + if(!callback){ + return; + } + JSGlobalContextRef ctx = scriptView.jsGlobalContext; + JSValueRef arg = JSValueMakeNull(ctx); + if (responseObject == NULL) { + // TODO + } + else if ([responseObject isKindOfClass:[NSString class]]) { + JSStringRef jsStr = JSStringCreateWithUTF8CString([(NSString *)responseObject UTF8String]); + arg = JSValueMakeString(ctx, (JSStringRef)jsStr); + } + else { + arg = NSObjectToJSValue(scriptView.jsGlobalContext, responseObject); + } + [scriptView invokeCallback:callback thisObject:NULL argc:2 argv: + (JSValueRef[]) { + JSValueMakeNumber(scriptView.jsGlobalContext, statusCode), arg + } + ]; + JSValueUnprotect(scriptView.jsGlobalContext, callback); +} + +- (id)initWithContext:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + if (self = [super initWithContext:ctx argc:argc argv:argv]) { + _accountStore = [[ACAccountStore alloc] init]; + } + return self; +} + +- (void)dealloc { + [_accountStore release]; + [super dealloc]; +} + +- (BOOL)addMultipartData:(NSString *)imgSrc request:(SLRequest *)request dataName:(NSString *)dataName { + imgSrc = [scriptView pathForResource:imgSrc]; + UIImage *img = [UIImage imageNamed:imgSrc]; + if ([imgSrc hasSuffix:@".png"]) { + NSData *imageData = UIImagePNGRepresentation(img); + [request addMultipartData:imageData + withName:dataName + type:@"image/png" + filename:@"image.png"]; + } + else if ([imgSrc hasSuffix:@".gif"]) { + NSData *imageData = UIImagePNGRepresentation(img); + [request addMultipartData:imageData + withName:dataName + type:@"image/gif" + filename:@"image.gif"]; + } + else if ([imgSrc hasSuffix:@".jpg"] || [imgSrc hasSuffix:@".jpeg"]) { + NSData *imageData = UIImageJPEGRepresentation(img, 0.9f); + [request addMultipartData:imageData + withName:dataName + type:@"image/jpeg" + filename:@"image.jpg"]; + } + else { + return FALSE; + } + return TRUE; +} + +- (SLRequest *)createSLRequest:(NSString *)snsName message:(NSString *)message imgSrc:(NSString *)imgSrc { + SLRequest *request = NULL; + snsName = [snsName lowercaseString]; + if ([snsName isEqualToString:@"twitter"]) { + NSURL *url = [NSURL URLWithString:@"https://api.twitter.com/1.1/statuses/update_with_media.json"]; + NSDictionary *params = @{ @"status" : message }; + request = [SLRequest requestForServiceType:SLServiceTypeTwitter + requestMethod:SLRequestMethodPOST + URL:url + parameters:params]; + + if (imgSrc) { + [self addMultipartData:imgSrc request:request dataName:@"media[]"]; + } + } + if ([snsName isEqualToString:@"facebook"]) { + NSURL *url = [NSURL URLWithString:@"https://graph.facebook.com/me/photos"]; + NSDictionary *params = @{ @"message" : message }; + request = [SLRequest requestForServiceType:SLServiceTypeFacebook + requestMethod:SLRequestMethodPOST + URL:url + parameters:params]; + + if (imgSrc) { + [self addMultipartData:imgSrc request:request dataName:@"source"]; + } + } + + if ([snsName isEqualToString:@"sinaweibo"]) { + NSURL *url = [NSURL URLWithString:@"http://api.t.sina.com.cn/statuses/upload.json"]; + + NSDictionary *params = @{ @"status" : message }; + request = [SLRequest requestForServiceType:SLServiceTypeSinaWeibo + requestMethod:SLRequestMethodPOST + URL:url + parameters:params]; + if (imgSrc) { + [self addMultipartData:imgSrc request:request dataName:@"pic"]; + } + } + + return request; +} + +- (NSDictionary *)createRequestOption:(NSString *)snsName appKey:(NSString *)appKey { + NSDictionary *options = nil; + + if ([snsName isEqualToString:@"facebook"] && appKey != nil) { + if (appKey != nil) { + options = @{ ACFacebookAppIdKey:appKey, + ACFacebookPermissionsKey: @[@"publish_stream", @"publish_actions"], + ACFacebookAudienceKey:ACFacebookAudienceEveryone }; + } + else { + options = @{ ACFacebookPermissionsKey: @[@"publish_stream", @"publish_actions"], + ACFacebookAudienceKey:ACFacebookAudienceEveryone }; + } + } + + return options; +} + +- (void)prepareForFacebook:(NSString *)snsName message:(NSString *)message imgSrc:(NSString *)imgSrc appKey:(NSString *)appKey callback:(JSObjectRef)callback { + // separate request for read and writes + ACAccountType *accountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; + NSDictionary *readOptions = nil; + if (appKey != nil) { + readOptions = @{ ACFacebookAppIdKey:appKey, + ACFacebookPermissionsKey: @[@"email", @"read_stream", @"user_photos"], + ACFacebookAudienceKey:ACFacebookAudienceEveryone }; + } + else { + readOptions = @{ ACFacebookPermissionsKey: @[@"email", @"read_stream", @"user_photos"], + ACFacebookAudienceKey:ACFacebookAudienceEveryone }; + } + [self.accountStore requestAccessToAccountsWithType:accountType options:readOptions completion: ^(BOOL granted, NSError *error) { + if (granted) { + [self post:snsName message:message imgSrc:imgSrc appKey:appKey callback:callback]; + } + else { + //Fail gracefully... + NSLog(@"error getting permission %@", error); + [self invokeAndUnprotectPostCallback:callback statusCode:error.code responseObject:[error localizedDescription]]; + } + }]; +} + +- (void)post:(NSString *)snsName message:(NSString *)message imgSrc:(NSString *)imgSrc appKey:(NSString *)appKey callback:(JSObjectRef)callback { + ACAccountType *accountType = NULL; + + snsName = [snsName lowercaseString]; + if ([snsName isEqualToString:@"twitter"]) { + accountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter]; + } + else if ([snsName isEqualToString:@"facebook"]) { + accountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; + } + else if ([snsName isEqualToString:@"sinaweibo"]) { + accountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierSinaWeibo]; + } + if (!accountType) { + NSLog(@"%@ NOT found.", snsName); + [self invokeAndUnprotectPostCallback:callback statusCode:-1 responseObject:NULL]; + return; + } + + SLRequestHandler requestHandler = ^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) { + NSInteger statusCode = urlResponse.statusCode; + if (responseData) { + if (statusCode >= 200 && statusCode < 300) { + NSDictionary *postResponseData = [NSJSONSerialization JSONObjectWithData:responseData + options:NSJSONReadingMutableContainers + error:NULL]; + NSLog(@"[SUCCESS] %@ Server responded: status code %ld", snsName, (long)statusCode); + [self invokeAndUnprotectPostCallback:callback statusCode:statusCode responseObject:postResponseData]; + } + else { + NSLog(@"[ERROR] %@ Server responded: status code %ld %@", snsName, (long)statusCode, + [NSHTTPURLResponse localizedStringForStatusCode:statusCode]); + NSString *responseText = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; + + [self invokeAndUnprotectPostCallback:callback statusCode:statusCode responseObject:responseText]; + [responseText release]; + } + } + else { + NSLog(@"[ERROR] An error occurred while posting: %@", [error localizedDescription]); + responseData = NULL; + [self invokeAndUnprotectPostCallback:callback statusCode:error.code responseObject:[error localizedDescription]]; + } + }; + + ACAccountStoreRequestAccessCompletionHandler accountStoreHandler = ^(BOOL granted, NSError *error) { + if (granted) { + NSArray *accounts = [self.accountStore accountsWithAccountType:accountType]; + if ([accounts count] > 0) { + SLRequest *request = [self createSLRequest:snsName message:message imgSrc:imgSrc]; + [request setAccount:[accounts lastObject]]; + [request performRequestWithHandler:requestHandler]; + } + else { + NSLog(@"Not granted by SNS"); + [self invokeAndUnprotectPostCallback:callback statusCode:0 responseObject:@"Not granted by SNS"]; + } + } + else { + NSLog(@"[ERROR] An error occurred while asking for user authorization: %@", + [error localizedDescription]); + [self invokeAndUnprotectPostCallback:callback statusCode:error.code responseObject:[error localizedDescription]]; + } + }; + + + NSDictionary *options = [self createRequestOption:snsName appKey:appKey]; + + [self.accountStore requestAccessToAccountsWithType:accountType + options:options + completion:accountStoreHandler]; +} + +- (void)showPostDialog:(NSString *)snsName message:(NSString *)message imgSrc:(NSString *)imgSrc shareUrl:(NSString *)shareUrl callback:(JSObjectRef)callback { + SLComposeViewController *sns = NULL; + snsName = [snsName lowercaseString]; + if ([snsName isEqualToString:@"twitter"] && [SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]) { + sns = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter]; + } + else if ([snsName isEqualToString:@"facebook"] && [SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) { + sns = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; + } + else if ([snsName isEqualToString:@"sinaweibo"] && [SLComposeViewController isAvailableForServiceType:SLServiceTypeSinaWeibo]) { + sns = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeSinaWeibo]; + } + + if (sns) { + [sns setInitialText:message]; + if (imgSrc) { + imgSrc = [scriptView pathForResource:imgSrc]; + NSData *pixels = [NSData dataWithContentsOfFile:imgSrc]; + UIImage *img = [[UIImage alloc] initWithData:pixels]; + if (img) { + bool ok = [sns addImage:img]; + [img release]; + NSLog(@"addImage %d", ok); + } + } + if (shareUrl) { + [sns addURL:[NSURL URLWithString:shareUrl]]; + } + [sns setCompletionHandler: ^(SLComposeViewControllerResult result) { + NSInteger statusCode = 0; + switch (result) { + case SLComposeViewControllerResultDone: + statusCode = 200; + NSLog(@"Done"); + break; + + case SLComposeViewControllerResultCancelled: + statusCode = 0; + NSLog(@"Cancelled"); + break; + + default: + statusCode = 500; + NSLog(@"Other Exception"); + break; + } + [sns dismissViewControllerAnimated:YES completion:nil]; + NSString *responseText = NULL; + [self invokeAndUnprotectPostCallback:callback statusCode:statusCode responseObject:responseText]; + }]; + + [scriptView.window.rootViewController presentViewController:sns animated:YES completion: ^{ + // on displayed + NSLog(@"On Displayed"); + }]; + + }else{ + NSLog(@"%@ NOT found.", snsName); + [self invokeAndUnprotectPostCallback:callback statusCode:-1 responseObject:NULL]; + return; + } +} + +EJ_BIND_FUNCTION(post, ctx, argc, argv) +{ + if (![SLComposeViewController class]) { + NSLog(@"This iOS does NOT include Social.framework."); + return JSValueMakeBoolean(ctx, false); + } + NSString *snsName = JSValueToNSString(ctx, argv[0]); + NSString *message = JSValueToNSString(ctx, argv[1]); + NSString *imgSrc = JSValueToNSString(ctx, argv[2]); + NSString *appKey; + JSObjectRef callback; + if (argc > 4) { + appKey = JSValueToNSString(ctx, argv[3]); + callback = JSValueToObject(ctx, argv[4], NULL); + } + else { + appKey = NULL; + callback = JSValueToObject(ctx, argv[3], NULL); + } + + if (callback) { + JSValueProtect(ctx, callback); + } + + snsName = [snsName lowercaseString]; + if ([snsName isEqualToString:@"facebook"]) { + [self prepareForFacebook:snsName message:message imgSrc:imgSrc appKey:appKey callback:callback]; + } + else { + [self post:snsName message:message imgSrc:imgSrc appKey:appKey callback:callback]; + } + + return JSValueMakeBoolean(ctx, true); +} + + +// snsName ,message, imgSrc, shareUrl, callback +EJ_BIND_FUNCTION(showPostDialog, ctx, argc, argv) +{ + if (![SLComposeViewController class]) { + NSLog(@"This iOS does NOT include Social.framework."); + return JSValueMakeBoolean(ctx, false); + } + NSString *snsName = JSValueToNSString(ctx, argv[0]); + NSString *message = JSValueToNSString(ctx, argv[1]); + NSString *imgSrc = nil; + NSString *shareUrl = nil; + JSObjectRef callback = nil; + + if (argc > 2){ + imgSrc = JSValueToNSString(ctx, argv[2]); + if (argc > 3){ + shareUrl = JSValueToNSString(ctx, argv[3]); + } + if (argc > 4){ + callback = JSValueToObject(ctx, argv[4], NULL); + if (callback) { + JSValueProtect(ctx, callback); + } + } + } + + snsName = [snsName lowercaseString]; + [self showPostDialog:snsName message:message imgSrc:imgSrc shareUrl:shareUrl callback:callback]; + + return JSValueMakeBoolean(ctx, true); +} + + +// message, imgSrc, callback +EJ_BIND_FUNCTION(openShare, ctx, argc, argv){ + + NSString *message = JSValueToNSString(ctx, argv[0]); + NSString *imgSrc = nil; + JSObjectRef callback = nil; + + if (argc > 1){ + imgSrc = JSValueToNSString(ctx, argv[1]); + if (argc > 2){ + callback = JSValueToObject(ctx, argv[2], NULL); + if (callback) { + JSValueProtect(ctx, callback); + } + } + } + + UIActivityViewController *activityViewController = nil; + if (imgSrc) { + imgSrc = [scriptView pathForResource:imgSrc]; + NSData *pixels = [NSData dataWithContentsOfFile:imgSrc]; + UIImage *shareImg = [[UIImage alloc] initWithData:pixels]; + if (shareImg) { + NSLog(@"addImage %d", true); + activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[message, shareImg] applicationActivities:nil]; + [shareImg release]; + } + } + + if (!activityViewController){ + activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[message] applicationActivities:nil]; + } + + activityViewController.popoverPresentationController.sourceView = scriptView.window.rootViewController.view; + + [scriptView.window.rootViewController + presentViewController:activityViewController + animated:YES + completion:^{ + if (callback){ + [scriptView invokeCallback:callback thisObject:NULL argc:0 argv:nil]; + JSValueUnprotect(scriptView.jsGlobalContext, callback); + } + } + ]; + + return NULL; + +} + +@end diff --git a/Extension/EJBindingTimer.h b/Extension/EJBindingTimer.h new file mode 100644 index 00000000..bd98fb2e --- /dev/null +++ b/Extension/EJBindingTimer.h @@ -0,0 +1,16 @@ + +#import "JavaScriptCore/JavaScriptCore.h" +#import "EJBindingBase.h" +#import + +@interface EJBindingTimer : EJBindingBase +{ + int uniqueId; + NSMutableDictionary * timers; + NSDate * pauseTime; + NSMutableDictionary * timerTimes; + +} + + +@end diff --git a/Extension/EJBindingTimer.m b/Extension/EJBindingTimer.m new file mode 100644 index 00000000..e1f99f39 --- /dev/null +++ b/Extension/EJBindingTimer.m @@ -0,0 +1,112 @@ +#import "EJBindingTimer.h" + +@implementation EJBindingTimer + + + +- (id)initWithContext:(JSContextRef)ctxp argc:(size_t)argc argv:(const JSValueRef[])argv { + if (self = [super initWithContext:ctxp argc:argc argv:argv]) { + timers = [[NSMutableDictionary alloc] init]; + // Listen to notifications to pause and resume timers + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc addObserver:self selector:@selector(pauseTimers:) name:@"UIApplicationWillResignActiveNotification" object:nil]; + [nc addObserver:self selector:@selector(pauseTimers:) name:@"UIApplicationDidEnterBackgroundNotification" object:nil]; + [nc addObserver:self selector:@selector(resumeTimers:) name:@"UIApplicationDidBecomeActiveNotification" object:nil]; + } + return self; +} + +- (JSValueRef)createTimer:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv repeat:(BOOL)repeat { + if (argc != 2 || !JSValueIsObject(ctx, argv[0]) || !JSValueIsNumber(ctx, argv[1])) return NULL; + + JSObjectRef func = JSValueToObject(ctx, argv[0], NULL); + JSValueProtect(ctx, func); + NSValue *callback = [NSValue valueWithPointer:func]; + float interval = JSValueToNumberFast(ctx, argv[1]) / 1000; + + uniqueId++; + NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:interval target:self selector:@selector(timerCallback:) userInfo:callback repeats:repeat]; + [timers setObject:timer forKey:[NSNumber numberWithInt:uniqueId]]; + return JSValueMakeNumber(ctx, uniqueId); +} + +- (JSValueRef)deleteTimer:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + if (argc != 1 || !JSValueIsNumber(ctx, argv[0])) return NULL; + + NSNumber *timerId = [NSNumber numberWithInt:(int)JSValueToNumberFast(ctx, argv[0])]; + NSTimer *timer = [timers objectForKey:timerId]; + + //JSObjectRef func = [[timer userInfo] pointeValue]; + //JSValueUnprotect(ctx, func); // Humm... seems to crash? FIXME + + [timer invalidate]; + [timers removeObjectForKey:timerId]; + return NULL; +} + +- (void)timerCallback:(NSTimer *)timer { + JSObjectRef func = [[timer userInfo] pointerValue]; + [scriptView invokeCallback:func thisObject:NULL argc:0 argv:NULL]; +} + +- (void)pauseTimers:(NSNotification *)notification { + if (pauseTime) return; // already paused? + + pauseTime = [[NSDate dateWithTimeIntervalSinceNow:0] retain]; + timerTimes = [[NSMutableDictionary alloc] init]; + + for (NSString *key in timers) { + NSTimer *timer = [timers objectForKey:key]; + if ([timer isValid]) { + //NSLog( @"Pausing timer: %@ with date : %@", timer, [timer fireDate] ); + [timerTimes setObject:[timer fireDate] forKey:key]; + [timer setFireDate:[NSDate distantFuture]]; + } + } +} + +- (void)resumeTimers:(NSNotification *)notification { + if (!timerTimes) return; + + for (NSString *key in timerTimes) { + NSTimer *timer = [timers objectForKey:key]; + NSDate *timerTime = [timerTimes objectForKey:key]; + if (timer && timerTime) { + float nudge = [pauseTime timeIntervalSinceNow] * -1; + //NSLog( @"Resuming timer: %@ with nudge : %f", timer, nudge ); + NSDate *newTimerTime = [[NSDate alloc] initWithTimeInterval:nudge sinceDate:timerTime]; + [timer setFireDate:newTimerTime]; + [newTimerTime release]; + } + } + + [pauseTime release]; + pauseTime = nil; + + [timerTimes release]; + timerTimes = nil; +} + +EJ_BIND_FUNCTION(setTimeout, ctx, argc, argv) +{ + return [self createTimer:ctx argc:argc argv:argv repeat:NO]; +} + +EJ_BIND_FUNCTION(setInterval, ctx, argc, argv) +{ + return [self createTimer:ctx argc:argc argv:argv repeat:YES]; +} + +EJ_BIND_FUNCTION(clearTimeout, ctx, argc, argv) +{ + return [self deleteTimer:ctx argc:argc argv:argv]; +} + +EJ_BIND_FUNCTION(clearInterval, ctx, argc, argv) +{ + return [self deleteTimer:ctx argc:argc argv:argv]; +} + + + +@end diff --git a/Extension/EJBindingWebView.h b/Extension/EJBindingWebView.h new file mode 100644 index 00000000..ce560ee4 --- /dev/null +++ b/Extension/EJBindingWebView.h @@ -0,0 +1,26 @@ + +#import +#import "JavaScriptCore/JavaScriptCore.h" +#import "EJBindingEventedBase.h" + + +@interface EJBindingWebView : EJBindingEventedBase { + + short width, height; + short left, top; + BOOL loading; + NSString *src; + NSString *backgroundColor; + NSString *evalProtocol; + UIWebView *webView; + +} + +@property (nonatomic,assign) BOOL loaded; + +- (BOOL)load:(NSString *)path; +- (NSString *)evalScriptInWeb:(NSString *)script; +- (JSValueRef)evalScriptInNative:(NSString *)script; +- (NSString *)dictionaryToJSONString:(NSDictionary *)dictionary; + +@end \ No newline at end of file diff --git a/Extension/EJBindingWebView.m b/Extension/EJBindingWebView.m new file mode 100644 index 00000000..1c8e07ed --- /dev/null +++ b/Extension/EJBindingWebView.m @@ -0,0 +1,327 @@ + +#import "EJBindingWebView.h" +#import "AppDelegate.h" +#import "EJConvertColorRGBA.h" + +#define WEBVIEW_BRIDGE_JS @"../WebviewBridge.js" + +@implementation EJBindingWebView + +@synthesize loaded; + +- (id)initWithContext:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef [])argv { + if (self = [super initWithContext:ctx argc:argc argv:argv]) { + evalProtocol = @"eval"; + backgroundColor = @"transparent"; + /* + { + backgroundColor: "transparent", + left: + top: + width: + height: + src: + visible: + } + */ + } + return self; +} + +- (void)createWithJSObject:(JSObjectRef)obj scriptView:(EJJavaScriptView *)view { + [super createWithJSObject:obj scriptView:view]; + + CGSize screen = scriptView.bounds.size; + width = screen.width; + height = screen.height; + left = 0; + top = 0; + + CGRect webViewBounds=CGRectMake(left,top,width,height); + webView=[[UIWebView alloc] initWithFrame:webViewBounds]; + + webView.delegate = self; + webView.mediaPlaybackRequiresUserAction = NO; + + webView.opaque = NO; + webView.backgroundColor = [UIColor clearColor]; + [webView setHidden:YES]; + + [scriptView addSubview: webView]; + + +} + + +-(NSString *)evalScriptInWeb:(NSString *)script { + NSString *result=[webView stringByEvaluatingJavaScriptFromString:script]; + return result; +} + +-(JSValueRef)evalScriptInNative:(NSString *)script { + + JSValueRef result=[scriptView evaluateScript:script]; + + // JSGlobalContextRef jsGlobalContext=[scriptView jsGlobalContext]; + // JSType type=JSValueGetType(jsGlobalContext,result); + + return result; + +} + +// +//- (void)logException:(JSValueRef)exception ctx:(JSContextRef)ctxp { +// if( !exception ) return; +// +// JSStringRef jsLinePropertyName = JSStringCreateWithUTF8CString("line"); +// JSStringRef jsFilePropertyName = JSStringCreateWithUTF8CString("sourceURL"); +// +// JSObjectRef exObject = JSValueToObject( ctxp, exception, NULL ); +// JSValueRef line = JSObjectGetProperty( ctxp, exObject, jsLinePropertyName, NULL ); +// JSValueRef file = JSObjectGetProperty( ctxp, exObject, jsFilePropertyName, NULL ); +// +// NSLog( +// @"%@ at line %@ in %@", +// JSValueToNSString( ctxp, exception ), +// JSValueToNSString( ctxp, line ), +// JSValueToNSString( ctxp, file ) +// ); +// +// JSStringRelease( jsLinePropertyName ); +// JSStringRelease( jsFilePropertyName ); +//} + +- (void)loadRequest:(NSURLRequest *)request { + loaded=NO; + [webView loadRequest:request]; +} + +- (BOOL)load:(NSString *)path { + + NSURL* appURL; + NSString *queryString; + NSString *fragment; + + if ([path hasPrefix:@"http:"] || [path hasPrefix:@"https:"]) { + appURL=[NSURL URLWithString:path]; + NSLog(@"webview load remote url : %@",appURL); + }else{ + appURL = [NSURL URLWithString:path]; + NSString *filePath=[appURL path]; + + //TODO + queryString=[appURL query]; + fragment=[appURL fragment]; + + + NSString* startFilePath = [scriptView pathForResource: filePath]; + appURL = [NSURL fileURLWithPath:startFilePath]; + NSString *urlString = appURL.absoluteString; + if(queryString.length) { + urlString = [[[NSString alloc] initWithFormat:@"%@?%@", urlString, queryString]autorelease]; + } + if(fragment.length) { + urlString = [[[NSString alloc] initWithFormat:@"%@#%@", urlString, fragment]autorelease]; + } + appURL = [NSURL URLWithString:urlString]; + NSLog(@"webview load local url : %@", urlString); + } + + NSURLRequest *appReq = [NSURLRequest requestWithURL:appURL]; + + [webView loadRequest:appReq]; + return YES; +} + + +-(NSString *) dictionaryToJSONString:(NSDictionary *)dictionary { + NSError *error; + NSString *jsonString; + + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dictionary options:0 error:&error]; + + if (!jsonData) { + NSLog(@"Got an error: %@", error); + jsonString = NULL; + } else { + jsonString = [[[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding] autorelease]; + } + return jsonString; +} + + +- (void)webViewDidStartLoad:(UIWebView *)webView +{ + +} + +- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error +{ + +} + +- (void)webViewDidFinishLoad:(UIWebView *)_webView { + + NSData *fileData = [NSData dataWithContentsOfFile:[scriptView pathForResource:WEBVIEW_BRIDGE_JS]]; + NSString* script = [[[NSString alloc] initWithData:fileData encoding:NSUTF8StringEncoding] autorelease]; + [self evalScriptInWeb:script]; + + self.loaded = YES; + [self triggerEvent:@"load"]; +} + +- (BOOL) webView:(UIWebView*)_webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType +{ + NSURL *url = request.URL; + + if ([[url scheme] isEqualToString:evalProtocol]) { + + NSString *script = [[url query] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + + NSLog(@"evalScriptInNative : %@",script); + + [self evalScriptInNative:script]; + return NO; + } else { + if ([[url absoluteString] isEqualToString:@"about:blank"]) { + return NO; + } +// NSLog(@"url: %@",[url absoluteURL]); + return YES; + } + +} + + + +- (void)dealloc { + // TODO + [src release]; + [webView release]; + + [super dealloc]; + +} + + +EJ_BIND_EVENT(load); + +EJ_BIND_FUNCTION( eval, ctx, argc, argv ) { + NSString *script = JSValueToNSString(ctx, argv[0]); + + NSLog(@"evalScriptInWeb : %@", script); + NSString *result = [self evalScriptInWeb:script]; + + JSStringRef _result = JSStringCreateWithUTF8CString( [result UTF8String] ); + + return JSValueMakeString(ctx, _result); + +} + +EJ_BIND_FUNCTION( hide, ctx, argc, argv ) { + [webView setHidden:YES]; + return NULL; +} +EJ_BIND_FUNCTION( show, ctx, argc, argv ) { + [webView setHidden:NO]; + return NULL; +} + +EJ_BIND_FUNCTION( reload, ctx, argc, argv ) { + [self load:src]; + return NULL; +} + +EJ_BIND_GET(loaded, ctx) { + return JSValueMakeBoolean(ctx, [self loaded]); +} + +EJ_BIND_GET(width, ctx) { + return JSValueMakeNumber(ctx, width); +} + +EJ_BIND_SET(width, ctx, value) { + width = JSValueToNumberFast(ctx, value); +} + +EJ_BIND_GET(height, ctx) { + return JSValueMakeNumber(ctx, height); +} + +EJ_BIND_SET(height, ctx, value) { + height = JSValueToNumberFast(ctx, value); +} + +EJ_BIND_GET(left, ctx) { + return JSValueMakeNumber(ctx, left); +} + +EJ_BIND_SET(left, ctx, value) { + left = JSValueToNumberFast(ctx, value); +} + +EJ_BIND_GET(backgroundColor, ctx) { + return NSStringToJSValue(ctx, backgroundColor); +} + +EJ_BIND_SET(backgroundColor, ctx, value) { + backgroundColor = JSValueToNSString(ctx, value); + if ([backgroundColor isEqualToString:@"transparent"] ){ + webView.backgroundColor = [UIColor clearColor]; + }else{ + webView.backgroundColor = JSValueToUIColor(ctx, value); + } + +} + + +EJ_BIND_GET(evalProtocol, ctx ) { + JSStringRef _evalProtocol = JSStringCreateWithUTF8CString( [evalProtocol UTF8String] ); + JSValueRef ret = JSValueMakeString(ctx, _evalProtocol); + JSStringRelease(_evalProtocol); + return ret; +} +EJ_BIND_SET(evalProtocol, ctx, value) { + evalProtocol = JSValueToNSString(ctx, value); +} + +EJ_BIND_GET(top, ctx) { + return JSValueMakeNumber(ctx, top); +} + +EJ_BIND_SET(top, ctx, value) { + top = JSValueToNumberFast(ctx, value); +} + +EJ_BIND_GET(src, ctx ) { + JSStringRef _src = JSStringCreateWithUTF8CString( [src UTF8String] ); + JSValueRef ret = JSValueMakeString(ctx, _src); + JSStringRelease(_src); + return ret; +} + +EJ_BIND_SET(src, ctx, value) { + + NSString *newSrc = JSValueToNSString( ctx, value ); + + if ([src isEqualToString:newSrc] ) { + return; + } + + // Release the old path + if( src ) { + [src release]; + } + + if( [newSrc length] ) { + src = [newSrc retain]; + }else{ + src = @"about:blank"; + } + [newSrc release]; + [self load:src]; + +} + + +@end \ No newline at end of file diff --git a/Extension/EJDeviceUID.h b/Extension/EJDeviceUID.h new file mode 100644 index 00000000..67ea4cf6 --- /dev/null +++ b/Extension/EJDeviceUID.h @@ -0,0 +1,5 @@ +#import + +@interface EJDeviceUID : NSObject ++ (NSString *)uid; +@end \ No newline at end of file diff --git a/Extension/EJDeviceUID.m b/Extension/EJDeviceUID.m new file mode 100644 index 00000000..b821ad0e --- /dev/null +++ b/Extension/EJDeviceUID.m @@ -0,0 +1,158 @@ +#import "EJDeviceUID.h" +#import + + +@interface EJDeviceUID () + +@property(nonatomic, strong, readonly) NSString *uidKey; +@property(nonatomic, strong, readonly) NSString *uid; + +@end + +@implementation EJDeviceUID + +@synthesize uid = _uid; + +#pragma mark - Public methods + ++ (NSString *)uid { + return [[[[EJDeviceUID alloc] initWithKey:@"ejectaDeviceUID"] autorelease] uid]; +} + +#pragma mark - Instance methods + +- (id)initWithKey:(NSString *)key { + self = [super init]; + if (self) { + _uidKey = [key retain]; + _uid = nil; + } + return self; +} + +- (void)dealloc { + [_uid release]; + [_uidKey release]; + [super dealloc]; +} + +/*! Returns the Device UID. + The UID is obtained in a chain of fallbacks: + - Keychain + - NSUserDefaults + - Apple IFV (Identifier for Vendor) + - Generate a random UUID if everything else is unavailable + At last, the UID is persisted if needed to. + */ +- (NSString *)uid { + if (!_uid) _uid = [[[self class] valueForKeychainKey:_uidKey service:_uidKey] retain]; + if (!_uid) _uid = [[[self class] valueForUserDefaultsKey:_uidKey] retain]; + // if (!_uid) _uid = [[[self class] appleIFA] retain]; + if (!_uid) _uid = [[[self class] appleIFV] retain]; + if (!_uid) _uid = [[[self class] randomUUID] retain]; + + [self save]; + return _uid; +} + +/*! Persist UID to NSUserDefaults and Keychain, if not yet saved + */ +- (void)save { + if (![EJDeviceUID valueForUserDefaultsKey:_uidKey]) { + [EJDeviceUID setValue:_uid forUserDefaultsKey:_uidKey]; + } + if (![EJDeviceUID valueForKeychainKey:_uidKey service:_uidKey]) { + [EJDeviceUID setValue:_uid forKeychainKey:_uidKey inService:_uidKey]; + } +} + +#pragma mark - Keychain methods + +/*! Create as generic NSDictionary to be used to query and update Keychain items. + * param1 + * param2 + */ ++ (NSMutableDictionary *)keychainItemForKey:(NSString *)key service:(NSString *)service { + NSMutableDictionary *keychainItem = [[NSMutableDictionary new] autorelease]; + keychainItem[(__bridge id)kSecClass] = (__bridge id)kSecClassGenericPassword; + keychainItem[(__bridge id)kSecAttrAccessible] = (__bridge id)kSecAttrAccessibleAlways; + keychainItem[(__bridge id)kSecAttrAccount] = key; + keychainItem[(__bridge id)kSecAttrService] = service; + return keychainItem; +} + +/*! Sets + * param1 + * param2 + */ ++ (OSStatus)setValue:(NSString *)value forKeychainKey:(NSString *)key inService:(NSString *)service { + NSMutableDictionary *keychainItem = [[self class] keychainItemForKey:key service:service]; + keychainItem[(__bridge id)kSecValueData] = [value dataUsingEncoding:NSUTF8StringEncoding]; + return SecItemAdd((__bridge CFDictionaryRef)keychainItem, NULL); +} + ++ (NSString *)valueForKeychainKey:(NSString *)key service:(NSString *)service { + OSStatus status; + NSMutableDictionary *keychainItem = [[self class] keychainItemForKey:key service:service]; + keychainItem[(__bridge id)kSecReturnData] = (__bridge id)kCFBooleanTrue; + keychainItem[(__bridge id)kSecReturnAttributes] = (__bridge id)kCFBooleanTrue; + CFDictionaryRef result = nil; + status = SecItemCopyMatching((__bridge CFDictionaryRef)keychainItem, (CFTypeRef *)&result); + if (status != noErr) { + return nil; + } + NSDictionary *resultDict = (NSDictionary *)result; + NSData *data = resultDict[(__bridge id)kSecValueData]; + if (!data) { + return nil; + } + return [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]; +} + +#pragma mark - NSUserDefaults methods + ++ (BOOL)setValue:(NSString *)value forUserDefaultsKey:(NSString *)key { + [[NSUserDefaults standardUserDefaults] setObject:value forKey:key]; + return [[NSUserDefaults standardUserDefaults] synchronize]; +} + ++ (NSString *)valueForUserDefaultsKey:(NSString *)key { + return [[NSUserDefaults standardUserDefaults] stringForKey:key]; +} + +#pragma mark - UID Generation methods + +//+ (NSString *)appleIFA { +// NSString *ifa = nil; +// Class ASIdentifierManagerClass = NSClassFromString(@"ASIdentifierManager"); +// if (ASIdentifierManagerClass) { // a dynamic way of checking if AdSupport.framework is available +// SEL sharedManagerSelector = NSSelectorFromString(@"sharedManager"); +// id sharedManager = ((id (*)(id, SEL))[ASIdentifierManagerClass methodForSelector:sharedManagerSelector])(ASIdentifierManagerClass, sharedManagerSelector); +// SEL advertisingIdentifierSelector = NSSelectorFromString(@"advertisingIdentifier"); +// NSUUID *advertisingIdentifier = ((NSUUID* (*)(id, SEL))[sharedManager methodForSelector:advertisingIdentifierSelector])(sharedManager, advertisingIdentifierSelector); +// ifa = [advertisingIdentifier UUIDString]; +// } +// return ifa; +//} + ++ (NSString *)appleIFV { + if(NSClassFromString(@"UIDevice") && [UIDevice instancesRespondToSelector:@selector(identifierForVendor)]) { + // only available in iOS >= 6.0 + return [[UIDevice currentDevice].identifierForVendor UUIDString]; + } + return nil; +} + ++ (NSString *)randomUUID { + if(NSClassFromString(@"NSUUID")) { + return [[NSUUID UUID] UUIDString]; + } + CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault); + CFStringRef cfuuid = CFUUIDCreateString(kCFAllocatorDefault, uuidRef); + CFRelease(uuidRef); + NSString *uuid = [[((__bridge NSString *) cfuuid) copy] autorelease]; + CFRelease(cfuuid); + return uuid; +} + +@end diff --git a/Extension/WebviewBridge.js b/Extension/WebviewBridge.js new file mode 100755 index 00000000..f3e172e9 --- /dev/null +++ b/Extension/WebviewBridge.js @@ -0,0 +1,108 @@ +"use strict"; + +var WebviewBridge; + +(function() { + + WebviewBridge = { + + ID: 1, + protocol: "eval", + + frameCount: 5, + + _init: function() { + this.callId = 1; + this.awaitingCallbacks = {}; + }, + // initInWeb: function(native) { + initInWeb: function() { + this._init(); + // this.native = native || this.native; + this.inWeb = true; + this.remoteName = "evalNative"; + var Me = this; + this.evalNative = function(script) { + evalIframes[iframeIndex].src = Me.protocol + "://script/?" + script; + iframeIndex = iframeIndex < Me.frameCount ? iframeIndex + 1 : 0; + } + + var evalIframes = []; + var iframeIndex = 0; + for (var i = 0; i <= this.frameCount; i++) { + var iframe = document.createElement("iframe"); + evalIframes.push(iframe); + iframe.width = iframe.height = 0; + iframe.style.display = 'none'; + } + + function initExecIframes() { + if (document.body && document.body.appendChild) { + evalIframes.forEach(function(iframe) { + document.body.appendChild(iframe); + }) + } else { + setTimeout(initExecIframes, 1); + } + } + initExecIframes(); + + }, + + initInNative: function(webview) { + this._init(); + webview = this.webview = webview || this.webview; + this.inNative = true; + this.remoteName = "evalWeb"; + this.evalWeb = function(script) { + webview.eval(script); + } + + }, + + evalRemote: function(script) { + this[this.remoteName](script); + }, + + evalRemoteWithArgs: function(func, args) { + args = Array.prototype.slice.call(args, 0); + var str = JSON.stringify(args); + this[this.remoteName](func + "(" + str.substring(1, str.length - 1) + ")"); + }, + + callRemote: function(cmd, args, callback) { + var args = Array.prototype.slice.call(arguments, 1); + var callId = this.callId++; + if (callId >= 1024) callId = this.callId = 1; + this.awaitingCallbacks[callId] = args.pop(); //callback + var _cb = "function _cb(){WebviewBridge.callbackRemote(" + callId + ",arguments);}"; + var a; + if (args.length > 0) { + a = JSON.stringify(args); + a = a.substring(1, a.length - 1) + ","; + } else { + a = ""; + } + this[this.remoteName](cmd + "(" + a + _cb + ")"); + }, + + callbackRemote: function(callId, args) { + args = Array.prototype.slice.call(args, 0); + this.evalRemote("WebviewBridge.callback(" + callId + "," + JSON.stringify(args) + ")"); + }, + + callback: function(callId, args) { + var cb = this.awaitingCallbacks[callId]; + delete this.awaitingCallbacks[callId]; + if (cb) { + return cb.apply(null, args); + } + } + + }; + + setTimeout(function() { + WebviewBridge.initInWeb(); + },10); + +}()); diff --git a/Extension/ad/EJBindingAdBase.h b/Extension/ad/EJBindingAdBase.h new file mode 100644 index 00000000..3e51bef8 --- /dev/null +++ b/Extension/ad/EJBindingAdBase.h @@ -0,0 +1,22 @@ +#import "EJBindingEventedBase.h" + + +@interface EJBindingAdBase : EJBindingEventedBase +{ + BOOL debug; + BOOL autoLoad; + +} + +- (void)triggerEventOnce:(NSString *)type argc:(int)argc argv:(JSValueRef[])argv; +- (void)triggerEventOnce:(NSString *)type; +- (void)triggerEventOnce:(NSString *)type properties:(JSEventProperty[])properties; + +-(NSDictionary *)getOptions:(NSString *)type ctx:(JSContextRef)ctx jsOptions:(JSObjectRef)jsOptions; +-(BOOL)callShow:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv; +-(BOOL)callLoadAd:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv; +-(BOOL)callHasAd:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv; +-(BOOL)callIsReady:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv; +-(void)callHide:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv; + +@end diff --git a/Extension/ad/EJBindingAdBase.m b/Extension/ad/EJBindingAdBase.m new file mode 100644 index 00000000..a5166c1d --- /dev/null +++ b/Extension/ad/EJBindingAdBase.m @@ -0,0 +1,237 @@ +#import "EJBindingAdBase.h" + +@implementation EJBindingAdBase + + +- (id)initWithContext:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + if (self = [super initWithContext:ctx argc:argc argv:argv]) { + debug = false; + autoLoad = true; + } + + return self; +} + + +- (void)dealloc { + [super dealloc]; +} + + +- (void)triggerEventOnce:(NSString *)type argc:(int)argc argv:(JSValueRef[])argv { + + [self triggerEvent:type argc:argc argv:argv]; + + JSContextRef ctx = scriptView.jsGlobalContext; + NSValue *callbackValue = onCallbacks[type]; + JSValueUnprotectSafe(ctx, callbackValue.pointerValue); + [onCallbacks removeObjectForKey:type]; + +} + +- (void)triggerEventOnce:(NSString *)type { + [self triggerEventOnce:type argc:0 argv:nil]; +} + +- (void)triggerEventOnce:(NSString *)type properties:(JSEventProperty[])properties { + + [self triggerEvent:type properties:properties]; + + JSContextRef ctx = scriptView.jsGlobalContext; + NSValue *callbackValue = onCallbacks[type]; + JSValueUnprotectSafe(ctx, callbackValue.pointerValue); + [onCallbacks removeObjectForKey:type]; +} + + +-(NSDictionary *)getOptions:(NSString *)type ctx:(JSContextRef)ctx jsOptions:(JSObjectRef)jsOptions { + + NSMutableDictionary* options = [[NSMutableDictionary new] autorelease]; + NSDictionary *inOptions = (NSDictionary *)JSValueToNSObject(ctx, jsOptions); + + NSEnumerator *keys = [inOptions keyEnumerator]; + id keyId; + while ((keyId = [keys nextObject])) { + NSString *key = (NSString *)keyId; + NSString *value = (NSString *)[inOptions objectForKey:keyId]; +// NSLog(@"key : %@, value: %@", key, value); + JSStringRef jsKey = JSStringCreateWithUTF8CString([key UTF8String]); + JSValueRef jsValue = JSObjectGetProperty(ctx, jsOptions, jsKey, NULL); + + JSObjectRef jsFunc = JSValueToObject(ctx, jsValue, NULL); + BOOL isFunc = JSObjectIsFunction(ctx, jsFunc); + + if ( isFunc ){; + NSString *callbackType = [[type stringByAppendingString:@"_"] stringByAppendingString:key]; + [self setCallbackWithType:callbackType ctx:ctx callback:jsValue]; + }else { + [options setObject:value forKey:key]; + } + + } + + return options; +} + + +////////////////////////////////// +////////////////////////////////// + + +EJ_BIND_GET(debug, ctx) +{ + return JSValueMakeBoolean(ctx, debug); +} + +EJ_BIND_SET(debug, ctx, value) +{ + debug = JSValueToBoolean(ctx, value); +} + +EJ_BIND_GET(autoLoad, ctx) +{ + return JSValueMakeBoolean(ctx, autoLoad); +} + + +EJ_BIND_SET(autoLoad, ctx, value) +{ + autoLoad = JSValueToBoolean(ctx, value); +} + + +EJ_BIND_FUNCTION(hasAd, ctx, argc, argv) +{ + if (argc < 1){ + return NULL; + } + + NSString *type = JSValueToNSString(ctx, argv[0]); + + NSDictionary* options = nil; + if (argc > 1){ + JSObjectRef jsOptions = JSValueToObject(ctx, argv[1], NULL); + options = [self getOptions:type ctx:ctx jsOptions:jsOptions]; + } + + BOOL hasAd = [self callHasAd:type options:options ctx:ctx argc:argc argv:argv]; + + return JSValueMakeBoolean(ctx, hasAd); +} + + +EJ_BIND_FUNCTION(isReady, ctx, argc, argv) +{ + + if (argc < 1){ + return NULL; + } + + NSString *type = JSValueToNSString(ctx, argv[0]); + + NSDictionary* options = nil; + if (argc > 1){ + JSObjectRef jsOptions = JSValueToObject(ctx, argv[1], NULL); + options = [self getOptions:type ctx:ctx jsOptions:jsOptions]; + } + + BOOL ready = [self callIsReady:type options:options ctx:ctx argc:argc argv:argv]; + + return JSValueMakeBoolean(ctx, ready); +} + + +EJ_BIND_FUNCTION(hide, ctx, argc, argv) +{ + if (argc < 1){ + return NULL; + } + + NSString *type = JSValueToNSString(ctx, argv[0]); + + NSDictionary* options = nil; + if (argc > 1){ + JSObjectRef jsOptions = JSValueToObject(ctx, argv[1], NULL); + options = [self getOptions:type ctx:ctx jsOptions:jsOptions]; + } + + [self callHide:type options:options ctx:ctx argc:argc argv:argv]; + return NULL; +} + + +EJ_BIND_FUNCTION(show, ctx, argc, argv) +{ + + if (argc < 1){ + return NULL; + } + + NSString *type = JSValueToNSString(ctx, argv[0]); + NSDictionary* options = nil; + + if (argc > 1){ + JSObjectRef jsOptions = JSValueToObject(ctx, argv[1], NULL); + options = [self getOptions:type ctx:ctx jsOptions:jsOptions]; + } + + BOOL ok = [self callShow:type options:options ctx:ctx argc:argc argv:argv]; + + return ok ? scriptView->jsTrue : scriptView->jsFalse; +} + +EJ_BIND_FUNCTION(load, ctx, argc, argv) +{ + if (argc < 1){ + return NULL; + } + + NSString *type = JSValueToNSString(ctx, argv[0]); + + NSDictionary* options = nil; + if (argc > 1){ + JSObjectRef jsOptions = JSValueToObject(ctx, argv[1], NULL); + options = [self getOptions:type ctx:ctx jsOptions:jsOptions]; + } + + [self callLoadAd:type options:options ctx:ctx argc:argc argv:argv]; + + + return NULL; +} + +// EJ_BIND_EVENT(load); +// EJ_BIND_EVENT(error); + + +////////////////////////////////// +////////////////////////////////// + + +-(BOOL)callShow:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + return false; +} + + +-(BOOL)callLoadAd:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + return false; +} + +-(BOOL)callHasAd:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + return false; +} + +-(BOOL)callIsReady:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + return false; +} + +-(void)callHide:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + +} + +@end diff --git a/Extension/ad/EJBindingAdColony.h b/Extension/ad/EJBindingAdColony.h new file mode 100644 index 00000000..f6c4f406 --- /dev/null +++ b/Extension/ad/EJBindingAdColony.h @@ -0,0 +1,15 @@ +#import + +#import "EJBindingAdBase.h" + + +@interface EJBindingAdColony : EJBindingAdBase +{ + + NSString *appId; + NSArray *zones; + NSMutableDictionary *availabilityState; + +} + +@end diff --git a/Extension/ad/EJBindingAdColony.m b/Extension/ad/EJBindingAdColony.m new file mode 100644 index 00000000..5069c450 --- /dev/null +++ b/Extension/ad/EJBindingAdColony.m @@ -0,0 +1,144 @@ +#import "EJBindingAdColony.h" + +@implementation EJBindingAdColony + + +- (id)initWithContext:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + if (self = [super initWithContext:ctx argc:argc argv:argv]) { + if (argc > 1) { + appId = [JSValueToNSString(ctx, argv[0]) retain]; + zones = (NSArray *)[JSValueToNSObject(ctx, argv[1]) retain]; + } + else { + NSLog(@"Error: Must set appId & zones"); + return self; + } + if (argc > 2) { + debug = JSValueToBoolean(ctx, argv[2]); + } + availabilityState = [NSMutableDictionary new]; + [AdColony configureWithAppID:appId zoneIDs:zones delegate:self logging:debug]; + } + + return self; +} + +- (void)createWithJSObject:(JSObjectRef)obj scriptView:(EJJavaScriptView *)view { + [super createWithJSObject:obj scriptView:view]; +} + +- (void)dealloc { + [appId release]; + [zones release]; + [availabilityState release]; + [super dealloc]; +} + +- (void)onAdColonyAdAvailabilityChange:(BOOL)available inZone:(NSString *)zoneID { + + NSLog(@"======== Availability Change ========\n %@ %@",zoneID, @(available)); + + [availabilityState setObject:@(available) forKey:zoneID]; + +} + +- (void)onAdColonyV4VCReward:(BOOL)success currencyName:(NSString *)currencyName currencyAmount:(int)amount inZone:(NSString *)zoneID{ + if (success){ + [self triggerEventOnce:@"video_onFinish" properties:(JSEventProperty[]){ + {"zone", NSStringToJSValue(scriptView.jsGlobalContext, zoneID)}, + {"rewardedName", NSStringToJSValue(scriptView.jsGlobalContext, currencyName)}, + {"rewardedAmount", JSValueMakeNumber(scriptView.jsGlobalContext, amount)}, + {NULL, NULL} + }]; + } +} + +- (void)onAdColonyAdStartedInZone:(NSString *)zoneID{ + [self triggerEventOnce:@"video_onDisplay" properties:(JSEventProperty[]){ + {"zone", NSStringToJSValue(scriptView.jsGlobalContext, zoneID)}, + {NULL, NULL} + }]; +} + +- (void)onAdColonyAdAttemptFinished:(BOOL)shown inZone:(NSString *)zoneID{ + [self triggerEventOnce:@"video_onClose" properties:(JSEventProperty[]){ + {"zone", NSStringToJSValue(scriptView.jsGlobalContext, zoneID)}, + {"shown", JSValueMakeBoolean(scriptView.jsGlobalContext, shown)}, + {NULL, NULL} + }]; +} + +//- (void)onAdColonyAdFinishedWithInfo:(AdColonyAdInfo *)info{ +// +//} + + + +////////////////////////////////////////////// + +EJ_BIND_GET(appId, ctx) +{ + return NSStringToJSValue(ctx, appId); +} + +EJ_BIND_GET(debug, ctx) +{ + return JSValueMakeBoolean(ctx, debug); +} + +EJ_BIND_SET(debug, ctx, value) +{ + +} + + + +////////////////////////////////////// +////////////////////////////////////// + + + +-(BOOL)callShow:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + NSString *zone = nil; + + if ([options objectForKey:@"zone"]) { + zone = [options objectForKey:@"zone"]; + } + + if (!zone){ + return false; + } + + [AdColony playVideoAdForZone:zone + withDelegate:self + withV4VCPrePopup:YES + andV4VCPostPopup:YES]; + + return true; + +} + +-(BOOL)callIsReady:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + NSString *zone = nil; + + if ([options objectForKey:@"zone"]) { + zone = [options objectForKey:@"zone"]; + } + + if (!zone){ + return false; + } + + return [[availabilityState objectForKey:zone] boolValue]; + +} + +-(void)callHide:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + [AdColony cancelAd]; +} + + +@end diff --git a/Extension/ad/EJBindingAdMob.h b/Extension/ad/EJBindingAdMob.h new file mode 100644 index 00000000..b39bff38 --- /dev/null +++ b/Extension/ad/EJBindingAdMob.h @@ -0,0 +1,47 @@ +/* + + Google AdMob needs some Frameworks: + + AdSupport.framework + CoreTelephony.framework + MessageUI.framework + libz.dylib + + */ +#import +#import +#import +#import + +#import "EJBindingAdBase.h" + + + +typedef enum { + banner, // 320x50 + mediumrectangle, // 300x250 + fullbanner, // 468x60 + leaderboard, // 728x90 + skyscraper, // 120x600 + portrait, // portraitx32/50/90 + landscape, // landscapex32/50/90 + invalid // +} BannerType; + + +@interface EJBindingAdMob : EJBindingAdBase +{ + GADInterstitial *interstitial; + GADBannerView *banner; + NSString *adUnitId; + + double bannerX; + double bannerY; + BOOL isBannerReady; + BOOL bannerLoading; + BOOL interstitialLoading; +} + +@property (readwrite, nonatomic) BannerType bannerType; + +@end diff --git a/Extension/ad/EJBindingAdMob.m b/Extension/ad/EJBindingAdMob.m new file mode 100644 index 00000000..db58fc32 --- /dev/null +++ b/Extension/ad/EJBindingAdMob.m @@ -0,0 +1,355 @@ +#import "EJBindingAdMob.h" + +@implementation EJBindingAdMob + + +- (id)initWithContext:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + if (self = [super initWithContext:ctx argc:argc argv:argv]) { + if (argc > 0) { + adUnitId = [JSValueToNSString(ctx, argv[0]) retain]; + } + else { + NSLog(@"Error: Must set adUnitId"); + } + + interstitialLoading = false; + bannerLoading = false; + isBannerReady = false; + bannerX = 0; + bannerY = 0; + } + + return self; +} + +- (void)createWithJSObject:(JSObjectRef)obj scriptView:(EJJavaScriptView *)view { + [super createWithJSObject:obj scriptView:view]; +} + +- (void)dealloc { + if(interstitial){ + interstitial.delegate = nil; + [interstitial release]; + interstitial = nil; + } + if(banner){ + banner.rootViewController = nil; + banner.delegate = nil; + [banner release]; + banner = nil; + } + [adUnitId release]; + [super dealloc]; +} + + + + +- (void)initBannerWithView:(EJJavaScriptView *)view { + + banner = [[GADBannerView alloc] initWithFrame:CGRectZero]; + banner.adUnitID = adUnitId; + banner.delegate = self; + banner.hidden = YES; + banner.rootViewController = scriptView.window.rootViewController; + + [scriptView addSubview:banner]; +} + +- (CGSize)getBannerSize { + GADAdSize adSize; + switch (self.bannerType) { + case 0: + adSize = kGADAdSizeBanner; + break; + + case 1: + adSize = kGADAdSizeMediumRectangle; + break; + + case 2: + adSize = kGADAdSizeFullBanner; + break; + + case 3: + adSize = kGADAdSizeLeaderboard; + break; + + case 4: + adSize = kGADAdSizeSkyscraper; + break; + + case 5: + adSize = kGADAdSizeSmartBannerPortrait; + break; + + case 6: + adSize = kGADAdSizeSmartBannerLandscape; + break; + + default: + adSize = kGADAdSizeInvalid; + break; + } + + return CGSizeFromGADAdSize(adSize); +} + + +- (void)doLayout { + + if (!banner){ + [self initBannerWithView:scriptView]; + } + + CGSize size = [self getBannerSize]; + [banner setFrame:CGRectMake(bannerX, bannerX, size.width, size.height)]; +} + +- (void)requestBanner { + + bannerLoading = true; + isBannerReady = false; + + GADRequest *request = [GADRequest request]; + + // Make the request for a test ad. Put in an identifier for the simulator as well as any devices + // you want to receive test ads. + request.testDevices = @[ + kGADSimulatorID, + @"_7ab1b64b7d167bd4b5ef38c58f925092", + @"_270a3ec13074818800317013ce006923", + @"_7eafba728afe41b98d10310ffa9e6e66" + ]; + + [banner loadRequest:request]; +} + +// We've received an ad successfully. +- (void)adViewDidReceiveAd:(GADBannerView *)adView { + NSLog(@"adMob adViewDidReceiveAd"); + bannerLoading = false; + isBannerReady = true; + [self triggerEventOnce:@"banner_onLoad"]; +} + +- (void)adView:(GADBannerView *)view didFailToReceiveAdWithError:(GADRequestError *)error { + NSLog(@"adMob interstitialDidFailToReceiveAdWithError: %@", [error localizedDescription]); + bannerLoading = false; + isBannerReady = false; + [self triggerEventOnce:@"banner_onFail"]; +} + +- (void)adViewDidDismissScreen:(GADBannerView *)adView { + NSLog(@"adMob adViewDidDismissScreen"); + bannerLoading = false; + isBannerReady = false; + [self triggerEventOnce:@"banner_onClose"]; +} + +- (void)adViewWillLeaveApplication:(GADBannerView *)adView { + NSLog(@"adMob adViewWillLeaveApplication"); + [self triggerEventOnce:@"banner_onClick"]; +} + +/////////////////////////////////////// + + +- (void)createAndLoadInterstitial { + interstitialLoading = true; + + if(interstitial){ + interstitial.delegate = nil; + [interstitial release]; + } + + // Create a new GADInterstitial each time. A GADInterstitial will only show one request in its + // lifetime. The property will release the old one and set the new one. + interstitial = [[GADInterstitial alloc] initWithAdUnitID:adUnitId]; + interstitial.delegate = self; + + + GADRequest *request = [GADRequest request]; + // Make the request for a test ad. Put in an identifier for the simulator as well as any devices + // you want to receive test ads. + request.testDevices = @[ + // TODO: Add your device/simulator test identifiers here. Your device identifier is printed to + // the console when the app is launched. + kGADSimulatorID, + @"_7ab1b64b7d167bd4b5ef38c58f925092", + @"_270a3ec13074818800317013ce006923", + @"_7eafba728afe41b98d10310ffa9e6e66" + ]; + + [interstitial loadRequest:request]; +} + +///////////////////////////////////// + + +- (void)interstitialDidReceiveAd:(GADInterstitial *)interstitial { + NSLog(@"adMob interstitialDidReceiveAd"); + interstitialLoading = false; + [self triggerEventOnce:@"interstitial_onLoad"]; +} + +- (void)interstitial:(GADInterstitial *)interstitial didFailToReceiveAdWithError:(GADRequestError *)error { + NSLog(@"adMob didFailToReceiveAdWithError"); + NSLog(@"Failed to receive interstitial AD with error: %@", [error localizedFailureReason]); + interstitialLoading = false; + [self triggerEventOnce:@"interstitial_onFail"]; +} + + +- (void)interstitialWillPresentScreen:(GADInterstitial *)ad { + NSLog(@"adMob interstitialWillPresentScreen"); + [self triggerEventOnce:@"interstitial_onDisplay"]; +} + + +- (void)interstitialWillDismissScreen:(GADInterstitial *)ad { + NSLog(@"adMob interstitialWillDismissScreen"); +} + +- (void)interstitialDidDismissScreen:(GADInterstitial *)ad { + NSLog(@"adMob interstitialDidDismissScreen"); + [self triggerEventOnce:@"interstitial_onClose"]; +} + +- (void)interstitialWillLeaveApplication:(GADInterstitial *)ad { + NSLog(@"adMob interstitialWillLeaveApplication"); + [self triggerEventOnce:@"interstitial_onClick"]; +} + + +/////////////////////////// + + + +EJ_BIND_GET(adUnitId, ctx) +{ + return NSStringToJSValue(ctx, adUnitId); +} + +EJ_BIND_GET(bannerX, ctx) +{ + return JSValueMakeNumber(ctx, bannerX); +} +EJ_BIND_SET(bannerX, ctx, value) +{ + double newValue = JSValueToNumberFast(ctx, value); + if (newValue != bannerX) { + bannerX = newValue; + if (banner){ + [self doLayout]; + } + } +} +EJ_BIND_GET(bannerY, ctx) +{ + return JSValueMakeNumber(ctx, bannerY); +} +EJ_BIND_SET(bannerY, ctx, value) +{ + double newValue = JSValueToNumberFast(ctx, value); + if (newValue != bannerY) { + bannerY = newValue; + if (banner){ + [self doLayout]; + } + } +} + +EJ_BIND_FUNCTION(setBannerPos, ctx, argc, argv) +{ + if (argc < 2){ + return NULL; + } + + double x = JSValueToNumberFast(ctx, argv[0]); + double y = JSValueToNumberFast(ctx, argv[0]); + + bannerX = x; + bannerY = y; + + if (banner){ + [self doLayout]; + } + return NULL; +} + +EJ_BIND_ENUM(type, self.bannerType, + "banner", + "mediumrectangle", + "fullbanner", + "leaderboard", + "skyscraper", + "portrait", + "landscape", + "invalid" + ); + + + +/////////////////////////// + + + +-(BOOL)callLoadAd:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + if ([type isEqualToString:@"banner"]){ + if (bannerLoading){ + return false; + } + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_SEC * 0.21), + dispatch_get_main_queue(), ^{ + [self doLayout]; + [self requestBanner]; + }); + }else{ + if (interstitialLoading){ + return false; + } + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_SEC * 0.25), + dispatch_get_main_queue(), ^{ + [self createAndLoadInterstitial]; + }); + } + + return true; +} + + +-(BOOL)callShow:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + if ([type isEqualToString:@"banner"]){ + banner.hidden = NO; + [scriptView bringSubviewToFront:banner]; + return true; + }else{ + if (interstitial.isReady) { + [interstitial presentFromRootViewController:scriptView.window.rootViewController]; + return true; + } + } + + return false; + +} + +-(BOOL)callIsReady:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + if ([type isEqualToString:@"banner"]){ + return isBannerReady; + } + return interstitial && interstitial.isReady; + +} + +-(void)callHide:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + banner.hidden = YES; +} + + +@end diff --git a/Extension/ad/EJBindingAppodeal.h b/Extension/ad/EJBindingAppodeal.h new file mode 100644 index 00000000..6b7c90f6 --- /dev/null +++ b/Extension/ad/EJBindingAppodeal.h @@ -0,0 +1,20 @@ +#import + +#import "EJBindingBase.h" + + +@interface EJBindingAppodeal : EJBindingBase +{ + + NSString *appKey; + NSDictionary *adStyle; + + BOOL loading; + + JSObjectRef hookBeforeShow; + JSObjectRef hookAfterClose; + JSObjectRef hookAfterClick; + JSObjectRef hookAfterFinish; +} + +@end diff --git a/Extension/ad/EJBindingAppodeal.m b/Extension/ad/EJBindingAppodeal.m new file mode 100644 index 00000000..37b5b19a --- /dev/null +++ b/Extension/ad/EJBindingAppodeal.m @@ -0,0 +1,365 @@ +#import "EJBindingAppodeal.h" + +@implementation EJBindingAppodeal + + +- (id)initWithContext:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + if (self = [super initWithContext:ctx argc:argc argv:argv]) { + if (argc > 0) { + appKey = [JSValueToNSString(ctx, argv[0]) retain]; + } + else { + NSLog(@"Error: Must set appID"); + return self; + } + + loading = false; + hookBeforeShow = nil; + hookAfterClose = nil; + hookAfterClick = nil; + hookAfterFinish = nil; + + adStyle = @{@"interstitial": @(AppodealShowStyleInterstitial), + @"video": @(AppodealShowStyleSkippableVideo), + @"videoorinterstitial": @(AppodealShowStyleVideoOrInterstitial), + @"bannertop": @(AppodealShowStyleBannerTop), + @"bannercenter": @(AppodealShowStyleBannerCenter), + @"bannerbottom": @(AppodealShowStyleBannerBottom), + @"rewardedvideo": @(AppodealShowStyleRewardedVideo) + }; + + [Appodeal initializeWithApiKey:appKey types: (AppodealAdType)(AppodealAdTypeAll)]; + + [Appodeal setInterstitialDelegate:self]; + [Appodeal setBannerDelegate:self]; + [Appodeal setVideoDelegate:self]; + [Appodeal setRewardedVideoDelegate:self]; + + } + + return self; +} + +- (void)createWithJSObject:(JSObjectRef)obj scriptView:(EJJavaScriptView *)view { + [super createWithJSObject:obj scriptView:view]; +} + +- (void)dealloc { + + if (hookBeforeShow) { + JSValueUnprotect(scriptView.jsGlobalContext, hookBeforeShow); + hookBeforeShow = nil; + } + + if (hookAfterClose) { + JSValueUnprotect(scriptView.jsGlobalContext, hookAfterClose); + hookAfterClose = nil; + } + + if (hookAfterClick) { + JSValueUnprotect(scriptView.jsGlobalContext, hookAfterClick); + hookAfterClick = nil; + } + + if (hookAfterFinish) { + JSValueUnprotect(scriptView.jsGlobalContext, hookAfterFinish); + hookAfterFinish = nil; + } + + [super dealloc]; +} + + + +-(void)beforeShowAd { + if (hookBeforeShow) { + [scriptView invokeCallback: hookBeforeShow thisObject: NULL argc: 0 argv: NULL]; + JSValueUnprotect(scriptView.jsGlobalContext, hookBeforeShow); + hookBeforeShow = nil; + } +} + +-(void)afterCloseAd { + if (hookAfterClose) { + [scriptView invokeCallback: hookAfterClose thisObject: NULL argc: 0 argv: NULL]; + JSValueUnprotect(scriptView.jsGlobalContext, hookAfterClose); + hookAfterClose = nil; + } +} + +-(void)afterClickAd { + if (hookAfterClick) { + [scriptView invokeCallback: hookAfterClick thisObject: NULL argc: 0 argv: NULL]; + JSValueUnprotect(scriptView.jsGlobalContext, hookAfterClick); + hookAfterClick = nil; + } +} + +-(void)afterFinishAd{ + if (hookAfterFinish) { + [scriptView invokeCallback: hookAfterFinish thisObject: NULL argc: 0 argv: NULL]; + JSValueUnprotect(scriptView.jsGlobalContext, hookAfterFinish); + hookAfterFinish = nil; + } +} + +-(void)afterFinishAd:(NSString *)rewardName rewardAmount:(NSUInteger)rewardAmount{ + if (hookAfterFinish) { + JSValueRef rewardInfo = NSObjectToJSValue(scriptView.jsGlobalContext, + @{ + @"rewardName": rewardName, + @"rewardAmount":@(rewardAmount) + }); + JSValueRef params[] = { rewardInfo }; + + [scriptView invokeCallback: hookAfterFinish thisObject: NULL argc:1 argv:params]; + JSValueUnprotect(scriptView.jsGlobalContext, hookAfterFinish); + hookAfterFinish = nil; + } + +} + +////////////////////////////////// + +- (void)interstitialDidLoadAd { + NSLog(@"interstitialDidLoadAd"); +} + +- (void)interstitialDidFailToLoadAd { + NSLog(@"interstitialDidFailToLoadAd"); +} + +- (void)interstitialWillPresent { + NSLog(@"interstitial beforeShow"); + [self beforeShowAd]; +} + +- (void)interstitialDidClick { + NSLog(@"interstitial onClick"); + [self afterClickAd]; +} + +- (void)interstitialDidDismiss { + NSLog(@"interstitial onClose"); + [self afterCloseAd]; +} + + +////////////////////////////////// + +- (void)bannerDidLoadAd{ + NSLog(@"bannerDidLoadAd"); +} + + +- (void)bannerDidFailToLoadAd{ + NSLog(@"bannerDidFailToLoadAd"); +} + + +- (void)bannerDidClick{ + NSLog(@"banner onClick"); + [self afterClickAd]; +} + + +////////////////////////////////// + +- (void)videoDidLoadAd{ + NSLog(@"videoDidLoadAd"); +} + +- (void)videoDidFailToLoadAd{ + NSLog(@"videoDidFailToLoadAd"); +} + +- (void)videoDidPresent{ + NSLog(@"video beforeShow"); + [self beforeShowAd]; +} + +- (void)videoWillDismiss{ + NSLog(@"video onClose"); + [self afterCloseAd]; +} + +- (void)videoDidFinish{ + NSLog(@"video onFinish"); + [self afterFinishAd]; +} + +////////////////////////////////// + +- (void)rewardedVideoDidLoadAd{ + NSLog(@"rewardedVideoDidLoadAd"); +} + +- (void)rewardedVideoDidFailToLoadAd{ + NSLog(@"rewardedVideoDidFailToLoadAd"); +} + +- (void)rewardedVideoDidPresent{ + NSLog(@"rewardVideo beforeShow"); + [self beforeShowAd]; +} + +- (void)rewardedVideoWillDismiss{ + NSLog(@"rewardVideo onClose"); + [self afterCloseAd]; +} + +- (void)rewardedVideoDidFinish:(NSUInteger)rewardAmount name:(NSString *)rewardName{ + NSLog(@"rewardVideo onFinish"); + [self afterFinishAd:rewardName rewardAmount:rewardAmount]; +} + +////////////////////////////////// + + +EJ_BIND_GET(appKey, ctx) +{ + return NSStringToJSValue(ctx, appKey); +} + +EJ_BIND_GET(autocache, ctx) +{ + BOOL autocache = [Appodeal isAutocacheEnabled:(AppodealAdType)(AppodealAdTypeAll)]; + return JSValueMakeBoolean(ctx, autocache); +} + +EJ_BIND_SET(autocache, ctx, value) +{ + BOOL autocache = JSValueToBoolean(ctx, value); + [Appodeal setAutocache:autocache types:(AppodealAdType)(AppodealAdTypeAll)]; +} + +EJ_BIND_FUNCTION(cacheAd, ctx, argc, argv) +{ + [Appodeal cacheAd:(AppodealAdType)(AppodealAdTypeAll)]; + return NULL; +} + + +EJ_BIND_FUNCTION(hideBanner, ctx, argc, argv) +{ + [Appodeal hideBanner]; + return NULL; +} + +EJ_BIND_FUNCTION(setDebugEnabled, ctx, argc, argv) +{ + BOOL debug = JSValueToBoolean(ctx, argv[0]); + [Appodeal setDebugEnabled:debug]; + return NULL; +} + + +EJ_BIND_FUNCTION(isReady, ctx, argc, argv) +{ + + NSString * style=[JSValueToNSString(ctx, argv[0]) lowercaseString]; + if (!style){ + style = @"interstitial"; + } + + NSInteger showStyle = [adStyle objectForKey:style]; + if (!showStyle){ + showStyle = AppodealShowStyleInterstitial; + } + + BOOL ready = [Appodeal isReadyForShowWithStyle:showStyle]; + return JSValueMakeBoolean(ctx, ready); +} + + +EJ_BIND_FUNCTION(show, ctx, argc, argv) +{ + + if (hookBeforeShow) { + JSValueUnprotect(scriptView.jsGlobalContext, hookBeforeShow); + hookBeforeShow = nil; + } + + if (hookAfterClose) { + JSValueUnprotect(scriptView.jsGlobalContext, hookAfterClose); + hookAfterClose = nil; + } + + NSString * style=[JSValueToNSString(ctx, argv[0]) lowercaseString]; + if (!style){ + style = @"interstitial"; + } + + NSInteger showStyle = [adStyle objectForKey:style]; + if (!showStyle){ + showStyle = AppodealShowStyleInterstitial; + } + + + NSMutableDictionary* options = nil; + + JSObjectRef jsOptions; + if (argc > 1){ + jsOptions = JSValueToObject(ctx, argv[1], NULL); + NSDictionary *inOptions = (NSDictionary *)JSValueToNSObject(ctx, jsOptions); + NSEnumerator *keys = [inOptions keyEnumerator]; + options = [NSMutableDictionary new]; + id keyId; + while ((keyId = [keys nextObject])) { + NSString *key = (NSString *)keyId; + NSString *value = (NSString *)[inOptions objectForKey:keyId]; + NSLog(@"key : %@, value: %@", key, value); + + if ([key isEqualToString:@"beforeShow"]){ + JSStringRef funcName = JSStringCreateWithUTF8CString("beforeShow"); + JSValueRef jsFunc = JSObjectGetProperty(ctx, jsOptions, funcName, NULL); + JSStringRelease(funcName); + + hookBeforeShow = JSValueToObject(ctx, jsFunc, NULL); + JSValueProtect(ctx, hookBeforeShow); + + }else if ([key isEqualToString:@"afterClose"]){ + JSStringRef funcName = JSStringCreateWithUTF8CString("afterClose"); + JSValueRef jsFunc = JSObjectGetProperty(ctx, jsOptions, funcName, NULL); + JSStringRelease(funcName); + + hookAfterClose = JSValueToObject(ctx, jsFunc, NULL); + JSValueProtect(ctx, hookAfterClose); + + }else if ([key isEqualToString:@"afterClick"]){ + JSStringRef funcName = JSStringCreateWithUTF8CString("afterClick"); + JSValueRef jsFunc = JSObjectGetProperty(ctx, jsOptions, funcName, NULL); + JSStringRelease(funcName); + + hookAfterClick = JSValueToObject(ctx, jsFunc, NULL); + JSValueProtect(ctx, hookAfterClick); + + }else if ([key isEqualToString:@"afterFinish"]){ + JSStringRef funcName = JSStringCreateWithUTF8CString("afterFinish"); + JSValueRef jsFunc = JSObjectGetProperty(ctx, jsOptions, funcName, NULL); + JSStringRelease(funcName); + + hookAfterFinish = JSValueToObject(ctx, jsFunc, NULL); + JSValueProtect(ctx, hookAfterFinish); + + } + } + } + +// [self beforeShowAd]; + + if (options){ + [Appodeal showAd:showStyle rootViewController:scriptView.window.rootViewController]; + [options release]; + }else{ + [Appodeal showAd:showStyle rootViewController:scriptView.window.rootViewController]; + } + + + return scriptView->jsTrue; + +} + + + +@end diff --git a/Extension/ad/EJBindingChartboost.h b/Extension/ad/EJBindingChartboost.h new file mode 100644 index 00000000..c6eb0fd7 --- /dev/null +++ b/Extension/ad/EJBindingChartboost.h @@ -0,0 +1,16 @@ + +#import +#import +//#import +#import "EJBindingAdBase.h" + + + +@interface EJBindingChartboost : EJBindingAdBase +{ + NSString *appId; + NSString *appSignature; + +} + +@end diff --git a/Extension/ad/EJBindingChartboost.m b/Extension/ad/EJBindingChartboost.m new file mode 100644 index 00000000..b409e131 --- /dev/null +++ b/Extension/ad/EJBindingChartboost.m @@ -0,0 +1,397 @@ +#import +#import +// TODO +//#import +//#import +//#import +//#import + +#import "EJBindingChartboost.h" + + + +@implementation EJBindingChartboost + + +- (id)initWithContext:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + if (self = [super initWithContext:ctx argc:argc argv:argv]) { + if (argc > 1) { + appId = [JSValueToNSString(ctx, argv[0]) retain]; + appSignature = [JSValueToNSString(ctx, argv[1]) retain]; + } + else { + NSLog(@"Error: Must set appId & appSignature"); + } + } + return self; +} + +- (void)createWithJSObject:(JSObjectRef)obj scriptView:(EJJavaScriptView *)view { + [super createWithJSObject:obj scriptView:view]; + + [Chartboost startWithAppId:appId appSignature:appSignature delegate:self]; + [Chartboost setAutoCacheAds:autoLoad]; + +} + +- (void)dealloc { + [appId release]; + [appSignature release]; + [super dealloc]; +} + + + +/* + * Chartboost Delegate Methods + * + */ + +//shouldDisplayInterstitial +//didDisplayInterstitial +//didDismissInterstitial +//didCloseInterstitial +//didClickInterstitial +// +//shouldDisplayRewardedVideo +//didDisplayRewardedVideo +//didDismissRewardedVideo +//didCloseRewardedVideo +//didClickRewardedVideo +//didCompleteRewardedVideo +//willDisplayVideo +// +//shouldDisplayMoreApps +//didDisplayMoreApps +//didDismissMoreApps +//didCloseMoreApps +//didClickMoreApps + +- (NSString *)getErrorMessage:(CBLoadError)error { + NSString *message = nil; + switch(error){ + case CBLoadErrorInternetUnavailable: { + message = @"No Internet connection !"; + } break; + case CBLoadErrorInternal: { + message = @"Internal error !"; + } break; + case CBLoadErrorNetworkFailure: { + message = @"Network error !"; + } break; + case CBLoadErrorWrongOrientation: { + message = @"Wrong orientation !"; + } break; + case CBLoadErrorTooManyConnections: { + message = @"Too many connections !"; + } break; + case CBLoadErrorFirstSessionInterstitialsDisabled: { + message = @"First session !"; + } break; + case CBLoadErrorNoAdFound : { + message = @"No ad found !"; + } break; + case CBLoadErrorSessionNotStarted : { + message = @"Session not started !"; + } break; + case CBLoadErrorNoLocationFound : { + message = @"Missing location parameter !"; + } break; + default: { + message = @"Unknown error !"; + } + } + return message; +} + + + +////////////// Interstitial //////////////// +- (void)didCacheInterstitial:(CBLocation)location { + #if DEBUG + NSLog(@"Cache Interstitial at location %@", location); + #endif + [self triggerEventOnce:@"interstitial_onLoad" properties:(JSEventProperty[]){ + {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"Interstitial")}, + {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, + {NULL, NULL} + }]; +} +- (void)didCloseInterstitial:(CBLocation)location { + #if DEBUG + NSLog(@"Close Interstitial at location %@", location); + #endif + [self triggerEventOnce:@"interstitial_onClose" properties:(JSEventProperty[]){ + {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"Interstitial")}, +// {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, + {NULL, NULL} + }]; +} +- (void)didClickInterstitial:(CBLocation)location { + #if DEBUG + NSLog(@"Click Interstitial at location %@", location); + #endif + [self triggerEventOnce:@"interstitial_onClick" properties:(JSEventProperty[]){ + {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"Interstitial")}, + {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, + {NULL, NULL} + }]; +} +- (void)didDisplayInterstitial:(CBLocation)location { + #if DEBUG + NSLog(@"Did display Interstitial"); + #endif + if ([Chartboost isAnyViewVisible]) { + [self triggerEventOnce:@"interstitial_onDisplay" properties:(JSEventProperty[]){ + {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"Interstitial")}, + {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, + {NULL, NULL} + }]; + } +} +- (void)didFailToLoadInterstitial:(CBLocation)location withError:(CBLoadError)error { + NSString *message = [self getErrorMessage:error]; + #if DEBUG + NSLog(@"Faild to load Interstitial: %@", message); + #endif + [self triggerEventOnce:@"interstitial_onFail" properties:(JSEventProperty[]){ + {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"Interstitial")}, +// {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, + {"message",NSStringToJSValue(scriptView.jsGlobalContext, message)}, + {NULL, NULL} + }]; + +} + + + +////////////// MoreApps //////////////// +- (void)didCacheMoreApps:(CBLocation)location { + #if DEBUG + NSLog(@"Cache MoreApps at location %@", location); + #endif + [self triggerEventOnce:@"moreApps_onLoad" properties:(JSEventProperty[]){ + {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"MoreApps")}, + {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, + {NULL, NULL} + }]; +} +- (void)didCloseMoreApps:(CBLocation)location { + #if DEBUG + NSLog(@"Close MoreApps at location %@", location); + #endif + [self triggerEventOnce:@"moreApps_onClose" properties:(JSEventProperty[]){ + {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"MoreApps")}, + {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, + {NULL, NULL} + }]; +} +- (void)didClickMoreApps:(CBLocation)location { + #if DEBUG + NSLog(@"Click MoreApps at location %@", location); + #endif + [self triggerEventOnce:@"moreApps_onClick" properties:(JSEventProperty[]){ + {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"MoreApps")}, + {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, + {NULL, NULL} + }]; +} +- (void)didFailToLoadMoreApps:(CBLoadError)error forLocation:(CBLocation)location { + NSString *message = [self getErrorMessage:error]; + #if DEBUG + NSLog(@"Faild to load MoreApps: %@", message); + #endif + [self triggerEventOnce:@"moreApps_onFail" properties:(JSEventProperty[]){ + {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"MoreApps")}, +// {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, + {"message",NSStringToJSValue(scriptView.jsGlobalContext, message)}, + {NULL, NULL} + }]; +} + + +////////////// RewardedVideo //////////////// +- (void)didCacheRewardedVideo:(CBLocation)location { + #if DEBUG + NSLog(@"Cache RewardedVideo at location %@", location); + #endif + [self triggerEventOnce:@"rewardedVideo_onLoad" properties:(JSEventProperty[]){ + {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"RewardedVideo")}, + {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, + {NULL, NULL} + }]; +} +- (void)didCloseRewardedVideo:(CBLocation)location { + #if DEBUG + NSLog(@"Close RewardedVideo at location %@", location); + #endif + [self triggerEventOnce:@"rewardedVideo_onClose" properties:(JSEventProperty[]){ + {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"RewardedVideo")}, +// {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, + {NULL, NULL} + }]; +} +- (void)didClickRewardedVideo:(CBLocation)location { + #if DEBUG + NSLog(@"Click RewardedVideo at location %@", location); + #endif + [self triggerEventOnce:@"rewardedVideo_onClick" properties:(JSEventProperty[]){ + {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"RewardedVideo")}, + {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, + {NULL, NULL} + }]; +} + +- (void)didDisplayRewardedVideo:(CBLocation)location { +#if DEBUG + NSLog(@"Did display RewardedVideo"); +#endif +// if ([Chartboost isAnyViewVisible]) { +// [self triggerEventOnce:@"rewardedVideo_onDisplay" properties:(JSEventProperty[]){ +// {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"RewardedVideo")}, +// {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, +// {NULL, NULL} +// }]; +// } +} + +- (void)willDisplayVideo:(CBLocation)location { +#if DEBUG + NSLog(@"Will Display RewardedVideo"); +#endif + [self triggerEventOnce:@"rewardedVideo_onDisplay" properties:(JSEventProperty[]){ + {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"RewardedVideo")}, + {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, + {NULL, NULL} + }]; +} +- (void)didCompleteRewardedVideo:(CBLocation)location withReward:(int)reward { + #if DEBUG + NSLog(@"completed RewardedVideo view at location %@ with reward amount %d", location, reward); + #endif + [self triggerEventOnce:@"rewardedVideo_onFinish" properties:(JSEventProperty[]){ + {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"RewardedVideo")}, + {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, + {"reward", JSValueMakeNumber(scriptView.jsGlobalContext, reward)}, + {NULL, NULL} + }]; +} +- (void)didFailToLoadRewardedVideo:(CBLocation)location withError:(CBLoadError)error { + NSString *message = [self getErrorMessage:error]; + #if DEBUG + NSLog(@"Faild to load RewardedVideo: %@", message); + #endif + [self triggerEventOnce:@"rewardedVideo_onFail" properties:(JSEventProperty[]){ + {"adType", NSStringToJSValue(scriptView.jsGlobalContext, @"RewardedVideo")}, + {"location", NSStringToJSValue(scriptView.jsGlobalContext, location)}, + {"message",NSStringToJSValue(scriptView.jsGlobalContext, message)}, + {NULL, NULL} + }]; +} + + +////////////////////////////////////////// +////////////////////////////////////////// + + +EJ_BIND_GET(appId, ctx) +{ + return NSStringToJSValue(ctx, appId); +} + +EJ_BIND_GET(appSignature, ctx) +{ + return NSStringToJSValue(ctx, appSignature); +} + + +/* + * Chartboost API + */ + + + +EJ_BIND_GET(autoLoad, ctx) +{ + return JSValueMakeBoolean(ctx, [Chartboost getAutoCacheAds]); +} + +EJ_BIND_SET(autoLoad, ctx, value) +{ + autoLoad = JSValueToBoolean(ctx, value); + [Chartboost setAutoCacheAds:autoLoad]; +} + + + +-(BOOL)callShow:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + NSString *location = CBLocationDefault; + + if ([options objectForKey:@"location"]) { + location = [options objectForKey:@"location"]; + } + + if ([type isEqualToString:@"interstitial"]){ + if ([Chartboost hasInterstitial:location]){ + [Chartboost showInterstitial:location]; + return true; + } + }else if ([type isEqualToString:@"moreApps"]){ + if ([Chartboost hasMoreApps:location]){ + [Chartboost showMoreApps:scriptView.window.rootViewController location:location]; + return true; + } + }else if ([type isEqualToString:@"rewardedVideo"]){ + if ([Chartboost hasRewardedVideo:location]){ + [Chartboost showRewardedVideo:location]; + return true; + } + } + + return false; + +} + +-(BOOL)callIsReady:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + NSString *location = CBLocationDefault; + + if ([options objectForKey:@"location"]) { + location = [options objectForKey:@"location"]; + } + + if ([type isEqualToString:@"interstitial"]){ + return [Chartboost hasInterstitial:location]; + }else if ([type isEqualToString:@"moreApps"]){ + return [Chartboost hasMoreApps:location]; + }else if ([type isEqualToString:@"rewardedVideo"]){ + return [Chartboost hasRewardedVideo:location]; + } + + return false; + +} + +-(BOOL)callLoadAd:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + NSString *location = CBLocationDefault; + + if ([options objectForKey:@"location"]) { + location = [options objectForKey:@"location"]; + } + + if ([type isEqualToString:@"interstitial"]){ + [Chartboost cacheInterstitial:location]; + }else if ([type isEqualToString:@"moreApps"]){ + [Chartboost cacheMoreApps:location]; + }else if ([type isEqualToString:@"rewardedVideo"]){ + [Chartboost cacheRewardedVideo:location]; + }else{ + return false; + } + + return true; +} + +@end diff --git a/Extension/ad/EJBindingUnityAds.h b/Extension/ad/EJBindingUnityAds.h new file mode 100644 index 00000000..e88b3a6b --- /dev/null +++ b/Extension/ad/EJBindingUnityAds.h @@ -0,0 +1,13 @@ +#import + +#import "EJBindingAdBase.h" + + +@interface EJBindingUnityAds : EJBindingAdBase +{ + + NSString *appId; + +} + +@end diff --git a/Extension/ad/EJBindingUnityAds.m b/Extension/ad/EJBindingUnityAds.m new file mode 100644 index 00000000..6491125e --- /dev/null +++ b/Extension/ad/EJBindingUnityAds.m @@ -0,0 +1,163 @@ +#import "EJBindingUnityAds.h" + +@implementation EJBindingUnityAds + + +- (id)initWithContext:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + if (self = [super initWithContext:ctx argc:argc argv:argv]) { + if (argc > 0) { + appId = [JSValueToNSString(ctx, argv[0]) retain]; + } + else { + NSLog(@"Error: Must set appID"); + return self; + } + + [[NSOperationQueue mainQueue] addOperationWithBlock:^{ + [UnityAds initialize:appId delegate:self]; + }]; + + +// [UnityAds show:self placementId:self.incentivizedPlacementId]; + + } + + return self; +} + +- (void)createWithJSObject:(JSObjectRef)obj scriptView:(EJJavaScriptView *)view { + [super createWithJSObject:obj scriptView:view]; +} + +- (void)dealloc { + [appId release]; + [super dealloc]; +} + + +- (void)unityAdsReady:(NSString *)placementId { + NSLog(@"UADS Ready"); + + JSValueRef jsViewInfo = NSObjectToJSValue(scriptView.jsGlobalContext,@{ + @"placementId": placementId + }); + JSValueRef jsParams[] = { jsViewInfo }; + [self triggerEventOnce:@"video_onReady" argc:1 argv:jsParams]; +} + +- (void)unityAdsDidError:(UnityAdsError)error withMessage:(NSString *)message { + NSLog(@"UnityAds ERROR: %ld - %@",(long)error, message); + + JSValueRef jsViewInfo = NSObjectToJSValue(scriptView.jsGlobalContext,@{ + @"message": message + }); + JSValueRef jsParams[] = { jsViewInfo }; + [self triggerEventOnce:@"video_onFail" argc:1 argv:jsParams]; +} + +- (void)unityAdsDidStart:(NSString *)placementId { + NSLog(@"UADS Start"); + + JSValueRef jsViewInfo = NSObjectToJSValue(scriptView.jsGlobalContext,@{ + @"placementId": placementId + }); + JSValueRef jsParams[] = { jsViewInfo }; + [self triggerEventOnce:@"video_onDisplay" argc:1 argv:jsParams]; +} + +- (void)unityAdsDidFinish:(NSString *)placementId withFinishState:(UnityAdsFinishState)state { + + JSValueRef jsViewInfo = NSObjectToJSValue(scriptView.jsGlobalContext,@{ + @"placementId": placementId + }); + JSValueRef jsParams[] = { jsViewInfo }; + + NSString *stateString = @"UNKNOWN"; + switch (state) { + case kUnityAdsFinishStateError: + stateString = @"ERROR"; + [self triggerEventOnce:@"video_onError" argc:1 argv:jsParams]; + break; + case kUnityAdsFinishStateSkipped: + stateString = @"SKIPPED"; + [self triggerEventOnce:@"video_onSkip" argc:1 argv:jsParams]; + break; + case kUnityAdsFinishStateCompleted: + stateString = @"COMPLETED"; + [self triggerEventOnce:@"video_onFinish" argc:1 argv:jsParams]; + break; + default: + break; + } + NSLog(@"UnityAds FINISH: %@ - %@", stateString, placementId); +} + + +////////////////////////////////////// +////////////////////////////////////// + + +EJ_BIND_GET(appId, ctx) +{ + return NSStringToJSValue(ctx, appId); +} + + +EJ_BIND_GET(debug, ctx) +{ + return JSValueMakeBoolean(ctx, [UnityAds getDebugMode]); +} + +EJ_BIND_SET(debug, ctx, value) +{ + debug = JSValueToBoolean(ctx, value); + [UnityAds setDebugMode:debug]; +} + + + +////////////////////////////////////// +////////////////////////////////////// + + + +-(BOOL)callShow:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + NSLog(@"callShow %@",type); + + NSString *zone = @"rewardedVideo"; + + if ([options objectForKey:@"zone"]) { + zone = [options objectForKey:@"zone"]; + } + + if ([UnityAds isReady:zone]){ + [UnityAds show:scriptView.window.rootViewController placementId:zone]; + return true; + } + + return false; +} + +-(BOOL)callIsReady:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + NSString *zone = @"rewardedVideo"; + + if ([options objectForKey:@"zone"]) { + zone = [options objectForKey:@"zone"]; + } + + return [UnityAds isReady:zone]; +} + +-(BOOL)callLoadAd:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + return true; +} + +-(void)callHide:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + +} + +@end diff --git a/Extension/ad/EJBindingVungle.h b/Extension/ad/EJBindingVungle.h new file mode 100644 index 00000000..ee40ea70 --- /dev/null +++ b/Extension/ad/EJBindingVungle.h @@ -0,0 +1,14 @@ +#import + +#import "EJBindingAdBase.h" + + +@interface EJBindingVungle : EJBindingAdBase +{ + + NSString *appId; + VungleSDK* sdk; + +} + +@end diff --git a/Extension/ad/EJBindingVungle.m b/Extension/ad/EJBindingVungle.m new file mode 100644 index 00000000..e74672b2 --- /dev/null +++ b/Extension/ad/EJBindingVungle.m @@ -0,0 +1,236 @@ +#import "EJBindingVungle.h" + +@implementation EJBindingVungle + + +- (id)initWithContext:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + if (self = [super initWithContext:ctx argc:argc argv:argv]) { + if (argc > 0) { + appId = [JSValueToNSString(ctx, argv[0]) retain]; + } + else { + NSLog(@"Error: Must set appID"); + return self; + } + + sdk = [VungleSDK sharedSDK]; + + [[NSOperationQueue mainQueue] addOperationWithBlock:^{ + [sdk setDelegate:self]; + [sdk startWithAppId:appId]; + }]; + + } + + return self; +} + +- (void)createWithJSObject:(JSObjectRef)obj scriptView:(EJJavaScriptView *)view { + [super createWithJSObject:obj scriptView:view]; +} + +- (void)dealloc { + [sdk setDelegate:nil]; + [sdk release]; + [appId release]; + [super dealloc]; +} + +-(void)vungleSDKwillShowAd { + NSLog(@"vungleSDKwillShowAd"); + + [self triggerEventOnce:@"video_onDisplay"]; +} + +- (void)vungleSDKwillCloseAdWithViewInfo:(NSDictionary *)viewInfo willPresentProductSheet:(BOOL)willPresentProductSheet { + + BOOL completed = [[viewInfo objectForKey:@"completedView"] boolValue]; + + NSLog(@"vungleSDKwillCloseAdWithViewInfo %d %d", willPresentProductSheet, completed); + + // "playTime":15,"didDownload":false,"videoLength":15,"completedView":true + JSValueRef jsViewInfo = NSObjectToJSValue(scriptView.jsGlobalContext,@{ + @"playTime": [viewInfo objectForKey:@"playTime"], + @"completedView": [viewInfo objectForKey:@"completedView"], + @"didDownload": [viewInfo objectForKey:@"didDownload"], + @"willPresentProductSheet": @(willPresentProductSheet) + }); + + if (completed){ + JSValueRef jsParams[] = { jsViewInfo }; + [self triggerEventOnce:@"video_onFinish" argc:1 argv:jsParams]; + } + [[NSOperationQueue mainQueue] addOperationWithBlock:^{ + JSValueRef jsParams[] = { jsViewInfo }; + [self triggerEventOnce:@"video_onClose" argc:1 argv:jsParams]; + }]; + +} + +- (void)vungleSDKwillCloseProductSheet:(id)productSheet { + NSLog(@"vungleSDKwillCloseProductSheet"); + [self triggerEventOnce:@"video_onBack"]; +} + +////////////////////////////////////////////// + +EJ_BIND_GET(appId, ctx) +{ + return NSStringToJSValue(ctx, appId); +} + + +EJ_BIND_GET(muted, ctx) +{ + return JSValueMakeBoolean(ctx, sdk.muted); +} + +EJ_BIND_SET(muted, ctx, value) +{ + sdk.muted = JSValueToBoolean(ctx, value); +} + + +EJ_BIND_GET(debug, ctx) +{ + return JSValueMakeBoolean(ctx, debug); +} + +EJ_BIND_SET(debug, ctx, value) +{ + debug = JSValueToBoolean(ctx, value); + [sdk setLoggingEnabled:debug]; +} + + +//EJ_BIND_FUNCTION(show, ctx, argc, argv) +//{ +// +// if (argc < 1){ +// return NULL; +// } +// +// NSString *type = JSValueToNSString(ctx, argv[0]); +// NSDictionary* options = nil; +// +// BOOL rewarded = false; +// +// if ([type isEqualToString:@"rewardedVideo"]){ +// type = @"video"; +// rewarded = true; +// } +// +// if (argc > 1){ +// JSObjectRef jsOptions = JSValueToObject(ctx, argv[1], NULL); +// options = [self getOptions:type ctx:ctx jsOptions:jsOptions]; +// if (rewarded){ +// [options setValue:@(YES) forKey:@"incentivized"]; +// } +// }else if (rewarded){ +// options = [NSDictionary dictionaryWithObject:@(YES) forKey:@"incentivized"]; +// }; +// +// BOOL ok = [self callShow:type options:options ctx:ctx argc:argc argv:argv]; +// +// return ok ? scriptView->jsTrue : scriptView->jsFalse; +//} + + + +////////////////////////////////////// +////////////////////////////////////// + + + +-(BOOL)callShow:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + /* + Options ( VunglePlayAdOptionKey + key ) : + incentivized boolean + incentivizedAlertTitleText string + incentivizedAlertBodyText string + incentivizedAlertCloseButtonText string + incentivizedAlertContinueButtonText string + orientations string + placement string + user string + * extraInfoDictionary (don't support) + { + "videoLength":30, + "playTime":30, + "completedView":1, + "willPresentProductSheet":0, + "didDownload":0 + } + + */ + + + NSError *error; + + if (options){ + +// if ([type isEqualToString:@"rewardedVideo"]){ +// [options setValue:@(YES) forKey:@"incentivized"]; +// } + + NSMutableDictionary *sdkOptions = [NSMutableDictionary new]; + + NSEnumerator *keys = [options keyEnumerator]; + + id keyId; + while ((keyId = [keys nextObject])) { + NSString *key = (NSString *)keyId; + NSString *value = (NSString *)[options objectForKey:keyId]; + NSLog(@"key : %@, value: %@", key, value); + if ([key isEqualToString:@"incentivized"]){ + [sdkOptions setObject:@([[options objectForKey:keyId] boolValue]) forKey:VunglePlayAdOptionKeyIncentivized]; + }else if ([key isEqualToString:@"incentivizedAlertTitleText"]){ + [sdkOptions setObject:value forKey:VunglePlayAdOptionKeyIncentivizedAlertTitleText]; + }else if ([key isEqualToString:@"incentivizedAlertBodyText"]){ + [sdkOptions setObject:value forKey:VunglePlayAdOptionKeyIncentivizedAlertBodyText]; + }else if ([key isEqualToString:@"incentivizedAlertCloseButtonText"]){ + [sdkOptions setObject:value forKey:VunglePlayAdOptionKeyIncentivizedAlertCloseButtonText]; + }else if ([key isEqualToString:@"incentivizedAlertContinueButtonText"]){ + [sdkOptions setObject:value forKey:VunglePlayAdOptionKeyIncentivizedAlertContinueButtonText]; + }else if ([key isEqualToString:@"orientations"]){ + if ([value isEqualToString:@"portrait"]){ + [sdkOptions setObject:@(UIInterfaceOrientationMaskPortrait) forKey:VunglePlayAdOptionKeyOrientations]; + }else if ([value isEqualToString:@"landscape"]){ + [sdkOptions setObject:@(UIInterfaceOrientationMaskLandscape) forKey:VunglePlayAdOptionKeyOrientations]; + } + }else if ([key isEqualToString:@"placement"]){ + [sdkOptions setObject:value forKey:VunglePlayAdOptionKeyPlacement]; + }else if ([key isEqualToString:@"user"]){ + [sdkOptions setObject:value forKey:VunglePlayAdOptionKeyUser]; + } + } + [sdk playAd:scriptView.window.rootViewController withOptions:sdkOptions error:&error]; + [sdkOptions release]; + + }else{ + [sdk playAd:scriptView.window.rootViewController error:&error]; + } + + if (error) { + NSLog(@"Error encountered playing ad: %@", error); + [self triggerEventOnce:@"error"]; + return false; + } + + return true; + +} + +-(BOOL)callIsReady:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + return sdk.isAdPlayable; + +} + +-(BOOL)callLoadAd:(NSString *)type options:(NSDictionary *)options ctx:(JSContextRef)ctx argc:(size_t)argc argv:(const JSValueRef[])argv { + + return true; +} + +@end diff --git a/Extension/lib/AdColony.framework/AdColony b/Extension/lib/AdColony.framework/AdColony new file mode 120000 index 00000000..ad448641 --- /dev/null +++ b/Extension/lib/AdColony.framework/AdColony @@ -0,0 +1 @@ +Versions/Current/AdColony \ No newline at end of file diff --git a/Source/lib/JavaScriptCore.framework/Headers b/Extension/lib/AdColony.framework/Headers similarity index 100% rename from Source/lib/JavaScriptCore.framework/Headers rename to Extension/lib/AdColony.framework/Headers diff --git a/Extension/lib/AdColony.framework/Versions/A/AdColony b/Extension/lib/AdColony.framework/Versions/A/AdColony new file mode 100755 index 00000000..b7d19b30 Binary files /dev/null and b/Extension/lib/AdColony.framework/Versions/A/AdColony differ diff --git a/Extension/lib/AdColony.framework/Versions/A/Headers/AdColony.h b/Extension/lib/AdColony.framework/Versions/A/Headers/AdColony.h new file mode 100755 index 00000000..6e0944b7 --- /dev/null +++ b/Extension/lib/AdColony.framework/Versions/A/Headers/AdColony.h @@ -0,0 +1,405 @@ +/* + * AdColony.h + * adc-ios-sdk + * + * Created by Ty Heath on 7/17/12. + */ + +#import + +#import "AdColonyAdInfo.h" + +#pragma mark - Constants + +/** + * Enum for zone status + */ +typedef NS_ENUM(NSUInteger, ADCOLONY_ZONE_STATUS) { + ADCOLONY_ZONE_STATUS_NO_ZONE = 0, /** AdColony has not been configured with that zone ID. */ + ADCOLONY_ZONE_STATUS_OFF, /** The zone has been turned off on the [Control Panel](http://clients.adcolony.com). */ + ADCOLONY_ZONE_STATUS_LOADING, /** The zone is preparing ads for display. */ + ADCOLONY_ZONE_STATUS_ACTIVE, /** The zone has completed preparing ads for display. */ + ADCOLONY_ZONE_STATUS_UNKNOWN /** AdColony has not yet received the zone's configuration from our server. */ +}; + +#pragma mark - Forward declarations + +@class AdColonyNativeAdView; +@class UIViewController; + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - AdColonyDelegate protocol + +/** + * Use the AdColonyDelegate to receive callbacks when ad availability changes or when a V4VC transaction has completed. + * This delegate is passed to AdColony during configuration using `[AdColony configureWithAppID:zoneIDs:delegate:logging:]`. + */ +@protocol AdColonyDelegate +@optional + +/** @name Video Ad Readiness */ + +/** + * Provides your app with real-time updates about ad availability changes. + * This method is called when a zone's ad availability state changes (when ads become available, or become unavailable). + * Listening to these callbacks allows your app to update its user interface immediately. + * For example, when ads become available in a zone you could immediately show an ad for that zone. + * @param available Whether ads became available or unavailable. + * @param zoneID The affected zone. + */ +- (void)onAdColonyAdAvailabilityChange:(BOOL)available inZone:(NSString *)zoneID; + + +/** @name Virtual Currency Rewards (V4VC) */ + +/** + * Notifies your app when a virtual currency transaction has completed as a result of displaying an ad. + * In your implementation, check for success and implement any app-specific code that should be run when + * AdColony has successfully rewarded. Client-side V4VC implementations should increment the user's currency + * balance in this method. Server-side V4VC implementations should contact the game server to determine + * the current total balance for the virtual currency. + * @param success Whether the transaction succeeded or failed. + * @param currencyName The name of currency to reward. + * @param amount The amount of currency to reward. + * @param zoneID The affected zone. + */ +- (void)onAdColonyV4VCReward:(BOOL)success currencyName:(NSString *)currencyName currencyAmount:(int)amount inZone:(NSString *)zoneID; +@end + +#pragma mark - AdColonyAdDelegate protocol + +/** + * Use the AdColonyAdDelegate to receive callbacks when ads start playing or when an attempt to play an ad has finished (successfully or not). + * This is most frequently used by apps to pause app sound and music during the display of an ad. + * This delegate is passed to AdColony when you call a method to play an ad. + */ +@protocol AdColonyAdDelegate +@optional + +/** + * Notifies your app that an ad will actually play in response to the app's request to play an ad. + * This method is called when AdColony has taken control of the device screen and is about to begin + * showing an ad. Apps should implement app-specific code such as pausing a game and turning off app music. + * @param zoneID The affected zone. + */ +- (void)onAdColonyAdStartedInZone:(NSString *)zoneID; + +/** + * Notifies your app that an ad completed playing (or never played) and control has been returned to the app. + * This method is called when AdColony has finished trying to show an ad, either successfully or unsuccessfully. + * If an ad was shown, apps should implement app-specific code such as unpausing a game and restarting app music. + * @param shown Whether an ad was actually shown. + * @param zoneID The affected zone. + */ +- (void)onAdColonyAdAttemptFinished:(BOOL)shown inZone:(NSString *)zoneID; + +/** + * Alternative for `- onAdColonyAdAttemptFinished:inZone` that passes an AdColonyAdInfo object to the delegate. The AdColonyAdInfo object can be queried + * for information about the ad session: whether or not the ad was shown, the associated zone ID, whether or not the video was an In-App Purchase Promo (IAPP), + * the type of engagement that triggered an IAP, etc. If your application is showing IAPP advertisements, you will need to implement this callback + * instead of `- onAdColonyAdAttemptFinished:inZone` so you can decide what action to take once the ad has completed. + * @param info An AdColonyAdInfo object containing metadata about the associated ad. + * @see onAdColonyAdAttemptFinished:inZone + * @see AdColonyAdInfo + */ +- (void)onAdColonyAdFinishedWithInfo:(AdColonyAdInfo *)info; +@end + +#pragma mark - AdColony interface + +/** + * The AdColony class provides methods to start AdColony, display ads, and change global settings + */ +@interface AdColony : NSObject + +/** @name Starting AdColony */ + +/** + * Configures AdColony specifically for your app; required for usage of the rest of the API. + * This method returns immediately; any long-running work such as network connections are performed in the background. + * AdColony does not begin preparing ads for display or performing reporting until after it is configured by your app. + * @param appID The AdColony app ID for your app. This can be created and retrieved at the [Control Panel](http://clients.adcolony.com). + * @param zoneIDs An array of at least one AdColony zone ID string. AdColony zone IDs can be created and retrieved at the [Control Panel](http://clients.adcolony.com). If `nil`, app will be unable to play ads and AdColony will only provide limited reporting and install tracking functionality. + * @param del (*optional*) The delegate to receive V4VC and ad availability events. Can be `nil` for apps that do not need these events. + * @param log A boolean controlling AdColony verbose logging. + */ ++ (void)configureWithAppID:(NSString *)appID zoneIDs:(NSArray *)zoneIDs delegate:(nullable id)del logging:(BOOL)log; + +/** @name Playing Video Ads */ + +/** + * Plays an AdColony ad. + * This method returns immediately, before the ad completes. If ads are not + * available, an ad may not play as a result of this method call. If you need + * more detailed information about when the ad completes or whether an ad + * played, pass in a delegate. + * @param zoneID The zone from which the ad should play. + * @param del (*optional*) The delegate to receive ad events. Can be `nil` for apps that do not need these events. + */ ++ (void)playVideoAdForZone:(NSString *)zoneID withDelegate:(nullable id)del; + +/** + * Plays an AdColony ad and allows specifying display of the default V4VC instructional popups. + * This method returns immediately, before the ad completes. If ads are not + * available, an ad may not play as a result of this method call. If you need + * more detailed information about when the ad completes or whether an ad + * played, pass in a delegate. + * @param zoneID The zone from which the ad should play. + * @param del (*optional*) The delegate to receive ad events. Can be `nil` for apps that do not need these events. + * @param showPrePopup Whether AdColony should display an instructional popup before the ad. + * @param showPostPopup Whether AdColony should display an instructional popup after the ad. + */ ++ (void)playVideoAdForZone:(NSString *)zoneID withDelegate:(nullable id)del withV4VCPrePopup:(BOOL)showPrePopup andV4VCPostPopup:(BOOL)showPostPopup; + +/** + * Returns an AdColonyNativeAdView, used to display an ad embedded within a screen of your app. + * @param zoneID The zone from which the ad should play. + * @param viewController The UIViewController in which you will display the AdColonyNativeAdView. Must not be `nil`. This is required so that the ad can present additional view controllers if the user interacts with it. + * @return An AdColonyNativeAdView. May be `nil` if ads are not available. + * @see AdColonyNativeAdView + */ ++ (nullable AdColonyNativeAdView *)getNativeAdForZone:(NSString *)zoneID presentingViewController:(UIViewController *)viewController; + +/** + * Returns the zone status for the specified zone. + * @param zoneID The zone in question + * @return An ADCOLONY_ZONE_STATUS enum value indicating the zone status. Possible values are: `ADCOLONY_ZONE_STATUS_NO_ZONE` indicating AdColony has not been configured with that zone ID; `ADCOLONY_ZONE_STATUS_OFF` indicating the zone has been turned off on the control panel; `ADCOLONY_ZONE_STATUS_LOADING` indicating zone is preparing ads for display; `ADCOLONY_ZONE_STATUS_ACTIVE` indicating the zone is ready to display ads; `ADCOLONY_ZONE_STATUS_UNKNOWN` indicating AdColony has not yet received the zone's configuration from the server. + */ ++ (ADCOLONY_ZONE_STATUS)zoneStatusForZone:(NSString *)zoneID; + + +/** @name Device and User Identifiers */ + +/** + * Assigns your own custom identifier to the current app user. + * Once you've provided an identifier, AdColony will persist it across app + * restarts (stored on disk only) until you update it. If using this method, + * call it before `[AdColony configureWithAppID:zoneIDs:delegate:logging:]` so that the + * identifier is used consistently across all server communications. The + * identifier will also pass through to server-side V4VC callbacks. + * @param customID An arbitrary, application-specific identifier string for the current user. Must be less than 128 characters. + * @see getCustomID + */ ++ (void)setCustomID:(NSString *)customID; + +/** + * Returns the device's current custom identifier. + * @return The custom identifier string most recently set using `[AdColony setCustomID:]`. + * @see setCustomID: + */ ++ (NSString *)getCustomID; + +/** + * Returns the device's OpenUDID. + * OpenUDID is a community-designed replacement for the Apple UDID. You can + * link your own copy of the OpenUDID library if desired, and it should return + * the same value for the OpenUDID. For details, please see the + * [OpenUDID GitHub page](https://github.com/ylechelle/OpenUDID). + * As of iOS 7, the behavior of this identifier will change. We do not recommend using this + * identifier for new integrations. This method is provided for backwards compatibility. + * @return The string representation of the device's OpenUDID. + */ ++ (NSString *)getOpenUDID; + +/** + * Returns an AdColony-defined device identifier. + * This identifier should remain constant across the lifetime of an iOS device. + * The identifier is a SHA-1 hash of the lowercase colon-separated MAC address of the device's WiFi interface. + * As of iOS 7, the behavior of this identifier will change. We do not recommend using this + * identifier for new integrations. This method is provided for backwards compatibility. + * @return The string representation of the device's AdColony identifier. + */ ++ (NSString *)getUniqueDeviceID; + +/** + * Returns the device's ODIN-1. + * ODIN-1 is a community-designed replacement for the Apple UDID. You can + * link your own copy of the ODIN-1 source if desired, and it should return the same value. + * For details, please see the [ODIN-1 Google Code page](https://code.google.com/p/odinmobile/wiki/ODIN1). + * As of iOS 7, the behavior of this identifier will change. We do not recommend using this + * identifier for new integrations. This method is provided for backwards compatibility. + * @return The string representation of the device's ODIN-1. + */ ++ (NSString *)getODIN1; + +/** + * Returns the device's advertising identifier. + * This value can change if the user restores their device or resets ad tracking. + * @return The string representation of the device's advertising identifier, introduced in iOS 6. Returns an empty string on iOS 5 or below. + */ ++ (NSString *)getAdvertisingIdentifier; + +/** + * Returns the device's vendor identifier. + * @return As of version 2.3 of our iOS SDK, AdColony no longer collects the vendor identifier and this method will return an empty string. This method is provided for backwards compatibility. + */ ++ (NSString *)getVendorIdentifier; + + +/** @name V4VC Availability and Currency Info */ + +/** + * Returns if it is possible for the user to receive a virtual currency reward for playing an ad in the zone. + * This method takes into account whether V4VC has been configured properly for the zone on the + * [AdColony Control Panel](http://clients.adcolony.com), whether the user's daily reward cap has been reached, + * and whether there are ads available. + * @param zoneID The zone in question. + * @return A boolean indicating whether a reward is currently available for the user. + */ ++ (BOOL)isVirtualCurrencyRewardAvailableForZone:(NSString *)zoneID; + +/** + * Returns the number of possible virtual currency rewards currently available for the user. + * This method takes into account daily caps, available ads, and other variables. + * @param zoneID The zone in question. + * @return As of version 2.6 of our iOS SDK, AdColony no longer suports this method. It will always return 0. This method is provided for backwards compatibility. + */ ++ (int)getVirtualCurrencyRewardsAvailableTodayForZone:(NSString *)zoneID; + +/** + * Returns the name of the virtual currency rewarded by the zone. + * You must first configure AdColony using `[AdColony configureWithAppID:zoneIDs:delegate:logging:]` + * and ensure the zone's status is not `ADCOLONY_ZONE_STATUS_UNKNOWN` before this function will return an accurate result. + * @param zoneID The zone in question + * @return A string name of the virtual currency rewarded by the zone, as configured on the [AdColony Control Panel](http://clients.adcolony.com). + */ ++ (NSString *)getVirtualCurrencyNameForZone:(NSString *)zoneID; + +/** + * Returns the amount of virtual currency rewarded by the zone. + * You must first configure AdColony using `[AdColony configureWithAppID:zoneIDs:delegate:logging:]` + * and ensure the zone's status is not `ADCOLONY_ZONE_STATUS_UNKNOWN` before this function will return an accurate result. + * @param zoneID The zone in question + * @return An integer indicating the amount of virtual currency rewarded by the zone, as configured on the [AdColony Control Panel](http://clients.adcolony.com). + */ ++ (int)getVirtualCurrencyRewardAmountForZone:(NSString *)zoneID; + + +/** @name V4VC Multiple Videos per Reward Info */ + +/** + * Returns the number of ads that the user must play to earn the designated reward. + * You must first configure AdColony using `[AdColony configureWithAppID:zoneIDs:delegate:logging:]` + * and ensure the zone's status is not `ADCOLONY_ZONE_STATUS_UNKNOWN` before this function will return an accurate result. + * @param currencyName The name of the currency to query + * @return An integer number of ads that the user must play per currency reward, as configured on the [AdColony Control Panel](http://clients.adcolony.com). + */ ++ (int)getVideosPerReward:(NSString *)currencyName; + +/** + * Returns the number of ads that the user has seen towards their next reward. + * You must first configure AdColony using `[AdColony configureWithAppID:zoneIDs:delegate:logging:]` + * and ensure the zone's status is not `ADCOLONY_ZONE_STATUS_UNKNOWN` before this function will return an accurate result. + * @param currencyName The name of the currency to query. + * @return An integer number of ads that the user has seen towards their next reward. + */ ++ (int)getVideoCreditBalance:(NSString *)currencyName; + + +/** @name Options and Other Functionality */ + +/** + * Cancels any full-screen ad that is currently playing and returns control to the app. + * No earnings or V4VC rewards will occur if an ad is canceled programmatically by the app. + * This should only be used by apps that must immediately respond to non-standard incoming events, + * like a VoIP phone call. This should not be used for standard app interruptions such as + * multitasking or regular phone calls. + */ ++ (void)cancelAd; + +/** + * Whether a full-screen AdColony ad is currently being played. + * @return A boolean indicating if AdColony is currently playing an ad. + */ ++ (BOOL)videoAdCurrentlyRunning; + +/** + * This method permanently turns off all AdColony ads for this app on the current device. + * After this method is called, no ads will be played unless the app is deleted and reinstalled. + * This method could be used in the implementation of an In-App Purchase to disable ads; + * make sure to allow In-App Purchases to be restored by the user in the case of deleting and reinstalling the app. + */ ++ (void)turnAllAdsOff; + + +/** @name Optional User Metadata */ + +/** + * Provide AdColony with per-user non personally-identifiable information for ad targeting purposes. + * Providing non personally-identifiable information using this API will improve targeting and unlock + * improved earnings for your app. [This support article](http://support.adcolony.com/customer/portal/articles/700183-sdk-user-metadata-pass-through) contains usage guidelines. + * @param metadataType One of the predefined user metadata keys. + * @param value Either a predefined user metadata value, or arbitrary value. + */ ++ (void)setUserMetadata:(NSString *)metadataType withValue:(NSString *)value; + +/** + * Provide AdColony with real-time feedback about what a user is interested in. + * Providing non personally-identifiable information using this API will improve targeting and unlock + * improved earnings for your app. [This support article](http://support.adcolony.com/customer/portal/articles/700183-sdk-user-metadata-pass-through) contains usage guidelines. + * You can call this as often as you want with various topics that the user has engaged in + * within your app or as the user engages in them. For example, if the user has started browsing + * the finance section of a news app, a developer should call: `[AdColony userInterestedIn:@"finance"]`. + * @param topic An arbitrary topic string. + */ ++ (void)userInterestedIn:(NSString *)topic; + + +/** @name In-app purchase (IAP) Tracking */ + +/** + * Call this method to report IAPs within your application. Note that this API can be leveraged to report standard IAPs + * as well as those triggered by AdColony’s IAP Promo (IAPP) advertisements and will improve overall ad targeting. + * @param transactionID An NSString representing the unique SKPaymentTransaction identifier for the IAP. Must be 128 chars or less. + * @param productID An NSString identifying the purchased product. Must be 128 chars or less. + * @param quantity An int indicating the number of items. + * @param price (*optional*) An NSNumber indicating the total price of the items purchased. + * @param currencyCode (*optional*) An NSString indicating the real-world, three-letter ISO 4217 (e.g. USD) currency code of the transaction. + * @see onAdColonyIAPRequest:quantity + */ ++ (void)notifyIAPComplete:(NSString *)transactionID productID:(NSString *)productID quantity:(int)quantity price:(nullable NSNumber *)price currencyCode:(nullable NSString *)currencyCode; + + +/** @name Options */ + +/** Use this method to set AdColony options. + * @param option An NSString representing the option. + * @param value A BOOL indicating whether or not to enable/disable the option. + */ ++ (void)setOption:(NSString *)option value:(BOOL)value; +@end + +#pragma mark - User Metadata Constants + +/** + * User metadata keys + */ +extern NSString *const ADC_SET_USER_AGE; /** Set the user's age */ +extern NSString *const ADC_SET_USER_INTERESTS; /** Set the user's interests */ +extern NSString *const ADC_SET_USER_GENDER; /** Set the user's gender */ +extern NSString *const ADC_SET_USER_LATITUDE; /** Set the user's current latitude */ +extern NSString *const ADC_SET_USER_LONGITUDE; /** Set the user's current longitude */ +extern NSString *const ADC_SET_USER_ANNUAL_HOUSEHOLD_INCOME; /** Set the user's annual house hold income in United States Dollars */ +extern NSString *const ADC_SET_USER_MARITAL_STATUS; /** Set the user's marital status */ +extern NSString *const ADC_SET_USER_EDUCATION; /** Set the user's education level */ +extern NSString *const ADC_SET_USER_ZIPCODE; /** Set the user's known zip code */ + +/** + * User metadata values (for pre-defined values) + */ +extern NSString *const ADC_USER_MALE; /** User is male */ +extern NSString *const ADC_USER_FEMALE; /** User is female */ + +extern NSString *const ADC_USER_SINGLE; /** User is single */ +extern NSString *const ADC_USER_MARRIED; /** User is married */ + +extern NSString *const ADC_USER_EDUCATION_GRADE_SCHOOL; /** User has a basic grade school education and has not attended high school */ +extern NSString *const ADC_USER_EDUCATION_SOME_HIGH_SCHOOL; /** User has completed at least some high school but has not received a diploma */ +extern NSString *const ADC_USER_EDUCATION_HIGH_SCHOOL_DIPLOMA; /** User has received a high school diploma but has not completed any college */ +extern NSString *const ADC_USER_EDUCATION_SOME_COLLEGE; /** User has completed at least some college but doesn't have a college degree */ +extern NSString *const ADC_USER_EDUCATION_ASSOCIATES_DEGREE; /** User has been awarded at least 1 associates degree, but doesn't have any higher level degrees */ +extern NSString *const ADC_USER_EDUCATION_BACHELORS_DEGREE; /** User has been awarded at least 1 bachelors degree, but does not have a graduate level degree */ +extern NSString *const ADC_USER_EDUCATION_GRADUATE_DEGREE; /** User has been awarded at least 1 masters or doctorate level degree */ + +NS_ASSUME_NONNULL_END diff --git a/Extension/lib/AdColony.framework/Versions/A/Headers/AdColonyAdInfo.h b/Extension/lib/AdColony.framework/Versions/A/Headers/AdColonyAdInfo.h new file mode 100755 index 00000000..562be95d --- /dev/null +++ b/Extension/lib/AdColony.framework/Versions/A/Headers/AdColonyAdInfo.h @@ -0,0 +1,70 @@ +/* + * AdColonyAdInfo.h + * adc-ios-sdk + * + * Created by Owain Moss on 11/25/14. + */ + +#pragma mark - Constants + +/** + * Enum for in-app purchase (IAP) engagement types + */ +typedef NS_ENUM(NSUInteger, ADCOLONY_IAP_ENGAGEMENT) { + ADCOLONY_IAP_ENGAGEMENT_NONE = 0, /** IAPP was not enabled for the associated ad object. */ + ADCOLONY_IAP_ENGAGEMENT_AUTOMATIC, /** IAPP was enabled for the ad; however, there was no user engagement. */ + ADCOLONY_IAP_ENGAGEMENT_END_CARD, /** IAPP was enabled for the ad, and the user engaged via a dynamic end card (DEC). */ + ADCOLONY_IAP_ENGAGEMENT_OVERLAY /** IAPP was enabled for the ad, and the user engaged via an in-vdeo engagement (Overlay). */ +}; + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - AdColonyAdInfo interface + +/** + * AdColonyAdInfo objects are passed to the `[AdColonyAdDelegate onAdColonyAdFinishedWithInfo:]` callback of AdColonyAdDelegates. + * These objects can be queried for useful information about the ad such as the associated zone ID, whether or + * not the ad was shown, or any relevant In-App Purchase Promo (IAPP)-related information. + */ +@interface AdColonyAdInfo : NSObject + +/** @name Properties */ + +/** + * Whether or not the associated ad was shown. + * @param shown A BOOL indicating whether or not the ad was actually shown. + */ +@property (nonatomic, readonly) BOOL shown; + +/** + * The associated ad's unique zone identifier. + * @param zoneID An NSString representing the ad's zone ID. + */ +@property (nonatomic, readonly) NSString *zoneID; + +/** + * Whether or not the associated ad was an IAPP. + * @param iapEnabled A BOOL indicating whether or not the ad is an IAPP. + */ +@property (nonatomic, readonly) BOOL iapEnabled; + +/** + * The product identifier for the associated ad's IAP as it is defined in iTunesConnect. + * @param iapProductID An NSString representing the product ID. + */ +@property (nonatomic, readonly) NSString *iapProductID; + +/** + * The number of items to be purchased. + * @param iapQuantity An int denoting the number of items the user wishes to purchase. + */ +@property (nonatomic, readonly) int iapQuantity; + +/** + * If an IAP was triggered in the associated ad, this property will contain the engagement type. + * @param iapEngagementType An `ADCOLONY_IAP_ENGAGEMENT` indicating the engagement mechanism. + */ +@property (nonatomic, readonly) ADCOLONY_IAP_ENGAGEMENT iapEngagementType; +@end + +NS_ASSUME_NONNULL_END diff --git a/Extension/lib/AdColony.framework/Versions/A/Headers/AdColonyNativeAdView.h b/Extension/lib/AdColony.framework/Versions/A/Headers/AdColonyNativeAdView.h new file mode 100755 index 00000000..6ca13427 --- /dev/null +++ b/Extension/lib/AdColony.framework/Versions/A/Headers/AdColonyNativeAdView.h @@ -0,0 +1,174 @@ +/* + * AdColonyNativeAdView.h + * adc-ios-sdk + * + * Created by John Fernandes-Salling on 11/21/13. + */ + +#import + +#pragma mark - Forward Declarations + +@protocol AdColonyNativeAdDelegate; +@class AdColonyAdInfo; + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - AdColonyNativeAdView + +/** + * The AdColonyNativeAdView is used to display non-fullscreen AdColony ads in a fashion that matches the look-and-feel of your application; + * it contains the video and enegagement components of the native ad and manages the display and playback of the video. + * The native ad has an accompanying delegate if you need information about the video starting, finishing, or any user interactions with the ad. + * The object also exposes additional information about the advertisement that is intended to be displayed alongside the video. + * The native ad may include a engagement button which it displays beneath the video; the appearance of this button is customizable. + * Instances of this class should not be initialized directly; instead, use `[AdColony getNativeAdForZone:presentingViewController:]`. + */ +@interface AdColonyNativeAdView : UIView + +/** @name Delegate */ + +/** + * The delegate for the AdColonyNativeAd, which will receive callbacks about the video starting, finishing, and user interactions with the ad. + * Setting this property is optional; in many cases the callbacks provided by the delegate are not required to create a good user experience. + * @param delegate The AdColonyNativeAdDelegate. + */ +@property (nonatomic, weak, nullable) id delegate; + +/** @name Creative Content and User Interface */ + +/** + * The name of the advertiser for this ad. Approximately 25 characters. + * AdColony requires this to be displayed alongside the AdColonyNativeAdView. + * @param advertiserName The name of this ad's advertiser. + */ +@property (nonatomic, readonly) NSString* advertiserName; + +/** + * The advertiser's icon for this ad (may be `nil`). Typically 200x200 pixels for Retina display at up to 100x100 screen points. + * Display of this image is optional. + * @param advertiserIrcon The icon of this ad's advertiser. + */ +@property (nonatomic, readonly, nullable) UIImage* advertiserIcon; + +/** + * A short title for this ad. Approximately 25 characters. + * Display of this string is optional. + * @param adTitle The title of this ad. + */ +@property (nonatomic, readonly) NSString* adTitle; + +/** + * A mid-length description of this ad. Up to approximately 90 characters. + * Display of this string is optional. + * @param adDescription The description of this ad. + */ +@property (nonatomic, readonly) NSString* adDescription; + +/** + * The engagement button for this ad (may be `nil`). This is automatically displayed beneath the video component. + * Use this property to access the UIButton and customize anything about it except its title text and tap action. + * @param engagementButton The engagement button that is already embedded within this ad. + */ +@property (nonatomic, nullable) UIButton* engagementButton; + +/** + * Returns the recommended height for the AdColonyNativeAdView if it will be displayed at the specified width. + * When calculating a frame for the AdColonyNativeAdView, use the recommended height for your chosen width in order to minimize padding space around the video. + * @param width The display width for which this method will return the best display height. + * @return The best display height for the desired width. + */ +-(CGFloat)recommendedHeightForWidth:(CGFloat)width; + +/** @name Audio */ + +/** + * The volume level of the video component of the ad. Defaults to 0.05f. + * @param volume Volume + */ +@property (nonatomic) float volume; + +/** + * Whether or not the video component of the ad is muted. Defaults to NO. + * @param muted Muted + */ +@property (nonatomic) BOOL muted; + +/** @name Playback */ + +/** + * Pauses the video component of the native ad if it is currently playing. + * This should be used when the native ad goes off-screen temporarily: for + * example, when it is contained in a UITableViewCell that has been scrolled + * off-screen; or when the ad is contained in a UIViewController and that view + * controller has called the method `viewWillDisappear`. + * Any use of this method must be paired with a corresponding call to `resume`. + */ +-(void)pause; + +/** + * Resumes the video component of the native ad if it has been paused. + * This should be used when a native ad that was off-screen temporarily has + * come back on-screen: for example, when the ad is contained in a UIViewController + * and that view controller has called the method `viewWillAppear`. + * This method must be used to undo a previous corresponding call to `pause`. + */ +-(void)resume; +@end + +#pragma mark - AdColonyNativeAdDelegate + +/** + * The AdColonyNativeAdDelegate protocol provides callbacks about AdColony's native ad display and user interaction. + */ +@protocol AdColonyNativeAdDelegate +@optional + +/** + * Notifies your app that a native ad has begun displaying its video content in response to being displayed on screen. + * @param ad The affected native ad view. + */ +-(void)onAdColonyNativeAdStarted:(AdColonyNativeAdView*)ad; + +/** + * Notifies your app that a native ad has been interacted with by a user and is expanding to full-screen playback. + * Within the callback, apps should implement app-specific code such as turning off app music. + * @param ad The affected native ad view. + */ +-(void)onAdColonyNativeAdExpanded:(AdColonyNativeAdView*)ad; + +/** + * Notifies your app that a native ad finished displaying its video content. + * If the native ad was expanded to full-screen, this indicates that the full-screen mode has been exited. + * Within the callback, apps should implement app-specific code such as resuming app music if it was turned off. + * @param ad The affected native ad view. + * @param expanded Whether or not the native ad had been expanded to full-screen by the user. + */ +-(void)onAdColonyNativeAdFinished:(AdColonyNativeAdView*)ad expanded:(BOOL)expanded; + +/** + * Alternative for `[AdColonyNativeAdDelegate onAdColonyNativeAdFinished:expanded]` that passes an AdColonyAdInfo object to the delegate. The AdColonyAdInfo object can be queried + * for information about the ad session: whether or not the ad was shown, the associated zone ID, whether or not the video was an In-App Purchase Promo (IAPP), + * the type of engagement that triggered an IAP, etc. If your application is showing IAPP advertisements, you will need to implement this callback + * instead of `[AdColonyNativeAdDelegate onAdColonyNativeAdFinished:expanded]` so you can decide what action to take once the ad has completed. + * @param ad The affected native ad view. + * @param info An AdColonyAdInfo object containing information about the associated ad. + * @see AdColonyAdInfo + */ +-(void)onAdColonyNativeAd:(AdColonyNativeAdView*)ad finishedWithInfo:(AdColonyAdInfo*)info expanded:(BOOL)expanded; + +/** + * Notifies your app that a native ad was muted or unmuted by a user. + * @param ad The affected native ad view. + * @param muted Whether the ad was muted or unmuted. + */ +-(void)onAdColonyNativeAd:(AdColonyNativeAdView*)ad muted:(BOOL)muted; + +/** + * Notifies your app that a user has engaged with the native ad via an in-video engagement mechanism. + * @param ad The affected native ad view. + */ +-(void)onAdColonyNativeAdEngagementPressed:(AdColonyNativeAdView*)ad expanded:(BOOL)expanded; +@end + +NS_ASSUME_NONNULL_END diff --git a/Source/lib/JavaScriptCore.framework/Versions/Current b/Extension/lib/AdColony.framework/Versions/Current similarity index 100% rename from Source/lib/JavaScriptCore.framework/Versions/Current rename to Extension/lib/AdColony.framework/Versions/Current diff --git a/Extension/lib/Chartboost.framework/Chartboost b/Extension/lib/Chartboost.framework/Chartboost new file mode 120000 index 00000000..8e4c39e8 --- /dev/null +++ b/Extension/lib/Chartboost.framework/Chartboost @@ -0,0 +1 @@ +./Versions/A/Chartboost \ No newline at end of file diff --git a/Extension/lib/Chartboost.framework/Headers b/Extension/lib/Chartboost.framework/Headers new file mode 120000 index 00000000..b0cc393f --- /dev/null +++ b/Extension/lib/Chartboost.framework/Headers @@ -0,0 +1 @@ +./Versions/A/Headers \ No newline at end of file diff --git a/Extension/lib/Chartboost.framework/Versions/A/Chartboost b/Extension/lib/Chartboost.framework/Versions/A/Chartboost new file mode 100644 index 00000000..b574af72 Binary files /dev/null and b/Extension/lib/Chartboost.framework/Versions/A/Chartboost differ diff --git a/Extension/lib/Chartboost.framework/Versions/A/Headers/CBAnalytics.h b/Extension/lib/Chartboost.framework/Versions/A/Headers/CBAnalytics.h new file mode 100644 index 00000000..91105455 --- /dev/null +++ b/Extension/lib/Chartboost.framework/Versions/A/Headers/CBAnalytics.h @@ -0,0 +1,151 @@ +/* + * CBAnalytics.h + * Chartboost + * 6.5.1 + * + * Copyright 2011 Chartboost. All rights reserved. + */ + +#import + +/*! + @typedef NS_ENUM (NSUInteger, CBLevelType) + + @abstract + Used with trackLevelInfo calls to describe meta information about the level value as it + pertains to the game's context. + */ +typedef NS_ENUM(NSUInteger, CBLevelType) { + /*! Highest level reached */ + HIGHEST_LEVEL_REACHED = 1, + /*! Current area level reached */ + CURRENT_AREA = 2, + /*! Current character level reached */ + CHARACTER_LEVEL = 3, + /*! Other sequential level reached */ + OTHER_SEQUENTIAL = 4, + /*! Current non sequential level reached */ + OTHER_NONSEQUENTIAL = 5 +}; + +/*! + @class ChartboostAnalytics + + @abstract + Provide methods to track various events for improved targeting. + + @discussion For more information on integrating and using the Chartboost SDK + please visit our help site documentation at https://help.chartboost.com + */ +@interface CBAnalytics : NSObject + +/*! + @abstract + Track an In App Purchase Event. + + @param receipt The transaction receipt used to validate the purchase. + + @param productTitle The localized title of the product. + + @param productDescription The localized description of the product. + + @param productPrice The price of the product. + + @param productCurrency The localized currency of the product. + + @param productIdentifier The IOS identifier for the product. + + @discussion Tracks In App Purchases for later use with user segmentation + and targeting. +*/ ++ (void)trackInAppPurchaseEvent:(NSData *)receipt + productTitle:(NSString *)productTitle + productDescription:(NSString *)productDescription + productPrice:(NSDecimalNumber *)productPrice + productCurrency:(NSString *)productCurrency + productIdentifier:(NSString *)productIdentifier; + +/*! + @abstract + Track an In App Purchase Event. + + @param receiptString The base64 encoded receipt string used to validate the purchase. + + @param productTitle The localized title of the product. + + @param productDescription The localized description of the product. + + @param productPrice The price of the product. + + @param productCurrency The localized currency of the product. + + @param productIdentifier The IOS identifier for the product. + + @discussion Tracks In App Purchases for later use with user segmentation + and targeting. +*/ ++ (void)trackInAppPurchaseEventWithString:(NSString *)receiptString + productTitle:(NSString *)productTitle + productDescription:(NSString *)productDescription + productPrice:(NSDecimalNumber *)productPrice + productCurrency:(NSString *)productCurrency + productIdentifier:(NSString *)productIdentifier; +/*! + @abstract + Track an In App Purchase Event. + + @param receipt The transaction receipt used to validate the purchase. + + @param product The SKProduct that was purchased. + + @discussion Tracks In App Purchases for later use with user segmentation + and targeting. + */ ++ (void)trackInAppPurchaseEvent:(NSData *)receipt + product:(SKProduct *)product; + + +/*! + @abstract + Track level information about your user. Can be sequential levelling, non-sequential levelling, character level, or other. + + @param eventLabel A string that disambiguates the eventField. Use it to provides a human readable string to answer the question - What are we tracking ? + + @param eventField any value from the CBLevelType enumeration. Specifies whether this event is tracking a sequential levelling, non-sequential levelling, a character level, or other. + + @param mainLevel integer value to be tracked that represents the main level + + @param subLevel integer value to be tracked that represents the sub level, 0 if no relevant sub-level + + @param description A string that disambiguates the mainLevel & subLevel. Use it to provide a human readable string to answer the question - What does the mainLevel number and subLevel nubmer represent in my game ? + + @discussion Tracks In App Purchases for later use with user segmentation + and targeting. + */ ++ (void)trackLevelInfo:(NSString*)eventLabel + eventField:(CBLevelType)eventField + mainLevel:(NSUInteger)mainLevel + subLevel:(NSUInteger)subLevel + description:(NSString*)description; + +/*! + @abstract + Track level information about your user. Can be sequential levelling, non-sequential levelling, character level, or other. + + @param eventLabel A string that disambiguates the eventField. Use it to provides a human readable string to answer the question - What are we tracking ? + + @param eventField any value from the CBLevelType enumeration. Specifies whether this event is tracking a sequential levelling, non-sequential levelling, a character level, current area, or other. + + @param mainLevel integer value to be tracked that represents the main level + + @param description A string that disambiguates the mainLevel. Use it to provide a human readable string to answer the question - What does the mainLevel number represent in my game ? + + @discussion Tracks In App Purchases for later use with user segmentation + and targeting. + */ ++ (void)trackLevelInfo:(NSString*)eventLabel + eventField:(CBLevelType)eventField + mainLevel:(NSUInteger)mainLevel + description:(NSString*)description; + +@end diff --git a/Extension/lib/Chartboost.framework/Versions/A/Headers/CBInPlay.h b/Extension/lib/Chartboost.framework/Versions/A/Headers/CBInPlay.h new file mode 100644 index 00000000..fe9ebbc6 --- /dev/null +++ b/Extension/lib/Chartboost.framework/Versions/A/Headers/CBInPlay.h @@ -0,0 +1,125 @@ +/* + * CBInPlay.h + * Chartboost + * 6.5.1 + * + * Copyright 2011 Chartboost. All rights reserved. + */ + +#import "Chartboost.h" + +/*! @abstract CBInPlay forward declaration. */ +@class CBInPlay; + +/*! + @class Chartboost + + @abstract + Provide methods to display and controler Chartboost native advertising types. + This is a category extension that adds additional functionality to the Chartboost object. + + @discussion For more information on integrating and using the Chartboost SDK + please visit our help site documentation at https://help.chartboost.com + */ +@interface Chartboost (CBInPlay) + +/*! + @abstract + Cache a number of InPlay objects for the given CBLocation. + + @param location The location for the Chartboost impression type. + + @discussion This method will first check if there is a locally cached InPlay object set + for the given CBLocation and, if found, will do nothing. If no locally cached data exists + the method will attempt to fetch data from the Chartboost API server. +*/ ++ (void)cacheInPlay:(CBLocation)location; + + +/*! + @abstract + Determine if a locally cached InPlay object exists for the given CBLocation. + + @param location The location for the Chartboost impression type. + + @return YES if there a locally cached InPlay object, and NO if not. + + @discussion A return value of YES here indicates that the corresponding + getInPlay:(CBLocation)location method will return an InPlay object without making + additional Chartboost API server requests to fetch data to present. + */ ++ (BOOL)hasInPlay:(CBLocation)location; + +/*! + @abstract + Return an InPlay object for the given CBLocation. + + @param location The location for the Chartboost impression type. + + @return CBInPlay object if one exists in the InPlay cache or nil if one is not yet available. + + @discussion This method will first check if there is a locally cached InPlay object + for the given CBLocation and, if found, will return the object using the locally cached data. + If no locally cached data exists the method will attempt to fetch data from the + Chartboost API server. If the Chartboost API server is unavailable + or there is no eligible InPlay object to present in the given CBLocation this method + is a no-op. + */ ++ (CBInPlay *)getInPlay:(CBLocation)location; + +@end + + +/*! + @class CBInPlay + + @abstract + CBInPlay ad type is a native ad type that is left the end user to integrate into their + applications own custom experiences. Chartboost acts as a data marshalling system + and gives the developer access to specific attributes of the ad type. + + @discussion For more information on integrating and using the Chartboost SDK + please visit our help site documentation at https://help.chartboost.com + */ +@interface CBInPlay : NSObject + +/*! @abstract CBLocation target for the CBInPlay ad. */ +@property (nonatomic, strong, readonly) CBLocation location; + +/*! @abstract Image byte data for the CBInPlay icon. */ +@property (nonatomic, strong, readonly) NSData *appIcon; + +/*! @abstract Application name associated with the ad. */ +@property (nonatomic, strong, readonly) NSString *appName; + +/*! + @abstract + Marks the CBInPlay object as shown and notifies the Charboost API servers. + + @discussion This method will emit a server request to the Chartboost API servers + to mark the CBInPlay ad as viewed. You must send this information to correlate + with installs driven by the ad. + */ +- (void)show; + +/*! + @abstract + Marks the CBInPlay object as clicked and notifies the Charboost API servers. + + @discussion This method will emit a server request to the Chartboost API servers + to mark the CBInPlay ad as clicked. You must send this information to correlate + with installs driven by the ad. + */ +- (void)click; + +/*! + @abstract + Clears all CBInPlay objects from the cache locations. + + @discussion This method will clear all the CBInPlay native ads from the internal cash. + This is intended to be used to either force an update for all content or reduce the + memory overhead of this feature. + */ +- (void)clearCache; + +@end diff --git a/Extension/lib/Chartboost.framework/Versions/A/Headers/CBMoreAppsBadge.h b/Extension/lib/Chartboost.framework/Versions/A/Headers/CBMoreAppsBadge.h new file mode 100644 index 00000000..ea12a8e2 --- /dev/null +++ b/Extension/lib/Chartboost.framework/Versions/A/Headers/CBMoreAppsBadge.h @@ -0,0 +1,32 @@ +/* + * CBMoreAppsBadge.h + * Chartboost + * 6.5.1 + * + * Copyright 2011 Chartboost. All rights reserved. + */ + +/*! + @class CBMoreAppsBadge + + @abstract + Class for creating a UIVIew that will display the number of applications displayed + on the more applications page. It is meant to be placed over a button that will display the more applications page. + + @discussion For more information on integrating and using the Chartboost SDK + please visit our help site documentation at https://help.chartboost.com + */ +@interface CBMoreAppsBadge : UIView + +/*! + @abstract + Returns a badge view with the number of unviewed applications on the More Applications page. + + @return CBMoreAppsBadge a badge view. + + @discussion This method returns a customizable badge that by default displays the number of applications displayed + on the more applications page. It is meant to be placed over a button that will display the more applications page. + */ ++ (CBMoreAppsBadge *)moreAppsBadge; + +@end diff --git a/Extension/lib/Chartboost.framework/Versions/A/Headers/CBMoreAppsButton.h b/Extension/lib/Chartboost.framework/Versions/A/Headers/CBMoreAppsButton.h new file mode 100644 index 00000000..9ee7cc77 --- /dev/null +++ b/Extension/lib/Chartboost.framework/Versions/A/Headers/CBMoreAppsButton.h @@ -0,0 +1,44 @@ +/* + * CBMoreAppsButton.h + * Chartboost + * 6.5.1 + * + * Copyright 2011 Chartboost. All rights reserved. + */ + +/*! + @class CBMoreAppsButton + + @abstract + Class for creating a UIVIew that will trigger displaying a + Chartboost MoreApps ad when tapped. + + @discussion For more information on integrating and using the Chartboost SDK + please visit our help site documentation at https://help.chartboost.com + */ +@interface CBMoreAppsButton : UIView + +/*! + @abstract + Returns a button with a custom image that is launches the More Applications page. + + @param customImage the UIImage object to be displayed as the button interface. + + @param viewController the view controller object to which the button with be added. + + @param location The location for the Chartboost impression type. + + @return CBMoreAppsButton formatted with a custom image and badge icon. + + @discussion This method returns a customizable button with update badge that launches the more apps + page from an optional presenting view controller object or the main window if nil. The frame of the + button is set to the size of the customImage object plus the radius of the badge icon. The position + of this object can be adjusted using the center property of the button object after initialization. + +*/ + ++ (CBMoreAppsButton *)moreAppsButtonWithImage:(UIImage *)customImage + fromViewController:(UIViewController *)viewController + location:(CBLocation)location; + +@end diff --git a/Extension/lib/Chartboost.framework/Versions/A/Headers/Chartboost.h b/Extension/lib/Chartboost.framework/Versions/A/Headers/Chartboost.h new file mode 100644 index 00000000..7d04fd4a --- /dev/null +++ b/Extension/lib/Chartboost.framework/Versions/A/Headers/Chartboost.h @@ -0,0 +1,1034 @@ +/* + * Chartboost.h + * Chartboost + * 6.5.1 + * + * Copyright 2011 Chartboost. All rights reserved. + */ + +#import +#import + +/*! + @typedef NS_ENUM (NSUInteger, CBFramework) + + @abstract + Used with setFramework:(CBFramework)framework calls to set suffix for + wrapper libraries like Unity or Corona. + */ +typedef NS_ENUM(NSUInteger, CBFramework) { + /*! Unity. */ + CBFrameworkUnity, + /*! Corona. */ + CBFrameworkCorona, + /*! Adobe AIR. */ + CBFrameworkAIR, + /*! GameSalad. */ + CBFrameworkGameSalad, + /*! Cordova. */ + CBFrameworkCordova, + /*! CocoonJS. */ + CBFrameworkCocoonJS, + /*! Cocos2d-x. */ + CBFrameworkCocos2dx, + /*! Prime31Unreal. */ + CBFrameworkPrime31Unreal, + /*! Weeby. */ + CBFrameworkWeeby, + /*! Unknown. Other */ + CBFrameworkOther +}; + +/*! + @typedef NS_ENUM (NSUInteger, CBMediation) + + @abstract + Used with setMediation:(CBMediation)library calls to set mediation library name + partners. If you don't see your library here, contact support. + */ +typedef NS_ENUM(NSUInteger, CBMediation) { + /*! Unknown. Other */ + CBMediationOther, + /*! AdMarvel */ + CBMediationAdMarvel, + /*! Fuse */ + CBMediationFuse, + /*! Fyber */ + CBMediationFyber, + /*! HeyZap */ + CBMediationHeyZap, + /*! MoPub */ + CBMediationMoPub, + /*! Supersonic */ + CBMediationSupersonic, + /*! AdMob */ + CBMediationAdMob, + /*! HyprMX */ + CBMediationHyprMX +}; + + + +/*! + @typedef NS_ENUM (NSUInteger, CBLoadError) + + @abstract + Returned to ChartboostDelegate methods to notify of Chartboost SDK errors. + */ +typedef NS_ENUM(NSUInteger, CBLoadError) { + /*! Unknown internal error. */ + CBLoadErrorInternal = 0, + /*! Network is currently unavailable. */ + CBLoadErrorInternetUnavailable = 1, + /*! Too many requests are pending for that location. */ + CBLoadErrorTooManyConnections = 2, + /*! Interstitial loaded with wrong orientation. */ + CBLoadErrorWrongOrientation = 3, + /*! Interstitial disabled, first session. */ + CBLoadErrorFirstSessionInterstitialsDisabled = 4, + /*! Network request failed. */ + CBLoadErrorNetworkFailure = 5, + /*! No ad received. */ + CBLoadErrorNoAdFound = 6, + /*! Session not started. */ + CBLoadErrorSessionNotStarted = 7, + /*! There is an impression already visible.*/ + CBLoadErrorImpressionAlreadyVisible = 8, + /*! User manually cancelled the impression. */ + CBLoadErrorUserCancellation = 10, + /*! No location detected. */ + CBLoadErrorNoLocationFound = 11, + /*! Error downloading asset. */ + CBLoadErrorAssetDownloadFailure = 16, + /*! Video Prefetching is not finished */ + CBLoadErrorPrefetchingIncomplete = 21, + /*! Error Originating from the JS side of a Web View */ + CBLoadErrorWebViewScriptError = 22 +}; + +/*! + @typedef NS_ENUM (NSUInteger, CBClickError) + + @abstract + Returned to ChartboostDelegate methods to notify of Chartboost SDK errors. + */ +typedef NS_ENUM(NSUInteger, CBClickError) { + /*! Invalid URI. */ + CBClickErrorUriInvalid, + /*! The device does not know how to open the protocol of the URI */ + CBClickErrorUriUnrecognized, + /*! User failed to pass the age gate. */ + CBClickErrorAgeGateFailure, + /*! Unknown internal error */ + CBClickErrorInternal, +}; + +/*! + @typedef NS_ENUM (NSUInteger, CBStatusBarBehavior) + + @abstract + Used with setStatusBarBehavior:(CBStatusBarBehavior)statusBarBehavior calls to set how fullscreen ads should + behave with regards to the status bar. + */ +typedef NS_ENUM(NSUInteger, CBStatusBarBehavior) { + /*! Ignore status bar altogether; fullscreen ads will use the space of the status bar. */ + CBStatusBarBehaviorIgnore, + /*! Respect the status bar partially; fullscreen ads will use the space of the status bar but any user interactive buttons will not. */ + CBStatusBarBehaviorRespectButtons, + /*! Respect the status bar fully; fullscreen ads will not use the status bar space. */ + CBStatusBarBehaviorRespect +}; + +/*! + @typedef CBLocation + + @abstract + Defines standard locations to describe where Chartboost SDK features appear in game. + + @discussion Standard locations used to describe where Chartboost features show up in your game + For best performance, it is highly recommended to use standard locations. + + Benefits include: + - Higher eCPMs. + - Control of ad targeting and frequency. + - Better reporting. + */ +typedef NSString * const CBLocation; + +/*! "Startup" - Initial startup of game. */ +extern CBLocation const CBLocationStartup; +/*! "Home Screen" - Home screen the player first sees. */ +extern CBLocation const CBLocationHomeScreen; +/*! "Main Menu" - Menu that provides game options. */ +extern CBLocation const CBLocationMainMenu; +/*! "Game Screen" - Game screen where all the magic happens. */ +extern CBLocation const CBLocationGameScreen; +/*! "Achievements" - Screen with list of achievements in the game. */ +extern CBLocation const CBLocationAchievements; +/*! "Quests" - Quest, missions or goals screen describing things for a player to do. */ +extern CBLocation const CBLocationQuests; +/*! "Pause" - Pause screen. */ +extern CBLocation const CBLocationPause; +/*! "Level Start" - Start of the level. */ +extern CBLocation const CBLocationLevelStart; +/*! "Level Complete" - Completion of the level */ +extern CBLocation const CBLocationLevelComplete; +/*! "Turn Complete" - Finishing a turn in a game. */ +extern CBLocation const CBLocationTurnComplete; +/*! "IAP Store" - The store where the player pays real money for currency or items. */ +extern CBLocation const CBLocationIAPStore; +/*! "Item Store" - The store where a player buys virtual goods. */ +extern CBLocation const CBLocationItemStore; +/*! "Game Over" - The game over screen after a player is finished playing. */ +extern CBLocation const CBLocationGameOver; +/*! "Leaderboard" - List of leaders in the game. */ +extern CBLocation const CBLocationLeaderBoard; +/*! "Settings" - Screen where player can change settings such as sound. */ +extern CBLocation const CBLocationSettings; +/*! "Quit" - Screen displayed right before the player exits a game. */ +extern CBLocation const CBLocationQuit; +/*! "Default" - Supports legacy applications that only have one "Default" location */ +extern CBLocation const CBLocationDefault; + +@protocol ChartboostDelegate; + +/*! + @class Chartboost + + @abstract + Provide methods to display and control Chartboost native advertising types. + + @discussion For more information on integrating and using the Chartboost SDK + please visit our help site documentation at https://help.chartboost.com + */ +@interface Chartboost : NSObject + +#pragma mark - Main Chartboost API + +/*! + @abstract + Start Chartboost with required appId, appSignature and delegate. + + @param appId The Chartboost application ID for this application. + + @param appSignature The Chartboost application signature for this application. + + @param delegate The delegate instance to receive Chartboost SDK callbacks. + + @discussion This method must be executed before any other Chartboost SDK methods can be used. + Once executed this call will also controll session tracking and background tasks + used by Chartboost. +*/ ++ (void)startWithAppId:(NSString*)appId + appSignature:(NSString*)appSignature + delegate:(id)delegate; + +/*! + @abstract + Set the Chartboost Delegate + + @param del The new Chartboost Delegate for the sharedChartboost instance + + @discussion This doesn't need to be called when calling startWithAppID, only later + to switch the delegate object. + */ ++ (void)setDelegate:(id)del; + + +/*! + @abstract + Check to see if any views are visible + + @return YES if there is any view visible + + @discussion This method can be used to check if any chartboost ad's are visible on the app. + */ ++ (BOOL)isAnyViewVisible; + +/*! + @abstract + Determine if a locally cached interstitial exists for the given CBLocation. + + @param location The location for the Chartboost impression type. + + @return YES if there a locally cached interstitial, and NO if not. + + @discussion A return value of YES here indicates that the corresponding + showInterstitial:(CBLocation)location method will present without making + additional Chartboost API server requests to fetch data to present. + */ ++ (BOOL)hasInterstitial:(CBLocation)location; + +/*! + @abstract + Present an interstitial for the given CBLocation. + + @param location The location for the Chartboost impression type. + + @discussion This method will first check if there is a locally cached interstitial + for the given CBLocation and, if found, will present using the locally cached data. + If no locally cached data exists the method will attempt to fetch data from the + Chartboost API server and present it. If the Chartboost API server is unavailable + or there is no eligible interstitial to present in the given CBLocation this method + is a no-op. + */ ++ (void)showInterstitial:(CBLocation)location; + +/*! + @abstract + Determine if a locally cached "more applications" exists for the given CBLocation. + + @param location The location for the Chartboost impression type. + + @return YES if there a locally cached "more applications", and NO if not. + + @discussion A return value of YES here indicates that the corresponding + showMoreApps:(CBLocation)location method will present without making + additional server requests to fetch data to present. + */ ++ (BOOL)hasMoreApps:(CBLocation)location; + +/*! + @abstract + Present an "more applications" for the given CBLocation. + + @param location The location for the Chartboost impression type. + + @discussion This method will first check if there is a locally cached "more applications" + for the given CBLocation and, if found, will present using the locally cached data. + If no locally cached data exists the method will attempt to fetch data from the + Chartboost API server and present it. If the Chartboost API server is unavailable + or there is no eligible "more applications" to present in the given CBLocation this method + is a no-op. + */ ++ (void)showMoreApps:(CBLocation)location; + +/*! + @abstract + Present an "more applications" for the given CBLocation and inside the given UIViewController. + + @param viewController The UIViewController to display the "more applications" UI within. + + @param location The location for the Chartboost impression type. + + @discussion This method uses the same implementation logic as showMoreApps:(CBLocation)location + for loading the "more applications" data, but adds an optional viewController parameter. + The viewController object allows the "more applications" page to be presented modally in a specified + view hierarchy. If the Chartboost API server is unavailable or there is no eligible "more applications" + to present in the given CBLocation this method is a no-op. + */ ++ (void)showMoreApps:(UIViewController *)viewController + location:(CBLocation)location; + +/*! + @abstract + Determine if a locally cached rewarded video exists for the given CBLocation. + + @param location The location for the Chartboost impression type. + + @return YES if there a locally cached rewarded video, and NO if not. + + @discussion A return value of YES here indicates that the corresponding + showRewardedVideo:(CBLocation)location method will present without making + additional Chartboost API server requests to fetch data to present. + */ ++ (BOOL)hasRewardedVideo:(CBLocation)location; + +/*! + @abstract + Present a rewarded video for the given CBLocation. + + @param location The location for the Chartboost impression type. + + @discussion This method will first check if there is a locally cached rewarded video + for the given CBLocation and, if found, will present it using the locally cached data. + If no locally cached data exists the method will attempt to fetch data from the + Chartboost API server and present it. If the Chartboost API server is unavailable + or there is no eligible rewarded video to present in the given CBLocation this method + is a no-op. + */ ++ (void)showRewardedVideo:(CBLocation)location; + +#pragma mark - Advanced Configuration & Use + +/*! + @abstract + Confirm if an age gate passed or failed. When specified Chartboost will wait for + this call before showing the IOS App Store. + + @param pass The result of successfully passing the age confirmation. + + @discussion If you have configured your Chartboost experience to use the age gate feature + then this method must be executed after the user has confirmed their age. The Chartboost SDK + will halt until this is done. + */ ++ (void)didPassAgeGate:(BOOL)pass; + +/*! + @abstract + Opens a "deep link" URL for a Chartboost Custom Scheme. + + @param url The URL to open. + + @param sourceApplication The application that originated the action. + + @return YES if Chartboost SDK is capable of handling the URL and does so, and NO if not. + + @discussion If you have configured a custom scheme and provided "deep link" URLs that the + Chartboost SDK is capable of handling you should use this method in your ApplicationDelegate + class methods that handle custom URL schemes. + */ ++ (BOOL)handleOpenURL:(NSURL *)url + sourceApplication:(NSString *)sourceApplication; + +/*! + @abstract + Opens a "deep link" URL for a Chartboost Custom Scheme. + + @param url The URL to open. + + @param sourceApplication The application that originated the action. + + @param annotation The provided annotation. + + @return YES if Chartboost SDK is capable of handling the URL and does so, and NO if not. + + @discussion If you have configured a custom scheme and provided "deep link" URLs that the + Chartboost SDK is capable of handling you should use this method in your ApplicationDelegate + class methods that handle custom URL schemes. + */ ++ (BOOL)handleOpenURL:(NSURL *)url + sourceApplication:(NSString *)sourceApplication + annotation:(id)annotation; + +/*! + @abstract + Set a custom identifier to send in the POST body for all Chartboost API server requests. + + @param customId The identifier to send with all Chartboost API server requests. + + @discussion Use this method to set a custom identifier that can be used later in the Chartboost + dashboard to group information by. + */ ++ (void)setCustomId:(NSString *)customId; + +/*! + @abstract + Get the current custom identifier being sent in the POST body for all Chartboost API server requests. + + @return The identifier being sent with all Chartboost API server requests. + + @discussion Use this method to get the custom identifier that can be used later in the Chartboost + dashboard to group information by. + */ ++ (NSString *)getCustomId; + +/*! + @abstract + Set a custom version to append to the POST body of every request. This is useful for analytics and provides chartboost with important information. + example setFramework:Unity withVersion:4.6, setFrameworkVersion:5.2.1 + + @param frameworkVersion The version sent as a string. + + @discussion This is an internal method used via Chartboost's Unity and Corona SDKs + to track their usage. + */ ++ (void)setFrameworkVersion:(NSString*)frameworkVersion __attribute__((deprecated("This method is deprecated, please use + (void)setChartboostWrapperVersion:(NSString*)chartboostWrapperVersion instead"))); + +/*! + @abstract + Set a custom version to append to the POST body of every request. This is useful for analytics and provides chartboost with important information. + example: [Chartboost setChartboostWrapperVersion:@"6.4.6"]; + + @param chartboostWrapperVersion The version sent as a string. + + @discussion This is an internal method used via Chartboost's Unity and Corona SDKs + to track their usage. + */ ++ (void)setChartboostWrapperVersion:(NSString*)chartboostWrapperVersion; + +/*! + @abstract + Set a custom framework suffix to append to the POST headers field. + + @param framework The suffx to send with all Chartboost API server requests. + + @discussion This is an internal method used via Chartboost's Unity and Corona SDKs + to track their usage. + */ ++ (void)setFramework:(CBFramework)framework __attribute__((deprecated("This method is deprecated, please use + (void)setFramework:(CBFramework)framework withVersion:(NSString *)version; instead"))); + +/*! + @abstract + Set a custom framework suffix to append to the POST headers field. +example setFramework:Unity withVersion:4.6, setFrameworkVersion:5.2.1 + + @param framework The suffix to send with all Chartbooost API server requets. + @param version The platform version used for analytics. Example Unity should set Application.unityVersion + + @discussion This is an internal method used via Chartboost's Unity and Corona SDKs + to track their usage. + */ ++ (void)setFramework:(CBFramework)framework withVersion:(NSString *)version; + +/*! + @abstract + Set a custom mediation library to append to the POST body of every request. + example setMediation:CBMediationMoPub withVersion:@"3.8.0" + + @param library The constant for the name of the mediation library. + @param libraryVersion The version sent as a string. + + @discussion This is an internal method used by mediation partners to track their usage. + */ ++ (void)setMediation:(CBMediation)library withVersion:(NSString*)libraryVersion; + +/*! + @abstract + Decide if Chartboost SDK should show interstitials in the first session. + + @param shouldRequest YES if allowed to show interstitials in first session, NO otherwise. + + @discussion Set to control if Chartboost SDK can show interstitials in the first session. + The session count is controlled via the startWithAppId:appSignature:delegate: method in the Chartboost + class. + + Default is YES. + */ ++ (void)setShouldRequestInterstitialsInFirstSession:(BOOL)shouldRequest; + +/*! + @abstract + Decide if Chartboost SDK should block for an age gate. + + @param shouldPause YES if Chartboost should pause for an age gate, NO otherwise. + + @discussion Set to control if Chartboost SDK should block for an age gate. + + Default is NO. + */ ++ (void)setShouldPauseClickForConfirmation:(BOOL)shouldPause; + +/*! + @abstract + Decide if Chartboost SDK should show a loading view while preparing to display the + "more applications" UI. + + @param shouldDisplay YES if Chartboost should display a loading view, NO otherwise. + + @discussion Set to control if Chartboost SDK should show a loading view while + preparing to display the "more applications" UI. + + Default is NO. + */ ++ (void)setShouldDisplayLoadingViewForMoreApps:(BOOL)shouldDisplay; + +/*! + @abstract + Decide if Chartboost SDKK will attempt to fetch videos from the Chartboost API servers. + + @param shouldPrefetch YES if Chartboost should prefetch video content, NO otherwise. + + @discussion Set to control if Chartboost SDK control if videos should be prefetched. + + Default is YES. + */ ++ (void)setShouldPrefetchVideoContent:(BOOL)shouldPrefetch; + + +/*! + @abstract + Returns the version of the Chartboost SDK. + */ ++ (NSString*)getSDKVersion; + + +#pragma mark - Advanced Caching + +/*! + @abstract + Cache an interstitial at the given CBLocation. + + @param location The location for the Chartboost impression type. + + @discussion This method will first check if there is a locally cached interstitial + for the given CBLocation and, if found, will do nothing. If no locally cached data exists + the method will attempt to fetch data from the Chartboost API server. + */ ++ (void)cacheInterstitial:(CBLocation)location; + +/*! + @abstract + Cache an "more applications" at the given CBLocation. + + @param location The location for the Chartboost impression type. + + @discussion This method will first check if there is a locally cached "more applications" + for the given CBLocation and, if found, will do nothing. If no locally cached data exists + the method will attempt to fetch data from the Chartboost API server. + */ ++ (void)cacheMoreApps:(CBLocation)location; + +/*! + @abstract + Cache a rewarded video at the given CBLocation. + + @param location The location for the Chartboost impression type. + + @discussion This method will first check if there is a locally cached rewarded video + for the given CBLocation and, if found, will do nothing. If no locally cached data exists + the method will attempt to fetch data from the Chartboost API server. + */ ++ (void)cacheRewardedVideo:(CBLocation)location; + +/*! + @abstract + Set to enable and disable the auto cache feature (Enabled by default). + + @param shouldCache The param to enable or disable auto caching. + + @discussion If set to YES the Chartboost SDK will automatically attempt to cache an impression + once one has been consumed via a "show" call. If set to NO, it is the responsibility of the + developer to manage the caching behavior of Chartboost impressions. + */ ++ (void)setAutoCacheAds:(BOOL)shouldCache; + +/*! + @abstract + Get the current auto cache behavior (Enabled by default). + + @return YES if the auto cache is enabled, NO if it is not. + + @discussion If set to YES the Chartboost SDK will automatically attempt to cache an impression + once one has been consumed via a "show" call. If set to NO, it is the responsibility of the + developer to manage the caching behavior of Chartboost impressions. + */ ++ (BOOL)getAutoCacheAds; + +/*! + @abstract + Set to control how the fullscreen ad units should interact with the status bar. (CBStatusBarBehaviorIgnore by default). + + @param statusBarBehavior The param to set if fullscreen video should respect the status bar. + + @discussion See the enum value comments for descriptions on the values and their behavior. Only use this feature if your + application has the status bar enabled. + */ ++ (void)setStatusBarBehavior:(CBStatusBarBehavior)statusBarBehavior; + + +/*! + @abstract + returns YES if auto IAP tracking is enabled, NO if it isn't. + + @discussion Call to check if automatic tracking of in-app purchases is enabled. + The setting is controlled by the server. + */ ++ (BOOL)getAutoIAPTracking; + + +@end + +/*! + @protocol ChartboostDelegate + + @abstract + Provide methods and callbacks to receive notifications of when the Chartboost SDK + has taken specific actions or to more finely control the Chartboost SDK. + + @discussion For more information on integrating and using the Chartboost SDK + please visit our help site documentation at https://help.chartboost.com + + All of the delegate methods are optional. + */ +@protocol ChartboostDelegate + +@optional + +/*! + @abstract + Called after the SDK has been successfully initialized + + @param status The result of the initialization. YES if successful. NO if failed. + + @discussion Implement to be notified of when the initialization process has finished. + */ + +- (void)didInitialize:(BOOL)status; + +#pragma mark - Interstitial Delegate + +/*! + @abstract + Called before requesting an interstitial via the Chartboost API server. + + @param location The location for the Chartboost impression type. + + @return YES if execution should proceed, NO if not. + + @discussion Implement to control if the Charboost SDK should fetch data from + the Chartboost API servers for the given CBLocation. This is evaluated + if the showInterstitial:(CBLocation) or cacheInterstitial:(CBLocation)location + are called. If YES is returned the operation will proceed, if NO, then the + operation is treated as a no-op. + + Default return is YES. + */ +- (BOOL)shouldRequestInterstitial:(CBLocation)location; + +/*! + @abstract + Called before an interstitial will be displayed on the screen. + + @param location The location for the Chartboost impression type. + + @return YES if execution should proceed, NO if not. + + @discussion Implement to control if the Charboost SDK should display an interstitial + for the given CBLocation. This is evaluated if the showInterstitial:(CBLocation) + is called. If YES is returned the operation will proceed, if NO, then the + operation is treated as a no-op and nothing is displayed. + + Default return is YES. + */ +- (BOOL)shouldDisplayInterstitial:(CBLocation)location; + +/*! + @abstract + Called after an interstitial has been displayed on the screen. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when an interstitial has + been displayed on the screen for a given CBLocation. + */ +- (void)didDisplayInterstitial:(CBLocation)location; + +/*! + @abstract + Called after an interstitial has been loaded from the Chartboost API + servers and cached locally. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when an interstitial has been loaded from the Chartboost API + servers and cached locally for a given CBLocation. + */ +- (void)didCacheInterstitial:(CBLocation)location; + +/*! + @abstract + Called after an interstitial has attempted to load from the Chartboost API + servers but failed. + + @param location The location for the Chartboost impression type. + + @param error The reason for the error defined via a CBLoadError. + + @discussion Implement to be notified of when an interstitial has attempted to load from the Chartboost API + servers but failed for a given CBLocation. + */ +- (void)didFailToLoadInterstitial:(CBLocation)location + withError:(CBLoadError)error; + +/*! + @abstract + Called after a click is registered, but the user is not fowrwarded to the IOS App Store. + + @param location The location for the Chartboost impression type. + + @param error The reason for the error defined via a CBLoadError. + + @discussion Implement to be notified of when a click is registered, but the user is not fowrwarded + to the IOS App Store for a given CBLocation. + */ +- (void)didFailToRecordClick:(CBLocation)location + withError:(CBClickError)error; + +/*! + @abstract + Called after an interstitial has been dismissed. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when an interstitial has been dismissed for a given CBLocation. + "Dismissal" is defined as any action that removed the interstitial UI such as a click or close. + */ +- (void)didDismissInterstitial:(CBLocation)location; + +/*! + @abstract + Called after an interstitial has been closed. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when an interstitial has been closed for a given CBLocation. + "Closed" is defined as clicking the close interface for the interstitial. + */ +- (void)didCloseInterstitial:(CBLocation)location; + +/*! + @abstract + Called after an interstitial has been clicked. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when an interstitial has been click for a given CBLocation. + "Clicked" is defined as clicking the creative interface for the interstitial. + */ +- (void)didClickInterstitial:(CBLocation)location; + +/*! + @abstract + Called before an "more applications" will be displayed on the screen. + + @param location The location for the Chartboost impression type. + + @return YES if execution should proceed, NO if not. + + @discussion Implement to control if the Charboost SDK should display an "more applications" + for the given CBLocation. This is evaluated if the showMoreApps:(CBLocation) + is called. If YES is returned the operation will proceed, if NO, then the + operation is treated as a no-op and nothing is displayed. + + Default return is YES. + */ +- (BOOL)shouldDisplayMoreApps:(CBLocation)location; + +/*! + @abstract + Called after an "more applications" has been displayed on the screen. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when an "more applications" has + been displayed on the screen for a given CBLocation. + */ +- (void)didDisplayMoreApps:(CBLocation)location; + +/*! + @abstract + Called after an "more applications" has been loaded from the Chartboost API + servers and cached locally. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when an "more applications" has been loaded from the Chartboost API + servers and cached locally for a given CBLocation. + */ +- (void)didCacheMoreApps:(CBLocation)location; + +/*! + @abstract + Called after an "more applications" has been dismissed. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when an "more applications" has been dismissed for a given CBLocation. + "Dismissal" is defined as any action that removed the "more applications" UI such as a click or close. + */ +- (void)didDismissMoreApps:(CBLocation)location; + +/*! + @abstract + Called after an "more applications" has been closed. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when an "more applications" has been closed for a given CBLocation. + "Closed" is defined as clicking the close interface for the "more applications". + */ +- (void)didCloseMoreApps:(CBLocation)location; + +/*! + @abstract + Called after an "more applications" has been clicked. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when an "more applications" has been clicked for a given CBLocation. + "Clicked" is defined as clicking the creative interface for the "more applications". + */ +- (void)didClickMoreApps:(CBLocation)location; + +/*! + @abstract + Called after an "more applications" has attempted to load from the Chartboost API + servers but failed. + + @param location The location for the Chartboost impression type. + + @param error The reason for the error defined via a CBLoadError. + + @discussion Implement to be notified of when an "more applications" has attempted to load from the Chartboost API + servers but failed for a given CBLocation. + */ +- (void)didFailToLoadMoreApps:(CBLocation)location + withError:(CBLoadError)error; + +#pragma mark - Rewarded Video Delegate + +/*! + @abstract + Called before a rewarded video will be displayed on the screen. + + @param location The location for the Chartboost impression type. + + @return YES if execution should proceed, NO if not. + + @discussion Implement to control if the Charboost SDK should display a rewarded video + for the given CBLocation. This is evaluated if the showRewardedVideo:(CBLocation) + is called. If YES is returned the operation will proceed, if NO, then the + operation is treated as a no-op and nothing is displayed. + + Default return is YES. + */ +- (BOOL)shouldDisplayRewardedVideo:(CBLocation)location; + +/*! + @abstract + Called after a rewarded video has been displayed on the screen. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when a rewarded video has + been displayed on the screen for a given CBLocation. + */ +- (void)didDisplayRewardedVideo:(CBLocation)location; + +/*! + @abstract + Called after a rewarded video has been loaded from the Chartboost API + servers and cached locally. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when a rewarded video has been loaded from the Chartboost API + servers and cached locally for a given CBLocation. + */ +- (void)didCacheRewardedVideo:(CBLocation)location; + +/*! + @abstract + Called after a rewarded video has attempted to load from the Chartboost API + servers but failed. + + @param location The location for the Chartboost impression type. + + @param error The reason for the error defined via a CBLoadError. + + @discussion Implement to be notified of when an rewarded video has attempted to load from the Chartboost API + servers but failed for a given CBLocation. + */ +- (void)didFailToLoadRewardedVideo:(CBLocation)location + withError:(CBLoadError)error; + +/*! + @abstract + Called after a rewarded video has been dismissed. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when a rewarded video has been dismissed for a given CBLocation. + "Dismissal" is defined as any action that removed the rewarded video UI such as a click or close. + */ +- (void)didDismissRewardedVideo:(CBLocation)location; + +/*! + @abstract + Called after a rewarded video has been closed. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when a rewarded video has been closed for a given CBLocation. + "Closed" is defined as clicking the close interface for the rewarded video. + */ +- (void)didCloseRewardedVideo:(CBLocation)location; + +/*! + @abstract + Called after a rewarded video has been clicked. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when a rewarded video has been click for a given CBLocation. + "Clicked" is defined as clicking the creative interface for the rewarded video. + */ +- (void)didClickRewardedVideo:(CBLocation)location; + +/*! + @abstract + Called after a rewarded video has been viewed completely and user is eligible for reward. + + @param reward The reward for watching the video. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when a rewarded video has been viewed completely and user is eligible for reward. + */ +- (void)didCompleteRewardedVideo:(CBLocation)location + withReward:(int)reward; + +#pragma mark - InPlay Delegate + +/*! + @abstract + Called after an InPlay object has been loaded from the Chartboost API + servers and cached locally. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when an InPlay object has been loaded from the Chartboost API + servers and cached locally for a given CBLocation. + */ +- (void)didCacheInPlay:(CBLocation)location; + +/*! + @abstract + Called after a InPlay has attempted to load from the Chartboost API + servers but failed. + + @param location The location for the Chartboost impression type. + + @param error The reason for the error defined via a CBLoadError. + + @discussion Implement to be notified of when an InPlay has attempted to load from the Chartboost API + servers but failed for a given CBLocation. + */ +- (void)didFailToLoadInPlay:(CBLocation)location + withError:(CBLoadError)error; + +#pragma mark - General Delegate + +/*! + @abstract + Called before a video has been displayed on the screen. + + @param location The location for the Chartboost impression type. + + @discussion Implement to be notified of when a video will + be displayed on the screen for a given CBLocation. You can then do things like mute + effects and sounds. + */ +- (void)willDisplayVideo:(CBLocation)location; + +/*! + @abstract + Called after the App Store sheet is dismissed, when displaying the embedded app sheet. + + @discussion Implement to be notified of when the App Store sheet is dismissed. + */ +- (void)didCompleteAppStoreSheetFlow; + +/*! + @abstract + Called if Chartboost SDK pauses click actions awaiting confirmation from the user. + + @discussion Use this method to display any gating you would like to prompt the user for input. + Once confirmed call didPassAgeGate:(BOOL)pass to continue execution. + */ +- (void)didPauseClickForConfirmation; + +@end + + diff --git a/Extension/lib/Chartboost.framework/Versions/Current b/Extension/lib/Chartboost.framework/Versions/Current new file mode 120000 index 00000000..044dcb92 --- /dev/null +++ b/Extension/lib/Chartboost.framework/Versions/Current @@ -0,0 +1 @@ +./A \ No newline at end of file diff --git a/Extension/lib/GoogleMobileAds.framework/GoogleMobileAds b/Extension/lib/GoogleMobileAds.framework/GoogleMobileAds new file mode 120000 index 00000000..95e839f2 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/GoogleMobileAds @@ -0,0 +1 @@ +Versions/Current/GoogleMobileAds \ No newline at end of file diff --git a/Extension/lib/GoogleMobileAds.framework/Headers b/Extension/lib/GoogleMobileAds.framework/Headers new file mode 120000 index 00000000..a177d2a6 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/Extension/lib/GoogleMobileAds.framework/Modules/module.modulemap b/Extension/lib/GoogleMobileAds.framework/Modules/module.modulemap new file mode 100644 index 00000000..f108fe2f --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Modules/module.modulemap @@ -0,0 +1,95 @@ +framework module GoogleMobileAds { + umbrella header "GoogleMobileAds.h" + + export * + module * { export * } + + link framework "AdSupport" + link framework "AudioToolbox" + link framework "AVFoundation" + link framework "CoreGraphics" + link framework "CoreMedia" + link framework "CoreMotion" + link framework "CoreTelephony" + link framework "CoreVideo" + link framework "Foundation" + link framework "GLKit" + link framework "MediaPlayer" + link framework "MessageUI" + link framework "MobileCoreServices" + link framework "OpenGLES" + link framework "SafariServices" + link framework "StoreKit" + link framework "SystemConfiguration" + link framework "UIKit" + + header "GoogleMobileAdsDefines.h" + + header "GADAdDelegate.h" + header "GADAdNetworkExtras.h" + header "GADAdSize.h" + header "GADBannerView.h" + header "GADBannerViewDelegate.h" + header "GADCorrelator.h" + header "GADCorrelatorAdLoaderOptions.h" + header "GADExtras.h" + header "GADInAppPurchase.h" + header "GADInAppPurchaseDelegate.h" + header "GADInterstitial.h" + header "GADInterstitialDelegate.h" + header "GADMediaView.h" + header "GADMobileAds.h" + header "GADNativeExpressAdView.h" + header "GADNativeExpressAdViewDelegate.h" + header "GADRequest.h" + header "GADRequestError.h" + header "GADVideoController.h" + header "GADVideoControllerDelegate.h" + header "GADVideoOptions.h" + + header "DFPBannerView.h" + header "DFPCustomRenderedAd.h" + header "DFPCustomRenderedBannerViewDelegate.h" + header "DFPCustomRenderedInterstitialDelegate.h" + header "DFPInterstitial.h" + header "DFPRequest.h" + header "GADAdSizeDelegate.h" + header "GADAppEventDelegate.h" + + header "GADAdLoader.h" + header "GADAdLoaderAdTypes.h" + header "GADAdLoaderDelegate.h" + + header "GADNativeAd.h" + header "GADNativeAdDelegate.h" + header "GADNativeAdImage.h" + header "GADNativeAdImage+Mediation.h" + header "GADNativeAppInstallAd.h" + header "GADNativeContentAd.h" + header "GADNativeCustomTemplateAd.h" + + header "GADNativeAdImageAdLoaderOptions.h" + + header "GADCustomEventBanner.h" + header "GADCustomEventBannerDelegate.h" + header "GADCustomEventExtras.h" + header "GADCustomEventInterstitial.h" + header "GADCustomEventInterstitialDelegate.h" + header "GADCustomEventNativeAd.h" + header "GADCustomEventNativeAdDelegate.h" + header "GADCustomEventParameters.h" + header "GADCustomEventRequest.h" + header "GADMediatedNativeAd.h" + header "GADMediatedNativeAdDelegate.h" + header "GADMediatedNativeAdNotificationSource.h" + header "GADMediatedNativeAppInstallAd.h" + header "GADMediatedNativeContentAd.h" + + header "GADDynamicHeightSearchRequest.h" + header "GADSearchBannerView.h" + header "GADSearchRequest.h" + + header "GADAdReward.h" + header "GADRewardBasedVideoAd.h" + header "GADRewardBasedVideoAdDelegate.h" +} diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/GoogleMobileAds b/Extension/lib/GoogleMobileAds.framework/Versions/A/GoogleMobileAds new file mode 100644 index 00000000..8e53434c Binary files /dev/null and b/Extension/lib/GoogleMobileAds.framework/Versions/A/GoogleMobileAds differ diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPBannerView.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPBannerView.h new file mode 100644 index 00000000..194e0546 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPBannerView.h @@ -0,0 +1,86 @@ +// +// DFPBannerView.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google Inc. All rights reserved. +// + +#import +#import +#import +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// The view that displays DoubleClick For Publishers banner ads. +@interface DFPBannerView : GADBannerView + +/// Required value created on the DFP website. Create a new ad unit for every unique placement of an +/// ad in your application. Set this to the ID assigned for this placement. Ad units are important +/// for targeting and statistics. +/// +/// Example DFP ad unit ID: @"/6499/example/banner" +@property(nonatomic, copy, GAD_NULLABLE) NSString *adUnitID; + +/// Optional delegate that is notified when creatives send app events. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id appEventDelegate; + +/// Optional delegate that is notified when creatives cause the banner to change size. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id adSizeDelegate; + +/// Optional array of NSValue encoded GADAdSize structs, specifying all valid sizes that are +/// appropriate for this slot. Never create your own GADAdSize directly. Use one of the predefined +/// standard ad sizes (such as kGADAdSizeBanner), or create one using the GADAdSizeFromCGSize +/// method. +/// +/// \see setValidAdSizesWithSizes: +/// +/// Example: +/// +/// \code +/// NSArray *validSizes = @[ +/// NSValueFromGADAdSize(kGADAdSizeBanner), +/// NSValueFromGADAdSize(kGADAdSizeLargeBanner) +/// ]; +/// +/// bannerView.validAdSizes = validSizes; +/// \endcode +@property(nonatomic, copy, GAD_NULLABLE) NSArray *validAdSizes; + +/// Correlator object for correlating this object to other ad objects. +@property(nonatomic, strong, GAD_NULLABLE) GADCorrelator *correlator; + +/// Indicates that the publisher will record impressions manually when the ad becomes visible to the +/// user. +@property(nonatomic, assign) BOOL enableManualImpressions; + +/// Optional delegate object for custom rendered ads. +@property(nonatomic, weak, GAD_NULLABLE) + IBOutlet id customRenderedBannerViewDelegate; + +/// If you've set enableManualImpressions to YES, call this method when the ad is visible. +- (void)recordImpression; + +/// Use this function to resize the banner view without launching a new ad request. +- (void)resize:(GADAdSize)size; + +#pragma mark Deprecated + +/// Sets the receiver's valid ad sizes to the values pointed to by the provided NULL terminated list +/// of GADAdSize pointers. +/// +/// Example: +/// +/// \code +/// GADAdSize size1 = kGADAdSizeBanner; +/// GADAdSize size2 = kGADAdSizeLargeBanner; +/// [bannerView setValidAdSizesWithSizes:&size1, &size2, NULL]; +/// \endcode +- (void)setValidAdSizesWithSizes:(GADAdSize *)firstSize, ... NS_REQUIRES_NIL_TERMINATION + GAD_DEPRECATED_MSG_ATTRIBUTE("Use validAdSizes property."); + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedAd.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedAd.h new file mode 100644 index 00000000..5c2b0abb --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedAd.h @@ -0,0 +1,34 @@ +// +// DFPCustomRenderedAd.h +// Google Mobile Ads SDK +// +// Copyright 2014 Google Inc. All rights reserved. +// + +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Custom rendered ad. Your application renders the ad. +@interface DFPCustomRenderedAd : NSObject + +/// The ad's HTML. +@property(nonatomic, readonly, copy) NSString *adHTML; + +/// The base URL of the ad's HTML. +@property(nonatomic, readonly, copy) NSURL *adBaseURL; + +/// Call this method when the user clicks the ad. +- (void)recordClick; + +/// Call this method when the ad is visible to the user. +- (void)recordImpression; + +/// Call this method after the ad has been rendered in a UIView object. +- (void)finishedRenderingAdView:(UIView *)view; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedBannerViewDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedBannerViewDelegate.h new file mode 100644 index 00000000..eb46dedd --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedBannerViewDelegate.h @@ -0,0 +1,26 @@ +// +// DFPCustomRenderedBannerViewDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2014 Google Inc. All rights reserved. +// + +#import + +#import + +@class DFPBannerView; +@class DFPCustomRenderedAd; + +GAD_ASSUME_NONNULL_BEGIN + +@protocol DFPCustomRenderedBannerViewDelegate + +/// Called after ad data has been received. You must construct a banner from |customRenderedAd| and +/// call the |customRenderedAd| object's finishedRenderingAdView: when the ad has been rendered. +- (void)bannerView:(DFPBannerView *)bannerView + didReceiveCustomRenderedAd:(DFPCustomRenderedAd *)customRenderedAd; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedInterstitialDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedInterstitialDelegate.h new file mode 100644 index 00000000..23554e91 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedInterstitialDelegate.h @@ -0,0 +1,27 @@ +// +// DFPCustomRenderedInterstitialDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2014 Google Inc. All rights reserved. +// + +#import + +#import + +@class DFPCustomRenderedAd; +@class DFPInterstitial; + +GAD_ASSUME_NONNULL_BEGIN + +@protocol DFPCustomRenderedInterstitialDelegate + +/// Called after ad data has been received. You must construct an interstitial from +/// |customRenderedAd| and call the |customRenderedAd| object's finishedRenderingAdView: method when +/// the ad has been rendered. +- (void)interstitial:(DFPInterstitial *)interstitial + didReceiveCustomRenderedAd:(DFPCustomRenderedAd *)customRenderedAd; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPInterstitial.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPInterstitial.h new file mode 100644 index 00000000..c38723b5 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPInterstitial.h @@ -0,0 +1,37 @@ +// +// DFPInterstitial.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google Inc. All rights reserved. +// + +#import +#import +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +@interface DFPInterstitial : GADInterstitial + +/// Required value created on the DFP website. Create a new ad unit for every unique placement of an +/// ad in your application. Set this to the ID assigned for this placement. Ad units are important +/// for targeting and stats. +/// +/// Example DFP ad unit ID: @"/6499/example/interstitial" +@property(nonatomic, readonly, copy) NSString *adUnitID; + +/// Correlator object for correlating this object to other ad objects. +@property(nonatomic, strong, GAD_NULLABLE) GADCorrelator *correlator; + +/// Optional delegate that is notified when creatives send app events. +@property(nonatomic, weak, GAD_NULLABLE) id appEventDelegate; + +/// Optional delegate object for custom rendered ads. +@property(nonatomic, weak, GAD_NULLABLE) + id customRenderedInterstitialDelegate; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPRequest.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPRequest.h new file mode 100644 index 00000000..c934db4d --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/DFPRequest.h @@ -0,0 +1,37 @@ +// +// DFPRequest.h +// Google Mobile Ads SDK +// +// Copyright 2014 Google Inc. All rights reserved. +// + +#import + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Add this constant to the testDevices property's array to receive test ads on the simulator. +GAD_EXTERN const id kDFPSimulatorID; + +/// Specifies optional parameters for ad requests. +@interface DFPRequest : GADRequest + +/// Publisher provided user ID. +@property(nonatomic, copy, GAD_NULLABLE) NSString *publisherProvidedID; + +/// Array of strings used to exclude specified categories in ad results. +@property(nonatomic, copy, GAD_NULLABLE) NSArray *categoryExclusions; + +/// Key-value pairs used for custom targeting. +@property(nonatomic, copy, GAD_NULLABLE) NSDictionary *customTargeting; + +/// This API is deprecated and a no-op, use an instance of GADCorrelator set on DFPInterstitial or +/// DFPBannerView objects to correlate requests. ++ (void)updateCorrelator GAD_DEPRECATED_MSG_ATTRIBUTE( + "Set GADCorrelator objects on your ads instead. This method longer affects ad correlation."); + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdDelegate.h new file mode 100644 index 00000000..27cdda03 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdDelegate.h @@ -0,0 +1,28 @@ +// +// GADAdDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +GAD_ASSUME_NONNULL_BEGIN + +#pragma mark - Audio Control Notifications + +/// Delegate methods common to multiple ad types. +@protocol GADAdDelegate + +@optional + +#pragma mark Audio Control Methods + +/// Asks the delegate if the audio session category can be changed while displaying an ad. Return NO +/// to prevent the Google Mobile Ads SDK from changing the audio session category. The default +/// behavior if unimplemented is to return YES. +- (BOOL)ad:(id)ad shouldChangeAudioSessionToCategory:(NSString *)audioSessionCategory; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoader.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoader.h new file mode 100644 index 00000000..5f2bee15 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoader.h @@ -0,0 +1,49 @@ +// +// GADAdLoader.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +#import +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Loads ads. See GADAdLoaderAdTypes.h for available ad types. +@interface GADAdLoader : NSObject + +/// Object notified when an ad request succeeds or fails. Must conform to requested ad types' +/// delegate protocols. +@property(nonatomic, weak, GAD_NULLABLE) id delegate; + +/// The ad loader's ad unit ID. +@property(nonatomic, readonly) NSString *adUnitID; + +/// Returns an initialized ad loader configured to load the specified ad types. +/// +/// \param rootViewController The root view controller is used to present ad click actions. +/// \param adTypes An array of ad types. See GADAdLoaderAdTypes.h for available ad types. +/// \param options An array of GADAdLoaderOptions objects to configure how ads are loaded, or nil to +/// use default options. See each ad type's header for available GADAdLoaderOptions subclasses. +- (instancetype)initWithAdUnitID:(NSString *)adUnitID + rootViewController:(UIViewController *GAD_NULLABLE_TYPE)rootViewController + adTypes:(NSArray *)adTypes + options:(NSArray *GAD_NULLABLE_TYPE)options; + +/// Loads the ad and informs the delegate of the outcome. +- (void)loadRequest:(GADRequest *GAD_NULLABLE_TYPE)request; + +@end + +/// Ad loader options base class. See each ad type's header for available GADAdLoaderOptions +/// subclasses. +@interface GADAdLoaderOptions : NSObject +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderAdTypes.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderAdTypes.h new file mode 100644 index 00000000..76d17623 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderAdTypes.h @@ -0,0 +1,31 @@ +// +// GADAdLoaderAdTypes.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Use with GADAdLoader to request native app install ads. To receive ads, the ad loader's delegate +/// must conform to the GADNativeAppInstallAdRequestDelegate protocol. See GADNativeAppInstallAd.h. +/// +/// See GADNativeAdImageAdLoaderOptions.h for ad loader image options. +GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeAppInstall; + +/// Use with GADAdLoader to request native content ads. To receive ads, the ad loader's delegate +/// must conform to the GADNativeContentAdRequestDelegate protocol. See GADNativeContentAd.h. +/// +/// See GADNativeAdImageAdLoaderOptions.h for ad loader image options. +GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeContent; + +/// Use with GADAdLoader to request native custom template ads. To receive ads, the ad loader's +/// delegate must conform to the GADNativeCustomTemplateAdLoaderDelegate protocol. See +/// GADNativeCustomTemplateAd.h. +GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeCustomTemplate; + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderDelegate.h new file mode 100644 index 00000000..dec90b78 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderDelegate.h @@ -0,0 +1,26 @@ +// +// GADAdLoaderDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import +#import + +@class GADAdLoader; + +GAD_ASSUME_NONNULL_BEGIN + +/// Base ad loader delegate protocol. Ad types provide extended protocols that declare methods to +/// handle successful ad loads. +@protocol GADAdLoaderDelegate + +/// Called when adLoader fails to load an ad. +- (void)adLoader:(GADAdLoader *)adLoader didFailToReceiveAdWithError:(GADRequestError *)error; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdNetworkExtras.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdNetworkExtras.h new file mode 100644 index 00000000..d33de74b --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdNetworkExtras.h @@ -0,0 +1,16 @@ +// +// GADAdNetworkExtras.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google Inc. All rights reserved. +// + +#import + +/// An object implementing this protocol contains information set by the publisher on the client +/// device for a particular ad network. +/// +/// Ad networks should create an 'extras' object implementing this protocol for their publishers to +/// use. +@protocol GADAdNetworkExtras +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdReward.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdReward.h new file mode 100644 index 00000000..2d392e98 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdReward.h @@ -0,0 +1,29 @@ +// +// GADAdReward.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +@interface GADAdReward : NSObject + +/// Type of the reward. +@property(nonatomic, readonly, copy) NSString *type; + +/// Amount rewarded to the user. +@property(nonatomic, readonly, copy) NSDecimalNumber *amount; + +/// Returns an initialized GADAdReward with the provided reward type and reward amount. rewardType +/// and rewardAmount must not be nil. +- (instancetype)initWithRewardType:(NSString *)rewardType + rewardAmount:(NSDecimalNumber *)rewardAmount NS_DESIGNATED_INITIALIZER; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdSize.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdSize.h new file mode 100644 index 00000000..55422842 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdSize.h @@ -0,0 +1,117 @@ +// +// GADAdSize.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google Inc. All rights reserved. +// + +#import +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// A valid GADAdSize is considered to be one of the predefined GADAdSize constants or a GADAdSize +/// constructed by GADAdSizeFromCGSize, GADAdSizeFullWidthPortraitWithHeight, +/// GADAdSizeFullWidthLandscapeWithHeight. +/// +/// Do not create a GADAdSize manually. Use one of the kGADAdSize constants. Treat GADAdSize as an +/// opaque type. Do not access any fields directly. To obtain a concrete CGSize, use the function +/// CGSizeFromGADAdSize(). +typedef struct GADAdSize GADAdSize; + +/// Ad size. +/// +/// \see typedef GADAdSize +struct GADAdSize { + CGSize size; ///< The ad size. Don't modify this value directly. + NSUInteger flags; ///< Reserved. +}; + +#pragma mark Standard Sizes + +/// iPhone and iPod Touch ad size. Typically 320x50. +GAD_EXTERN GADAdSize const kGADAdSizeBanner; + +/// Taller version of kGADAdSizeBanner. Typically 320x100. +GAD_EXTERN GADAdSize const kGADAdSizeLargeBanner; + +/// Medium Rectangle size for the iPad (especially in a UISplitView's left pane). Typically 300x250. +GAD_EXTERN GADAdSize const kGADAdSizeMediumRectangle; + +/// Full Banner size for the iPad (especially in a UIPopoverController or in +/// UIModalPresentationFormSheet). Typically 468x60. +GAD_EXTERN GADAdSize const kGADAdSizeFullBanner; + +/// Leaderboard size for the iPad. Typically 728x90. +GAD_EXTERN GADAdSize const kGADAdSizeLeaderboard; + +/// Skyscraper size for the iPad. Mediation only. AdMob/Google does not offer this size. Typically +/// 120x600. +GAD_EXTERN GADAdSize const kGADAdSizeSkyscraper; + +/// An ad size that spans the full width of the application in portrait orientation. The height is +/// typically 50 pixels on an iPhone/iPod UI, and 90 pixels tall on an iPad UI. +GAD_EXTERN GADAdSize const kGADAdSizeSmartBannerPortrait; + +/// An ad size that spans the full width of the application in landscape orientation. The height is +/// typically 32 pixels on an iPhone/iPod UI, and 90 pixels tall on an iPad UI. +GAD_EXTERN GADAdSize const kGADAdSizeSmartBannerLandscape; + +/// An ad size that spans the full width of its container, with a height dynamically determined by +/// the ad. +GAD_EXTERN GADAdSize const kGADAdSizeFluid; + +/// Invalid ad size marker. +GAD_EXTERN GADAdSize const kGADAdSizeInvalid; + +#pragma mark Custom Sizes + +/// Returns a custom GADAdSize for the provided CGSize. Use this only if you require a non-standard +/// size. Otherwise, use one of the standard size constants above. +GAD_EXTERN GADAdSize GADAdSizeFromCGSize(CGSize size); + +/// Returns a custom GADAdSize that spans the full width of the application in portrait orientation +/// with the height provided. +GAD_EXTERN GADAdSize GADAdSizeFullWidthPortraitWithHeight(CGFloat height); + +/// Returns a custom GADAdSize that spans the full width of the application in landscape orientation +/// with the height provided. +GAD_EXTERN GADAdSize GADAdSizeFullWidthLandscapeWithHeight(CGFloat height); + +#pragma mark Convenience Functions + +/// Returns YES if the two GADAdSizes are equal, otherwise returns NO. +GAD_EXTERN BOOL GADAdSizeEqualToSize(GADAdSize size1, GADAdSize size2); + +/// Returns a CGSize for the provided a GADAdSize constant. If the GADAdSize is unknown, returns +/// CGSizeZero. +GAD_EXTERN CGSize CGSizeFromGADAdSize(GADAdSize size); + +/// Returns YES if |size| is one of the predefined constants or is a custom GADAdSize generated by +/// GADAdSizeFromCGSize. +GAD_EXTERN BOOL IsGADAdSizeValid(GADAdSize size); + +/// Returns YES if |size| is a fluid ad size. +GAD_EXTERN BOOL GADAdSizeIsFluid(GADAdSize size); + +/// Returns a NSString describing the provided GADAdSize. +GAD_EXTERN NSString *NSStringFromGADAdSize(GADAdSize size); + +/// Returns an NSValue representing the GADAdSize. +GAD_EXTERN NSValue *NSValueFromGADAdSize(GADAdSize size); + +/// Returns a GADAdSize from an NSValue. Returns kGADAdSizeInvalid if the value is not a GADAdSize. +GAD_EXTERN GADAdSize GADAdSizeFromNSValue(NSValue *value); + +#pragma mark Deprecated Macros + +#define GAD_SIZE_320x50 CGSizeFromGADAdSize(kGADAdSizeBanner) +#define GAD_SIZE_320x100 CGSizeFromGADAdSize(kGADAdSizeLargeBanner) +#define GAD_SIZE_300x250 CGSizeFromGADAdSize(kGADAdSizeMediumRectangle) +#define GAD_SIZE_468x60 CGSizeFromGADAdSize(kGADAdSizeFullBanner) +#define GAD_SIZE_728x90 CGSizeFromGADAdSize(kGADAdSizeLeaderboard) +#define GAD_SIZE_120x600 CGSizeFromGADAdSize(kGADAdSizeSkyscraper) + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdSizeDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdSizeDelegate.h new file mode 100644 index 00000000..ce82adce --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAdSizeDelegate.h @@ -0,0 +1,26 @@ +// +// GADAdSizeDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google Inc. All rights reserved. +// + +#import + +#import +#import + +@class GADBannerView; + +GAD_ASSUME_NONNULL_BEGIN + +/// The class implementing this protocol will be notified when the DFPBannerView changes ad size. +/// Any views that may be affected by the banner size change will have time to adjust. +@protocol GADAdSizeDelegate + +/// Called before the ad view changes to the new size. +- (void)adView:(GADBannerView *)bannerView willChangeAdSizeTo:(GADAdSize)size; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAppEventDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAppEventDelegate.h new file mode 100644 index 00000000..34fbccec --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADAppEventDelegate.h @@ -0,0 +1,29 @@ +// +// GADAppEventDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google Inc. All rights reserved. +// + +#import + +@class GADBannerView; +@class GADInterstitial; + +/// Implement your app event within these methods. The delegate will be notified when the SDK +/// receives an app event message from the ad. +@protocol GADAppEventDelegate + +@optional + +/// Called when the banner receives an app event. +- (void)adView:(GADBannerView *)banner + didReceiveAppEvent:(NSString *)name + withInfo:(NSString *)info; + +/// Called when the interstitial receives an app event. +- (void)interstitial:(GADInterstitial *)interstitial + didReceiveAppEvent:(NSString *)name + withInfo:(NSString *)info; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADBannerView.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADBannerView.h new file mode 100644 index 00000000..87461000 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADBannerView.h @@ -0,0 +1,111 @@ +// +// GADBannerView.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import + +#import +#import +#import +#import +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// The view that displays banner ads. A minimum implementation to get an ad from within a +/// UIViewController class is: +/// +/// \code +/// // Create and setup the ad view, specifying the size and origin at {0, 0}. +/// GADBannerView *adView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner]; +/// adView.rootViewController = self; +/// adView.adUnitID = @"ID created when registering your app"; +/// +/// // Place the ad view onto the screen. +/// [self.view addSubview:adView]; +/// +/// // Request an ad without any additional targeting information. +/// [adView loadRequest:[GADRequest request]]; +/// \endcode +/// +@interface GADBannerView : UIView + +#pragma mark Initialization + +/// Initializes and returns a banner view with the specified ad size and origin relative to the +/// banner's superview. +- (instancetype)initWithAdSize:(GADAdSize)adSize origin:(CGPoint)origin; + +/// Initializes and returns a banner view with the specified ad size placed at its superview's +/// origin. +- (instancetype)initWithAdSize:(GADAdSize)adSize; + +#pragma mark Pre-Request + +/// Required value created on the AdMob website. Create a new ad unit for every unique placement of +/// an ad in your application. Set this to the ID assigned for this placement. Ad units are +/// important for targeting and statistics. +/// +/// Example AdMob ad unit ID: @"ca-app-pub-0123456789012345/0123456789" +@property(nonatomic, copy, GAD_NULLABLE) IBInspectable NSString *adUnitID; + +/// Required reference to the current root view controller. For example the root view controller in +/// tab-based application would be the UITabViewController. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIViewController *rootViewController; + +/// Required to set this banner view to a proper size. Never create your own GADAdSize directly. Use +/// one of the predefined standard ad sizes (such as kGADAdSizeBanner), or create one using the +/// GADAdSizeFromCGSize method. If not using mediation, then changing the adSize after an ad has +/// been shown will cause a new request (for an ad of the new size) to be sent. If using mediation, +/// then a new request may not be sent. +@property(nonatomic, assign) GADAdSize adSize; + +/// Optional delegate object that receives state change notifications from this GADBannerView. +/// Typically this is a UIViewController. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id delegate; + +/// Optional delegate object that receives in-app purchase notifications from this ad. Required for +/// the custom in-app purchase flow, but ignored when using the default in-app purchase flow. +@property(nonatomic, weak, GAD_NULLABLE) + IBOutlet id inAppPurchaseDelegate; + +/// Optional delegate that is notified when creatives cause the banner to change size. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id adSizeDelegate; + +#pragma mark Making an Ad Request + +/// Makes an ad request. The request object supplies targeting information. +- (void)loadRequest:(GADRequest *GAD_NULLABLE_TYPE)request; + +/// A Boolean value that determines whether autoloading of ads in the receiver is enabled. If +/// enabled, you do not need to call the loadRequest: method to load ads. +@property(nonatomic, assign, getter=isAutoloadEnabled) IBInspectable BOOL autoloadEnabled; + +#pragma mark Mediation + +/// The ad network class name that fetched the current ad. Returns nil while the latest ad request +/// is in progress or if the latest ad request failed. For both standard and mediated Google AdMob +/// ads, this method returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation custom +/// events, this method returns @"GADMAdapterCustomEvents". +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adNetworkClassName; + +#pragma mark Deprecated + +/// Indicates if the currently displayed ad (or most recent failure) was a result of auto refreshing +/// as specified on server. This property is set to NO after each loadRequest: method. +@property(nonatomic, readonly, assign) BOOL hasAutoRefreshed GAD_DEPRECATED_ATTRIBUTE; + +/// The mediated ad network's underlying ad view. You may use this property to read the ad's actual +/// size and adjust this banner view's frame origin. However, modifying the banner view's frame size +/// triggers the Mobile Ads SDK to request a new ad. Only update the banner view's frame origin. +@property(nonatomic, readonly, weak, GAD_NULLABLE) + UIView *mediatedAdView GAD_DEPRECATED_MSG_ATTRIBUTE("Use adNetworkClassName."); + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADBannerViewDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADBannerViewDelegate.h new file mode 100644 index 00000000..e4bee35b --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADBannerViewDelegate.h @@ -0,0 +1,49 @@ +// +// GADBannerViewDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import + +#import + +@class GADBannerView; +@class GADRequestError; + +/// Delegate methods for receiving GADBannerView state change messages such as ad request status +/// and ad click lifecycle. +@protocol GADBannerViewDelegate + +@optional + +#pragma mark Ad Request Lifecycle Notifications + +/// Tells the delegate that an ad request successfully received an ad. The delegate may want to add +/// the banner view to the view hierarchy if it hasn't been added yet. +- (void)adViewDidReceiveAd:(GADBannerView *)bannerView; + +/// Tells the delegate that an ad request failed. The failure is normally due to network +/// connectivity or ad availablility (i.e., no fill). +- (void)adView:(GADBannerView *)bannerView didFailToReceiveAdWithError:(GADRequestError *)error; + +#pragma mark Click-Time Lifecycle Notifications + +/// Tells the delegate that a full screen view will be presented in response to the user clicking on +/// an ad. The delegate may want to pause animations and time sensitive interactions. +- (void)adViewWillPresentScreen:(GADBannerView *)bannerView; + +/// Tells the delegate that the full screen view will be dismissed. +- (void)adViewWillDismissScreen:(GADBannerView *)bannerView; + +/// Tells the delegate that the full screen view has been dismissed. The delegate should restart +/// anything paused while handling adViewWillPresentScreen:. +- (void)adViewDidDismissScreen:(GADBannerView *)bannerView; + +/// Tells the delegate that the user click will open another app, backgrounding the current +/// application. The standard UIApplicationDelegate methods, like applicationDidEnterBackground:, +/// are called immediately before this method is called. +- (void)adViewWillLeaveApplication:(GADBannerView *)bannerView; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelator.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelator.h new file mode 100644 index 00000000..268c2ae6 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelator.h @@ -0,0 +1,17 @@ +// +// GADCorrelator.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +/// Represents a correlation between multiple ads. Set an instance of this object on multiple ads to +/// indicate they are being used in a common context. +@interface GADCorrelator : NSObject + +/// Resets the correlator to force a new set of correlated ads. +- (void)reset; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelatorAdLoaderOptions.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelatorAdLoaderOptions.h new file mode 100644 index 00000000..65df4e8b --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelatorAdLoaderOptions.h @@ -0,0 +1,17 @@ +// +// GADCorrelatorAdLoaderOptions.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +/// Ad loader options for adding a correlator to a native ad request. +@interface GADCorrelatorAdLoaderOptions : GADAdLoaderOptions + +/// Correlator object for correlating ads loaded by an ad loader to other ad objects. +@property(nonatomic, strong) GADCorrelator *correlator; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBanner.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBanner.h new file mode 100644 index 00000000..3e47034e --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBanner.h @@ -0,0 +1,35 @@ +// +// GADCustomEventBanner.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google Inc. All rights reserved. +// + +#import + +#import +#import +#import + +/// The banner custom event protocol. Your banner custom event handler must implement this protocol. +@protocol GADCustomEventBanner + +/// Inform |delegate| with the custom event execution results to ensure mediation behaves correctly. +/// +/// In your class, define the -delegate and -setDelegate: methods or use "@synthesize delegate". The +/// Google Mobile Ads SDK sets this property on instances of your class. +@property(nonatomic, weak) id delegate; + +/// Called by mediation when your custom event is scheduled to be executed. Report execution results +/// to the delegate. +/// +/// \param adSize The size of the ad as configured in the mediation UI for the mediation placement. +/// \param serverParameter Parameter configured in the mediation UI. +/// \param serverLabel Label configured in the mediation UI. +/// \param request Contains ad request information. +- (void)requestBannerAd:(GADAdSize)adSize + parameter:(NSString *)serverParameter + label:(NSString *)serverLabel + request:(GADCustomEventRequest *)request; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBannerDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBannerDelegate.h new file mode 100644 index 00000000..271489fd --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBannerDelegate.h @@ -0,0 +1,62 @@ +// +// GADCustomEventBannerDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google Inc. All rights reserved. +// + +#import +#import + +#import + +@protocol GADCustomEventBanner; + +/// Call back to this delegate in your custom event. You must call customEventBanner:didReceiveAd: +/// when there is an ad to show, or customEventBanner:didFailAd: when there is no ad to show. +/// Otherwise, if enough time passed (several seconds) after the SDK called the requestBannerAd: +/// method of your custom event, the mediation SDK will consider the request timed out, and move on +/// to the next ad network. +@protocol GADCustomEventBannerDelegate + +/// Your Custom Event object must call this when it receives or creates an ad view. +- (void)customEventBanner:(id)customEvent didReceiveAd:(UIView *)view; + +/// Your Custom Event object must call this when it fails to receive or create the ad view. Pass +/// along any error object sent from the ad network's SDK, or an NSError describing the error. Pass +/// nil if not available. +- (void)customEventBanner:(id)customEvent didFailAd:(NSError *)error; + +/// Your Custom Event object should call this when the user touches or "clicks" the ad to initiate +/// an action. When the SDK receives this callback, it reports the click back to the mediation +/// server. +- (void)customEventBannerWasClicked:(id)customEvent; + +/// The rootViewController that you set in GADBannerView. Use this UIViewController to show a modal +/// view when a user taps on the ad. +@property(nonatomic, readonly) UIViewController *viewControllerForPresentingModalView; + +/// When you call the following methods, the call will be propagated back to the +/// GADBannerViewDelegate that you implemented and passed to GADBannerView. + +/// Your Custom Event should call this when the user taps an ad and a modal view appears. +- (void)customEventBannerWillPresentModal:(id)customEvent; + +/// Your Custom Event should call this when the user dismisses the modal view and the modal view is +/// about to go away. +- (void)customEventBannerWillDismissModal:(id)customEvent; + +/// Your Custom Event should call this when the user dismisses the modal view and the modal view has +/// gone away. +- (void)customEventBannerDidDismissModal:(id)customEvent; + +/// Your Custom Event should call this method when a user action will result in App switching. +- (void)customEventBannerWillLeaveApplication:(id)customEvent; + +#pragma mark Deprecated + +- (void)customEventBanner:(id)customEvent + clickDidOccurInAd:(UIView *)view + GAD_DEPRECATED_MSG_ATTRIBUTE("Use customEventBannerWasClicked:."); + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventExtras.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventExtras.h new file mode 100644 index 00000000..3ebe81e1 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventExtras.h @@ -0,0 +1,30 @@ +// +// GADCustomEventExtras.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google Inc. All rights reserved. +// + +#import + +#import + +/// Create an instance of this class to set additional parameters for each custom event object. The +/// additional parameters for a custom event are keyed by the custom event label. These extras are +/// passed to your implementation of GADCustomEventBanner or GADCustomEventInterstitial. +@interface GADCustomEventExtras : NSObject + +/// Set additional parameters for the custom event with label |label|. To remove additional +/// parameters associated with |label|, pass in nil for |extras|. +- (void)setExtras:(NSDictionary *)extras forLabel:(NSString *)label; + +/// Retrieve the extras for |label|. +- (NSDictionary *)extrasForLabel:(NSString *)label; + +/// Removes all the extras set on this instance. +- (void)removeAllExtras; + +/// Returns all the extras set on this instance. +- (NSDictionary *)allExtras; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitial.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitial.h new file mode 100644 index 00000000..32e8f9c0 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitial.h @@ -0,0 +1,38 @@ +// +// GADCustomEventInterstitial.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google Inc. All rights reserved. +// + +#import + +#import +#import + +/// The interstitial custom event protocol. Your interstitial custom event handler must implement +/// this protocol. +@protocol GADCustomEventInterstitial + +/// Inform |delegate| with the custom event execution results to ensure mediation behaves correctly. +/// +/// In your class, define the -delegate and -setDelegate: methods or use "@synthesize delegate". The +/// Google Mobile Ads SDK sets this property on instances of your class. +@property(nonatomic, weak) id delegate; + +/// Called by mediation when your custom event is scheduled to be executed. Your implementation +/// should start retrieving the interstitial ad. Report execution results to the delegate. You must +/// wait until -presentFromRootViewController is called before displaying the interstitial ad. +/// +/// \param serverParameter Parameter configured in the mediation UI. +/// \param serverLabel Label configured in the mediation UI. +/// \param request Contains ad request information. +- (void)requestInterstitialAdWithParameter:(NSString *)serverParameter + label:(NSString *)serverLabel + request:(GADCustomEventRequest *)request; + +/// Present the interstitial ad as a modal view using the provided view controller. Called only +/// after your class calls -customEventInterstitialDidReceiveAd: on its custom event delegate. +- (void)presentFromRootViewController:(UIViewController *)rootViewController; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitialDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitialDelegate.h new file mode 100644 index 00000000..13fb963c --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitialDelegate.h @@ -0,0 +1,56 @@ +// +// GADCustomEventInterstitialDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google Inc. All rights reserved. +// + +#import + +#import + +@protocol GADCustomEventInterstitial; + +/// Call back to this delegate in your custom event. You must call +/// customEventInterstitialDidReceiveAd: when there is an ad to show, or +/// customEventInterstitial:didFailAd: when there is no ad to show. Otherwise, if enough time passed +/// (several seconds) after the SDK called the requestInterstitialAdWithParameter: method of your +/// custom event, the mediation SDK will consider the request timed out, and move on to the next ad +/// network. +@protocol GADCustomEventInterstitialDelegate + +/// Your Custom Event object must call this when it receives or creates an interstitial ad. +- (void)customEventInterstitialDidReceiveAd:(id)customEvent; + +/// Your Custom Event object must call this when it fails to receive or create the ad. Pass along +/// any error object sent from the ad network's SDK, or an NSError describing the error. Pass nil if +/// not available. +- (void)customEventInterstitial:(id)customEvent + didFailAd:(NSError *)error; + +/// Your Custom Event object should call this when the user touches or "clicks" the ad to initiate +/// an action. When the SDK receives this callback, it reports the click back to the mediation +/// server. +- (void)customEventInterstitialWasClicked:(id)customEvent; + +// When you call any of the following methods, the call will be propagated back to the +// GADInterstitialDelegate that you implemented and passed to GADInterstitial. + +/// Your Custom Event should call this when the interstitial is being displayed. +- (void)customEventInterstitialWillPresent:(id)customEvent; + +/// Your Custom Event should call this when the interstitial is about to be dismissed. +- (void)customEventInterstitialWillDismiss:(id)customEvent; + +/// Your Custom Event should call this when the interstitial has been dismissed. +- (void)customEventInterstitialDidDismiss:(id)customEvent; + +/// Your Custom Event should call this method when a user action will result in app switching. +- (void)customEventInterstitialWillLeaveApplication:(id)customEvent; + +#pragma mark Deprecated +- (void)customEventInterstitial:(id)customEvent + didReceiveAd:(NSObject *)ad + GAD_DEPRECATED_MSG_ATTRIBUTE("Use customEventInterstitialDidReceiveAd:."); + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAd.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAd.h new file mode 100644 index 00000000..f9fff8ce --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAd.h @@ -0,0 +1,53 @@ +// +// GADCustomEventNativeAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import "GADCustomEventRequest.h" + +@protocol GADCustomEventNativeAdDelegate; + +/// Native ad custom event protocol. Your native ad custom event handler class must conform to this +/// protocol. +@protocol GADCustomEventNativeAd + +/// Called when the custom event is scheduled to be executed. +/// +/// \param serverParameter A value configured in the mediation UI for the custom event. +/// \param request Ad targeting information. +/// \param adTypes List of requested native ad types. See GADAdLoaderAdTypes.h for available ad +/// types. +/// \param options Additional options configured by the publisher for requesting a native ad. See +/// GADNativeAdImageAdLoaderOptions.h for available image options. +/// \param rootViewController Publisher-provided view controller. +- (void)requestNativeAdWithParameter:(NSString *)serverParameter + request:(GADCustomEventRequest *)request + adTypes:(NSArray *)adTypes + options:(NSArray *)options + rootViewController:(UIViewController *)rootViewController; + +/// Indicates if the custom event handles user clicks. Return YES if the custom event should handle +/// user clicks. In this case, the Google Mobile Ads SDK doesn't track user clicks and the custom +/// event must notify the Google Mobile Ads SDK of clicks using +/// +[GADMediatedNativeAdNotificationSource mediatedNativeAdDidRecordClick:]. Return NO if the +/// custom event doesn't handles user clicks. In this case, the Google Mobile Ads SDK tracks user +/// clicks itself and the custom event is notified of user clicks via -[GADMediatedNativeAdDelegate +/// mediatedNativeAd:didRecordClickOnAssetWithName:view:viewController:]. +- (BOOL)handlesUserClicks; + +/// Indicates if the custom event handles user impressions tracking. If this method returns YES, the +/// Google Mobile Ads SDK will not track user impressions and the custom event must notify the +/// Google Mobile Ads SDK of impressions using +[GADMediatedNativeAdNotificationSource +/// mediatedNativeAdDidRecordImpression:]. If this method returns NO, +/// the Google Mobile Ads SDK tracks user impressions and notifies the custom event of impressions +/// using -[GADMediatedNativeAdDelegate mediatedNativeAdDidRecordImpression:]. +- (BOOL)handlesUserImpressions; + +/// Delegate object used for receiving custom native ad load request progress. +@property(nonatomic, weak) id delegate; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAdDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAdDelegate.h new file mode 100644 index 00000000..4f1f79a8 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAdDelegate.h @@ -0,0 +1,26 @@ +// +// GADCustomEventNativeAdDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import +#import + +/// The delegate of the GADCustomEventNativeAd object must adopt the GADCustomEventNativeAdDelegate +/// protocol. Methods in this protocol are used for native ad's custom event communication with the +/// Google Mobile Ads SDK. +@protocol GADCustomEventNativeAdDelegate + +/// Tells the delegate that the custom event ad request succeeded and loaded a native ad. +- (void)customEventNativeAd:(id)customEventNativeAd + didReceiveMediatedNativeAd:(id)mediatedNativeAd; + +/// Tells the delegate that the custom event ad request failed. +- (void)customEventNativeAd:(id)customEventNativeAd + didFailToLoadWithError:(NSError *)error; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventParameters.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventParameters.h new file mode 100644 index 00000000..6b3fe641 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventParameters.h @@ -0,0 +1,13 @@ +// +// GADCustomEventParameters.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import + +/// Key for getting the server parameter configured in AdMob when mediating to a custom event +/// adapter. +/// Eg: NSString *serverParameter = [connector credentials][GADCustomEventParametersServer]. +extern NSString *const GADCustomEventParametersServer; diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventRequest.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventRequest.h new file mode 100644 index 00000000..75fe69b4 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventRequest.h @@ -0,0 +1,47 @@ +// +// GADCustomEventRequest.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google Inc. All rights reserved. +// + +#import + +#import + +@class GADCustomEventExtras; + +@interface GADCustomEventRequest : NSObject + +/// The end user's gender set in GADRequest. If not specified, returns kGADGenderUnknown. +@property(nonatomic, readonly, assign) GADGender userGender; + +/// The end user's birthday set in GADRequest. If not specified, returns nil. +@property(nonatomic, readonly, copy) NSDate *userBirthday; + +/// The end user's latitude, longitude, and accuracy, set in GADRequest. If not specified, +/// userHasLocation returns NO, and userLatitude, userLongitude and userLocationAccuracyInMeters +/// will all return 0. +@property(nonatomic, readonly, assign) BOOL userHasLocation; +@property(nonatomic, readonly, assign) CGFloat userLatitude; +@property(nonatomic, readonly, assign) CGFloat userLongitude; +@property(nonatomic, readonly, assign) CGFloat userLocationAccuracyInMeters; + +/// Description of the user's location, in free form text, set in GADRequest. If not available, +/// returns nil. This may be set even if userHasLocation is NO. +@property(nonatomic, readonly, copy) NSString *userLocationDescription; + +/// Keywords set in GADRequest. Returns nil if no keywords are set. +@property(nonatomic, readonly, copy) NSArray *userKeywords; + +/// The additional parameters set by the application. This property allows you to pass additional +/// information from your application to your Custom Event object. To do so, create an instance of +/// GADCustomEventExtras to pass to GADRequest -registerAdNetworkExtras:. The instance should have +/// an NSDictionary set for a particular custom event label. That NSDictionary becomes the +/// additionalParameters here. +@property(nonatomic, readonly, copy) NSDictionary *additionalParameters; + +/// Indicates if the testing property has been set in GADRequest. +@property(nonatomic, readonly, assign) BOOL isTesting; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADDynamicHeightSearchRequest.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADDynamicHeightSearchRequest.h new file mode 100644 index 00000000..39827316 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADDynamicHeightSearchRequest.h @@ -0,0 +1,160 @@ +// +// GADDynamicHeightSearchRequest.h +// GoogleMobileAds +// +// Copyright © 2016 Google Inc. All rights reserved. +// + +#import "GADRequest.h" + +/// Use to configure Custom Search Ad (CSA) ad requests. A dynamic height search banner can contain +/// multiple ads and the height is set dynamically based on the ad contents. Please cross-reference +/// the property sections and properties with the official reference document: +/// https://developers.google.com/custom-search-ads/docs/reference +@interface GADDynamicHeightSearchRequest : GADRequest + +#pragma mark - Page Level Parameters + +#pragma mark Required + +/// The CSA "query" parameter. +@property(nonatomic, copy) NSString *query; + +/// The CSA "adPage" parameter. +@property(nonatomic, assign) NSInteger adPage; + +#pragma mark Configuration Settings + +/// Indicates if the CSA "adTest" parameter is enabled. +@property(nonatomic, assign) BOOL adTestEnabled; + +/// The CSA "channel" parameter. +@property(nonatomic, copy) NSString *channel; + +/// The CSA "hl" parameter. +@property(nonatomic, copy) NSString *hostLanguage; + +#pragma mark Layout and Styling + +/// The CSA "colorLocation" parameter. +@property(nonatomic, copy) NSString *locationExtensionTextColor; + +/// The CSA "fontSizeLocation" parameter. +@property(nonatomic, assign) CGFloat locationExtensionFontSize; + +#pragma mark Ad Extensions + +/// Indicates if the CSA "clickToCall" parameter is enabled. +@property(nonatomic, assign) BOOL clickToCallExtensionEnabled; + +/// Indicates if the CSA "location" parameter is enabled. +@property(nonatomic, assign) BOOL locationExtensionEnabled; + +/// Indicates if the CSA "plusOnes" parameter is enabled. +@property(nonatomic, assign) BOOL plusOnesExtensionEnabled; + +/// Indicates if the CSA "sellerRatings" parameter is enabled. +@property(nonatomic, assign) BOOL sellerRatingsExtensionEnabled; + +/// Indicates if the CSA "siteLinks" parameter is enabled. +@property(nonatomic, assign) BOOL siteLinksExtensionEnabled; + +#pragma mark - Unit Level Parameters + +#pragma mark Required + +/// The CSA "width" parameter. +@property(nonatomic, copy) NSString *CSSWidth; + +/// Configuration Settings + +/// The CSA "number" parameter. +@property(nonatomic, assign) NSInteger numberOfAds; + +#pragma mark Font + +/// The CSA "fontFamily" parameter. +@property(nonatomic, copy) NSString *fontFamily; + +/// The CSA "fontFamilyAttribution" parameter. +@property(nonatomic, copy) NSString *attributionFontFamily; + +/// The CSA "fontSizeAnnotation" parameter. +@property(nonatomic, assign) CGFloat annotationFontSize; + +/// The CSA "fontSizeAttribution" parameter. +@property(nonatomic, assign) CGFloat attributionFontSize; + +/// The CSA "fontSizeDescription" parameter. +@property(nonatomic, assign) CGFloat descriptionFontSize; + +/// The CSA "fontSizeDomainLink" parameter. +@property(nonatomic, assign) CGFloat domainLinkFontSize; + +/// The CSA "fontSizeTitle" parameter. +@property(nonatomic, assign) CGFloat titleFontSize; + +#pragma mark Color + +/// The CSA "colorAdBorder" parameter. +@property(nonatomic, copy) NSString *adBorderColor; + +/// The CSA "colorAdSeparator" parameter. +@property(nonatomic, copy) NSString *adSeparatorColor; + +/// The CSA "colorAnnotation" parameter. +@property(nonatomic, copy) NSString *annotationTextColor; + +/// The CSA "colorAttribution" parameter. +@property(nonatomic, copy) NSString *attributionTextColor; + +/// The CSA "colorBackground" parameter. +@property(nonatomic, copy) NSString *backgroundColor; + +/// The CSA "colorBorder" parameter. +@property(nonatomic, copy) NSString *borderColor; + +/// The CSA "colorDomainLink" parameter. +@property(nonatomic, copy) NSString *domainLinkColor; + +/// The CSA "colorText" parameter. +@property(nonatomic, copy) NSString *textColor; + +/// The CSA "colorTitleLink" parameter. +@property(nonatomic, copy) NSString *titleLinkColor; + +#pragma mark General Formatting + +/// The CSA "adBorderSelections" parameter. +@property(nonatomic, copy) NSString *adBorderCSSSelections; + +/// The CSA "adjustableLineHeight" parameter. +@property(nonatomic, assign) CGFloat adjustableLineHeight; + +/// The CSA "attributionSpacingBelow" parameter. +@property(nonatomic, assign) CGFloat attributionBottomSpacing; + +/// The CSA "borderSelections" parameter. +@property(nonatomic, copy) NSString *borderCSSSelections; + +/// Indicates if the CSA "noTitleUnderline" parameter is enabled. +@property(nonatomic, assign) BOOL titleUnderlineHidden; + +/// Indicates if the CSA "titleBold" parameter is enabled. +@property(nonatomic, assign) BOOL boldTitleEnabled; + +/// The CSA "verticalSpacing" parameter. +@property(nonatomic, assign) CGFloat verticalSpacing; + +#pragma mark Ad Extensions + +/// Indicates if the CSA "detailedAttribution" parameter is enabled. +@property(nonatomic, assign) BOOL detailedAttributionExtensionEnabled; + +/// Indicates if the CSA "longerHeadlines" parameter is enabled. +@property(nonatomic, assign) BOOL longerHeadlinesExtensionEnabled; + +/// Sets an advanced option value for a specified key. The value must be an NSString or NSNumber. +- (void)setAdvancedOptionValue:(id)value forKey:(NSString *)key; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADExtras.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADExtras.h new file mode 100644 index 00000000..80a354a4 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADExtras.h @@ -0,0 +1,17 @@ +// +// GADExtras.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google Inc. All rights reserved. +// + +#import + +#import + +@interface GADExtras : NSObject + +/// Additional parameters to be sent to Google networks. +@property(nonatomic, copy) NSDictionary *additionalParameters; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchase.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchase.h new file mode 100644 index 00000000..bd8d922e --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchase.h @@ -0,0 +1,80 @@ +// +// GADInAppPurchase.h +// Google Mobile Ads SDK +// +// Copyright 2013 Google Inc. All rights reserved. +// + +#import +#import + +@protocol GADDefaultInAppPurchaseDelegate; + +#pragma mark - Default Purchase Flow + +/// The consumable in-app purchase item that has been purchased by the user. The purchase flow is +/// handled by the Google Mobile Ads SDK. +/// Instances of this class are created and passed to your in-app purchase delegate after the user +/// has successfully paid for a product. Your code must correctly deliver the product to the user +/// and then call the didCompletePurchase method to finish the transaction. +@interface GADDefaultInAppPurchase : NSObject + +/// Enables the default consumable product in-app purchase flow handled by the Google Mobile Ads +/// SDK. The GADDefaultInAppPurchaseDelegate object is retained while the default purchase flow is +/// enabled. This method adds a SKPaymentTransactionObserver to the default SKPaymentQueue. +/// +/// Call this method early in your application to handle unfinished transactions from previous +/// application sessions. For example, call this method in your application delegate's +/// application:didFinishLaunchingWithOptions: method. ++ (void)enableDefaultPurchaseFlowWithDelegate:(id)delegate; + +/// Disables the default in-app purchase flow handled by the Google Mobile Ads SDK and releases the +/// associated GADDefaultInAppPurchaseDelegate object. ++ (void)disableDefaultPurchaseFlow; + +/// The in-app purchase product ID. +@property(nonatomic, readonly, copy) NSString *productID; + +/// The product quantity. +@property(nonatomic, readonly, assign) NSInteger quantity; + +/// The purchased item's completed payment transaction. Your application can use this property's +/// data to save a permanent record of the completed payment. The default purchase flow will finish +/// the transaction on your behalf. Do not finish the transaction yourself. +@property(nonatomic, readonly, strong) SKPaymentTransaction *paymentTransaction; + +/// The in-app purchase delegate object must first deliver the user's item and then call this +/// method. Failure to call this method will result in duplicate purchase notifications. +- (void)finishTransaction; + +@end + +#pragma mark - Custom Purchase Flow + +/// Enum of the different statuses resulting from processing a purchase. +typedef NS_ENUM(NSInteger, GADInAppPurchaseStatus) { + kGADInAppPurchaseStatusError = 0, ///< Error occured while processing the purchase. + kGADInAppPurchaseStatusSuccessful = 1, ///< Purchase was completed successfully. + kGADInAppPurchaseStatusCancel = 2, ///< Purchase was cancelled by the user. + kGADInAppPurchaseStatusInvalidProduct = 3 ///< Error occured while looking up the product. +}; + +/// The in-app purchase item to be purchased with the purchase flow handled by you, the +/// application developer. +/// Instances of this class are created and passed to your GADInAppPurchaseDelegate object when +/// users click a buy button. It is important to report the result of the purchase back to the SDK +/// in order to track metrics about the transaction. +@interface GADInAppPurchase : NSObject + +/// The in-app purchase product ID. +@property(nonatomic, readonly, copy) NSString *productID; + +/// The product quantity. +@property(nonatomic, readonly, assign) NSInteger quantity; + +/// The GADInAppPurchaseDelegate object must call this method after handling the in-app purchase for +/// both successful and unsuccessful purchase attempts. This method reports ad conversion and +/// purchase status information to Google. +- (void)reportPurchaseStatus:(GADInAppPurchaseStatus)purchaseStatus; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchaseDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchaseDelegate.h new file mode 100644 index 00000000..6dee2442 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchaseDelegate.h @@ -0,0 +1,42 @@ +// +// GADInAppPurchaseDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2013 Google Inc. All rights reserved. +// + +#import + +@class GADDefaultInAppPurchase; +@class GADInAppPurchase; + +#pragma mark - Default Purchase Flow + +/// In-app purchase delegate protocol for default purchase handling. The delegate must deliver +/// the purchased item then call the GADDefaultInAppPurchase object's finishTransaction method. +@protocol GADDefaultInAppPurchaseDelegate + +/// Called when the user successfully paid for a purchase. You must first deliver the purchased +/// item to the user, then call defaultInAppPurchase's finishTransaction method. +- (void)userDidPayForPurchase:(GADDefaultInAppPurchase *)defaultInAppPurchase; + +@optional + +/// Called when the user clicks on the buy button of an in-app purchase ad. Return YES if the +/// default purchase flow should be started to purchase the item, otherwise return NO. If not +/// implemented, defaults to YES. +- (BOOL)shouldStartPurchaseForProductID:(NSString *)productID quantity:(NSInteger)quantity; + +@end + +#pragma mark - Custom Purchase Flow + +/// In-app purchase delegate protocol for custom purchase handling. The delegate must handle the +/// product purchase flow then call the GADInAppPurchase object's reportPurchaseStatus: method. +@protocol GADInAppPurchaseDelegate + +/// Called when the user clicks on the buy button of an in-app purchase ad. After the receiver +/// handles the purchase, it must call the GADInAppPurchase object's reportPurchaseStatus: method. +- (void)didReceiveInAppPurchase:(GADInAppPurchase *)purchase; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitial.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitial.h new file mode 100644 index 00000000..dff57c51 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitial.h @@ -0,0 +1,88 @@ +// +// GADInterstitial.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import + +#import +#import +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// An interstitial ad. This is a full-screen advertisement shown at natural transition points in +/// your application such as between game levels or news stories. +@interface GADInterstitial : NSObject + +/// Initializes an interstitial with an ad unit created on the AdMob website. Create a new ad unit +/// for every unique placement of an ad in your application. Set this to the ID assigned for this +/// placement. Ad units are important for targeting and statistics. +/// +/// Example AdMob ad unit ID: @"ca-app-pub-0123456789012345/0123456789" +- (instancetype)initWithAdUnitID:(NSString *)adUnitID NS_DESIGNATED_INITIALIZER; + +#pragma mark Pre-Request + +/// Required value passed in with initWithAdUnitID:. +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adUnitID; + +/// Optional delegate object that receives state change notifications from this GADInterstitalAd. +@property(nonatomic, weak, GAD_NULLABLE) id delegate; + +/// Optional delegate object that receives in-app purchase notifications from this ad. Required for +/// the custom in-app purchase flow, but ignored when using the default in-app purchase flow. +@property(nonatomic, weak, GAD_NULLABLE) id inAppPurchaseDelegate; + +#pragma mark Making an Ad Request + +/// Makes an interstitial ad request. Additional targeting options can be supplied with a request +/// object. Only one interstitial request is allowed at a time. +/// +/// This is best to do several seconds before the interstitial is needed to preload its content. +/// Then when transitioning between view controllers show the interstital with +/// presentFromViewController. +- (void)loadRequest:(GADRequest *GAD_NULLABLE_TYPE)request; + +#pragma mark Post-Request + +/// Returns YES if the interstitial is ready to be displayed. The delegate's +/// interstitialAdDidReceiveAd: will be called after this property switches from NO to YES. +@property(nonatomic, readonly, assign) BOOL isReady; + +/// Returns YES if this object has already been presented. Interstitial objects can only be used +/// once even with different requests. +@property(nonatomic, readonly, assign) BOOL hasBeenUsed; + +/// Returns the ad network class name that fetched the current ad. Returns nil while the latest ad +/// request is in progress or if the latest ad request failed. For both standard and mediated Google +/// AdMob ads, this method returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation +/// custom events, this method returns @"GADMAdapterCustomEvents". +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adNetworkClassName; + +/// Presents the interstitial ad which takes over the entire screen until the user dismisses it. +/// This has no effect unless isReady returns YES and/or the delegate's interstitialDidReceiveAd: +/// has been received. +/// +/// Set rootViewController to the current view controller at the time this method is called. If your +/// application does not use view controllers pass in nil and your views will be removed from the +/// window to show the interstitial and restored when done. After the interstitial has been removed, +/// the delegate's interstitialDidDismissScreen: will be called. +- (void)presentFromRootViewController:(UIViewController *)rootViewController; + +#pragma mark Deprecated + +/// Deprecated intializer. Use initWithAdUnitID: instead. +- (instancetype)init GAD_DEPRECATED_MSG_ATTRIBUTE("Use initWithAdUnitID:."); + +/// Deprecated setter, use initWithAdUnitID: instead. +- (void)setAdUnitID:(NSString *GAD_NULLABLE_TYPE)adUnitID + GAD_DEPRECATED_MSG_ATTRIBUTE("Use initWithAdUnitID: instead of setting the ad unit ID."); + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitialDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitialDelegate.h new file mode 100644 index 00000000..3a2f05fd --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitialDelegate.h @@ -0,0 +1,54 @@ +// +// GADInterstitialDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import + +#import + +@class GADInterstitial; +@class GADRequestError; + +/// Delegate for receiving state change messages from a GADInterstitial such as interstitial ad +/// requests succeeding/failing. +@protocol GADInterstitialDelegate + +@optional + +#pragma mark Ad Request Lifecycle Notifications + +/// Called when an interstitial ad request succeeded. Show it at the next transition point in your +/// application such as when transitioning between view controllers. +- (void)interstitialDidReceiveAd:(GADInterstitial *)ad; + +/// Called when an interstitial ad request completed without an interstitial to +/// show. This is common since interstitials are shown sparingly to users. +- (void)interstitial:(GADInterstitial *)ad didFailToReceiveAdWithError:(GADRequestError *)error; + +#pragma mark Display-Time Lifecycle Notifications + +/// Called just before presenting an interstitial. After this method finishes the interstitial will +/// animate onto the screen. Use this opportunity to stop animations and save the state of your +/// application in case the user leaves while the interstitial is on screen (e.g. to visit the App +/// Store from a link on the interstitial). +- (void)interstitialWillPresentScreen:(GADInterstitial *)ad; + +/// Called when |ad| fails to present. +- (void)interstitialDidFailToPresentScreen:(GADInterstitial *)ad; + +/// Called before the interstitial is to be animated off the screen. +- (void)interstitialWillDismissScreen:(GADInterstitial *)ad; + +/// Called just after dismissing an interstitial and it has animated off the screen. +- (void)interstitialDidDismissScreen:(GADInterstitial *)ad; + +/// Called just before the application will background or terminate because the user clicked on an +/// ad that will launch another application (such as the App Store). The normal +/// UIApplicationDelegate methods, like applicationDidEnterBackground:, will be called immediately +/// before this. +- (void)interstitialWillLeaveApplication:(GADInterstitial *)ad; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediaView.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediaView.h new file mode 100644 index 00000000..813a6264 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediaView.h @@ -0,0 +1,21 @@ +// +// GADMediaView.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import + +/// Displays native ad media assets. +/// +/// To display media assets in GADNativeAppInstallAdView instances, add a GADMediaView subview and +/// assign the native ad view's mediaView property. +/// +/// If the native ad doesn't contain a video and image loading is enabled, the GADMediaView displays +/// the native ad's |images| asset's first image. +/// +/// If the native ad doesn't contain a video and image loading is disabled, the GADMediaView object +/// is empty. +@interface GADMediaView : UIView +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAd.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAd.h new file mode 100644 index 00000000..868b6405 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAd.h @@ -0,0 +1,21 @@ +// +// GADMediatedNativeAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +/// Base protocol for mediated native ads. +@protocol GADMediatedNativeAd + +/// Returns a delegate object that receives state change notifications. +- (id)mediatedNativeAdDelegate; + +/// Returns a dictionary of asset names and object pairs for assets that are not handled by +/// properties of the GADMediatedNativeAd subclass. +- (NSDictionary *)extraAssets; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdDelegate.h new file mode 100644 index 00000000..e9aebe00 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdDelegate.h @@ -0,0 +1,41 @@ +// +// GADMediatedNativeAdDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +@protocol GADMediatedNativeAd; + +/// GADMediatedNativeAdDelegate objects handle mediated native ad events. +@protocol GADMediatedNativeAdDelegate + +@optional + +/// Tells the delegate that the mediated native ad has rendered in |view|, a subview of +/// |viewController|. +- (void)mediatedNativeAd:(id)mediatedNativeAd + didRenderInView:(UIView *)view + viewController:(UIViewController *)viewController; + +/// Tells the delegate that the mediated native ad has recorded an impression. This method is called +/// only once per mediated native ad. +- (void)mediatedNativeAdDidRecordImpression:(id)mediatedNativeAd; + +/// Tells the delegate that the mediated native ad has recorded a user click on the asset named +/// |assetName|. Full screen actions should be presented from |viewController|. This method is +/// called only if -[GADMAdNetworkAdapter handlesUserClicks] returns NO. +- (void)mediatedNativeAd:(id)mediatedNativeAd + didRecordClickOnAssetWithName:(NSString *)assetName + view:(UIView *)view + viewController:(UIViewController *)viewController; + +/// Tells the delegate that the mediated native ad has untracked |view|. This method is called +/// when the mediatedNativeAd is no longer rendered in the provided view and the delegate should +/// stop tracking the view's impressions and clicks. +- (void)mediatedNativeAd:(id)mediatedNativeAd didUntrackView:(UIView *)view; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdNotificationSource.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdNotificationSource.h new file mode 100644 index 00000000..f2afa154 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdNotificationSource.h @@ -0,0 +1,39 @@ +// +// GADMediatedNativeAdNotificationSource.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +/// Notifies the Google Mobile Ads SDK about the events performed by adapters. Adapters may perform +/// some action (e.g. opening an in app browser or open the iTunes store) when handling callbacks +/// from GADMediatedNativeAdDelegate. Adapters in such case should notify the Google Mobile Ads SDK +/// by calling the relevant methods from this class. +@interface GADMediatedNativeAdNotificationSource : NSObject + +/// Called by the adapter when it has registered an impression on the tracked view. Adapter should +/// only call this method if -[GADMAdNetworkAdapter handlesUserImpressions] returns YES. ++ (void)mediatedNativeAdDidRecordImpression:(id)mediatedNativeAd; + +/// Called by the adapter when it has registered a user click on the tracked view. Adapter should +/// only call this method if -[GADMAdNetworkAdapter handlesUserClicks] returns YES. ++ (void)mediatedNativeAdDidRecordClick:(id)mediatedNativeAd; + +/// Must be called by the adapter just before mediatedNativeAd has opened an in app modal screen. ++ (void)mediatedNativeAdWillPresentScreen:(id)mediatedNativeAd; + +/// Must be called by the adapter just before the in app modal screen opened by mediatedNativeAd is +/// dismissed. ++ (void)mediatedNativeAdWillDismissScreen:(id)mediatedNativeAd; + +/// Must be called by the adapter after the in app modal screen opened by mediatedNativeAd is +/// dismissed. ++ (void)mediatedNativeAdDidDismissScreen:(id)mediatedNativeAd; + +/// Must be called by the adapter just before mediatedNativeAd has left the application. ++ (void)mediatedNativeAdWillLeaveApplication:(id)mediatedNativeAd; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAppInstallAd.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAppInstallAd.h new file mode 100644 index 00000000..8269c87e --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAppInstallAd.h @@ -0,0 +1,40 @@ +// +// GADMediatedNativeAppInstallAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import +#import + +/// Provides methods used for constructing native app install ads. The adapter must return an object +/// conforming to this protocol for native app install ad requests. +@protocol GADMediatedNativeAppInstallAd + +/// App title. +- (NSString *)headline; + +/// Array of GADNativeAdImage objects related to the advertised application. +- (NSArray *)images; + +/// App description. +- (NSString *)body; + +/// Application icon. +- (GADNativeAdImage *)icon; + +/// Text that encourages user to take some action with the ad. For example "Install". +- (NSString *)callToAction; + +/// App store rating (0 to 5). +- (NSDecimalNumber *)starRating; + +/// The app store name. For example, "App Store". +- (NSString *)store; + +/// String representation of the app's price. +- (NSString *)price; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeContentAd.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeContentAd.h new file mode 100644 index 00000000..d5600632 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeContentAd.h @@ -0,0 +1,33 @@ +// +// GADMediatedNativeContentAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import +#import + +/// Provides methods used for constructing native content ads. +@protocol GADMediatedNativeContentAd + +/// Primary text headline. +- (NSString *)headline; + +/// Secondary text. +- (NSString *)body; + +/// List of large images. Each object is an instance of GADNativeAdImage. +- (NSArray *)images; + +/// Small logo image. +- (GADNativeAdImage *)logo; + +/// Text that encourages user to take some action with the ad. +- (NSString *)callToAction; + +/// Identifies the advertiser. For example, the advertiser’s name or visible URL. +- (NSString *)advertiser; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMobileAds.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMobileAds.h new file mode 100644 index 00000000..fc1f8323 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADMobileAds.h @@ -0,0 +1,48 @@ +// +// GADMobileAds.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +@interface GADMobileAds : NSObject + +/// Returns the shared GADMobileAds instance. ++ (GADMobileAds *)sharedInstance; + +/// Configures the SDK using the settings associated with the given application ID. ++ (void)configureWithApplicationID:(NSString *)applicationID; + +/// Disables automated in app purchase (IAP) reporting. Must be called before any IAP transaction is +/// initiated. IAP reporting is used to track IAP ad conversions. Do not disable reporting if you +/// use IAP ads. ++ (void)disableAutomatedInAppPurchaseReporting; + +/// Disables automated SDK crash reporting. If not called, the SDK records the original exception +/// handler if available and registers a new exception handler. The new exception handler only +/// reports SDK related exceptions and calls the recorded original exception handler. ++ (void)disableSDKCrashReporting; + +/// The application's audio volume. Affects audio volumes of all ads relative to other audio output. +/// Valid ad volume values range from 0.0 (silent) to 1.0 (current device volume). Use this method +/// only if your application has its own volume controls (e.g., custom music or sound effect +/// volumes). Defaults to 1.0. +@property(nonatomic, assign) float applicationVolume; + +/// Indicates if the application's audio is muted. Affects initial mute state for all ads. Use this +/// method only if your application has its own volume controls (e.g., custom music or sound effect +/// muting). Defaults to NO. +@property(nonatomic, assign) BOOL applicationMuted; + +/// Returns YES if the current SDK version is at least |major|.|minor|.|patch|. This method can be +/// used by libraries that depend on a specific minimum version of the Google Mobile Ads SDK to warn +/// developers if they have an incompatible version. +/// +/// Available in Google Mobile Ads SDK 7.10 and onwards. Before calling this method check if the +/// GADMobileAds's shared instance responds to this method. Calling this method on a Google Mobile +/// Ads SDK lower than 7.10 can crash the app. +- (BOOL)isSDKVersionAtLeastMajor:(NSInteger)major minor:(NSInteger)minor patch:(NSInteger)patch; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAd.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAd.h new file mode 100644 index 00000000..b4937212 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAd.h @@ -0,0 +1,30 @@ +// +// GADNativeAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +@protocol GADNativeAdDelegate; + +/// Native ad base class. All native ad types are subclasses of this class. +@interface GADNativeAd : NSObject + +/// Optional delegate to receive state change notifications. +@property(nonatomic, weak) id delegate; + +/// Root view controller for handling ad actions. +@property(nonatomic, weak) UIViewController *rootViewController; + +/// Dictionary of assets which aren't processed by the receiver. +@property(nonatomic, readonly, copy) NSDictionary *extraAssets; + +/// The ad network class name that fetched the current ad. For both standard and mediated Google +/// AdMob ads, this method returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation +/// custom events, this method returns @"GADMAdapterCustomEvents". +@property(nonatomic, readonly, copy) NSString *adNetworkClassName; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdDelegate.h new file mode 100644 index 00000000..fa39d858 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdDelegate.h @@ -0,0 +1,41 @@ +// +// GADNativeAdDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +@class GADNativeAd; + +/// Identifies native ad assets. +@protocol GADNativeAdDelegate + +@optional + +#pragma mark Click-Time Lifecycle Notifications + +/// Called just before presenting the user a full screen view, such as a browser, in response to +/// clicking on an ad. Use this opportunity to stop animations, time sensitive interactions, etc. +/// +/// Normally the user looks at the ad, dismisses it, and control returns to your application with +/// the nativeAdDidDismissScreen: message. However, if the user hits the Home button or clicks on an +/// App Store link, your application will end. The next method called will be the +/// applicationWillResignActive: of your UIApplicationDelegate object.Immediately after that, +/// nativeAdWillLeaveApplication: is called. +- (void)nativeAdWillPresentScreen:(GADNativeAd *)nativeAd; + +/// Called just before dismissing a full screen view. +- (void)nativeAdWillDismissScreen:(GADNativeAd *)nativeAd; + +/// Called just after dismissing a full screen view. Use this opportunity to restart anything you +/// may have stopped as part of nativeAdWillPresentScreen:. +- (void)nativeAdDidDismissScreen:(GADNativeAd *)nativeAd; + +/// Called just before the application will go to the background or terminate due to an ad action +/// that will launch another application (such as the App Store). The normal UIApplicationDelegate +/// methods, like applicationDidEnterBackground:, will be called immediately before this. +- (void)nativeAdWillLeaveApplication:(GADNativeAd *)nativeAd; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage+Mediation.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage+Mediation.h new file mode 100644 index 00000000..b448c4fb --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage+Mediation.h @@ -0,0 +1,18 @@ +// +// GADNativeAdImage+Mediation.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google. All rights reserved. +// + +#import "GADNativeAdImage.h" + +@interface GADNativeAdImage (MediationAdditions) + +/// Initializes and returns a native ad image object with the provided image. +- (instancetype)initWithImage:(UIImage *)image; + +/// Initializes and returns a native ad image object with the provided image URL and image scale. +- (instancetype)initWithURL:(NSURL *)URL scale:(CGFloat)scale; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage.h new file mode 100644 index 00000000..58da2901 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage.h @@ -0,0 +1,23 @@ +// +// GADNativeAdImage.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +/// Native ad image. +@interface GADNativeAdImage : NSObject + +/// The image. If image autoloading is disabled, this property will be nil. +@property(nonatomic, readonly, strong) UIImage *image; + +/// The image's URL. +@property(nonatomic, readonly, strong) NSURL *imageURL; + +/// The image's scale. +@property(nonatomic, readonly, assign) CGFloat scale; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImageAdLoaderOptions.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImageAdLoaderOptions.h new file mode 100644 index 00000000..c847e735 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImageAdLoaderOptions.h @@ -0,0 +1,31 @@ +// +// GADNativeAdImageAdLoaderOptions.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +/// Native ad image orientation preference. +typedef NS_ENUM(NSInteger, GADNativeAdImageAdLoaderOptionsOrientation) { + GADNativeAdImageAdLoaderOptionsOrientationAny, ///< No orientation preference. + GADNativeAdImageAdLoaderOptionsOrientationPortrait, ///< Prefer portrait images. + GADNativeAdImageAdLoaderOptionsOrientationLandscape ///< Prefer landscape images. +}; + +@interface GADNativeAdImageAdLoaderOptions : GADAdLoaderOptions + +/// Indicates if image asset content should be loaded by the SDK. If set to YES, the SDK will not +/// load image asset content and native ad image URLs can be used to fetch content. Defaults to NO, +/// image assets are loaded by the SDK. +@property(nonatomic, assign) BOOL disableImageLoading; + +/// Indicates if multiple images should be loaded for each asset. Defaults to NO. +@property(nonatomic, assign) BOOL shouldRequestMultipleImages; + +/// Indicates preferred image orientation. Defaults to +/// GADNativeAdImageAdLoaderOptionsOrientationAny. +@property(nonatomic, assign) GADNativeAdImageAdLoaderOptionsOrientation preferredImageOrientation; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAd.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAd.h new file mode 100644 index 00000000..34fab690 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAd.h @@ -0,0 +1,80 @@ +// +// GADNativeAppInstallAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +#import +#import +#import +#import +#import +#import + +/// Native app install ad. To request this ad type, you need to pass +/// kGADAdLoaderAdTypeNativeAppInstall (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in +/// GADAdLoader's initializer method. If you request this ad type, your delegate must conform to the +/// GADNativeAppInstallAdRequestDelegate protocol. +@interface GADNativeAppInstallAd : GADNativeAd + +#pragma mark - Must be displayed + +/// App title. +@property(nonatomic, readonly, copy) NSString *headline; +/// Text that encourages user to take some action with the ad. For example "Install". +@property(nonatomic, readonly, copy) NSString *callToAction; +/// Application icon. +@property(nonatomic, readonly, strong) GADNativeAdImage *icon; + +#pragma mark - Recommended to display + +/// App description. +@property(nonatomic, readonly, copy) NSString *body; +/// The app store name. For example, "App Store". +@property(nonatomic, readonly, copy) NSString *store; +/// String representation of the app's price. +@property(nonatomic, readonly, copy) NSString *price; +/// Array of GADNativeAdImage objects related to the advertised application. +@property(nonatomic, readonly, strong) NSArray *images; +/// App store rating (0 to 5). +@property(nonatomic, readonly, copy) NSDecimalNumber *starRating; +/// Video controller for controlling video playback in GADNativeAppInstallAdView's mediaView. +/// Returns nil if the ad doesn't contain a video asset. +@property(nonatomic, strong, readonly) GADVideoController *videoController; +@end + +#pragma mark - Protocol and constants + +/// The delegate of a GADAdLoader object implements this protocol to receive GADNativeAppInstallAd +/// ads. +@protocol GADNativeAppInstallAdLoaderDelegate +/// Called when a native app install ad is received. +- (void)adLoader:(GADAdLoader *)adLoader + didReceiveNativeAppInstallAd:(GADNativeAppInstallAd *)nativeAppInstallAd; +@end + +#pragma mark - Native App Install Ad View + +/// Base class for app install ad views. Your app install ad view must be a subclass of this class +/// and must call superclass methods for all overriden methods. +@interface GADNativeAppInstallAdView : UIView + +/// This property must point to the native app install ad object rendered by this ad view. +@property(nonatomic, strong) GADNativeAppInstallAd *nativeAppInstallAd; + +// Weak references to your ad view's asset views. +@property(nonatomic, weak) IBOutlet UIView *headlineView; +@property(nonatomic, weak) IBOutlet UIView *callToActionView; +@property(nonatomic, weak) IBOutlet UIView *iconView; +@property(nonatomic, weak) IBOutlet UIView *bodyView; +@property(nonatomic, weak) IBOutlet UIView *storeView; +@property(nonatomic, weak) IBOutlet UIView *priceView; +@property(nonatomic, weak) IBOutlet UIView *imageView; +@property(nonatomic, weak) IBOutlet UIView *starRatingView; +@property(nonatomic, weak) IBOutlet GADMediaView *mediaView; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAd.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAd.h new file mode 100644 index 00000000..e2689128 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAd.h @@ -0,0 +1,69 @@ +// +// GADNativeContentAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +#import +#import +#import +#import + +#pragma mark - Native Content Ad Assets + +/// Native content ad. To request this ad type, you need to pass kGADAdLoaderAdTypeNativeContent +/// (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader's initializer method. If +/// you request this ad type, your delegate must conform to the GADNativeContentAdRequestDelegate +/// protocol. +@interface GADNativeContentAd : GADNativeAd + +#pragma mark - Must be displayed + +/// Primary text headline. +@property(nonatomic, readonly, copy) NSString *headline; +/// Secondary text. +@property(nonatomic, readonly, copy) NSString *body; + +#pragma mark - Recommended to display + +/// Large images. +@property(nonatomic, readonly, copy) NSArray *images; +/// Small logo image. +@property(nonatomic, readonly, strong) GADNativeAdImage *logo; +/// Text that encourages user to take some action with the ad. +@property(nonatomic, readonly, copy) NSString *callToAction; +/// Identifies the advertiser. For example, the advertiser’s name or visible URL. +@property(nonatomic, readonly, copy) NSString *advertiser; +@end + +#pragma mark - Protocol and constants + +/// The delegate of a GADAdLoader object implements this protocol to receive GADNativeContentAd ads. +@protocol GADNativeContentAdLoaderDelegate +/// Called when native content is received. +- (void)adLoader:(GADAdLoader *)adLoader + didReceiveNativeContentAd:(GADNativeContentAd *)nativeContentAd; +@end + +#pragma mark - Native Content Ad View + +/// Base class for content ad views. Your content ad view must be a subclass of this class and must +/// call superclass methods for all overriden methods. +@interface GADNativeContentAdView : UIView + +/// This property must point to the native content ad object rendered by this ad view. +@property(nonatomic, strong) GADNativeContentAd *nativeContentAd; + +// Weak references to your ad view's asset views. +@property(nonatomic, weak) IBOutlet UIView *headlineView; +@property(nonatomic, weak) IBOutlet UIView *bodyView; +@property(nonatomic, weak) IBOutlet UIView *imageView; +@property(nonatomic, weak) IBOutlet UIView *logoView; +@property(nonatomic, weak) IBOutlet UIView *callToActionView; +@property(nonatomic, weak) IBOutlet UIView *advertiserView; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeCustomTemplateAd.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeCustomTemplateAd.h new file mode 100644 index 00000000..83c2e101 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeCustomTemplateAd.h @@ -0,0 +1,61 @@ +// +// GADNativeCustomTemplateAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +#import +#import +#import +#import + +/// Native custom template ad. To request this ad type, you need to pass +/// kGADAdLoaderAdTypeNativeCustomTemplate (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in +/// GADAdLoader's initializer method. If you request this ad type, your delegate must conform to the +/// GADNativeCustomTemplateAdLoaderDelegate protocol. +@interface GADNativeCustomTemplateAd : GADNativeAd + +/// The ad's custom template ID. +@property(nonatomic, readonly) NSString *templateID; + +/// Array of available asset keys. +@property(nonatomic, readonly) NSArray *availableAssetKeys; + +/// Returns the native ad image corresponding to the specified key or nil if the image is not +/// available. +- (GADNativeAdImage *)imageForKey:(NSString *)key; + +/// Returns the string corresponding to the specified key or nil if the string is not available. +- (NSString *)stringForKey:(NSString *)key; + +/// Call when the user clicks on the ad. Provide the asset key that best matches the asset the user +/// interacted with. Provide |customClickHandler| only if this template is configured with a custom +/// click action, otherwise pass in nil. If a block is provided, the ad's built-in click actions are +/// ignored and |customClickHandler| is executed after recording the click. +- (void)performClickOnAssetWithKey:(NSString *)assetKey + customClickHandler:(dispatch_block_t)customClickHandler; + +/// Call when the ad is displayed on screen to the user. Can be called multiple times. Only the +/// first impression is recorded. +- (void)recordImpression; + +@end + +#pragma mark - Loading Protocol + +/// The delegate of a GADAdLoader object implements this protocol to receive +/// GADNativeCustomTemplateAd ads. +@protocol GADNativeCustomTemplateAdLoaderDelegate + +/// Called when requesting an ad. Asks the delegate for an array of custom template ID strings. +- (NSArray *)nativeCustomTemplateIDsForAdLoader:(GADAdLoader *)adLoader; + +/// Tells the delegate that a native custom template ad was received. +- (void)adLoader:(GADAdLoader *)adLoader + didReceiveNativeCustomTemplateAd:(GADNativeCustomTemplateAd *)nativeCustomTemplateAd; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdView.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdView.h new file mode 100644 index 00000000..95ea8c77 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdView.h @@ -0,0 +1,94 @@ +// +// GADNativeExpressAdView.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import +#import +#import +#import +#import + +/// The view that displays native ads. A minimum implementation to get an ad from within a +/// UIViewController class is: +/// +/// \code +/// // Create and setup the ad view, specifying the size and origin at {0, 0}. +/// GADNativeExpressAdView *adView = [[GADNativeExpressAdView alloc] +/// initWithAdSize:kGADAdSizeBanner]; +/// adView.rootViewController = self; +/// adView.adUnitID = @"ID created when registering your app"; +/// +/// // Place the ad view onto the screen. +/// [self.view addSubview:adView]; +/// +/// // Request an ad without any additional targeting information. +/// [adView loadRequest:[GADRequest request]]; +/// \endcode +@interface GADNativeExpressAdView : UIView + +#pragma mark - Initialization + +/// Returns an initialized GADNativeExpressAdView instance set to |adSize| and positioned at +/// |origin| relative to its superview bounds. Returns nil if |adSize| is an invalid ad size. +- (instancetype)initWithAdSize:(GADAdSize)adSize origin:(CGPoint)origin; + +/// Returns an initialized GADNativeExpressAdView instance set to |adSize| and positioned at the top +/// left of its superview. Returns nil if |adSize| is an invalid ad size. +- (instancetype)initWithAdSize:(GADAdSize)adSize; + +/// Video controller for controlling video rendered by this native express ad view. +@property(nonatomic, strong, readonly) GADVideoController *videoController; + +#pragma mark - Pre-Request + +/// Required value created on the AdMob website. Create a new ad unit for every unique placement of +/// an ad in your application. Set this to the ID assigned for this placement. Ad units are +/// important for targeting and statistics. +/// +/// Example AdMob ad unit ID: @"ca-app-pub-0123456789012345/0123456789" +@property(nonatomic, copy) IBInspectable NSString *adUnitID; + +/// Required reference to the current root view controller. For example, the root view controller in +/// a tab-based application would be the UITabViewController. +@property(nonatomic, weak) IBOutlet UIViewController *rootViewController; + +/// Required to set this native ad view to a proper size. Never create your own GADAdSize directly. +/// Use one of the predefined standard ad sizes (such as kGADAdSizeBanner), or create one using the +/// GADAdSizeFromCGSize method. If you are not using mediation, changing the adSize after an ad has +/// been shown will cause a new request (for an ad of the new size) to be sent. If you are using +/// mediation, then a new request may not be sent. +@property(nonatomic, assign) GADAdSize adSize; + +/// Optional delegate object that receives state change notifications from this +/// GADNativeExpressAdView. Typically this is a UIViewController. +@property(nonatomic, weak) IBOutlet id delegate; + +/// A Boolean value that determines whether autoloading of ads in the receiver is enabled. If +/// enabled, you do not need to call the loadRequest: method to load ads. +@property(nonatomic, assign, getter=isAutoloadEnabled) IBInspectable BOOL autoloadEnabled; + +/// Sets options that configure ad loading. +/// +/// \param adOptions An array of GADAdLoaderOptions objects. The array is deep copied and option +/// objects cannot be modified after calling this method. +- (void)setAdOptions:(NSArray *)adOptions; + +#pragma mark - Making an Ad Request + +/// Makes an ad request. The request object supplies targeting information. +- (void)loadRequest:(GADRequest *)request; + +#pragma mark - Mediation + +/// The name of the ad network adapter class that fetched the current ad. Returns nil while the +/// latest ad request is in progress or if the latest ad request failed. For both standard and +/// mediated Google AdMob ads, this method returns @"GADMAdapterGoogleAdMobAds". For ads fetched via +/// mediation custom events, this method returns @"GADMAdapterCustomEvents". +@property(nonatomic, readonly, weak) NSString *adNetworkClassName; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdViewDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdViewDelegate.h new file mode 100644 index 00000000..13f5efca --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdViewDelegate.h @@ -0,0 +1,48 @@ +// +// GADNativeExpressAdViewDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +@class GADNativeExpressAdView; +@class GADRequestError; + +/// Delegate methods for receiving GADNativeExpressAdView state change messages such as ad request +/// status and ad click lifecycle. +@protocol GADNativeExpressAdViewDelegate + +@optional + +#pragma mark Ad Request Lifecycle Notifications + +/// Tells the delegate that the native express ad view successfully received an ad. The delegate may +/// want to add the native express ad view to the view hierarchy if it hasn't been added yet. +- (void)nativeExpressAdViewDidReceiveAd:(GADNativeExpressAdView *)nativeExpressAdView; + +/// Tells the delegate that an ad request failed. The failure is normally due to network +/// connectivity or ad availablility (i.e., no fill). +- (void)nativeExpressAdView:(GADNativeExpressAdView *)nativeExpressAdView + didFailToReceiveAdWithError:(GADRequestError *)error; + +#pragma mark Click-Time Lifecycle Notifications + +/// Tells the delegate that a full screen view will be presented in response to the user clicking on +/// an ad. The delegate may want to pause animations and time sensitive interactions. +- (void)nativeExpressAdViewWillPresentScreen:(GADNativeExpressAdView *)nativeExpressAdView; + +/// Tells the delegate that the full screen view will be dismissed. +- (void)nativeExpressAdViewWillDismissScreen:(GADNativeExpressAdView *)nativeExpressAdView; + +/// Tells the delegate that the full screen view has been dismissed. The delegate should restart +/// anything paused while handling adViewWillPresentScreen:. +- (void)nativeExpressAdViewDidDismissScreen:(GADNativeExpressAdView *)nativeExpressAdView; + +/// Tells the delegate that the user click will open another app, backgrounding the current +/// application. The standard UIApplicationDelegate methods, like applicationDidEnterBackground:, +/// are called immediately before this method is called. +- (void)nativeExpressAdViewWillLeaveApplication:(GADNativeExpressAdView *)nativeExpressAdView; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADRequest.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADRequest.h new file mode 100644 index 00000000..422ba55a --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADRequest.h @@ -0,0 +1,127 @@ +// +// GADRequest.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import +#import + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Add this constant to the testDevices property's array to receive test ads on the simulator. +GAD_EXTERN const id kGADSimulatorID; + +/// Genders to help deliver more relevant ads. +typedef NS_ENUM(NSInteger, GADGender) { + kGADGenderUnknown, ///< Unknown gender. + kGADGenderMale, ///< Male gender. + kGADGenderFemale ///< Female gender. +}; + +/// Specifies optional parameters for ad requests. +@interface GADRequest : NSObject + +/// Returns a default request. ++ (instancetype)request; + +#pragma mark Additional Parameters For Ad Networks + +/// Ad networks may have additional parameters they accept. To pass these parameters to them, create +/// the ad network extras object for that network, fill in the parameters, and register it here. The +/// ad network should have a header defining the interface for the 'extras' object to create. All +/// networks will have access to the basic settings you've set in this GADRequest (gender, birthday, +/// testing mode, etc.). If you register an extras object that is the same class as one you have +/// registered before, the previous extras will be overwritten. +- (void)registerAdNetworkExtras:(id)extras; + +/// Returns the network extras defined for an ad network. +- (id GAD_NULLABLE_TYPE)adNetworkExtrasFor:(Class)aClass; + +/// Removes the extras for an ad network. |aClass| is the class which represents that network's +/// extras type. +- (void)removeAdNetworkExtrasFor:(Class)aClass; + +#pragma mark Collecting SDK Information + +/// Returns the version of the SDK. ++ (NSString *)sdkVersion; + +#pragma mark Testing + +/// Test ads will be returned for devices with device IDs specified in this array. +@property(nonatomic, copy, GAD_NULLABLE) NSArray *testDevices; + +#pragma mark User Information + +/// Provide the user's gender to increase ad relevancy. +@property(nonatomic, assign) GADGender gender; + +/// Provide the user's birthday to increase ad relevancy. +@property(nonatomic, copy, GAD_NULLABLE) NSDate *birthday; + +/// The user's current location may be used to deliver more relevant ads. However do not use Core +/// Location just for advertising, make sure it is used for more beneficial reasons as well. It is +/// both a good idea and part of Apple's guidelines. +- (void)setLocationWithLatitude:(CGFloat)latitude + longitude:(CGFloat)longitude + accuracy:(CGFloat)accuracyInMeters; + +/// [Optional] This method allows you to specify whether you would like your app to be treated as +/// child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA), +/// http:///business.ftc.gov/privacy-and-security/childrens-privacy. +/// +/// If you call this method with YES, you are indicating that your app should be treated as +/// child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA). If you call +/// this method with NO, you are indicating that your app should not be treated as child-directed +/// for purposes of the Children’s Online Privacy Protection Act (COPPA). If you do not call this +/// method, ad requests will include no indication of how you would like your app treated with +/// respect to COPPA. +/// +/// By setting this method, you certify that this notification is accurate and you are authorized to +/// act on behalf of the owner of the app. You understand that abuse of this setting may result in +/// termination of your Google account. +/// +/// It may take some time for this designation to be fully implemented in applicable Google +/// services. This designation will only apply to ad requests for which you have set this method. +- (void)tagForChildDirectedTreatment:(BOOL)childDirectedTreatment; + +#pragma mark Contextual Information + +/// Array of keyword strings. Keywords are words or phrases describing the current user activity +/// such as @"Sports Scores" or @"Football". Set this property to nil to clear the keywords. +@property(nonatomic, copy, GAD_NULLABLE) NSArray *keywords; + +/// URL string for a webpage whose content matches the app content. This webpage content is used for +/// targeting purposes. +@property(nonatomic, copy, GAD_NULLABLE) NSString *contentURL; + +#pragma mark Request Agent Information + +/// String that identifies the ad request's origin. Third party libraries that reference the Mobile +/// Ads SDK should set this property to denote the platform from which the ad request originated. +/// For example, a third party ad network called "CoolAds network" that is mediating requests to the +/// Mobile Ads SDK should set this property as "CoolAds". +@property(nonatomic, copy, GAD_NULLABLE) NSString *requestAgent; + +#pragma mark Deprecated Methods + +/// Provide the user's birthday to increase ad relevancy. +- (void)setBirthdayWithMonth:(NSInteger)month + day:(NSInteger)day + year:(NSInteger)year + GAD_DEPRECATED_MSG_ATTRIBUTE(" use the birthday property."); + +/// When Core Location isn't available but the user's location is known supplying it here may +/// deliver more relevant ads. It can be any free-form text such as @"Champs-Elysees Paris" or +/// @"94041 US". +- (void)setLocationWithDescription:(NSString *GAD_NULLABLE_TYPE)locationDescription + GAD_DEPRECATED_MSG_ATTRIBUTE(" use setLocationWithLatitude:longitude:accuracy:."); + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADRequestError.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADRequestError.h new file mode 100644 index 00000000..31175e49 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADRequestError.h @@ -0,0 +1,66 @@ +// +// GADRequestError.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import + +#import + +@class GADRequest; + +/// Google AdMob Ads error domain. +GAD_EXTERN NSString *const kGADErrorDomain; + +/// NSError codes for GAD error domain. +typedef NS_ENUM(NSInteger, GADErrorCode) { + /// The ad request is invalid. The localizedFailureReason error description will have more + /// details. Typically this is because the ad did not have the ad unit ID or root view + /// controller set. + kGADErrorInvalidRequest, + + /// The ad request was successful, but no ad was returned. + kGADErrorNoFill, + + /// There was an error loading data from the network. + kGADErrorNetworkError, + + /// The ad server experienced a failure processing the request. + kGADErrorServerError, + + /// The current device's OS is below the minimum required version. + kGADErrorOSVersionTooLow, + + /// The request was unable to be loaded before being timed out. + kGADErrorTimeout, + + /// Will not send request because the interstitial object has already been used. + kGADErrorInterstitialAlreadyUsed, + + /// The mediation response was invalid. + kGADErrorMediationDataError, + + /// Error finding or creating a mediation ad network adapter. + kGADErrorMediationAdapterError, + + /// The mediation request was successful, but no ad was returned from any ad networks. + kGADErrorMediationNoFill, + + /// Attempting to pass an invalid ad size to an adapter. + kGADErrorMediationInvalidAdSize, + + /// Internal error. + kGADErrorInternalError, + + /// Invalid argument error. + kGADErrorInvalidArgument, + + /// Received invalid response. + kGADErrorReceivedInvalidResponse +}; + +/// Represents the error generated due to invalid request parameters. +@interface GADRequestError : NSError +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAd.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAd.h new file mode 100644 index 00000000..1d1e7269 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAd.h @@ -0,0 +1,36 @@ +// +// GADRewardBasedVideoAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +@class GADRequest; + +@protocol GADRewardBasedVideoAdDelegate; + +/// The GADRewardBasedVideoAd class is used for requesting and presenting a reward based video ad. +/// This class isn't thread safe. +@interface GADRewardBasedVideoAd : NSObject + +/// Delegate for receiving video notifications. +@property(nonatomic, weak) id delegate; + +/// Indicates if the receiver is ready to be presented full screen. +@property(nonatomic, readonly, getter=isReady) BOOL ready; + +/// Returns the shared GADRewardBasedVideoAd instance. ++ (GADRewardBasedVideoAd *)sharedInstance; + +/// Initiates the request to fetch the reward based video ad. The |request| object supplies ad +/// targeting information and must not be nil. The adUnitID is the ad unit id used for fetching an +/// ad and must not be nil. +- (void)loadRequest:(GADRequest *)request withAdUnitID:(NSString *)adUnitID; + +/// Presents the reward based video ad with the provided view controller. +- (void)presentFromRootViewController:(UIViewController *)viewController; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAdDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAdDelegate.h new file mode 100644 index 00000000..48ee1153 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAdDelegate.h @@ -0,0 +1,41 @@ +// +// GADRewardBasedVideoAdDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import + +/// Delegate for receiving state change messages from a GADRewardBasedVideoAd such as ad requests +/// succeeding/failing. +@protocol GADRewardBasedVideoAdDelegate + +@optional + +/// Tells the delegate that the reward based video ad failed to load. +- (void)rewardBasedVideoAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd + didFailToLoadWithError:(NSError *)error; + +/// Tells the delegate that a reward based video ad was received. +- (void)rewardBasedVideoAdDidReceiveAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd; + +/// Tells the delegate that the reward based video ad opened. +- (void)rewardBasedVideoAdDidOpen:(GADRewardBasedVideoAd *)rewardBasedVideoAd; + +/// Tells the delegate that the reward based video ad started playing. +- (void)rewardBasedVideoAdDidStartPlaying:(GADRewardBasedVideoAd *)rewardBasedVideoAd; + +/// Tells the delegate that the reward based video ad closed. +- (void)rewardBasedVideoAdDidClose:(GADRewardBasedVideoAd *)rewardBasedVideoAd; + +/// Tells the delegate that the reward based video ad will leave the application. +- (void)rewardBasedVideoAdWillLeaveApplication:(GADRewardBasedVideoAd *)rewardBasedVideoAd; + +/// Tells the delegate that the reward based video ad has rewarded the user. +- (void)rewardBasedVideoAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd + didRewardUserWithReward:(GADAdReward *)reward; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADSearchBannerView.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADSearchBannerView.h new file mode 100644 index 00000000..f578d299 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADSearchBannerView.h @@ -0,0 +1,22 @@ +// +// GADSearchBannerView.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import +#import + +/// A view that displays search ads. +/// To show search ads: +/// 1) Create a GADSearchBannerView and add it to your view controller's view hierarchy. +/// 2) Create a GADSearchRequest ad request object to hold the search query and other search data. +/// 3) Call GADSearchBannerView's -loadRequest: method with the GADSearchRequest object. +@interface GADSearchBannerView : GADBannerView + +/// If the banner view is initialized with kGADAdSizeFluid and the corresponding request is created +/// with dynamic height parameters, this delegate will be called when the ad size changes. +@property(nonatomic, weak) IBOutlet id adSizeDelegate; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADSearchRequest.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADSearchRequest.h new file mode 100644 index 00000000..9ff23d4a --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADSearchRequest.h @@ -0,0 +1,57 @@ +// +// GADSearchRequest.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import +#import + +#import + +/// Search ad border types. +typedef NS_ENUM(NSUInteger, GADSearchBorderType) { + kGADSearchBorderTypeNone, + kGADSearchBorderTypeDashed, + kGADSearchBorderTypeDotted, + kGADSearchBorderTypeSolid +}; + +typedef NS_ENUM(NSUInteger, GADSearchCallButtonColor) { + kGADSearchCallButtonLight, + kGADSearchCallButtonMedium, + kGADSearchCallButtonDark +}; + +// Specifies parameters for search ads. +@interface GADSearchRequest : GADRequest + +@property(nonatomic, copy) NSString *query; +@property(nonatomic, copy, readonly) UIColor *backgroundColor; +@property(nonatomic, copy, readonly) UIColor *gradientFrom; +@property(nonatomic, copy, readonly) UIColor *gradientTo; +@property(nonatomic, copy) UIColor *headerColor; +@property(nonatomic, copy) UIColor *descriptionTextColor; +@property(nonatomic, copy) UIColor *anchorTextColor; +@property(nonatomic, copy) NSString *fontFamily; +@property(nonatomic, assign) NSUInteger headerTextSize; +@property(nonatomic, copy) UIColor *borderColor; +@property(nonatomic, assign) GADSearchBorderType borderType; +@property(nonatomic, assign) NSUInteger borderThickness; +@property(nonatomic, copy) NSString *customChannels; +@property(nonatomic, assign) GADSearchCallButtonColor callButtonColor; + +/// A solid background color for rendering the ad. The background of the ad +/// can either be a solid color, or a gradient, which can be specified through +/// setBackgroundGradientFrom:toColor: method. If both solid and gradient +/// background is requested, only the latter is considered. +- (void)setBackgroundSolid:(UIColor *)color; + +/// A linear gradient background color for rendering the ad. The background of +/// the ad can either be a linear gradient, or a solid color, which can be +/// specified through setBackgroundSolid method. If both solid and gradient +/// background is requested, only the latter is considered. +- (void)setBackgroundGradientFrom:(UIColor *)from toColor:(UIColor *)toColor; + +@end diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADVideoController.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADVideoController.h new file mode 100644 index 00000000..a3d3e66c --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADVideoController.h @@ -0,0 +1,35 @@ +// +// GADVideoController.h +// Google Mobile Ads SDK +// +// Copyright (c) 2016 Google Inc. All rights reserved. +// + +#import +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +@protocol GADVideoControllerDelegate; + +/// The video controller class provides a way to get the video metadata and also manages video +/// content of the ad rendered by the Google Mobile Ads SDK. You don't need to create an instance of +/// this class. When the ad rendered by the Google Mobile Ads SDK loads video content, you may be +/// able to get an instance of this class from the rendered ad object. Currently only native express +/// ad view class exposes video controller. +@interface GADVideoController : NSObject + +/// Delegate for receiving video notifications. +@property(nonatomic, weak, GAD_NULLABLE) id delegate; + +/// Returns a Boolean indicating if the receiver has video content. +- (BOOL)hasVideoContent; + +/// Returns the video's aspect ratio (width/height) or 0 if no video is present. +- (double)aspectRatio; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADVideoControllerDelegate.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADVideoControllerDelegate.h new file mode 100644 index 00000000..cd5c0487 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADVideoControllerDelegate.h @@ -0,0 +1,25 @@ +// +// GADVideoControllerDelegate.h +// Google Mobile Ads SDK +// +// Copyright (c) 2016 Google Inc. All rights reserved. +// + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// The GADVideoControllerDelegate protocol defines methods that are called by the video controller +/// object in response to the video events that occured throught the lifetime of the video rendered +/// by an ad. +@protocol GADVideoControllerDelegate + +@optional + +/// Tells the delegate that the video controller's video playback has ended. +- (void)videoControllerDidEndVideoPlayback:(GADVideoController *)videoController; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADVideoOptions.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADVideoOptions.h new file mode 100644 index 00000000..2f75a37d --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GADVideoOptions.h @@ -0,0 +1,21 @@ +// +// GADVideoOptions.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Video ad options. +@interface GADVideoOptions : GADAdLoaderOptions + +/// Indicates if videos should start muted. +@property(nonatomic, assign) BOOL startMuted; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAds.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAds.h new file mode 100644 index 00000000..6bf73e33 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAds.h @@ -0,0 +1,86 @@ +// +// GoogleMobileAds.h +// Google Mobile Ads SDK +// +// Copyright 2014 Google Inc. All rights reserved. + +#import +#import + +#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0 +#error The Google Mobile Ads SDK requires a deployment target of iOS 6.0 or later. +#endif + +//! Project version string for GoogleMobileAds. +FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; + +// Header files. +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import + +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import + +#import +#import +#import diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAdsDefines.h b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAdsDefines.h new file mode 100644 index 00000000..7d8bf87f --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAdsDefines.h @@ -0,0 +1,50 @@ +// +// GoogleMobileAdsDefines.h +// Google Mobile Ads SDK +// +// Copyright (c) 2015 Google Inc. All rights reserved. +// + +#import + +#if defined(__cplusplus) +#define GAD_EXTERN extern "C" __attribute__((visibility("default"))) +#else +#define GAD_EXTERN extern __attribute__((visibility("default"))) +#endif // defined(__cplusplus) + +#if defined(__has_feature) && defined(__has_attribute) +#if __has_feature(attribute_GAD_DEPRECATED_with_message) +#define GAD_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s))) +#elif __has_attribute(deprecated) +#define GAD_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated)) +#else +#define GAD_DEPRECATED_MSG_ATTRIBUTE(s) +#endif // __has_feature(attribute_GAD_DEPRECATED_with_message) +#if __has_attribute(deprecated) +#define GAD_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) +#else +#define GAD_DEPRECATED_ATTRIBUTE +#endif // __has_attribute(deprecated) +#else +#define GAD_DEPRECATED_ATTRIBUTE +#define GAD_DEPRECATED_MSG_ATTRIBUTE(s) +#endif // defined(__has_feature) && defined(__has_attribute) + +#ifndef IBInspectable +#define IBInspectable +#endif + +#if __has_feature(nullability) // Available starting in Xcode 6.3. +#define GAD_NULLABLE_TYPE __nullable +#define GAD_NONNULL_TYPE __nonnull +#define GAD_NULLABLE nullable +#define GAD_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN +#define GAD_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END +#else +#define GAD_NULLABLE_TYPE +#define GAD_NONNULL_TYPE +#define GAD_NULLABLE +#define GAD_ASSUME_NONNULL_BEGIN +#define GAD_ASSUME_NONNULL_END +#endif // __has_feature(nullability) diff --git a/Extension/lib/GoogleMobileAds.framework/Versions/Current b/Extension/lib/GoogleMobileAds.framework/Versions/Current new file mode 120000 index 00000000..8c7e5a66 --- /dev/null +++ b/Extension/lib/GoogleMobileAds.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Extension/lib/UnityAds.framework/Headers/UADSMediationMetaData.h b/Extension/lib/UnityAds.framework/Headers/UADSMediationMetaData.h new file mode 100644 index 00000000..5f49a285 --- /dev/null +++ b/Extension/lib/UnityAds.framework/Headers/UADSMediationMetaData.h @@ -0,0 +1,9 @@ +#import "UADSMetaData.h" + +@interface UADSMediationMetaData : UADSMetaData + +- (void)setName:(NSString *)mediationNetworkName; +- (void)setVersion:(NSString *)mediationSdkVersion; +- (void)setOrdinal:(int)mediationOrdinal; + +@end \ No newline at end of file diff --git a/Extension/lib/UnityAds.framework/Headers/UADSMetaData.h b/Extension/lib/UnityAds.framework/Headers/UADSMetaData.h new file mode 100644 index 00000000..791d3138 --- /dev/null +++ b/Extension/lib/UnityAds.framework/Headers/UADSMetaData.h @@ -0,0 +1,12 @@ + + +@interface UADSMetaData : NSObject + +@property (nonatomic, strong) NSString *category; +@property (nonatomic, strong) NSMutableDictionary *entries; + +- (instancetype)initWithCategory:(NSString *)category; +- (void)set:(NSString *)key value:(id)value; +- (void)commit; + +@end \ No newline at end of file diff --git a/Extension/lib/UnityAds.framework/Headers/UADSPlayerMetaData.h b/Extension/lib/UnityAds.framework/Headers/UADSPlayerMetaData.h new file mode 100644 index 00000000..5d0db483 --- /dev/null +++ b/Extension/lib/UnityAds.framework/Headers/UADSPlayerMetaData.h @@ -0,0 +1,7 @@ +#import "UADSMetaData.h" + +@interface UADSPlayerMetaData : UADSMetaData + +- (void)setServerId:(NSString *)serverId; + +@end \ No newline at end of file diff --git a/Extension/lib/UnityAds.framework/Headers/UnityAds.h b/Extension/lib/UnityAds.framework/Headers/UnityAds.h new file mode 100644 index 00000000..8e1ccfda --- /dev/null +++ b/Extension/lib/UnityAds.framework/Headers/UnityAds.h @@ -0,0 +1,255 @@ +#import + +#import +#import + +/** + * An enumerate that describes the state of `UnityAds` placements. + * @note All placement states, other than `kUnityAdsPlacementStateReady`, indicate that the placement is not currently ready to show ads. + */ +typedef NS_ENUM(NSInteger, UnityAdsPlacementState) { + /** + * A state that indicates that the placement is ready to show an ad. The `show:` selector can be called. + */ + kUnityAdsPlacementStateReady, + /** + * A state that indicates that no state is information is available. + * @warning This state can that UnityAds is not initialized or that the placement is not correctly configured in the Unity Ads admin tool. + */ + kUnityAdsPlacementStateNotAvailable, + /** + * A state that indicates that the placement is currently disabled. The placement can be enabled in the Unity Ads admin tools. + */ + kUnityAdsPlacementStateDisabled, + /** + * A state that indicates that the placement is not currently ready, but will be in the future. + * @note This state most likely indicates that the ad content is currently caching. + */ + kUnityAdsPlacementStateWaiting, + /** + * A state that indicates that the placement is properly configured, but there are currently no ads available for the placement. + */ + kUnityAdsPlacementStateNoFill +}; + +/** + * An enumeration for the completion state of an ad. + */ +typedef NS_ENUM(NSInteger, UnityAdsFinishState) { + /** + * A state that indicates that the ad did not successfully display. + */ + kUnityAdsFinishStateError, + /** + * A state that indicates that the user skipped the ad. + */ + kUnityAdsFinishStateSkipped, + /** + * A state that indicates that the ad was played entirely. + */ + kUnityAdsFinishStateCompleted +}; + +/** + * An enumeration for the various errors that can be emitted through the `UnityAdsDelegate` `unityAdsDidError:withMessage:` method. + */ +typedef NS_ENUM(NSInteger, UnityAdsError) { + /** + * An error that indicates failure due to `UnityAds` currently being uninitialized. + */ + kUnityAdsErrorNotInitialized = 0, + /** + * An error that indicates failure due to a failure in the initialization process. + */ + kUnityAdsErrorInitializedFailed, + /** + * An error that indicates failure due to attempting to initialize `UnityAds` with invalid parameters. + */ + kUnityAdsErrorInvalidArgument, + /** + * An error that indicates failure of the video player. + */ + kUnityAdsErrorVideoPlayerError, + /** + * An error that indicates failure due to having attempted to initialize the `UnityAds` class in an invalid environment. + */ + kUnityAdsErrorInitSanityCheckFail, + /** + * An error that indicates failure due to the presence of an ad blocker. + */ + kUnityAdsErrorAdBlockerDetected, + /** + * An error that indicates failure due to inability to read or write a file. + */ + kUnityAdsErrorFileIoError, + /** + * An error that indicates failure due to a bad device identifier. + */ + kUnityAdsErrorDeviceIdError, + /** + * An error that indicates a failure when attempting to show an ad. + */ + kUnityAdsErrorShowError, + /** + * An error that indicates an internal failure in `UnityAds`. + */ + kUnityAdsErrorInternalError, +}; + +/** + * The `UnityAdsDelegate` protocol defines the required methods for receiving messages from UnityAds. + * Must be implemented by the hosting app. + * The unityAdsReady: method is called when it's possible to show an ad. + * All other methods are used to provide notifications of events of the ad lifecycle. + * @note On initialization, there are ready (or error) callbacks for each placement attached to the game identifier. + */ +NS_ASSUME_NONNULL_BEGIN +@protocol UnityAdsDelegate +/** + * Called when `UnityAds` is ready to show an ad. After this callback you can call the `UnityAds` `show:` method for this placement. + * Note that sometimes placement might no longer be ready due to exceptional reasons. These situations will give no new callbacks. + * + * @warning To avoid error situations, it is always best to check `isReady` method status before calling show. + * @param placementId The ID of the placement that is ready to show, as defined in Unity Ads admin tools. + */ +- (void)unityAdsReady:(NSString *)placementId; +/** + * Called when `UnityAds` encounters an error. All errors will be logged but this method can be used as an additional debugging aid. This callback can also be used for collecting statistics from different error scenarios. + * + * @param error A `UnityAdsError` error enum value indicating the type of error encountered. + * @param message A human readable string indicating the type of error encountered. + */ +- (void)unityAdsDidError:(UnityAdsError)error withMessage:(NSString *)message; +/** + * Called on a successful start of advertisement after calling the `UnityAds` `show:` method. + * + * @warning If there are errors in starting the advertisement, this method may never be called. Unity Ads will directly call `unityAdsDidFinish:withFinishState:` with error status. + * + * @param placementId The ID of the placement that has started, as defined in Unity Ads admin tools. + */ +- (void)unityAdsDidStart:(NSString *)placementId; +/** + * Called after the ad has closed. + * + * @param placementId The ID of the placement that has finished, as defined in Unity Ads admin tools. + * @param state An enum value indicating the finish state of the ad. Possible values are `Completed`, `Skipped`, and `Error`. + */ +- (void)unityAdsDidFinish:(NSString *)placementId + withFinishState:(UnityAdsFinishState)state; +@end + +/** + * `UnityAds` is a static class with methods for preparing and showing ads. + * + * @warning In order to ensure expected behaviour, the delegate must always be set. + */ + +@interface UnityAds : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)initialize NS_UNAVAILABLE; + +/** + * Initializes UnityAds. UnityAds should be initialized when app starts. + * + * @param gameId Unique identifier for a game, given by Unity Ads admin tools or Unity editor. + * @param delegate delegate for UnityAdsDelegate callbacks + */ ++ (void)initialize:(NSString *)gameId + delegate:(nullable id)delegate; +/** + * Initializes UnityAds. UnityAds should be initialized when app starts. + * + * @param gameId Unique identifier for a game, given by Unity Ads admin tools or Unity editor. + * @param delegate delegate for UnityAdsDelegate callbacks + * @param testMode Set this flag to `YES` to indicate test mode and show only test ads. + */ ++ (void)initialize:(NSString *)gameId + delegate:(nullable id)delegate + testMode:(BOOL)testMode; +/** + * Show an ad using the defaul placement. + * + * @param viewController The `UIViewController` that is to present the ad view controller. + */ ++ (void)show:(UIViewController *)viewController; +/** + * Show an ad using the provided placement ID. + * + * @param viewController The `UIViewController` that is to present the ad view controller. + * @param placementId The placement ID, as defined in Unity Ads admin tools. + */ ++ (void)show:(UIViewController *)viewController placementId:(NSString *)placementId; +/** + * Provides the currently assigned `UnityAdsDelegate`. + * + * @return The current `UnityAdsDelegate`. + */ ++ (id)getDelegate; +/** + * Allows the delegate to be reassigned after UnityAds has already been initialized. + * + * @param delegate The new `UnityAdsDelegate' for UnityAds to send callbacks to. + */ ++ (void)setDelegate:(id)delegate; +/** + * Get the current debug status of `UnityAds`. + * + * @return If `YES`, `UnityAds` will provide verbose logs. + */ ++ (BOOL)getDebugMode; +/** + * Set the logging verbosity of `UnityAds`. Debug mode indicates verbose logging. + * @warning Does not relate to test mode for ad content. + * @param enableDebugMode `YES` for verbose logging. + */ ++ (void)setDebugMode:(BOOL)enableDebugMode; +/** + * Check to see if the current device supports using Unity Ads. + * + * @return If `NO`, the current device cannot initialize `UnityAds` or show ads. + */ ++ (BOOL)isSupported; +/** + * Check if the default placement is ready to show an ad. + * + * @return If `YES`, the default placement is ready to show an ad. + */ ++ (BOOL)isReady; +/** + * Check if a particular placement is ready to show an ad. + * + * @param placementId The placement ID being checked. + * + * @return If `YES`, the placement is ready to show an ad. + */ ++ (BOOL)isReady:(NSString *)placementId; +/** + * Check the current state of the default placement. + * + * @return If this is `kUnityAdsPlacementStateReady`, the placement is ready to show ads. Other states represent errors. + */ ++ (UnityAdsPlacementState)getPlacementState; +/** + * Check the current state of a placement. + * + * @param placementId The placement ID, as defined in Unity Ads admin tools. + * + * @return If this is `kUnityAdsPlacementStateReady`, the placement is ready to show ads. Other states represent errors. + */ ++ (UnityAdsPlacementState)getPlacementState:(NSString *)placementId; +/** + * Check the version of this `UnityAds` SDK + * + * @return String representing the current version name. + */ ++ (NSString *)getVersion; +/** + * Check that `UnityAds` has been initialized. This might be useful for debugging initialization problems. + * + * @return If `YES`, Unity Ads has been successfully initialized. + */ ++ (BOOL)isInitialized; + +@end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/Extension/lib/UnityAds.framework/Info.plist b/Extension/lib/UnityAds.framework/Info.plist new file mode 100644 index 00000000..31b03797 Binary files /dev/null and b/Extension/lib/UnityAds.framework/Info.plist differ diff --git a/Extension/lib/UnityAds.framework/Modules/module.modulemap b/Extension/lib/UnityAds.framework/Modules/module.modulemap new file mode 100644 index 00000000..932592c6 --- /dev/null +++ b/Extension/lib/UnityAds.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module UnityAds { + umbrella header "UnityAds.h" + + export * + module * { export * } +} diff --git a/Extension/lib/UnityAds.framework/UnityAds b/Extension/lib/UnityAds.framework/UnityAds new file mode 100644 index 00000000..012f0f9d Binary files /dev/null and b/Extension/lib/UnityAds.framework/UnityAds differ diff --git a/Extension/lib/VungleSDK.embeddedframework/Resources/Info.plist b/Extension/lib/VungleSDK.embeddedframework/Resources/Info.plist new file mode 100644 index 00000000..bf53c8f0 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/Resources/Info.plist differ diff --git a/Extension/lib/VungleSDK.embeddedframework/Resources/__vungle.db b/Extension/lib/VungleSDK.embeddedframework/Resources/__vungle.db new file mode 100644 index 00000000..f4a0d8fb Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/Resources/__vungle.db differ diff --git a/Extension/lib/VungleSDK.embeddedframework/Resources/vg_close.png b/Extension/lib/VungleSDK.embeddedframework/Resources/vg_close.png new file mode 100644 index 00000000..465275f9 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/Resources/vg_close.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/Resources/vg_cta.png b/Extension/lib/VungleSDK.embeddedframework/Resources/vg_cta.png new file mode 100644 index 00000000..ff62b1ff Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/Resources/vg_cta.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/Resources/vg_mute_off.png b/Extension/lib/VungleSDK.embeddedframework/Resources/vg_mute_off.png new file mode 100644 index 00000000..8000a501 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/Resources/vg_mute_off.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/Resources/vg_mute_on.png b/Extension/lib/VungleSDK.embeddedframework/Resources/vg_mute_on.png new file mode 100644 index 00000000..538428dd Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/Resources/vg_mute_on.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/Resources/vg_privacy.png b/Extension/lib/VungleSDK.embeddedframework/Resources/vg_privacy.png new file mode 100644 index 00000000..2016c154 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/Resources/vg_privacy.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Headers/VungleSDK.h b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Headers/VungleSDK.h new file mode 100644 index 00000000..d58c0bd0 --- /dev/null +++ b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Headers/VungleSDK.h @@ -0,0 +1,160 @@ +// +// VungleSDK.h +// Vungle iOS SDK +// +// Created by Rolando Abarca on 11/19/13. +// Copyright (c) 2013 Vungle Inc. All rights reserved. +// + +#import +#import + +@protocol VungleAssetLoader; + +extern NSString *VungleSDKVersion; +extern NSString *VunglePlayAdOptionKeyIncentivized; +extern NSString *VunglePlayAdOptionKeyIncentivizedAlertTitleText; +extern NSString *VunglePlayAdOptionKeyIncentivizedAlertBodyText; +extern NSString *VunglePlayAdOptionKeyIncentivizedAlertCloseButtonText; +extern NSString *VunglePlayAdOptionKeyIncentivizedAlertContinueButtonText; +extern NSString *VunglePlayAdOptionKeyOrientations; +extern NSString *VunglePlayAdOptionKeyUser; +extern NSString *VunglePlayAdOptionKeyPlacement; +extern NSString *VunglePlayAdOptionKeyExtraInfoDictionary; +extern NSString *VunglePlayAdOptionKeyExtra1; +extern NSString *VunglePlayAdOptionKeyExtra2; +extern NSString *VunglePlayAdOptionKeyExtra3; +extern NSString *VunglePlayAdOptionKeyExtra4; +extern NSString *VunglePlayAdOptionKeyExtra5; +extern NSString *VunglePlayAdOptionKeyExtra6; +extern NSString *VunglePlayAdOptionKeyExtra7; +extern NSString *VunglePlayAdOptionKeyExtra8; +extern NSString *VunglePlayAdOptionKeyLargeButtons; + +typedef enum { + VungleSDKErrorInvalidPlayAdOption = 1, + VungleSDKErrorInvalidPlayAdExtraKey, + VungleSDKErrorCannotPlayAd, + VungleSDKErrorNoAppID +} VungleSDKErrorCode; + +@protocol VungleSDKLogger +- (void)vungleSDKLog:(NSString *)message; +@end + +@class VungleSDK; + +@protocol VungleSDKDelegate +@optional +/** + * if implemented, this will get called when the SDK is about to show an ad. This point + * might be a good time to pause your game, and turn off any sound you might be playing. + */ +- (void)vungleSDKwillShowAd; + +/** + * if implemented, this will get called when the SDK closes the ad view, but there might be + * a product sheet that will be presented. This point might be a good place to resume your game + * if there's no product sheet being presented. The viewInfo dictionary will contain the + * following keys: + * - "completedView": NSNumber representing a BOOL whether or not the video can be considered a + * full view. + * - "playTime": NSNumber representing the time in seconds that the user watched the video. + * - "didDownload": NSNumber representing a BOOL whether or not the user clicked the download + * button. + * - "videoLength": **Deprecated** This will no longer be returned + */ +- (void)vungleSDKwillCloseAdWithViewInfo:(NSDictionary *)viewInfo willPresentProductSheet:(BOOL)willPresentProductSheet; + +/** + * if implemented, this will get called when the product sheet is about to be closed. + */ +- (void)vungleSDKwillCloseProductSheet:(id)productSheet; + +/** + * if implemented, this will get called when the SDK has an ad ready to be displayed. Also it will + * get called with an argument `NO` when for some reason, there's no ad available, for instance + * there is a corrupt ad or the OS wiped the cache. + * Please note that receiving a `NO` here does not mean that you can't play an Ad: if you haven't + * opted-out of our Exchange, you might be able to get a streaming ad if you call `play`. + */ +- (void)vungleSDKAdPlayableChanged:(BOOL)isAdPlayable; + +@end + +@interface VungleSDK : NSObject +@property (strong) NSDictionary *userData; +@property (strong) id delegate; +@property (strong) id assetLoader; +@property (assign) BOOL muted; + +/** + * Returns the singleton instance. + */ ++ (VungleSDK *)sharedSDK; + +/** + * Setup the SDK with an asset loader. This must be called before any call to shareSDK in order + * to properly set the asset loader. + */ ++ (VungleSDK *)setupSDKWithAssetLoader:(id)loader; + +/** + * Initializes the SDK. You can get your app id on Vungle's dashboard: https://v.vungle.com + */ +- (void)startWithAppId:(NSString *)appId; + +/** + * Will play an ad, presenting the view over the passed viewController as a modal. + * Return an error if there is one. + */ +- (BOOL)playAd:(UIViewController *)viewController error:(NSError **)error; + +/** + * Will play an ad, presenting the view over the passed viewController as a modal. + * Pass options to decide what type of ad to show. Return an error if there is one. + */ +- (BOOL)playAd:(UIViewController *)viewController withOptions:(id)options error:(NSError **)error; + +/** + * returns `YES` when there is certainty that an add will be able to play. Returning `NO`, you can + * still try to play and get a streaming Ad. + */ +- (BOOL)isAdPlayable; + +/** + * Returns debug info. + */ +- (NSDictionary *)debugInfo; + +/** + * by default, logging is off. + */ +- (void)setLoggingEnabled:(BOOL)enable; + +/** + * Log a new message. The message will be sent to all loggers. + */ +- (void)log:(NSString *)message, ...NS_FORMAT_FUNCTION(1, 2); + +/** + * Attach a new logger. It will get called on every log generated by Vungle (internally and externally). + */ +- (void)attachLogger:(id)logger; + +/** + * Detaches a logger. Make sure to do this, otherwise you might leak memory. + */ +- (void)detachLogger:(id)logger; + +/** + * This method is no-op and has been deprecated. Will be removed in a future version. + */ +- (void)clearCache __attribute__((deprecated)); + +/** + * this also only works on the simulator + */ +- (void)clearSleep; + +@end diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/Info.plist b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/Info.plist new file mode 100644 index 00000000..bf53c8f0 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/Info.plist differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/__vungle.db b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/__vungle.db new file mode 100644 index 00000000..f4a0d8fb Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/__vungle.db differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/vg_close.png b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/vg_close.png new file mode 100644 index 00000000..465275f9 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/vg_close.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/vg_cta.png b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/vg_cta.png new file mode 100644 index 00000000..ff62b1ff Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/vg_cta.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/vg_mute_off.png b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/vg_mute_off.png new file mode 100644 index 00000000..8000a501 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/vg_mute_off.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/vg_mute_on.png b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/vg_mute_on.png new file mode 100644 index 00000000..538428dd Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/vg_mute_on.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/vg_privacy.png b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/vg_privacy.png new file mode 100644 index 00000000..2016c154 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Resources/vg_privacy.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Headers/VungleSDK.h b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Headers/VungleSDK.h new file mode 100644 index 00000000..d58c0bd0 --- /dev/null +++ b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Headers/VungleSDK.h @@ -0,0 +1,160 @@ +// +// VungleSDK.h +// Vungle iOS SDK +// +// Created by Rolando Abarca on 11/19/13. +// Copyright (c) 2013 Vungle Inc. All rights reserved. +// + +#import +#import + +@protocol VungleAssetLoader; + +extern NSString *VungleSDKVersion; +extern NSString *VunglePlayAdOptionKeyIncentivized; +extern NSString *VunglePlayAdOptionKeyIncentivizedAlertTitleText; +extern NSString *VunglePlayAdOptionKeyIncentivizedAlertBodyText; +extern NSString *VunglePlayAdOptionKeyIncentivizedAlertCloseButtonText; +extern NSString *VunglePlayAdOptionKeyIncentivizedAlertContinueButtonText; +extern NSString *VunglePlayAdOptionKeyOrientations; +extern NSString *VunglePlayAdOptionKeyUser; +extern NSString *VunglePlayAdOptionKeyPlacement; +extern NSString *VunglePlayAdOptionKeyExtraInfoDictionary; +extern NSString *VunglePlayAdOptionKeyExtra1; +extern NSString *VunglePlayAdOptionKeyExtra2; +extern NSString *VunglePlayAdOptionKeyExtra3; +extern NSString *VunglePlayAdOptionKeyExtra4; +extern NSString *VunglePlayAdOptionKeyExtra5; +extern NSString *VunglePlayAdOptionKeyExtra6; +extern NSString *VunglePlayAdOptionKeyExtra7; +extern NSString *VunglePlayAdOptionKeyExtra8; +extern NSString *VunglePlayAdOptionKeyLargeButtons; + +typedef enum { + VungleSDKErrorInvalidPlayAdOption = 1, + VungleSDKErrorInvalidPlayAdExtraKey, + VungleSDKErrorCannotPlayAd, + VungleSDKErrorNoAppID +} VungleSDKErrorCode; + +@protocol VungleSDKLogger +- (void)vungleSDKLog:(NSString *)message; +@end + +@class VungleSDK; + +@protocol VungleSDKDelegate +@optional +/** + * if implemented, this will get called when the SDK is about to show an ad. This point + * might be a good time to pause your game, and turn off any sound you might be playing. + */ +- (void)vungleSDKwillShowAd; + +/** + * if implemented, this will get called when the SDK closes the ad view, but there might be + * a product sheet that will be presented. This point might be a good place to resume your game + * if there's no product sheet being presented. The viewInfo dictionary will contain the + * following keys: + * - "completedView": NSNumber representing a BOOL whether or not the video can be considered a + * full view. + * - "playTime": NSNumber representing the time in seconds that the user watched the video. + * - "didDownload": NSNumber representing a BOOL whether or not the user clicked the download + * button. + * - "videoLength": **Deprecated** This will no longer be returned + */ +- (void)vungleSDKwillCloseAdWithViewInfo:(NSDictionary *)viewInfo willPresentProductSheet:(BOOL)willPresentProductSheet; + +/** + * if implemented, this will get called when the product sheet is about to be closed. + */ +- (void)vungleSDKwillCloseProductSheet:(id)productSheet; + +/** + * if implemented, this will get called when the SDK has an ad ready to be displayed. Also it will + * get called with an argument `NO` when for some reason, there's no ad available, for instance + * there is a corrupt ad or the OS wiped the cache. + * Please note that receiving a `NO` here does not mean that you can't play an Ad: if you haven't + * opted-out of our Exchange, you might be able to get a streaming ad if you call `play`. + */ +- (void)vungleSDKAdPlayableChanged:(BOOL)isAdPlayable; + +@end + +@interface VungleSDK : NSObject +@property (strong) NSDictionary *userData; +@property (strong) id delegate; +@property (strong) id assetLoader; +@property (assign) BOOL muted; + +/** + * Returns the singleton instance. + */ ++ (VungleSDK *)sharedSDK; + +/** + * Setup the SDK with an asset loader. This must be called before any call to shareSDK in order + * to properly set the asset loader. + */ ++ (VungleSDK *)setupSDKWithAssetLoader:(id)loader; + +/** + * Initializes the SDK. You can get your app id on Vungle's dashboard: https://v.vungle.com + */ +- (void)startWithAppId:(NSString *)appId; + +/** + * Will play an ad, presenting the view over the passed viewController as a modal. + * Return an error if there is one. + */ +- (BOOL)playAd:(UIViewController *)viewController error:(NSError **)error; + +/** + * Will play an ad, presenting the view over the passed viewController as a modal. + * Pass options to decide what type of ad to show. Return an error if there is one. + */ +- (BOOL)playAd:(UIViewController *)viewController withOptions:(id)options error:(NSError **)error; + +/** + * returns `YES` when there is certainty that an add will be able to play. Returning `NO`, you can + * still try to play and get a streaming Ad. + */ +- (BOOL)isAdPlayable; + +/** + * Returns debug info. + */ +- (NSDictionary *)debugInfo; + +/** + * by default, logging is off. + */ +- (void)setLoggingEnabled:(BOOL)enable; + +/** + * Log a new message. The message will be sent to all loggers. + */ +- (void)log:(NSString *)message, ...NS_FORMAT_FUNCTION(1, 2); + +/** + * Attach a new logger. It will get called on every log generated by Vungle (internally and externally). + */ +- (void)attachLogger:(id)logger; + +/** + * Detaches a logger. Make sure to do this, otherwise you might leak memory. + */ +- (void)detachLogger:(id)logger; + +/** + * This method is no-op and has been deprecated. Will be removed in a future version. + */ +- (void)clearCache __attribute__((deprecated)); + +/** + * this also only works on the simulator + */ +- (void)clearSleep; + +@end diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/Info.plist b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/Info.plist new file mode 100644 index 00000000..bf53c8f0 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/Info.plist differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/__vungle.db b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/__vungle.db new file mode 100644 index 00000000..f4a0d8fb Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/__vungle.db differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/vg_close.png b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/vg_close.png new file mode 100644 index 00000000..465275f9 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/vg_close.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/vg_cta.png b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/vg_cta.png new file mode 100644 index 00000000..ff62b1ff Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/vg_cta.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/vg_mute_off.png b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/vg_mute_off.png new file mode 100644 index 00000000..8000a501 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/vg_mute_off.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/vg_mute_on.png b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/vg_mute_on.png new file mode 100644 index 00000000..538428dd Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/vg_mute_on.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/vg_privacy.png b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/vg_privacy.png new file mode 100644 index 00000000..2016c154 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/Resources/vg_privacy.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/VungleSDK b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/VungleSDK new file mode 100644 index 00000000..9ec01440 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/A/VungleSDK differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Headers/VungleSDK.h b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Headers/VungleSDK.h new file mode 100644 index 00000000..d58c0bd0 --- /dev/null +++ b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Headers/VungleSDK.h @@ -0,0 +1,160 @@ +// +// VungleSDK.h +// Vungle iOS SDK +// +// Created by Rolando Abarca on 11/19/13. +// Copyright (c) 2013 Vungle Inc. All rights reserved. +// + +#import +#import + +@protocol VungleAssetLoader; + +extern NSString *VungleSDKVersion; +extern NSString *VunglePlayAdOptionKeyIncentivized; +extern NSString *VunglePlayAdOptionKeyIncentivizedAlertTitleText; +extern NSString *VunglePlayAdOptionKeyIncentivizedAlertBodyText; +extern NSString *VunglePlayAdOptionKeyIncentivizedAlertCloseButtonText; +extern NSString *VunglePlayAdOptionKeyIncentivizedAlertContinueButtonText; +extern NSString *VunglePlayAdOptionKeyOrientations; +extern NSString *VunglePlayAdOptionKeyUser; +extern NSString *VunglePlayAdOptionKeyPlacement; +extern NSString *VunglePlayAdOptionKeyExtraInfoDictionary; +extern NSString *VunglePlayAdOptionKeyExtra1; +extern NSString *VunglePlayAdOptionKeyExtra2; +extern NSString *VunglePlayAdOptionKeyExtra3; +extern NSString *VunglePlayAdOptionKeyExtra4; +extern NSString *VunglePlayAdOptionKeyExtra5; +extern NSString *VunglePlayAdOptionKeyExtra6; +extern NSString *VunglePlayAdOptionKeyExtra7; +extern NSString *VunglePlayAdOptionKeyExtra8; +extern NSString *VunglePlayAdOptionKeyLargeButtons; + +typedef enum { + VungleSDKErrorInvalidPlayAdOption = 1, + VungleSDKErrorInvalidPlayAdExtraKey, + VungleSDKErrorCannotPlayAd, + VungleSDKErrorNoAppID +} VungleSDKErrorCode; + +@protocol VungleSDKLogger +- (void)vungleSDKLog:(NSString *)message; +@end + +@class VungleSDK; + +@protocol VungleSDKDelegate +@optional +/** + * if implemented, this will get called when the SDK is about to show an ad. This point + * might be a good time to pause your game, and turn off any sound you might be playing. + */ +- (void)vungleSDKwillShowAd; + +/** + * if implemented, this will get called when the SDK closes the ad view, but there might be + * a product sheet that will be presented. This point might be a good place to resume your game + * if there's no product sheet being presented. The viewInfo dictionary will contain the + * following keys: + * - "completedView": NSNumber representing a BOOL whether or not the video can be considered a + * full view. + * - "playTime": NSNumber representing the time in seconds that the user watched the video. + * - "didDownload": NSNumber representing a BOOL whether or not the user clicked the download + * button. + * - "videoLength": **Deprecated** This will no longer be returned + */ +- (void)vungleSDKwillCloseAdWithViewInfo:(NSDictionary *)viewInfo willPresentProductSheet:(BOOL)willPresentProductSheet; + +/** + * if implemented, this will get called when the product sheet is about to be closed. + */ +- (void)vungleSDKwillCloseProductSheet:(id)productSheet; + +/** + * if implemented, this will get called when the SDK has an ad ready to be displayed. Also it will + * get called with an argument `NO` when for some reason, there's no ad available, for instance + * there is a corrupt ad or the OS wiped the cache. + * Please note that receiving a `NO` here does not mean that you can't play an Ad: if you haven't + * opted-out of our Exchange, you might be able to get a streaming ad if you call `play`. + */ +- (void)vungleSDKAdPlayableChanged:(BOOL)isAdPlayable; + +@end + +@interface VungleSDK : NSObject +@property (strong) NSDictionary *userData; +@property (strong) id delegate; +@property (strong) id assetLoader; +@property (assign) BOOL muted; + +/** + * Returns the singleton instance. + */ ++ (VungleSDK *)sharedSDK; + +/** + * Setup the SDK with an asset loader. This must be called before any call to shareSDK in order + * to properly set the asset loader. + */ ++ (VungleSDK *)setupSDKWithAssetLoader:(id)loader; + +/** + * Initializes the SDK. You can get your app id on Vungle's dashboard: https://v.vungle.com + */ +- (void)startWithAppId:(NSString *)appId; + +/** + * Will play an ad, presenting the view over the passed viewController as a modal. + * Return an error if there is one. + */ +- (BOOL)playAd:(UIViewController *)viewController error:(NSError **)error; + +/** + * Will play an ad, presenting the view over the passed viewController as a modal. + * Pass options to decide what type of ad to show. Return an error if there is one. + */ +- (BOOL)playAd:(UIViewController *)viewController withOptions:(id)options error:(NSError **)error; + +/** + * returns `YES` when there is certainty that an add will be able to play. Returning `NO`, you can + * still try to play and get a streaming Ad. + */ +- (BOOL)isAdPlayable; + +/** + * Returns debug info. + */ +- (NSDictionary *)debugInfo; + +/** + * by default, logging is off. + */ +- (void)setLoggingEnabled:(BOOL)enable; + +/** + * Log a new message. The message will be sent to all loggers. + */ +- (void)log:(NSString *)message, ...NS_FORMAT_FUNCTION(1, 2); + +/** + * Attach a new logger. It will get called on every log generated by Vungle (internally and externally). + */ +- (void)attachLogger:(id)logger; + +/** + * Detaches a logger. Make sure to do this, otherwise you might leak memory. + */ +- (void)detachLogger:(id)logger; + +/** + * This method is no-op and has been deprecated. Will be removed in a future version. + */ +- (void)clearCache __attribute__((deprecated)); + +/** + * this also only works on the simulator + */ +- (void)clearSleep; + +@end diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/Info.plist b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/Info.plist new file mode 100644 index 00000000..bf53c8f0 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/Info.plist differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/__vungle.db b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/__vungle.db new file mode 100644 index 00000000..f4a0d8fb Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/__vungle.db differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/vg_close.png b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/vg_close.png new file mode 100644 index 00000000..465275f9 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/vg_close.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/vg_cta.png b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/vg_cta.png new file mode 100644 index 00000000..ff62b1ff Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/vg_cta.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/vg_mute_off.png b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/vg_mute_off.png new file mode 100644 index 00000000..8000a501 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/vg_mute_off.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/vg_mute_on.png b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/vg_mute_on.png new file mode 100644 index 00000000..538428dd Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/vg_mute_on.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/vg_privacy.png b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/vg_privacy.png new file mode 100644 index 00000000..2016c154 Binary files /dev/null and b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/Resources/vg_privacy.png differ diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/VungleSDK b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/VungleSDK new file mode 120000 index 00000000..00f83498 --- /dev/null +++ b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/Versions/Current/VungleSDK @@ -0,0 +1 @@ +../A/VungleSDK \ No newline at end of file diff --git a/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/VungleSDK b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/VungleSDK new file mode 120000 index 00000000..c83bb0e9 --- /dev/null +++ b/Extension/lib/VungleSDK.embeddedframework/VungleSDK.framework/VungleSDK @@ -0,0 +1 @@ +./Versions/A/VungleSDK \ No newline at end of file diff --git a/README.md b/README.md index fcf82e77..2fbde51d 100644 --- a/README.md +++ b/README.md @@ -6,47 +6,40 @@ More info & Documentation: http://impactjs.com/ejecta Ejecta is published under the [MIT Open Source License](http://opensource.org/licenses/mit-license.php). +--------------- + +The REAMDME of original Ejecta : . + +--------------- +# Features of this Fork version + + - Improve GameCenter + - Improve iOS `iAd` + - Support iOS `Social API` + - Support LocalNotification + - Support `AlertView` (non-block) + - Support `WebView` + - Encryption of Resource + - More Ad SDKs Integration: + - Chartboost + - Google AdMob + - Vungle + - UnityAds + - AdColony + - Some new API/Event/Attribute: + - `load` event of window + - `unload` event of window + - Some Utils ( see `EJBindingAppUtils.m`): + - get udid & uuid + - get system local (= preferredLanguages) + - get system version + - get app version ( = CFBundleShortVersionString) + - get app build ( = CFBundleVersion) + - check file exists (use `fileExists`) + - add "eval" function + - download file to local folder + - save image/canvas to local folder + - some functions about Font + - Improve Gamepad + - Minor improvements -## Recent Breaking Changes - - - - 2013-07-10 - All events now supply a proper `event` object to their callbacks. The `keypress` event for `EJBindingKeyInput` provides the char to callbacks as property of the event object: `input.onkeypress = function(event) { console.log(event.char); }` - - - 2013-04-15 - The GameCenter's `softAuthenticate` now calls the callback function with an error if the auth was skipped, instead of doing nothing. Also, `softAuthenticate` will now always try to auth when called for the very first time after installation. - - - 2013-03-15 - `canvas.scaleMode` was removed in favor of the `canvas.style` property. To scale and position your canvas independently from its internal resolution, use the style's `width`, `height`, `top` and `left` properties. I.e. to always scale to fullscreen: `canvas.style.width = window.innerWidth; canvas.style.height = window.innerHeight`. Appending `px` suffixes is ok. - - -## WebGL Support - -Recently WebGL support has been merged into the main branch. A huge thanks goes to @vikerman - he did most of the grunt work of the WebGL implementation. To have the WebGL alongside Canvas2D, I modified the old 2D implementation to use OpenGL ES2 instead of ES1, just like WebGL itself. - -Unlike with the Canvas2D, if you want to have a WebGL Canvas in retina resolution, you have to manually double the internal resiolution and shrink down the displayed size again through the `style`. I.e. - -```javascript -canvas.width = window.innerWidth * window.devicePixelRatio; -canvas.height = window.innerHeight * window.devicePixelRatio; -canvas.style.width = window.innerWidth + 'px'; -canvas.style.height = window.innerHeight + 'px'; -``` - - -## Three.js on iOS with Ejecta - -Ejecta always creates the screen Canvas element for you. You have to hand this Canvas element over to Three.js instead of letting it create its own. - -```javascript -renderer = new THREE.WebGLRenderer( {canvas: document.getElementById('canvas')} ); -``` - - -## How to use - -1. Create a folder called `App` within this XCode project -2. Copy your canvas application into the `App` folder -3. Ensure you have at least 1 file named `index.js` -4. Build the XCode project - -For an example application, copy `./index.js` into the `App` folder. An example App folder with the Three.js [Walt CubeMap demo](http://mrdoob.github.com/three.js/examples/webgl_materials_cubemap.html) can be found here: - -http://phoboslab.org/files/Ejecta-ThreeJS-CubeMap.zip diff --git a/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..12238454 --- /dev/null +++ b/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,78 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-60@2x.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "filename" : "Icon-60@3x.png", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-83.5@2x.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png b/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png new file mode 100644 index 00000000..b68de0de Binary files /dev/null and b/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png differ diff --git a/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png b/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png new file mode 100644 index 00000000..0ad02c02 Binary files /dev/null and b/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png differ diff --git a/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76.png b/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76.png new file mode 100644 index 00000000..9776c5a4 Binary files /dev/null and b/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76.png differ diff --git a/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png b/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png new file mode 100644 index 00000000..357f83a1 Binary files /dev/null and b/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png differ diff --git a/Resources/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/Resources/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png new file mode 100644 index 00000000..f41686aa Binary files /dev/null and b/Resources/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png differ diff --git a/Resources/Assets.xcassets/Contents.json b/Resources/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/Resources/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/Icon-60.png b/Resources/Icon-60.png deleted file mode 100644 index 7d493651..00000000 Binary files a/Resources/Icon-60.png and /dev/null differ diff --git a/Resources/Icon-60@2x.png b/Resources/Icon-60@2x.png deleted file mode 100644 index 0516c6b3..00000000 Binary files a/Resources/Icon-60@2x.png and /dev/null differ diff --git a/Resources/Icon-72.png b/Resources/Icon-72.png deleted file mode 100644 index f31b0426..00000000 Binary files a/Resources/Icon-72.png and /dev/null differ diff --git a/Resources/Icon-72@2x.png b/Resources/Icon-72@2x.png deleted file mode 100644 index d78677f9..00000000 Binary files a/Resources/Icon-72@2x.png and /dev/null differ diff --git a/Resources/Icon-76.png b/Resources/Icon-76.png deleted file mode 100644 index 516484e2..00000000 Binary files a/Resources/Icon-76.png and /dev/null differ diff --git a/Resources/Icon-76@2x.png b/Resources/Icon-76@2x.png deleted file mode 100644 index f4496d17..00000000 Binary files a/Resources/Icon-76@2x.png and /dev/null differ diff --git a/Resources/Icon@2x.png b/Resources/Icon@2x.png deleted file mode 100644 index 7386012f..00000000 Binary files a/Resources/Icon@2x.png and /dev/null differ diff --git a/Resources/Info.plist b/Resources/Info.plist index 7c9f9a5d..6d88ade0 100644 --- a/Resources/Info.plist +++ b/Resources/Info.plist @@ -4,57 +4,61 @@ CFBundleDevelopmentRegion English - CFBundleDisplayName - ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile CFBundleIcons - - CFBundlePrimaryIcon - - CFBundleIconFiles - - Icon.png - Icon@2x.png - Icon-60.png - Icon-60@2x.png - Icon-72.png - Icon-72@2x.png - Icon-76.png - Icon-76@2x.png - - - + CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL + CFBundleShortVersionString + 1.0 CFBundleSignature ???? CFBundleVersion - 1.0 + 1 + ITSAppUsesNonExemptEncryption + + LSApplicationQueriesSchemes + + LSHasLocalizedDisplayName + LSRequiresIPhoneOS - NSMainNibFile - MainWindow - NSMainNibFile~ipad - MainWindow - UIInterfaceOrientation - UIInterfaceOrientationPortrait + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + UIFileSharingEnabled + UILaunchStoryboardName LaunchScreen + UIRequiredDeviceCapabilities + + gamekit + + UIRequiresFullScreen + UIStatusBarHidden UISupportedInterfaceOrientations - + + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UISupportedInterfaceOrientations~ipad - + + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UIViewControllerBasedStatusBarAppearance diff --git a/Resources/ejecta-logo.png b/Resources/LaunchScreen-Logo.png similarity index 100% rename from Resources/ejecta-logo.png rename to Resources/LaunchScreen-Logo.png diff --git a/Resources/LaunchScreen.xib b/Resources/LaunchScreen.xib index 53d99125..b790b186 100644 --- a/Resources/LaunchScreen.xib +++ b/Resources/LaunchScreen.xib @@ -1,7 +1,8 @@ - + - + + @@ -10,7 +11,7 @@ - + @@ -18,7 +19,7 @@ - + @@ -29,6 +30,6 @@ - + diff --git a/Resources/MainWindow.xib b/Resources/MainWindow.xib deleted file mode 100644 index acdaf810..00000000 --- a/Resources/MainWindow.xib +++ /dev/null @@ -1,170 +0,0 @@ - - - - 1536 - 12C2034 - 2844 - 1187.34 - 625.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1930 - - - YES - IBProxyObject - IBUICustomObject - IBUIWindow - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - IBCocoaTouchFramework - - - - 1316 - - {320, 480} - - 3 - MAA - - NO - NO - IBCocoaTouchFramework - YES - - - - - YES - - - delegate - - - - 4 - - - - window - - - - 5 - - - - - YES - - 0 - - YES - - - - - - 2 - - - YES - - - - - -1 - - - File's Owner - - - 3 - - - - - -2 - - - - - - - YES - - YES - -1.CustomClassName - -1.IBPluginDependency - -2.CustomClassName - -2.IBPluginDependency - 2.IBAttributePlaceholdersKey - 2.IBPluginDependency - 3.CustomClassName - 3.IBPluginDependency - - - YES - UIApplication - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - YES - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - AppDelegate - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - - - - YES - - - - - 21 - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - 3 - 1930 - - diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..a40c83bc --- /dev/null +++ b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "tv", + "filename" : "Icon-Large-Back.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Icon-Large-Back.png b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Icon-Large-Back.png new file mode 100644 index 00000000..c67b52f6 Binary files /dev/null and b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Icon-Large-Back.png differ diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json new file mode 100644 index 00000000..cf8282aa --- /dev/null +++ b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json @@ -0,0 +1,14 @@ +{ + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..34a0434c --- /dev/null +++ b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "tv", + "filename" : "Icon-Large-Front.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Icon-Large-Front.png b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Icon-Large-Front.png new file mode 100644 index 00000000..c7eda5c2 Binary files /dev/null and b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Icon-Large-Front.png differ diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..e8d9bb1f --- /dev/null +++ b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "tv", + "filename" : "Icon-Back.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Icon-Back.png b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Icon-Back.png new file mode 100644 index 00000000..f28ff242 Binary files /dev/null and b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Icon-Back.png differ diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json new file mode 100644 index 00000000..8bf75d9f --- /dev/null +++ b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..942585bb --- /dev/null +++ b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "tv", + "filename" : "Icon-Front.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Icon-Front.png b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Icon-Front.png new file mode 100644 index 00000000..485aa1fa Binary files /dev/null and b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Icon-Front.png differ diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..bc95d1c5 --- /dev/null +++ b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "tv", + "filename" : "Icon-Middle.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Icon-Middle.png b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Icon-Middle.png new file mode 100644 index 00000000..d82c3cb9 Binary files /dev/null and b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Icon-Middle.png differ diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json new file mode 100644 index 00000000..21cebabe --- /dev/null +++ b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json @@ -0,0 +1,26 @@ +{ + "assets" : [ + { + "size" : "1280x768", + "idiom" : "tv", + "filename" : "App Icon - Large.imagestack", + "role" : "primary-app-icon" + }, + { + "size" : "400x240", + "idiom" : "tv", + "filename" : "App Icon - Small.imagestack", + "role" : "primary-app-icon" + }, + { + "size" : "1920x720", + "idiom" : "tv", + "filename" : "Top Shelf Image.imageset", + "role" : "top-shelf-image" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 00000000..dee5a626 --- /dev/null +++ b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "tv", + "filename" : "Top-Shelf.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Top-Shelf.png b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Top-Shelf.png new file mode 100644 index 00000000..ea63ff0f Binary files /dev/null and b/Resources/TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Top-Shelf.png differ diff --git a/Resources/TV/Assets.xcassets/Contents.json b/Resources/TV/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/Resources/TV/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/TV/Assets.xcassets/LaunchImage.launchimage/Contents.json b/Resources/TV/Assets.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 00000000..e54fff8d --- /dev/null +++ b/Resources/TV/Assets.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "orientation" : "landscape", + "idiom" : "tv", + "filename" : "LaunchScreen-TV.png", + "extent" : "full-screen", + "minimum-system-version" : "9.0", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Resources/TV/Assets.xcassets/LaunchImage.launchimage/LaunchScreen-TV.png b/Resources/TV/Assets.xcassets/LaunchImage.launchimage/LaunchScreen-TV.png new file mode 100644 index 00000000..e6ec4038 Binary files /dev/null and b/Resources/TV/Assets.xcassets/LaunchImage.launchimage/LaunchScreen-TV.png differ diff --git a/Resources/TV/Info.plist b/Resources/TV/Info.plist new file mode 100644 index 00000000..556d0d70 --- /dev/null +++ b/Resources/TV/Info.plist @@ -0,0 +1,75 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIcons + + CFBundleIcons~ipad + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + GCSupportedGameControllers + + + ProfileName + ExtendedGamepad + + + ProfileName + Gamepad + + + ProfileName + MicroGamepad + + + GCSupportsControllerUserInteraction + + ITSAppUsesNonExemptEncryption + + LSApplicationQueriesSchemes + + LSHasLocalizedDisplayName + + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + UIInterfaceOrientation + UIInterfaceOrientationPortrait + UIRequiredDeviceCapabilities + + arm64 + gamekit + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UISupportedInterfaceOrientations~ipad + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/Source/AppDelegate.h b/Source/AppDelegate.h index f5bbee1a..f44af98a 100644 --- a/Source/AppDelegate.h +++ b/Source/AppDelegate.h @@ -3,6 +3,6 @@ @interface AppDelegate : NSObject -@property (nonatomic, retain) IBOutlet UIWindow *window; +@property (nonatomic, retain) UIWindow *window; @end diff --git a/Source/AppDelegate.m b/Source/AppDelegate.m index 923b11b0..81faa62f 100644 --- a/Source/AppDelegate.m +++ b/Source/AppDelegate.m @@ -4,6 +4,11 @@ @implementation AppDelegate @synthesize window; + +#define EJECTA_SYSTEM_VERSION_LESS_THAN(v) \ +([UIDevice.currentDevice.systemVersion compare:v options:NSNumericSearch] == NSOrderedAscending) + + #pragma mark - #pragma mark Application lifecycle @@ -13,19 +18,19 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( // not being interacted with by touch. ie. games with motion control. application.idleTimerDisabled = YES; + window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds]; [self loadViewControllerWithScriptAtPath:@"index.js"]; + [window makeKeyAndVisible]; return YES; } - (void)loadViewControllerWithScriptAtPath:(NSString *)path { // Release any previous ViewController - window.frame = UIScreen.mainScreen.bounds; window.rootViewController = nil; EJAppViewController *vc = [[EJAppViewController alloc] initWithScriptAtPath:path]; window.rootViewController = vc; - [window makeKeyWindow]; [vc release]; } @@ -40,4 +45,34 @@ - (void)dealloc { } + +- (void)applicationDidBecomeActive:(UIApplication *)application { + #if !TARGET_OS_TV + [self setApplicationIconBadgeNumber:0]; + #endif +} + + +#if !TARGET_OS_TV +- (BOOL)checkNotificationType:(UIUserNotificationType)type { + UIUserNotificationSettings *currentSettings = [[UIApplication sharedApplication] currentUserNotificationSettings]; + + return (currentSettings.types & type); +} +#endif + +#if !TARGET_OS_TV +- (void)setApplicationIconBadgeNumber:(NSInteger)badgeNumber { + UIApplication *application = [UIApplication sharedApplication]; + + if ([self checkNotificationType:UIUserNotificationTypeBadge]) { +// NSLog(@"badge number changed to %d", badgeNumber); + application.applicationIconBadgeNumber = badgeNumber; + } else { +// NSLog(@"access denied for UIUserNotificationTypeBadge"); + } + +} +#endif + @end diff --git a/Source/Ejecta/EJAppViewController.h b/Source/Ejecta/EJAppViewController.h index 3bc3a76b..2eaf5156 100644 --- a/Source/Ejecta/EJAppViewController.h +++ b/Source/Ejecta/EJAppViewController.h @@ -1,7 +1,14 @@ +// Well, this is actually the place where most of the stuff from the +// EJJavaScriptView should happen, if we'd follow the Model-View-Controller +// (MVC) methodology. + +// Since the EJJavaScriptView is so tightly coupled to the JS execution and run +// loop, the View Controller here is mostly an empty shell that just +// instantiates a EJJavaScriptView, but does little else. + #import @interface EJAppViewController : UIViewController { - BOOL landscapeMode; NSString *path; } diff --git a/Source/Ejecta/EJAppViewController.m b/Source/Ejecta/EJAppViewController.m index 67a82e29..4eff51e0 100644 --- a/Source/Ejecta/EJAppViewController.m +++ b/Source/Ejecta/EJAppViewController.m @@ -8,14 +8,6 @@ @implementation EJAppViewController - (id)initWithScriptAtPath:(NSString *)pathp { if( self = [super init] ) { path = [pathp retain]; - if ([[NSBundle mainBundle] infoDictionary][@"UIInterfaceOrientation"]) - { - landscapeMode = [[[NSBundle mainBundle] infoDictionary][@"UIInterfaceOrientation"] hasPrefix:@"UIInterfaceOrientationLandscape"]; - } - else - { - landscapeMode = [[[NSBundle mainBundle] infoDictionary][@"UISupportedInterfaceOrientations"][0] hasPrefix:@"UIInterfaceOrientationLandscape"]; - } } return self; } @@ -33,12 +25,6 @@ - (void)didReceiveMemoryWarning { - (void)loadView { CGRect frame = UIScreen.mainScreen.bounds; - - // iOS pre 8.0 doesn't rotate the frame size in landscape mode, so we have to - // do it ourselfs - if( landscapeMode && EJECTA_SYSTEM_VERSION_LESS_THAN(@"8.0") ) { - frame.size = CGSizeMake(frame.size.height, frame.size.width); - } EJJavaScriptView *view = [[EJJavaScriptView alloc] initWithFrame:frame]; self.view = view; @@ -47,28 +33,4 @@ - (void)loadView { [view release]; } -- (NSUInteger)supportedInterfaceOrientations { - if( landscapeMode ) { - // Allow Landscape Left and Right - return UIInterfaceOrientationMaskLandscape; - } - else { - if( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ) { - // Allow Portrait UpsideDown on iPad - return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown; - } - else { - // Only Allow Portrait - return UIInterfaceOrientationMaskPortrait; - } - } -} - -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation { - // Deprecated in iOS6 - supportedInterfaceOrientations is the new way to do this - // We just use the mask returned by supportedInterfaceOrientations here to check if - // this particular orientation is allowed. - return ( self.supportedInterfaceOrientations & (1 << orientation) ); -} - @end diff --git a/Source/Ejecta/EJAudio/EJAudioSource.h b/Source/Ejecta/EJAudio/EJAudioSource.h index c30ed47f..e12eb92c 100644 --- a/Source/Ejecta/EJAudio/EJAudioSource.h +++ b/Source/Ejecta/EJAudio/EJAudioSource.h @@ -1,3 +1,6 @@ +// The protocol that all Audio Source types have to conform with in order to +// be used as the source for an EJBindingAudio element. + #import @protocol EJAudioSourceDelegate; diff --git a/Source/Ejecta/EJAudio/EJAudioSourceAVAudio.h b/Source/Ejecta/EJAudio/EJAudioSourceAVAudio.h index 22e2d229..764423c0 100644 --- a/Source/Ejecta/EJAudio/EJAudioSourceAVAudio.h +++ b/Source/Ejecta/EJAudio/EJAudioSourceAVAudio.h @@ -1,3 +1,12 @@ +// An Audio Source backed by the iOS native AVAudioPlayer. An instance of this +// class can be used as the source of a EJBindingAudio element. + +// AVAudioPlayer supports streaming from a file, so that this type of source +// does not need much memory. However, starting playback can have a bit of lag. + +// Typically, you want this type of Audio Source for music or background ambient +// sounds, but not for sound effects that need tight timing. + #import #import diff --git a/Source/Ejecta/EJAudio/EJAudioSourceAVAudio.m b/Source/Ejecta/EJAudio/EJAudioSourceAVAudio.m index ff65ab08..42da9e7a 100644 --- a/Source/Ejecta/EJAudio/EJAudioSourceAVAudio.m +++ b/Source/Ejecta/EJAudio/EJAudioSourceAVAudio.m @@ -1,5 +1,5 @@ #import "EJAudioSourceAVAudio.h" - +#import "EJJavaScriptView.h" @implementation EJAudioSourceAVAudio @@ -8,7 +8,8 @@ @implementation EJAudioSourceAVAudio - (id)initWithPath:(NSString *)pathp { if( self = [super init] ) { path = [pathp retain]; - player = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:nil]; + NSMutableData *data = [EJJavaScriptView loadMutableDataFromURL:path]; + player = [[AVAudioPlayer alloc] initWithData:data error:nil]; player.delegate = self; } return self; diff --git a/Source/Ejecta/EJAudio/EJAudioSourceOpenAL.h b/Source/Ejecta/EJAudio/EJAudioSourceOpenAL.h index e9c7793c..a1ab98b2 100644 --- a/Source/Ejecta/EJAudio/EJAudioSourceOpenAL.h +++ b/Source/Ejecta/EJAudio/EJAudioSourceOpenAL.h @@ -1,3 +1,9 @@ +// An Audio Source backed by OpenAL. Several instances of AudioSourceOpenAL +// may share the same underlying OpenALBuffer instance. + +// OpenAL sources are loaded fully into memory but provide lower latency +// and "rapid fire" playback in contrast to AVAudio sources. + #import #import diff --git a/Source/Ejecta/EJAudio/EJBindingAudio.h b/Source/Ejecta/EJAudio/EJBindingAudio.h index b93304b7..f937cd87 100644 --- a/Source/Ejecta/EJAudio/EJBindingAudio.h +++ b/Source/Ejecta/EJAudio/EJBindingAudio.h @@ -1,3 +1,6 @@ +// This provides an