├── .gitignore ├── Gruntfile.js ├── LICENSE.txt ├── README.md ├── bower.json ├── config.xml ├── config ├── config.base.json ├── config.dev.json └── config.prod.json ├── contributors.txt ├── hooks ├── README.md └── after_prepare │ ├── copy_assets.js │ └── inject_cordova.js ├── package.json ├── plugins ├── android.json ├── com.brodysoft.sqlitePlugin │ ├── AUTHORS.md │ ├── CHANGES.md │ ├── LICENSE.md │ ├── Lawnchair-adapter │ │ ├── Lawnchair-sqlitePlugin.js │ │ └── test-www │ │ │ ├── Lawnchair-sqlitePlugin.js │ │ │ ├── index.html │ │ │ ├── lawnchair-spec.js │ │ │ └── lib │ │ │ ├── json2.js │ │ │ ├── lawnchair.js │ │ │ ├── qunit.css │ │ │ └── qunit.js │ ├── README.md │ ├── SQLitePlugin.coffee.md │ ├── bin │ │ ├── test.ps1 │ │ └── test.sh │ ├── plugin.xml │ ├── src │ │ ├── android │ │ │ └── org │ │ │ │ └── pgsqlite │ │ │ │ └── SQLitePlugin.java │ │ ├── ios │ │ │ ├── SQLitePlugin.h │ │ │ └── SQLitePlugin.m │ │ └── wp │ │ │ ├── SQLite.cs │ │ │ ├── SQLitePlugin.cs │ │ │ └── csharp-sqlite-src │ │ │ ├── BtreeInt_h.cs │ │ │ ├── Btree_h.cs │ │ │ ├── Delegates.cs │ │ │ ├── Hash_h.cs │ │ │ ├── VdbeInt_h.cs │ │ │ ├── Vdbe_h.cs │ │ │ ├── _Custom.cs │ │ │ ├── alter_c.cs │ │ │ ├── analyze_c.cs │ │ │ ├── attach_c.cs │ │ │ ├── auth_c.cs │ │ │ ├── backup_c.cs │ │ │ ├── bitvec_c.cs │ │ │ ├── btmutex_c.cs │ │ │ ├── btree_c.cs │ │ │ ├── build_c.cs │ │ │ ├── callback_c.cs │ │ │ ├── complete_c.cs │ │ │ ├── crypto.cs │ │ │ ├── ctime_c.cs │ │ │ ├── date_c.cs │ │ │ ├── delete_c.cs │ │ │ ├── expr_c.cs │ │ │ ├── fault_c.cs │ │ │ ├── fkey_c.cs │ │ │ ├── func_c.cs │ │ │ ├── global_c.cs │ │ │ ├── hash_c.cs │ │ │ ├── hwtime_c.cs │ │ │ ├── insert_c.cs │ │ │ ├── journal_c.cs │ │ │ ├── keywordhash_h.cs │ │ │ ├── legacy_c.cs │ │ │ ├── loadext_c.cs │ │ │ ├── main_c.cs │ │ │ ├── malloc_c.cs │ │ │ ├── mem_Pool.cs │ │ │ ├── memjournal_c.cs │ │ │ ├── mutex_h.cs │ │ │ ├── mutex_noop_c.cs │ │ │ ├── notify_c.cs │ │ │ ├── opcodes_c.cs │ │ │ ├── opcodes_h.cs │ │ │ ├── os_c.cs │ │ │ ├── os_common_h.cs │ │ │ ├── os_h.cs │ │ │ ├── os_win_c.cs │ │ │ ├── pager_c.cs │ │ │ ├── pager_h.cs │ │ │ ├── parse_c.cs │ │ │ ├── parse_h.cs │ │ │ ├── pcache1_c.cs │ │ │ ├── pcache_c.cs │ │ │ ├── pcache_h.cs │ │ │ ├── pragma_c.cs │ │ │ ├── prepare_c.cs │ │ │ ├── printf_c.cs │ │ │ ├── random_c.cs │ │ │ ├── resolve_c.cs │ │ │ ├── rowset_c.cs │ │ │ ├── select_c.cs │ │ │ ├── sqlite3_h.cs │ │ │ ├── sqliteInt_h.cs │ │ │ ├── sqliteLimit_h.cs │ │ │ ├── status_c.cs │ │ │ ├── table_c.cs │ │ │ ├── tokenize_c.cs │ │ │ ├── trigger_c.cs │ │ │ ├── update_c.cs │ │ │ ├── utf_c.cs │ │ │ ├── util_c.cs │ │ │ ├── vacuum_c.cs │ │ │ ├── vdbe_c.cs │ │ │ ├── vdbeapi_c.cs │ │ │ ├── vdbeaux_c.cs │ │ │ ├── vdbeblob_c.cs │ │ │ ├── vdbemem_c.cs │ │ │ ├── vdbetrace_c.cs │ │ │ ├── vtab_c.cs │ │ │ ├── wal_c.cs │ │ │ ├── wal_h.cs │ │ │ ├── walker_c.cs │ │ │ └── where_c.cs │ ├── test-www │ │ ├── .cordova │ │ │ └── config.json │ │ ├── config.xml │ │ ├── platforms │ │ │ └── .gitignore │ │ ├── plugins │ │ │ └── .gitignore │ │ └── www │ │ │ ├── index.html │ │ │ ├── qunit-1.5.0.css │ │ │ └── qunit-1.5.0.js │ └── www │ │ └── SQLitePlugin.js ├── com.cmackay.plugins.googleanalytics │ ├── LICENSE │ ├── README.md │ ├── android │ │ ├── GoogleAnalyticsPlugin.java │ │ └── version.xml │ ├── ios │ │ ├── GAI.h │ │ ├── GAIDictionaryBuilder.h │ │ ├── GAIEcommerceFields.h │ │ ├── GAIEcommerceProduct.h │ │ ├── GAIEcommerceProductAction.h │ │ ├── GAIEcommercePromotion.h │ │ ├── GAIFields.h │ │ ├── GAILogger.h │ │ ├── GAITrackedViewController.h │ │ ├── GAITracker.h │ │ ├── GoogleAnalyticsPlugin.h │ │ ├── GoogleAnalyticsPlugin.m │ │ └── libGoogleAnalyticsServices.a │ ├── package.json │ ├── plugin.xml │ ├── prefix.md │ └── www │ │ └── analytics.js ├── cordova-plugin-admobpro │ ├── LICENSE │ ├── README.md │ ├── docs │ │ ├── README.md │ │ ├── README.zh_cn.md │ │ ├── android.jpg │ │ ├── android_interstitial.jpg │ │ ├── iphone.jpg │ │ ├── iphone_interstitial.jpg │ │ ├── stat_ref.png │ │ ├── trend.png │ │ ├── youtube_video.jpg │ │ └── youtube_video0.jpg │ ├── package.json │ ├── plugin.xml │ ├── src │ │ ├── android │ │ │ ├── AdMobMediation.java │ │ │ └── AdMobPlugin.java │ │ ├── ios │ │ │ ├── AdMobMediation.h │ │ │ ├── AdMobMediation.m │ │ │ ├── CDVAdMobPlugin.h │ │ │ ├── CDVAdMobPlugin.m │ │ │ └── GoogleMobileAds.framework │ │ │ │ ├── GoogleMobileAds │ │ │ │ ├── Headers │ │ │ │ ├── DFPBannerView.h │ │ │ │ ├── DFPCustomRenderedAd.h │ │ │ │ ├── DFPCustomRenderedBannerViewDelegate.h │ │ │ │ ├── DFPCustomRenderedInterstitialDelegate.h │ │ │ │ ├── DFPInterstitial.h │ │ │ │ ├── DFPRequest.h │ │ │ │ ├── GADAdLoader.h │ │ │ │ ├── GADAdLoaderAdTypes.h │ │ │ │ ├── GADAdLoaderDelegate.h │ │ │ │ ├── GADAdNetworkExtras.h │ │ │ │ ├── GADAdReward.h │ │ │ │ ├── GADAdSize.h │ │ │ │ ├── GADAdSizeDelegate.h │ │ │ │ ├── GADAppEventDelegate.h │ │ │ │ ├── GADBannerView.h │ │ │ │ ├── GADBannerViewDelegate.h │ │ │ │ ├── GADCorrelator.h │ │ │ │ ├── GADCorrelatorAdLoaderOptions.h │ │ │ │ ├── GADCustomEventBanner.h │ │ │ │ ├── GADCustomEventBannerDelegate.h │ │ │ │ ├── GADCustomEventExtras.h │ │ │ │ ├── GADCustomEventInterstitial.h │ │ │ │ ├── GADCustomEventInterstitialDelegate.h │ │ │ │ ├── GADCustomEventNativeAd.h │ │ │ │ ├── GADCustomEventNativeAdDelegate.h │ │ │ │ ├── GADCustomEventRequest.h │ │ │ │ ├── GADExtras.h │ │ │ │ ├── GADInAppPurchase.h │ │ │ │ ├── GADInAppPurchaseDelegate.h │ │ │ │ ├── GADInterstitial.h │ │ │ │ ├── GADInterstitialDelegate.h │ │ │ │ ├── GADMediatedNativeAd.h │ │ │ │ ├── GADMediatedNativeAdDelegate.h │ │ │ │ ├── GADMediatedNativeAdNotificationSource.h │ │ │ │ ├── GADMediatedNativeAppInstallAd.h │ │ │ │ ├── GADMediatedNativeContentAd.h │ │ │ │ ├── GADMobileAds.h │ │ │ │ ├── GADNativeAd.h │ │ │ │ ├── GADNativeAdDelegate.h │ │ │ │ ├── GADNativeAdImage+Mediation.h │ │ │ │ ├── GADNativeAdImage.h │ │ │ │ ├── GADNativeAdImageAdLoaderOptions.h │ │ │ │ ├── GADNativeAppInstallAd.h │ │ │ │ ├── GADNativeContentAd.h │ │ │ │ ├── GADNativeCustomTemplateAd.h │ │ │ │ ├── GADRequest.h │ │ │ │ ├── GADRequestError.h │ │ │ │ ├── GADRewardBasedVideoAd.h │ │ │ │ ├── GADRewardBasedVideoAdDelegate.h │ │ │ │ ├── GADSearchBannerView.h │ │ │ │ ├── GADSearchRequest.h │ │ │ │ ├── GoogleMobileAds.h │ │ │ │ └── GoogleMobileAdsDefines.h │ │ │ │ └── Modules │ │ │ │ └── module.modulemap │ │ └── wp8 │ │ │ ├── AdMobOptions.cs │ │ │ ├── AdMobPlugin.cs │ │ │ ├── GoogleAds.XML │ │ │ └── GoogleAds.dll │ ├── test │ │ ├── admob_simple.js │ │ └── index.html │ └── www │ │ └── AdMob.js ├── cordova-plugin-extension │ ├── README.md │ ├── cocos2dx │ │ └── TODO │ ├── package.json │ ├── plugin.xml │ ├── src │ │ ├── android │ │ │ ├── CordovaPluginExt.java │ │ │ ├── PluginAdapterDelegate.java │ │ │ └── cordova-generic-ad.jar │ │ └── ios │ │ │ ├── CDVPluginExt.h │ │ │ ├── CDVPluginExt.m │ │ │ ├── GenericAdPlugin.h │ │ │ ├── PluginAdapterDelegate.h │ │ │ └── libCordovaGenericAd.a │ └── unity │ │ ├── PluginAdapterUnity.h │ │ ├── PluginAdapterUnity.java │ │ └── PluginAdapterUnity.m ├── fetch.json └── org.apache.cordova.device │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── RELEASENOTES.md │ ├── doc │ ├── de │ │ └── index.md │ ├── es │ │ └── index.md │ ├── fr │ │ └── index.md │ ├── index.md │ ├── it │ │ └── index.md │ ├── ja │ │ └── index.md │ ├── ko │ │ └── index.md │ ├── pl │ │ └── index.md │ ├── ru │ │ └── index.md │ └── zh │ │ └── index.md │ ├── package.json │ ├── plugin.xml │ ├── src │ ├── android │ │ └── Device.java │ ├── blackberry10 │ │ └── index.js │ ├── browser │ │ └── DeviceProxy.js │ ├── firefoxos │ │ └── DeviceProxy.js │ ├── ios │ │ ├── CDVDevice.h │ │ └── CDVDevice.m │ ├── tizen │ │ └── DeviceProxy.js │ ├── ubuntu │ │ ├── device.cpp │ │ ├── device.h │ │ └── device.js │ ├── windows │ │ └── DeviceProxy.js │ ├── windows8 │ │ └── DeviceProxy.js │ └── wp │ │ └── Device.cs │ ├── tests │ ├── plugin.xml │ └── tests.js │ └── www │ └── device.js ├── res ├── iTunesArtwork@2x.png ├── icon │ ├── android │ │ ├── icon-36-ldpi.png │ │ ├── icon-48-mdpi.png │ │ ├── icon-72-hdpi.png │ │ └── icon-96-xhdpi.png │ ├── bada-wac │ │ ├── icon-48-type5.png │ │ ├── icon-50-type3.png │ │ └── icon-80-type4.png │ ├── bada │ │ └── icon-128.png │ ├── blackberry │ │ └── icon-80.png │ ├── ios │ │ ├── icon-40.png │ │ ├── icon-40@2x.png │ │ ├── icon-40@3x.png │ │ ├── icon-50.png │ │ ├── icon-50@2x.png │ │ ├── icon-60.png │ │ ├── icon-60@2x.png │ │ ├── icon-60@3x.png │ │ ├── icon-72.png │ │ ├── icon-72@2x.png │ │ ├── icon-76.png │ │ ├── icon-76@2x.png │ │ ├── icon-small.png │ │ ├── icon-small@2x.png │ │ ├── icon-small@3x.png │ │ ├── icon.png │ │ └── icon@2x.png │ ├── tizen │ │ └── icon-128.png │ ├── webos │ │ └── icon-64.png │ └── windows-phone │ │ ├── icon-173-tile.png │ │ ├── icon-48.png │ │ └── icon-62-tile.png └── screen │ ├── android │ ├── screen-hdpi-landscape.png │ ├── screen-hdpi-portrait.png │ ├── screen-ldpi-landscape.png │ ├── screen-ldpi-portrait.png │ ├── screen-mdpi-landscape.png │ ├── screen-mdpi-portrait.png │ ├── screen-xhdpi-landscape.png │ └── screen-xhdpi-portrait.png │ ├── bada-wac │ ├── screen-type3.png │ ├── screen-type4.png │ └── screen-type5.png │ ├── bada │ └── screen-portrait.png │ ├── blackberry │ └── screen-225.png │ ├── ios │ ├── Default-667h.png │ ├── Default-736h.png │ ├── Default-Landscape-736h.png │ ├── ipad1x-portrait.png │ ├── ipad1x.png │ ├── ipad2x-portrait.png │ ├── ipad2x.png │ ├── iphone6@2x.png │ ├── iphone6plus-portrait@3x.png │ ├── iphone6plus@3x.png │ ├── screen-iphone-portrait-2x.png │ ├── screen-iphone-portrait.png │ └── screen-iphone5-2x.png │ ├── tizen │ └── README.md │ ├── webos │ └── screen-64.png │ └── windows-phone │ └── screen-portrait.jpg ├── sass ├── _common.scss ├── _fonts.scss ├── _game.scss ├── _home.scss ├── _layout.scss ├── _variables.scss └── index.scss ├── solutions ├── combinations.js └── combinations.scala ├── tasks.txt └── www ├── desktopHeaderInclude.html ├── fonts ├── DeusEx.ttf ├── Ubuntu-B.ttf └── Ubuntu-R.ttf ├── icon.png ├── images ├── download-istore.svg └── get-google-play.png ├── index.html ├── js ├── analytics.js ├── app.js ├── bootstrap.js ├── config.js ├── data.js ├── game.js ├── helper.js ├── home.js ├── levelsList.js ├── monetize.js ├── storage │ ├── localstorage.js │ └── sqlite.js └── util.js └── views ├── game ├── game.html ├── nextLevelModal.html └── startGameTutorial.html └── home ├── about.html ├── exitInterstitial.html ├── help.html ├── homeAvailableIcons.html ├── levels.html └── menu.html /.gitignore: -------------------------------------------------------------------------------- 1 | app/my-release-key.keystore 2 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2016 Akvemus GSC 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Digit Square puzzle game 2 | Hybrid mobile application (puzzle game) developed using Cordova/Phonegap, AngularJS. 3 | 4 | 5 | 6 | [LIVE DEMO](http://digitsquare.akveo.com/) 7 | 8 | ## Setup 9 | 1. Install node and bower dependencies: `npm install` 10 | 2. Build configs, styles etc.: `grunt buildAssets` 11 | 3. Add some platform, for example iOS: `cordova platform add ios` 12 | 4. Either open the project in the xCode or type `cordova run ios` 13 | 5. We used cordova 5.4.0, if you have older version try updating it `npm install -g cordova` (may require sudo) 14 | 15 | ## Features 16 | #### Gameplay 17 | * 100 different levels. (If you think the first 20 is too easy, yeah it's true. Go straight to the 4-th and 5-th chapter and let's see how long would it take for you to finish them :) ). 18 | * Neat UI 19 | * Responsive design 20 | * Autosave feature 21 | 22 | I didn't add bootstrap, because I think it's overwhelming for such small project 23 | 24 | #### Technical stuff 25 | * AngularJS 26 | * Cordova/Phonegap 27 | * Sass 28 | * RequireJS 29 | * Google analytics integrated 30 | * Admob integrated 31 | * Sqlite storage for mobiles and localstorage for desktop 32 | * Hardware accelerated CSS3 animations 33 | * Nice levels gallery with swipe support 34 | * Ability to use generated configs 35 | 36 | ##Try digitsquare 37 | Application is live. You can download it from marketplaces: 38 | * [Apple store](https://itunes.apple.com/us/app/digit-square-puzzle-game/id959622726) 39 | * [Android market](https://play.google.com/store/apps/details?id=com.flatlogic.digitsquare) 40 | * Windows 8 - TBD 41 | * [Desktop version](http://digitsquare.akveo.com/) 42 | 43 | 44 | Please refer to [Apache Cordova documentation](http://cordova.apache.org/docs/en/4.0.0/) for additional info. 45 | 46 | ## License 47 | [MIT](/LICENSE.txt) 48 | 49 | ## From akveo 50 | For any additional information as well as with any suggestions or offers please refer to [Akveo homepage](http://akveo.com) 51 | 52 | Enjoy! 53 | 54 | Made with ♥ by [Akveo team](http://akveo.com/). 55 | 56 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "digitsquare", 3 | "version": "0.0.1", 4 | "main": "index.html", 5 | "ignore": [ 6 | ".jshintrc", 7 | "**/*.txt" 8 | ], 9 | "dependencies": { 10 | "angular": "~1.3.14", 11 | "requirejs": "~2.1.14", 12 | "normalize-scss": "~3.0.1", 13 | "angular-touch": "~1.3.14", 14 | "localstorage-schema": "~0.0.2", 15 | "elusive-iconfont": "*", 16 | "fontawesome": "~4.2.0", 17 | "angular-swipe-element": "~0.0.2", 18 | "angular-ui-router": "~0.2.13" 19 | }, 20 | "exportsOverride": { 21 | "angular": { 22 | "js": "angular.js" 23 | }, 24 | "angular-touch": { 25 | "js": "angular-touch.js" 26 | }, 27 | "angular-ui-router": { 28 | "js": "release/angular-ui-router.js" 29 | }, 30 | "angular-swipe-element": { 31 | "js": "angular-swipe-element.js" 32 | }, 33 | "requirejs": { 34 | "js": "require.js" 35 | }, 36 | "localstorage-schema": { 37 | "js": "localstorage-schema.js" 38 | }, 39 | "normalize-scss": {}, 40 | "elusive-iconfont": { 41 | "../fonts": "fonts/*" 42 | }, 43 | "fontawesome": { 44 | "../fonts": "fonts/*" 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /config/config.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "ads": { 3 | "enabled": true, 4 | "units": { 5 | "ios": { 6 | "banner": "ca-app-pub-4675194603106574/1411325040", 7 | "interstitial": "ca-app-pub-4675194603106574/1575788641" 8 | }, 9 | "android": { 10 | "banner": "ca-app-pub-4675194603106574/6522522247", 11 | "interstitial": "ca-app-pub-4675194603106574/9099055449" 12 | }, 13 | "wp8": { 14 | "banner": "ca-app-pub-xxx/9375997559", 15 | "interstitial": "ca-app-pub-xxx/9099055449" 16 | } 17 | }, 18 | "isTesting": false, 19 | "showBanner": false, 20 | "timeouts": { 21 | "interstitialRequestTimeout": 10000, 22 | "delayBetweenInterstitials": 150000 23 | } 24 | }, 25 | "analytics": { 26 | "enabled": true, 27 | "gaId": { 28 | "ios": "UA-56704032-2", 29 | "android": "UA-56704032-3", 30 | "wp8": "UA-56704032-4", 31 | "desktop": "UA-56704032-2" 32 | } 33 | }, 34 | "db": { 35 | "name": "DigitSquare.db" 36 | } 37 | } -------------------------------------------------------------------------------- /config/config.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "ads": { 3 | "isTesting": true 4 | } 5 | } -------------------------------------------------------------------------------- /config/config.prod.json: -------------------------------------------------------------------------------- 1 | { 2 | "ads": { 3 | "enabled": false 4 | } 5 | } -------------------------------------------------------------------------------- /contributors.txt: -------------------------------------------------------------------------------- 1 | Vladimir Lugovsky 2 | Andrei Hrabouski 3 | -------------------------------------------------------------------------------- /hooks/README.md: -------------------------------------------------------------------------------- 1 | 21 | # Cordova Hooks 22 | 23 | This directory may contain scripts used to customize cordova commands. This 24 | directory used to exist at `.cordova/hooks`, but has now been moved to the 25 | project root. Any scripts you add to these directories will be executed before 26 | and after the commands corresponding to the directory name. Useful for 27 | integrating your own build systems or integrating with version control systems. 28 | 29 | __Remember__: Make your scripts executable. 30 | 31 | ## Hook Directories 32 | The following subdirectories will be used for hooks: 33 | 34 | after_build/ 35 | after_compile/ 36 | after_docs/ 37 | after_emulate/ 38 | after_platform_add/ 39 | after_platform_rm/ 40 | after_platform_ls/ 41 | after_plugin_add/ 42 | after_plugin_ls/ 43 | after_plugin_rm/ 44 | after_plugin_search/ 45 | after_prepare/ 46 | after_run/ 47 | after_serve/ 48 | before_build/ 49 | before_compile/ 50 | before_docs/ 51 | before_emulate/ 52 | before_platform_add/ 53 | before_platform_rm/ 54 | before_platform_ls/ 55 | before_plugin_add/ 56 | before_plugin_ls/ 57 | before_plugin_rm/ 58 | before_plugin_search/ 59 | before_prepare/ 60 | before_run/ 61 | before_serve/ 62 | pre_package/ <-- Windows 8 and Windows Phone only. 63 | 64 | ## Script Interface 65 | 66 | All scripts are run from the project's root directory and have the root directory passes as the first argument. All other options are passed to the script using environment variables: 67 | 68 | * CORDOVA_VERSION - The version of the Cordova-CLI. 69 | * CORDOVA_PLATFORMS - Comma separated list of platforms that the command applies to (e.g.: android, ios). 70 | * CORDOVA_PLUGINS - Comma separated list of plugin IDs that the command applies to (e.g.: org.apache.cordova.file, org.apache.cordova.file-transfer) 71 | * CORDOVA_HOOK - Path to the hook that is being executed. 72 | * CORDOVA_CMDLINE - The exact command-line arguments passed to cordova (e.g.: cordova run ios --emulate) 73 | 74 | If a script returns a non-zero exit code, then the parent cordova command will be aborted. 75 | 76 | 77 | ## Writing hooks 78 | 79 | We highly recommend writting your hooks using Node.js so that they are 80 | cross-platform. Some good examples are shown here: 81 | 82 | [http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/) 83 | 84 | -------------------------------------------------------------------------------- /hooks/after_prepare/inject_cordova.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // this plugin injects cordova script in index.html 4 | // 5 | var fs = require('fs'); 6 | var path = require('path'); 7 | 8 | var rootdir = process.argv[2]; 9 | 10 | function replace_string_in_file(filename, to_replace, replace_with) { 11 | var data = fs.readFileSync(filename, 'utf8'); 12 | 13 | var result = data.replace(new RegExp(to_replace, "g"), replace_with); 14 | fs.writeFileSync(filename, result, 'utf8'); 15 | } 16 | if (rootdir) { 17 | var filestoreplace = [ 18 | // android 19 | "platforms/android/assets/www/index.html", 20 | // ios 21 | "platforms/ios/www/index.html", 22 | // wp8 23 | "platforms/wp8/www/index.html" 24 | ]; 25 | 26 | filestoreplace.forEach(function(val, index, array) { 27 | var fullfilename = path.join(rootdir, val); 28 | if (fs.existsSync(fullfilename)) { 29 | replace_string_in_file(fullfilename, 30 | '', 31 | ''); 32 | } 33 | }); 34 | 35 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "digitsquare", 3 | "dependencies": {}, 4 | "scripts": { 5 | "postinstall": "bower install" 6 | }, 7 | "devDependencies": { 8 | "bower": "^1.3.8", 9 | "grunt-bower-task": "^0.4.0", 10 | "grunt-contrib-sass": "^0.7.3", 11 | "grunt-contrib-watch": "^0.6.1", 12 | "grunt-exec": "^0.4.6", 13 | "grunt": "^0.4.5", 14 | "grunt-sass": "^1.1.0", 15 | "grunt-ng-constant": "^1.1.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /plugins/android.json: -------------------------------------------------------------------------------- 1 | { 2 | "prepare_queue": { 3 | "installed": [], 4 | "uninstalled": [] 5 | }, 6 | "config_munge": { 7 | "files": {} 8 | }, 9 | "installed_plugins": { 10 | "com.brodysoft.sqlitePlugin": { 11 | "PACKAGE_NAME": "com.flatlogic.digitsquare" 12 | }, 13 | "com.cmackay.plugins.googleanalytics": { 14 | "PACKAGE_NAME": "com.flatlogic.digitsquare" 15 | }, 16 | "cordova-plugin-admobpro": { 17 | "PACKAGE_NAME": "com.flatlogic.digitsquare" 18 | }, 19 | "cordova-plugin-extension": { 20 | "PACKAGE_NAME": "com.flatlogic.digitsquare" 21 | }, 22 | "org.apache.cordova.device": { 23 | "PACKAGE_NAME": "com.flatlogic.digitsquare" 24 | } 25 | }, 26 | "dependent_plugins": {} 27 | } -------------------------------------------------------------------------------- /plugins/com.brodysoft.sqlitePlugin/AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Authors 2 | 3 | ## Common Javascript 4 | 5 | - Extracted from DroidGap by @brodybits (Chris Brody) 6 | - Fail-safe nested transaction support by @ef4 (Edward Faulkner) 7 | - Translated to Coffee-Script using js2coffee tool by @brodybits (Chris Brody) 8 | - API changes by @brodybits (Chris Brody) 9 | - Transaction timing fixes to support PouchDB by @nolanlawson 10 | 11 | ## Android version 12 | 13 | - Extracted from DroidGap by @brodybits (Chris Brody) 14 | - Transaction batch processing of Android version by @marcucio 15 | - Maintained by @brodybits (Chris Brody) 16 | - Fixes to support old Android versions by @nolanlawson 17 | 18 | ## iOS version 19 | 20 | - Original authors: @davibe (Davide Bertola ) and @joenoon (Joe Noon ) 21 | - Cordova 2.7+ port with background processing by @j3k0 (Jean-Christophe Hoelt ) 22 | - Maintained by @brodybits (Chris Brody) 23 | 24 | ## WP(8) version 25 | 26 | - Original author: @marcucio (Mike Arcucio ) 27 | - Enhancements for background processing & improved transaction support by @Gillardo (Darren Gillard ) 28 | - DB threading and open/close/delete fixes by Mark Oppenheim 29 | -------------------------------------------------------------------------------- /plugins/com.brodysoft.sqlitePlugin/CHANGES.md: -------------------------------------------------------------------------------- 1 | # Changes 2 | 3 | ## 1.0.6 4 | 5 | - Proper handling of transactions that may be requested before the database open operation is completed 6 | - Report an error upon attempt to close a database handle object multiple times. 7 | 8 | ## 1.0.5 9 | 10 | - Workaround for Android db locking/closing issue 11 | - Fix double-precision REAL values in result (iOS version) 12 | - Fix query result truncation in case of NULL character (\0 or \u0000) (iOS version) 13 | - Convert array SQL parameters to string, according to match Web SQL spec 14 | - Fix closing of Android database 15 | - Some fixes for SQL API error handling to be consistent with Web SQL 16 | 17 | ## 1.0.4 18 | 19 | - Pre-populated database option (Android/iOS) 20 | - Option to select database location to disable iCloud backup (iOS ONLY) 21 | - Safeguard against closing of database while transaction is pending 22 | - Fix to prevent double marshaling of data 23 | 24 | ## 1.0.3 25 | 26 | - Fixed issue with multi-page apps on Android (due to problem when closing & re-opening app) 27 | 28 | ## 1.0.2 29 | 30 | - Workaround for issue with multiple UPDATE statements WP(8) (#128) 31 | 32 | ## 1.0.1 33 | 34 | - Support Cordova 3.3.0/3.4.0 to support Amazon-FireOS 35 | - Fixes for WP(8): 36 | - use one thread per db to solve open/close/delete issues 37 | - fix integer data binding 38 | - Fix open/close callbacks Android & WP(8) 39 | - Resolve issue with INSERT OR IGNORE (Android) 40 | 41 | -------------------------------------------------------------------------------- /plugins/com.brodysoft.sqlitePlugin/LICENSE.md: -------------------------------------------------------------------------------- 1 | # Licenses 2 | 3 | ## Common Javascript 4 | 5 | MIT or Apache 2.0 6 | 7 | ## Android version 8 | 9 | MIT or Apache 2.0 10 | 11 | - Extracted from DroidGap by @brodybits (Chris Brody) 12 | - Transaction batch processing of Android version by @marcucio 13 | - Maintained by @brodybits (Chris Brody) 14 | 15 | ## iOS version 16 | 17 | MIT only 18 | 19 | ## WP version 20 | 21 | MIT or Apache 2.0 22 | 23 | ## DLLs for WP version 24 | 25 | ### Newtonsoft.Json.dll: Json.NET 26 | 27 | MIT License 28 | 29 | Copyright (c) 2007 James Newton-King 30 | 31 | ### SQLiteWPNative.DLL: C#-SQLite 32 | 33 | MIT License 34 | 35 | C#-SQLite is an independent reimplementation of the SQLite software library. 36 | SQLite® is a registered trademark of Hipp, Wyrick & Company, Inc. 37 | 38 | The overall C#-SQLite package is distributed under the terms of the MIT License, given below. Some parts are distributed under more permissive licenses, see individual source files for details. 39 | 40 | Copyright (c) 2009-2012 Noah Hart and others, see individual source files for details. 41 | 42 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 43 | 44 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 45 | 46 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 47 | 48 | -------------------------------------------------------------------------------- /plugins/com.brodysoft.sqlitePlugin/Lawnchair-adapter/test-www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Lawnchair Spec 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 69 | 70 | 71 |

Lawnchair Spec

72 |

73 |

74 |
    75 | 76 | 77 | -------------------------------------------------------------------------------- /plugins/com.brodysoft.sqlitePlugin/bin/test.ps1: -------------------------------------------------------------------------------- 1 | # Automated cordova tests. Installs the correct cordova platform, 2 | # installs the plugin, installs the test app, and then runs it on 3 | # a device or emulator. 4 | # 5 | # usage: .\bin\test.ps1 [android|ios|wp8] 6 | 7 | # N.B. if you functionally change this script you _must_ change .\bin\test.sh too. 8 | 9 | param([string]$platform) 10 | 11 | if (! $platform) { 12 | echo "usage: .\bin\test.sh [android|ios|wp8]" 13 | exit 1 14 | } 15 | 16 | if (! (get-command coffee) ) { 17 | echo "you need coffeescript. please install with:" 18 | echo "npm install -g coffee-script" 19 | exit 1 20 | } 21 | 22 | if (! (get-command cordova) ) { 23 | echo "you need cordova. please install with:" 24 | echo "npm install -g cordova" 25 | exit 1 26 | } 27 | 28 | 29 | pushd test-www 30 | if (!$?) { # run from the bin/ directory 31 | echo "re-pushing" 32 | pushd ../test-www 33 | } 34 | try { 35 | # compile coffeescript 36 | coffee --no-header -cl -o ../www ../SQLitePlugin.coffee.md 37 | if (!$?) { 38 | echo "coffeescript compilation failed" 39 | exit 1 40 | } 41 | echo "compiled coffeescript to javascript" 42 | 43 | # move everything to a temp folder to avoid infinite recursion errors 44 | if (test-path ../.plugin) { 45 | rm -force -recurse ../.plugin -ErrorAction ignore 46 | } 47 | mkdir -ErrorAction ignore ../.plugin | out-null 48 | cp -recurse ../src, ../plugin.xml, ../www ../.plugin 49 | 50 | # update the plugin, run the test app 51 | cordova platform add $platform 52 | cordova plugin rm com.phonegap.plugins.sqlite 53 | cordova plugin add ../.plugin 54 | cordova run $platform 55 | } finally { 56 | popd 57 | } 58 | -------------------------------------------------------------------------------- /plugins/com.brodysoft.sqlitePlugin/bin/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Automated cordova tests. Installs the correct cordova platform, 4 | # installs the plugin, installs the test app, and then runs it on 5 | # a device or emulator. 6 | # 7 | # usage: ./bin/test.sh [android|ios] 8 | # 9 | 10 | # N.B. if you functionally change this script you _must_ change ./bin/test.ps1 too. 11 | 12 | platform=$1 13 | 14 | if [[ -z $platform ]]; then 15 | echo "usage: ./bin/test.sh [android|ios]" 16 | exit 1 17 | fi 18 | 19 | if [[ ! -x $(which coffee) ]]; then 20 | echo "you need coffeescript. please install with:" 21 | echo "npm install -g coffee-script" 22 | exit 1 23 | fi 24 | 25 | if [[ ! -x $(which cordova) ]]; then 26 | echo "you need cordova. please install with:" 27 | echo "npm install -g cordova" 28 | exit 1 29 | fi 30 | 31 | cd test-www 32 | if [[ $? != 0 ]]; then # run from the bin/ directory 33 | cd ../test-www 34 | fi 35 | 36 | # compile coffeescript 37 | coffee --no-header -cl -o ../www ../SQLitePlugin.coffee.md 38 | 39 | if [[ $? != 0 ]]; then 40 | echo "coffeescript compilation failed" 41 | exit 1 42 | fi 43 | echo "compiled coffeescript to javascript" 44 | 45 | # move everything to a temp folder to avoid infinite recursion errors 46 | rm -fr ../.plugin 47 | mkdir -p ../.plugin 48 | cp -r ../src ../plugin.xml ../www ../.plugin 49 | 50 | # update the plugin, run the test app 51 | cordova platform add $platform 52 | cordova plugin rm com.brodysoft.sqlitePlugin 53 | cordova plugin add ../.plugin 54 | cordova run $platform 55 | -------------------------------------------------------------------------------- /plugins/com.brodysoft.sqlitePlugin/src/ios/SQLitePlugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2015 Chris Brody 3 | * Copyright (C) 2011 Davide Bertola 4 | * 5 | * This library is available under the terms of the MIT License (2008). 6 | * See http://opensource.org/licenses/alphabetical for full text. 7 | */ 8 | 9 | #import 10 | 11 | // Used to remove dependency on sqlite3.h in this header: 12 | struct sqlite3; 13 | 14 | enum WebSQLError { 15 | UNKNOWN_ERR = 0, 16 | DATABASE_ERR = 1, 17 | VERSION_ERR = 2, 18 | TOO_LARGE_ERR = 3, 19 | QUOTA_ERR = 4, 20 | SYNTAX_ERR = 5, 21 | CONSTRAINT_ERR = 6, 22 | TIMEOUT_ERR = 7 23 | }; 24 | typedef int WebSQLError; 25 | 26 | @interface SQLitePlugin : CDVPlugin { 27 | NSMutableDictionary *openDBs; 28 | } 29 | 30 | @property (nonatomic, copy) NSMutableDictionary *openDBs; 31 | @property (nonatomic, copy) NSMutableDictionary *appDBPaths; 32 | 33 | // Open / Close 34 | -(void) open: (CDVInvokedUrlCommand*)command; 35 | -(void) close: (CDVInvokedUrlCommand*)command; 36 | -(void) delete: (CDVInvokedUrlCommand*)command; 37 | 38 | // Batch processing interface 39 | -(void) backgroundExecuteSqlBatch: (CDVInvokedUrlCommand*)command; 40 | -(void) executeSqlBatch: (CDVInvokedUrlCommand*)command; 41 | 42 | // Single requests interface 43 | -(void) backgroundExecuteSql:(CDVInvokedUrlCommand*)command; 44 | -(void) executeSql:(CDVInvokedUrlCommand*)command; 45 | 46 | // Perform the SQL request 47 | -(CDVPluginResult*) executeSqlWithDict: (NSMutableDictionary*)dict andArgs: (NSMutableDictionary*)dbargs; 48 | 49 | -(id) getDBPath:(NSString *)dbFile at:(NSString *)atkey; 50 | 51 | +(NSDictionary *)captureSQLiteErrorFromDb:(struct sqlite3 *)db; 52 | 53 | +(int)mapSQLiteErrorCode:(int)code; 54 | 55 | +(NSString*)getBlobAsBase64String:(const char*) blob_chars 56 | withlength:(int) blob_length; 57 | @end /* vim: set expandtab : */ 58 | -------------------------------------------------------------------------------- /plugins/com.brodysoft.sqlitePlugin/src/wp/csharp-sqlite-src/hwtime_c.cs: -------------------------------------------------------------------------------- 1 | namespace Community.CsharpSqlite 2 | { 3 | using sqlite_u3264 = System.UInt64; 4 | 5 | public partial class Sqlite3 6 | { 7 | /* 8 | ** 2008 May 27 9 | ** 10 | ** The author disclaims copyright to this source code. In place of 11 | ** a legal notice, here is a blessing: 12 | ** 13 | ** May you do good and not evil. 14 | ** May you find forgiveness for yourself and forgive others. 15 | ** May you share freely, never taking more than you give. 16 | ** 17 | ****************************************************************************** 18 | ** 19 | ** This file contains inline asm code for retrieving "high-performance" 20 | ** counters for x86 class CPUs. 21 | ** 22 | ** $Id: hwtime.h,v 1.3 2008/08/01 14:33:15 shane Exp $ 23 | ** 24 | ************************************************************************* 25 | ** Included in SQLite3 port to C#-SQLite; 2008 Noah B Hart 26 | ** C#-SQLite is an independent reimplementation of the SQLite software library 27 | ** 28 | ************************************************************************* 29 | */ 30 | //#if !_HWTIME_H_ 31 | //#define _HWTIME_H_ 32 | 33 | /* 34 | ** The following routine only works on pentium-class (or newer) processors. 35 | ** It uses the RDTSC opcode to read the cycle count value out of the 36 | ** processor and returns that value. This can be used for high-res 37 | ** profiling. 38 | */ 39 | #if ((__GNUC__) || (_MSC_VER)) && ((i386) || (__i386__) || (_M_IX86)) 40 | 41 | #if (__GNUC__) 42 | 43 | __inline__ sqlite_u3264 sqlite3Hwtime(void){ 44 | unsigned int lo, hi; 45 | __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); 46 | return (sqlite_u3264)hi << 32 | lo; 47 | } 48 | 49 | #elif (_MSC_VER) 50 | 51 | __declspec(naked) __inline sqlite_u3264 __cdecl sqlite3Hwtime(void){ 52 | __asm { 53 | rdtsc 54 | ret ; return value at EDX:EAX 55 | } 56 | } 57 | 58 | #endif 59 | 60 | #elif ((__GNUC__) && (__x86_64__)) 61 | 62 | __inline__ sqlite_u3264 sqlite3Hwtime(void){ 63 | unsigned long val; 64 | __asm__ __volatile__ ("rdtsc" : "=A" (val)); 65 | return val; 66 | } 67 | 68 | #elif ( (__GNUC__) && (__ppc__)) 69 | 70 | __inline__ sqlite_u3264 sqlite3Hwtime(void){ 71 | unsigned long long retval; 72 | unsigned long junk; 73 | __asm__ __volatile__ ("\n\ 74 | 1: mftbu %1\n\ 75 | mftb %L0\n\ 76 | mftbu %0\n\ 77 | cmpw %0,%1\n\ 78 | bne 1b" 79 | : "=r" (retval), "=r" (junk)); 80 | return retval; 81 | } 82 | 83 | #else 84 | 85 | //#error Need implementation of sqlite3Hwtime() for your platform. 86 | 87 | /* 88 | ** To compile without implementing sqlite3Hwtime() for your platform, 89 | ** you can remove the above #error and use the following 90 | ** stub function. You will lose timing support for many 91 | ** of the debugging and testing utilities, but it should at 92 | ** least compile and run. 93 | */ 94 | static sqlite_u3264 sqlite3Hwtime() 95 | { 96 | return (sqlite_u3264)System.DateTime.Now.Ticks; 97 | }// (sqlite_u3264)0 ); } 98 | 99 | #endif 100 | 101 | //#endif //* !_HWTIME_H_) */ 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /plugins/com.brodysoft.sqlitePlugin/test-www/.cordova/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "com.phonegap.plugins.sqlite.tests", 3 | "name": "Cordova SQLite Plugin Test Runner" 4 | } -------------------------------------------------------------------------------- /plugins/com.brodysoft.sqlitePlugin/test-www/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | Cordova SQLite Plugin Test Runner 5 | 6 | Runs the unit tests suite for the Cordova SQLite plugin. 7 | 8 | 9 | Nolan Lawson 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /plugins/com.brodysoft.sqlitePlugin/test-www/platforms/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /plugins/com.brodysoft.sqlitePlugin/test-www/plugins/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /plugins/com.cmackay.plugins.googleanalytics/android/version.xml: -------------------------------------------------------------------------------- 1 | 2 | 6171000 3 | 4 | -------------------------------------------------------------------------------- /plugins/com.cmackay.plugins.googleanalytics/ios/GAIEcommercePromotion.h: -------------------------------------------------------------------------------- 1 | /*! 2 | @header GAIEcommercePromotion.h 3 | @abstract Google Analytics iOS SDK Hit Format Header 4 | @copyright Copyright 2014 Google Inc. All rights reserved. 5 | */ 6 | 7 | #import 8 | 9 | /*! 10 | * Class to construct promotion related fields for Google Analytics hits. The fields from this class 11 | * can be used to represent internal promotions that run within an app, such as banners, banner ads 12 | * etc. 13 | * 14 | * Typical usage: 15 | * 16 | * GAIDictionaryBuilder *builder = [GAIDictionaryBuilder createScreenView]; 17 | * GAIEcommercePromotion *promotion = [[GAIEcommercePromotion alloc] init]; 18 | * [promotion setId:@"PROMO-ID1234"]; 19 | * [promotion setName:@"Home screen banner"]; 20 | * [builder set:kGAIPromotionClick forKey:kGAIPromotionAction]; 21 | * [builder addPromotion:promotion]; 22 | * [tracker send:builder.build]]; 23 | * 24 | */ 25 | @interface GAIEcommercePromotion : NSObject 26 | 27 | /*! 28 | Sets the id that is used to identify a promotion in GA reports. 29 | */ 30 | - (GAIEcommercePromotion *)setId:(NSString *)pid; 31 | 32 | /*! 33 | Sets the name that is used to identify a promotion in GA reports. 34 | */ 35 | - (GAIEcommercePromotion *)setName:(NSString *)name; 36 | 37 | /*! 38 | Sets the name of the creative associated with the promotion. 39 | */ 40 | - (GAIEcommercePromotion *)setCreative:(NSString *)creative; 41 | 42 | /*! 43 | Sets the position of the promotion. 44 | */ 45 | - (GAIEcommercePromotion *)setPosition:(NSString *)position; 46 | 47 | /*! 48 | Builds an NSDictionary of fields stored in this instance. The index parameter is the 49 | index of this promotion in that promotion list. 50 |
    51 | Normally, users will have no need to call this method. 52 | */ 53 | - (NSDictionary *)buildWithIndex:(NSUInteger)index; 54 | @end 55 | -------------------------------------------------------------------------------- /plugins/com.cmackay.plugins.googleanalytics/ios/GAILogger.h: -------------------------------------------------------------------------------- 1 | /*! 2 | @header GAILogger.h 3 | @abstract Google Analytics iOS SDK Source 4 | @copyright Copyright 2011 Google Inc. All rights reserved. 5 | */ 6 | 7 | #import 8 | 9 | typedef NS_ENUM(NSUInteger, GAILogLevel) { 10 | kGAILogLevelNone = 0, 11 | kGAILogLevelError = 1, 12 | kGAILogLevelWarning = 2, 13 | kGAILogLevelInfo = 3, 14 | kGAILogLevelVerbose = 4 15 | }; 16 | 17 | /*! 18 | Protocol to be used for logging debug and informational messages from the SDK. 19 | Implementations of this protocol can be provided to the |GAI| class, 20 | to be used as the logger by the SDK. See the |logger| property in GAI.h. 21 | */ 22 | @protocol GAILogger 23 | @required 24 | 25 | /*! 26 | Only messages of |logLevel| and below are logged. 27 | */ 28 | @property (nonatomic, assign) GAILogLevel logLevel; 29 | 30 | /*! 31 | Logs message with log level |kGAILogLevelVerbose|. 32 | */ 33 | - (void)verbose:(NSString *)message; 34 | 35 | /*! 36 | Logs message with log level |kGAILogLevelInfo|. 37 | */ 38 | - (void)info:(NSString *)message; 39 | 40 | /*! 41 | Logs message with log level |kGAILogLevelWarning|. 42 | */ 43 | - (void)warning:(NSString *)message; 44 | 45 | /*! 46 | Logs message with log level |kGAILogLevelError|. 47 | */ 48 | - (void)error:(NSString *)message; 49 | @end 50 | -------------------------------------------------------------------------------- /plugins/com.cmackay.plugins.googleanalytics/ios/GAITrackedViewController.h: -------------------------------------------------------------------------------- 1 | /*! 2 | @header GAITrackedViewController.h 3 | @abstract Google Analytics for iOS Tracked View Controller Header 4 | @copyright Copyright 2012 Google Inc. All rights reserved. 5 | */ 6 | 7 | #import 8 | #import 9 | 10 | @protocol GAITracker; 11 | 12 | /*! 13 | Extends UIViewController to generate Google Analytics screenview calls 14 | whenever the view appears; this is done by overriding the `viewDidAppear:` 15 | method. The screen name must be set for any tracking calls to be made. 16 | 17 | By default, this will use [GAI defaultTracker] for tracking calls, but one can 18 | override this by setting the tracker property. 19 | */ 20 | @interface GAITrackedViewController : UIViewController 21 | 22 | /*! 23 | The tracker on which view tracking calls are be made, or `nil`, in which case 24 | [GAI defaultTracker] will be used. 25 | */ 26 | @property(nonatomic, assign) id tracker; 27 | /*! 28 | The screen name, for purposes of Google Analytics tracking. If this is `nil`, 29 | no tracking calls will be made. 30 | */ 31 | @property(nonatomic, copy) NSString *screenName; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /plugins/com.cmackay.plugins.googleanalytics/ios/GAITracker.h: -------------------------------------------------------------------------------- 1 | /*! 2 | @header GAITracker.h 3 | @abstract Google Analytics iOS SDK Tracker Header 4 | @copyright Copyright 2013 Google Inc. All rights reserved. 5 | */ 6 | 7 | #import 8 | 9 | /*! 10 | Google Analytics tracking interface. Obtain instances of this interface from 11 | [GAI trackerWithTrackingId:] to track screens, events, transactions, timing, 12 | and exceptions. The implementation of this interface is thread-safe, and no 13 | calls are expected to block or take a long time. All network and disk activity 14 | will take place in the background. 15 | */ 16 | @protocol GAITracker 17 | 18 | /*! 19 | Name of this tracker. 20 | */ 21 | @property(nonatomic, readonly) NSString *name; 22 | 23 | /*! 24 | Allow collection of IDFA and related fields if set to true. Default is false. 25 | */ 26 | @property(nonatomic) BOOL allowIDFACollection; 27 | 28 | /*! 29 | Set a tracking parameter. 30 | 31 | @param parameterName The parameter name. 32 | 33 | @param value The value to set for the parameter. If this is nil, the 34 | value for the parameter will be cleared. 35 | */ 36 | - (void)set:(NSString *)parameterName 37 | value:(NSString *)value; 38 | 39 | /*! 40 | Get a tracking parameter. 41 | 42 | @param parameterName The parameter name. 43 | 44 | @returns The parameter value, or nil if no value for the given parameter is 45 | set. 46 | */ 47 | - (NSString *)get:(NSString *)parameterName; 48 | 49 | /*! 50 | Queue tracking information with the given parameter values. 51 | 52 | @param parameters A map from parameter names to parameter values which will be 53 | set just for this piece of tracking information, or nil for none. 54 | */ 55 | - (void)send:(NSDictionary *)parameters; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /plugins/com.cmackay.plugins.googleanalytics/ios/GoogleAnalyticsPlugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import 22 | #import "GAI.h" 23 | 24 | @interface GoogleAnalyticsPlugin : CDVPlugin { 25 | id tracker; 26 | } 27 | 28 | - (void) setTrackingId: (CDVInvokedUrlCommand*)command; 29 | - (void) setDispatchInterval: (CDVInvokedUrlCommand*)command; 30 | - (void) setLogLevel: (CDVInvokedUrlCommand*)command; 31 | - (void) get: (CDVInvokedUrlCommand*)command; 32 | - (void) set: (CDVInvokedUrlCommand*)command; 33 | - (void) send: (CDVInvokedUrlCommand*)command; 34 | - (void) close: (CDVInvokedUrlCommand*)command; 35 | - (void) getAppOptOut: (CDVInvokedUrlCommand*)command; 36 | - (void) setAppOptOut: (CDVInvokedUrlCommand*)command; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /plugins/com.cmackay.plugins.googleanalytics/ios/libGoogleAnalyticsServices.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/plugins/com.cmackay.plugins.googleanalytics/ios/libGoogleAnalyticsServices.a -------------------------------------------------------------------------------- /plugins/com.cmackay.plugins.googleanalytics/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.cmackay.plugins.googleanalytics", 3 | "version": "0.1.21", 4 | "description": "Plugin for Google Analytics Native SDKs (Android, iOS)", 5 | "cordova": { 6 | "id": "com.cmackay.plugins.googleanalytics", 7 | "platforms": [ 8 | "ios", 9 | "android" 10 | ] 11 | }, 12 | "scripts": { 13 | "docs": "./node_modules/.bin/rimraf README.md && cat prefix.md > README.md && ./node_modules/.bin/jsdoc2md ./www/*.js >> README.md" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/cmackay/google-analytics-plugin.git" 18 | }, 19 | "keywords": [ 20 | "cordova", 21 | "analytics", 22 | "ecosystem:cordova", 23 | "cordova-ios", 24 | "cordova-android" 25 | ], 26 | "engines": [ 27 | { 28 | "name": "cordova", 29 | "version": ">=3.0.0" 30 | } 31 | ], 32 | "author": "Craig MacKay", 33 | "license": "Apache 2.0", 34 | "bugs": { 35 | "url": "https://github.com/cmackay/google-analytics-plugin/issues" 36 | }, 37 | "homepage": "https://github.com/cmackay/google-analytics-plugin#readme", 38 | "devDependencies": { 39 | "jsdoc-to-markdown": "^1.1.1", 40 | "rimraf": "^2.4.3" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /plugins/com.cmackay.plugins.googleanalytics/prefix.md: -------------------------------------------------------------------------------- 1 | google-analytics-plugin 2 | ======================= 3 | 4 | Provides Apache Cordova/Phonegap support for Google Analytics using the native sdks for Android & iOS. 5 | 6 | * Android Native SDK v4 (using Google Play Services SDK) 7 | * iOS Native SDK v3 8 | 9 | This plugin provides support for some of the more specific analytics functions (screen, event & exception tracking, custom metrics & dimensions) and also the more generic set and send functions which can be used to implement all of the Google Analytics collection features. 10 | 11 | As an example tracking a screen could be implemented using either the sendAppView function or the send function: 12 | 13 | ```js 14 | 15 | var analytics = navigator.analytics; 16 | 17 | // set the tracking id 18 | analytics.setTrackingId('UA-XXXXX-X'); 19 | 20 | analytics.sendAppView('home', successCallback, errorCallback); 21 | 22 | // or the same could be done using the send function 23 | 24 | var Fields = analytics.Fields, 25 | HitTypes = analytics.HitTypes, 26 | LogLevel = analytics.LogLevel, 27 | params = {}; 28 | 29 | params[Fields.HIT_TYPE] = HitTypes.APP_VIEW; 30 | params[Fields.SCREEN_NAME] = 'home'; 31 | 32 | analytics.setLogLevel(LogLevel.INFO); 33 | 34 | analytics.send(params, successCallback, errorCallback); 35 | 36 | ``` 37 | 38 | The send & set functions provide maximum flexibility and allow you to utilize all of the Google Analytics collection calls. Some helper functions are also provided to support some of the more common analytic functions. 39 | 40 | For more information about measurement protocol refer to the following page: 41 | 42 | [Measurement Protocol Developer Guide](https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide) 43 | 44 | ## Installation 45 | ``` 46 | cordova plugin add com.cmackay.plugins.googleanalytics 47 | ``` 48 | 49 | ## API 50 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Liming Xie 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/docs/README.zh_cn.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/plugins/cordova-plugin-admobpro/docs/README.zh_cn.md -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/docs/android.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/plugins/cordova-plugin-admobpro/docs/android.jpg -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/docs/android_interstitial.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/plugins/cordova-plugin-admobpro/docs/android_interstitial.jpg -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/docs/iphone.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/plugins/cordova-plugin-admobpro/docs/iphone.jpg -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/docs/iphone_interstitial.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/plugins/cordova-plugin-admobpro/docs/iphone_interstitial.jpg -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/docs/stat_ref.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/plugins/cordova-plugin-admobpro/docs/stat_ref.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/docs/trend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/plugins/cordova-plugin-admobpro/docs/trend.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/docs/youtube_video.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/plugins/cordova-plugin-admobpro/docs/youtube_video.jpg -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/docs/youtube_video0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/plugins/cordova-plugin-admobpro/docs/youtube_video0.jpg -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cordova-plugin-admobpro", 3 | "version": "2.9.9", 4 | "description": "Ultimate Cordova Plugin for Google AdMob and DFP to monetize hybrid apps. Show mobile Ad with single line of JavaScript. Compatible with Cordova CLI, PhoneGap Build, Intel XDK/Crosswalk, Google ChromeApp, Ionic, Meteor, etc.", 5 | "cordova": { 6 | "id": "cordova-plugin-admobpro", 7 | "platforms": [ 8 | "android", 9 | "ios", 10 | "amazon-fireos", 11 | "wp8", 12 | "windows" 13 | ] 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "https://github.com/floatinghotpot/cordova-admob-pro.git" 18 | }, 19 | "bugs": { 20 | "url": "https://github.com/floatinghotpot/cordova-admob-pro/issues" 21 | }, 22 | "keywords": [ 23 | "cordova", 24 | "ecosystem:cordova", 25 | "ad", 26 | "admob", 27 | "google", 28 | "rjfun" 29 | ], 30 | "author": { 31 | "name": "Liming Xie" 32 | }, 33 | "license": "MIT" 34 | } 35 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/android/AdMobMediation.java: -------------------------------------------------------------------------------- 1 | package com.rjfun.cordova.admob; 2 | 3 | import org.json.JSONObject; 4 | import android.app.Activity; 5 | import com.google.android.gms.ads.AdRequest; 6 | 7 | public abstract class AdMobMediation { 8 | public AdMobMediation(Activity act, JSONObject options) {} 9 | public abstract AdRequest.Builder joinAdRequest(AdRequest.Builder builder); 10 | public void onPause(){} 11 | public void onResume(){} 12 | public void onDestroy(){} 13 | } 14 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/AdMobMediation.h: -------------------------------------------------------------------------------- 1 | // 2 | // AdMobMediation.h 3 | // TestAdMobCombo 4 | // 5 | // Created by Xie Liming on 14-10-20. 6 | // 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #import 13 | 14 | @interface AdMobMediation : NSObject 15 | 16 | - (AdMobMediation*) initWithOptions:(NSDictionary*)options; 17 | - (void) joinAdRequest:(GADRequest*)req; 18 | - (void) onPause; 19 | - (void) onResume; 20 | - (void) onDestroy; 21 | 22 | @end 23 | 24 | // ------------------------------------------------------------- 25 | 26 | // AdMobMediationMMedia 27 | 28 | // AdMobMediationiAd, no need extras 29 | 30 | // AdMobMediationInMobi, no need extras 31 | 32 | // AdMobMediationFacebook, no need extras 33 | 34 | // AdMobMediationMobFox, no need extras 35 | 36 | // AdMobMediationFlurry, no need extras 37 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/AdMobMediation.m: -------------------------------------------------------------------------------- 1 | // 2 | // AdMobMediation.m 3 | // TestAdMobCombo 4 | // 5 | // Created by Xie Liming on 14-10-29. 6 | // 7 | // 8 | 9 | #import "AdMobMediation.h" 10 | 11 | @implementation AdMobMediation 12 | 13 | - (AdMobMediation*) initWithOptions:(NSDictionary*)options { 14 | return self; 15 | } 16 | 17 | - (void) joinAdRequest:(GADRequest*)req { 18 | 19 | } 20 | 21 | - (void) onPause { 22 | 23 | } 24 | 25 | - (void) onResume { 26 | 27 | } 28 | 29 | - (void) onDestroy { 30 | 31 | } 32 | 33 | @end 34 | 35 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/CDVAdMobPlugin.h: -------------------------------------------------------------------------------- 1 | // 2 | // CDVAdMobPlugin.h 3 | // TestAdMobCombo 4 | // 5 | // Created by Xie Liming on 14-10-20. 6 | // 7 | // 8 | 9 | #import "GenericAdPlugin.h" 10 | 11 | @interface CDVAdMobPlugin : GenericAdPlugin 12 | 13 | - (void)pluginInitialize; 14 | 15 | - (void) parseOptions:(NSDictionary *)options; 16 | - (void) __showBanner:(int) position atX:(int)x atY:(int)y; 17 | 18 | - (NSString*) __getProductShortName; 19 | - (NSString*) __getTestBannerId; 20 | - (NSString*) __getTestInterstitialId; 21 | 22 | - (UIView*) __createAdView:(NSString*)adId; 23 | - (int) __getAdViewWidth:(UIView*)view; 24 | - (int) __getAdViewHeight:(UIView*)view; 25 | - (void) __loadAdView:(UIView*)view; 26 | - (void) __pauseAdView:(UIView*)view; 27 | - (void) __resumeAdView:(UIView*)view; 28 | - (void) __destroyAdView:(UIView*)view; 29 | 30 | - (NSObject*) __createInterstitial:(NSString*)adId; 31 | - (void) __loadInterstitial:(NSObject*)interstitial; 32 | - (void) __showInterstitial:(NSObject*)interstitial; 33 | - (void) __destroyInterstitial:(NSObject*)interstitial; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/GoogleMobileAds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/GoogleMobileAds -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/DFPBannerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // DFPBannerView.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2012 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | 12 | @protocol DFPCustomRenderedBannerViewDelegate; 13 | @protocol GADAdSizeDelegate; 14 | @protocol GADAppEventDelegate; 15 | 16 | /// The view that displays DoubleClick For Publishers banner ads. 17 | @interface DFPBannerView : GADBannerView 18 | 19 | /// Required value created on the DFP website. Create a new ad unit for every unique placement of an 20 | /// ad in your application. Set this to the ID assigned for this placement. Ad units are important 21 | /// for targeting and statistics. 22 | /// 23 | /// Example DFP ad unit ID: @"/6499/example/banner" 24 | @property(nonatomic, copy) NSString *adUnitID; 25 | 26 | /// Optional delegate that is notified when creatives send app events. 27 | @property(nonatomic, weak) IBOutlet id appEventDelegate; 28 | 29 | /// Optional delegate that is notified when creatives cause the banner to change size. To avoid 30 | /// crashing the app, remember to nil this property before releasing the object that implements the 31 | /// GADAdSizeDelegate protocol. 32 | @property(nonatomic, weak) IBOutlet id adSizeDelegate; 33 | 34 | /// Optional array of NSValue encoded GADAdSize structs, specifying all valid sizes that are 35 | /// appropriate for this slot. Never create your own GADAdSize directly. Use one of the predefined 36 | /// standard ad sizes (such as kGADAdSizeBanner), or create one using the GADAdSizeFromCGSize 37 | /// method. 38 | /// 39 | /// \see setValidAdSizesWithSizes: 40 | /// 41 | /// Example: 42 | /// \code 43 | /// NSArray *validSizes = @[ 44 | /// NSValueFromGADAdSize(kGADAdSizeBanner), 45 | /// NSValueFromGADAdSize(kGADAdSizeLargeBanner) 46 | /// ]; 47 | /// 48 | /// bannerView.validAdSizes = validSizes; 49 | /// \endcode 50 | @property(nonatomic, copy) NSArray *validAdSizes; 51 | 52 | /// Correlator object for correlating this object to other ad objects. 53 | @property(nonatomic, strong) GADCorrelator *correlator; 54 | 55 | /// Indicates that the publisher will record impressions manually when the ad becomes visible to the 56 | /// user. 57 | @property(nonatomic, assign) BOOL enableManualImpressions; 58 | 59 | /// Optional delegate object for custom rendered ads. 60 | @property(nonatomic, weak) 61 | IBOutlet id customRenderedBannerViewDelegate; 62 | 63 | /// If you've set enableManualImpressions to YES, call this method when the ad is visible. 64 | - (void)recordImpression; 65 | 66 | /// Use this function to resize the banner view without launching a new ad request. 67 | - (void)resize:(GADAdSize)size; 68 | 69 | #pragma mark Deprecated 70 | 71 | /// Sets the receiver's valid ad sizes to the values pointed to by the provided NULL terminated list 72 | /// of GADAdSize pointers. 73 | /// 74 | /// Example: 75 | /// \code 76 | /// GADAdSize size1 = kGADAdSizeBanner; 77 | /// GADAdSize size2 = kGADAdSizeLargeBanner; 78 | /// [bannerView setValidAdSizesWithSizes:&size1, &size2, NULL]; 79 | /// \endcode 80 | - (void)setValidAdSizesWithSizes:(GADAdSize *)firstSize, ... NS_REQUIRES_NIL_TERMINATION 81 | GAD_DEPRECATED_MSG_ATTRIBUTE("Use validAdSizes property."); 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/DFPCustomRenderedAd.h: -------------------------------------------------------------------------------- 1 | // 2 | // DFPCustomRenderedAd.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2014 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | /// Custom rendered ad. Your application renders the ad. 11 | @interface DFPCustomRenderedAd : NSObject 12 | 13 | /// The ad's HTML. 14 | @property(nonatomic, copy, readonly) NSString *adHTML; 15 | 16 | /// The base URL of the ad's HTML. 17 | @property(nonatomic, copy, readonly) NSURL *adBaseURL; 18 | 19 | /// Call this method when the user clicks the ad. 20 | - (void)recordClick; 21 | 22 | /// Call this method when the ad is visible to the user. 23 | - (void)recordImpression; 24 | 25 | /// Call this method after the ad has been rendered in a UIView object. 26 | - (void)finishedRenderingAdView:(UIView *)view; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/DFPCustomRenderedBannerViewDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // DFPCustomRenderedBannerViewDelegate.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2014 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @class DFPBannerView; 11 | @class DFPCustomRenderedAd; 12 | 13 | @protocol DFPCustomRenderedBannerViewDelegate 14 | 15 | /// Called after ad data has been received. You must construct a banner from |customRenderedAd| and 16 | /// call the |customRenderedAd| object's finishedRenderingAdView: when the ad is rendered. 17 | - (void)bannerView:(DFPBannerView *)bannerView 18 | didReceiveCustomRenderedAd:(DFPCustomRenderedAd *)customRenderedAd; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/DFPCustomRenderedInterstitialDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // DFPCustomRenderedInterstitialDelegate.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2014 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @class DFPCustomRenderedAd; 11 | @class DFPInterstitial; 12 | 13 | @protocol DFPCustomRenderedInterstitialDelegate 14 | 15 | /// Called after ad data has been received. You must construct an interstitial from 16 | /// |customRenderedAd| and call the |customRenderedAd| object's finishedRenderingAdView: method when 17 | /// the ad has been rendered. 18 | - (void)interstitial:(DFPInterstitial *)interstitial 19 | didReceiveCustomRenderedAd:(DFPCustomRenderedAd *)customRenderedAd; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/DFPInterstitial.h: -------------------------------------------------------------------------------- 1 | // 2 | // DFPInterstitial.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2012 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @protocol DFPCustomRenderedInterstitialDelegate; 12 | @protocol GADAppEventDelegate; 13 | 14 | @interface DFPInterstitial : GADInterstitial 15 | 16 | /// Required value created on the DFP website. Create a new ad unit for every unique placement of an 17 | /// ad in your application. Set this to the ID assigned for this placement. Ad units are important 18 | /// for targeting and stats. 19 | /// 20 | /// Example DFP ad unit ID: @"/6499/example/interstitial" 21 | @property(nonatomic, readonly, copy) NSString *adUnitID; 22 | 23 | /// Correlator object for correlating this object to other ad objects. 24 | @property(nonatomic, strong) GADCorrelator *correlator; 25 | 26 | /// Optional delegate that is notified when creatives send app events. 27 | @property(nonatomic, weak) id appEventDelegate; 28 | 29 | /// Optional delegate object for custom rendered ads. 30 | @property(nonatomic, weak) 31 | id customRenderedInterstitialDelegate; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/DFPRequest.h: -------------------------------------------------------------------------------- 1 | // 2 | // DFPRequest.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2014 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import 11 | #import 12 | 13 | /// Add this constant to the testDevices property's array to receive test ads on the simulator. 14 | GAD_EXTERN const id kDFPSimulatorID; 15 | 16 | /// Specifies optional parameters for ad requests. 17 | @interface DFPRequest : GADRequest 18 | 19 | /// Publisher provided user ID. 20 | @property(nonatomic, copy) NSString *publisherProvidedID; 21 | 22 | /// Array of strings used to exclude specified categories in ad results. 23 | @property(nonatomic, copy) NSArray *categoryExclusions; 24 | 25 | /// Key-value pairs used for custom targeting. 26 | @property(nonatomic, copy) NSDictionary *customTargeting; 27 | 28 | /// This API is deprecated and a no-op, use an instance of GADCorrelator set on DFPInterstitial or 29 | /// DFPBannerView objects to correlate requests. 30 | + (void)updateCorrelator GAD_DEPRECATED_MSG_ATTRIBUTE( 31 | "Set GADCorrelator objects on your ads instead. This method longer affects ad correlation."); 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADAdLoader.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADAdLoader.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | #import "GADAdLoaderDelegate.h" 12 | #import "GADRequest.h" 13 | #import "GADRequestError.h" 14 | 15 | /// Loads ads. See GADAdLoaderAdTypes.h for available ad types. 16 | @interface GADAdLoader : NSObject 17 | 18 | /// Object notified when an ad request succeeds or fails. Must conform to requested ad types' 19 | /// delegate protocols. 20 | @property(nonatomic, weak) id delegate; 21 | 22 | /// Returns an initialized ad loader configured to load the specified ad types. 23 | /// 24 | /// @param rootViewController The root view controller is used to present ad click actions. Cannot 25 | /// be nil. 26 | /// @param adTypes An array of ad types. See GADAdLoaderAdTypes.h for available ad types. 27 | /// @param options An array of GADAdLoaderOptions objects to configure how ads are loaded, or nil to 28 | /// use default options. See each ad type's header for available GADAdLoaderOptions subclasses. 29 | - (instancetype)initWithAdUnitID:(NSString *)adUnitID 30 | rootViewController:(UIViewController *)rootViewController 31 | adTypes:(NSArray *)adTypes 32 | options:(NSArray *)options; 33 | 34 | /// Loads the ad and informs the delegate of the outcome. 35 | - (void)loadRequest:(GADRequest *)request; 36 | 37 | @end 38 | 39 | /// Ad loader options base class. See each ad type's header for available GADAdLoaderOptions 40 | /// subclasses. 41 | @interface GADAdLoaderOptions : NSObject 42 | @end 43 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADAdLoaderAdTypes.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import 11 | 12 | // For use with GADAdLoader's creation methods. See the constants' respective headers for each ad 13 | // type's delegate requirements. 14 | 15 | /// Native app install ad type. \see GADNativeAppInstallAd.h. 16 | GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeAppInstall; 17 | 18 | /// Native content ad type. \see GADNativeContentAd.h. 19 | GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeContent; 20 | 21 | /// Native custom template ad type. \see GADNativeCustomTemplateAd.h. 22 | GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeCustomTemplate; 23 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADAdLoaderDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADAdLoaderDelegate.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import "GADRequestError.h" 11 | 12 | @class GADAdLoader; 13 | 14 | /// Base ad loader delegate protocol. Ad types provide extended protocols that declare methods to 15 | /// handle successful ad loads. 16 | @protocol GADAdLoaderDelegate 17 | 18 | /// Called when adLoader fails to load an ad. 19 | - (void)adLoader:(GADAdLoader *)adLoader didFailToReceiveAdWithError:(GADRequestError *)error; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADAdNetworkExtras.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADAdNetworkExtras.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2012 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | /// An object implementing this protocol contains information set by the publisher on the client 11 | /// device for a particular ad network. 12 | /// 13 | /// Ad networks should create an 'extras' object implementing this protocol for their publishers to 14 | /// use. 15 | @protocol GADAdNetworkExtras 16 | @end 17 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADAdReward.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADAdReward.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface GADAdReward : NSObject 11 | 12 | /// Type of the reward. 13 | @property(nonatomic, readonly, copy) NSString *type; 14 | 15 | /// Amount rewarded to the user. 16 | @property(nonatomic, readonly, copy) NSDecimalNumber *amount; 17 | 18 | /// Returns an initialized GADAdReward with the provided reward type and reward amount. rewardType 19 | /// and rewardAmount must not be nil. 20 | - (instancetype)initWithRewardType:(NSString *)rewardType 21 | rewardAmount:(NSDecimalNumber *)rewardAmount NS_DESIGNATED_INITIALIZER; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADAdSizeDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADAdSizeDelegate.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2012 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import 11 | 12 | @class GADBannerView; 13 | 14 | /// The class implementing this protocol will be notified when the DFPBannerView changes ad size. 15 | /// Any views that may be affected by the banner size change will have time to adjust. 16 | @protocol GADAdSizeDelegate 17 | 18 | /// Called before the ad view changes to the new size. 19 | - (void)adView:(GADBannerView *)bannerView willChangeAdSizeTo:(GADAdSize)size; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADAppEventDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADAppEventDelegate.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2012 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @class GADBannerView; 11 | @class GADInterstitial; 12 | 13 | /// Implement your app event within these methods. The delegate will be notified when the SDK 14 | /// receives an app event message from the ad. 15 | @protocol GADAppEventDelegate 16 | 17 | @optional 18 | 19 | /// Called when the banner receives an app event. 20 | - (void)adView:(GADBannerView *)banner 21 | didReceiveAppEvent:(NSString *)name 22 | withInfo:(NSString *)info; 23 | 24 | /// Called when the interstitial receives an app event. 25 | - (void)interstitial:(GADInterstitial *)interstitial 26 | didReceiveAppEvent:(NSString *)name 27 | withInfo:(NSString *)info; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADBannerViewDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADBannerViewDelegate.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2011 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @class GADBannerView; 11 | @class GADRequestError; 12 | 13 | /// Delegate methods for receiving GADBannerView state change messages such as ad request status 14 | /// and ad click lifecycle. 15 | @protocol GADBannerViewDelegate 16 | 17 | @optional 18 | 19 | #pragma mark Ad Request Lifecycle Notifications 20 | 21 | /// Tells the delegate that an ad request successfully received an ad. The delegate may want to add 22 | /// the banner view to the view hierarchy if it hasn't been added yet. 23 | - (void)adViewDidReceiveAd:(GADBannerView *)bannerView; 24 | 25 | /// Tells the delegate that an ad request failed. The failure is normally due to network 26 | /// connectivity or ad availablility (i.e., no fill). 27 | - (void)adView:(GADBannerView *)bannerView didFailToReceiveAdWithError:(GADRequestError *)error; 28 | 29 | #pragma mark Click-Time Lifecycle Notifications 30 | 31 | /// Tells the delegate that a full screen view will be presented in response to the user clicking on 32 | /// an ad. The delegate may want to pause animations and time sensitive interactions. 33 | - (void)adViewWillPresentScreen:(GADBannerView *)bannerView; 34 | 35 | /// Tells the delegate that the full screen view will be dismissed. 36 | - (void)adViewWillDismissScreen:(GADBannerView *)bannerView; 37 | 38 | /// Tells the delegate that the full screen view has been dismissed. The delegate should restart 39 | /// anything paused while handling adViewWillPresentScreen:. 40 | - (void)adViewDidDismissScreen:(GADBannerView *)bannerView; 41 | 42 | /// Tells the delegate that the user click will open another app, backgrounding the current 43 | /// application. The standard UIApplicationDelegate methods, like applicationDidEnterBackground:, 44 | /// are called immediately before this method is called. 45 | - (void)adViewWillLeaveApplication:(GADBannerView *)bannerView; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADCorrelator.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADCorrelator.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | /// Represents a correlation between multiple ads. Set an instance of this object on multiple ads to 11 | /// indicate they are being used in a common context. 12 | @interface GADCorrelator : NSObject 13 | 14 | /// Resets the correlator to force a new set of correlated ads. 15 | - (void)reset; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADCorrelatorAdLoaderOptions.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADCorrelatorAdLoaderOptions.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | /// Ad loader options for adding a correlator to a native ad request. 12 | @interface GADCorrelatorAdLoaderOptions : GADAdLoaderOptions 13 | 14 | /// Correlator object for correlating ads loaded by an ad loader to other ad objects. 15 | @property(nonatomic, strong) GADCorrelator *correlator; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADCustomEventBanner.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADCustomEventBanner.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2012 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import 11 | #import 12 | #import 13 | 14 | /// The protocol for a Custom Event of the banner type. Your Custom Event handler object for banners 15 | /// must implement this protocol. The requestBannerAd method will be called when mediation schedules 16 | /// your Custom Event to be executed. 17 | @protocol GADCustomEventBanner 18 | 19 | /// This method is called by mediation when your Custom Event is scheduled to be executed. Results 20 | /// of the execution should be reported back via the delegate. |adSize| is the size of the ad as 21 | /// configured in the mediation UI for the mediation placement. |serverParameter| and |serverLabel| 22 | /// are the parameter and label configured in the mediation UI for the Custom Event. |request| 23 | /// contains information about the ad request, some of those are from GADRequest. 24 | - (void)requestBannerAd:(GADAdSize)adSize 25 | parameter:(NSString *)serverParameter 26 | label:(NSString *)serverLabel 27 | request:(GADCustomEventRequest *)request; 28 | 29 | /// You should call back to the |delegate| with the results of the execution to ensure mediation 30 | /// behaves correctly. The delegate is weakly referenced to prevent memory leaks caused by circular 31 | /// retention. 32 | /// 33 | /// Define the -delegate and -setDelegate: methods in your class. 34 | /// 35 | /// In your class's -dealloc method, remember to nil out the delegate. 36 | @property(nonatomic, weak) id delegate; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADCustomEventBannerDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADCustomEventBannerDelegate.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2012 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | #import 12 | 13 | @protocol GADCustomEventBanner; 14 | 15 | /// Call back to this delegate in your custom event. You must call customEventBanner:didReceiveAd: 16 | /// when there is an ad to show, or customEventBanner:didFailAd: when there is no ad to show. 17 | /// Otherwise, if enough time passed (several seconds) after the SDK called the requestBannerAd: 18 | /// method of your custom event, the mediation SDK will consider the request timed out, and move on 19 | /// to the next ad network. 20 | @protocol GADCustomEventBannerDelegate 21 | 22 | /// Your Custom Event object must call this when it receives or creates an ad view. 23 | - (void)customEventBanner:(id)customEvent didReceiveAd:(UIView *)view; 24 | 25 | /// Your Custom Event object must call this when it fails to receive or create the ad view. Pass 26 | /// along any error object sent from the ad network's SDK, or an NSError describing the error. Pass 27 | /// nil if not available. 28 | - (void)customEventBanner:(id)customEvent didFailAd:(NSError *)error; 29 | 30 | /// Your Custom Event object should call this when the user touches or "clicks" the ad to initiate 31 | /// an action. When the SDK receives this callback, it reports the click back to the mediation 32 | /// server. 33 | - (void)customEventBannerWasClicked:(id)customEvent; 34 | 35 | /// The rootViewController that you set in GADBannerView. Use this UIViewController to show a modal 36 | /// view when a user taps on the ad. 37 | @property(nonatomic, readonly) UIViewController *viewControllerForPresentingModalView; 38 | 39 | /// When you call the following methods, the call will be propagated back to the 40 | /// GADBannerViewDelegate that you implemented and passed to GADBannerView. 41 | 42 | /// Your Custom Event should call this when the user taps an ad and a modal view appears. 43 | - (void)customEventBannerWillPresentModal:(id)customEvent; 44 | 45 | /// Your Custom Event should call this when the user dismisses the modal view and the modal view is 46 | /// about to go away. 47 | - (void)customEventBannerWillDismissModal:(id)customEvent; 48 | 49 | /// Your Custom Event should call this when the user dismisses the modal view and the modal view has 50 | /// gone away. 51 | - (void)customEventBannerDidDismissModal:(id)customEvent; 52 | 53 | /// Your Custom Event should call this method when a user action will result in App switching. 54 | - (void)customEventBannerWillLeaveApplication:(id)customEvent; 55 | 56 | #pragma mark Deprecated 57 | 58 | - (void)customEventBanner:(id)customEvent 59 | clickDidOccurInAd:(UIView *)view 60 | GAD_DEPRECATED_MSG_ATTRIBUTE("Use customEventBannerWasClicked:."); 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADCustomEventExtras.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADCustomEventExtras.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2012 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import 11 | 12 | /// Create an instance of this class to set additional parameters for each custom event object. The 13 | /// additional parameters for a custom event are keyed by the custom event label. These extras are 14 | /// passed to your implementation of GADCustomEventBanner or GADCustomEventInterstitial. 15 | @interface GADCustomEventExtras : NSObject 16 | 17 | /// Set additional parameters for the custom event with label |label|. To remove additional 18 | /// parameters associated with |label|, pass in nil for |extras|. 19 | - (void)setExtras:(NSDictionary *)extras forLabel:(NSString *)label; 20 | 21 | /// Retrieve the extras for |label|. 22 | - (NSDictionary *)extrasForLabel:(NSString *)label; 23 | 24 | /// Removes all the extras set on this instance. 25 | - (void)removeAllExtras; 26 | 27 | /// Returns all the extras set on this instance. 28 | - (NSDictionary *)allExtras; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADCustomEventInterstitial.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADCustomEventInterstitial.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2012 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import 11 | #import 12 | 13 | /// The protocol for a Custom Event of the interstitial type. Your Custom Event handler object for 14 | /// interstitial must implement this protocol. The requestInterstitialAd method will be called when 15 | /// mediation schedules your Custom Event to be executed. 16 | @protocol GADCustomEventInterstitial 17 | 18 | /// You should call back to the |delegate| with the results of the execution to ensure mediation 19 | /// behaves correctly. The delegate is assigned, not retained, to prevent memory leak caused by 20 | /// circular retention. 21 | /// 22 | /// Define the -delegate and -setDelegate: methods in your class. 23 | /// 24 | /// In your class's -dealloc method, remember to nil out the delegate. 25 | @property(nonatomic, weak) id delegate; 26 | 27 | /// This method is called by mediation when your Custom Event is scheduled to be executed. Your 28 | /// implementation should begin retrieval of the interstitial ad, usually from a backend server, or 29 | /// from an ad network SDK. Results of the execution should be reported back via the delegate. Note 30 | /// that you should wait until -presentFromRootViewController is called before displaying the 31 | /// interstitial ad. Do not automatically display the ad when you receive the ad. Instead, retain 32 | /// the ad and display it when presentFromRootViewController is called. |serverParameter| and 33 | /// |serverLabel| are the parameter and label configured in the AdMob mediation UI for the Custom 34 | /// Event. |request| contains information about the ad request, some of those are from GADRequest. 35 | - (void)requestInterstitialAdWithParameter:(NSString *)serverParameter 36 | label:(NSString *)serverLabel 37 | request:(GADCustomEventRequest *)request; 38 | 39 | /// Present the interstitial ad as a modal view using the provided view controller. This is called 40 | /// only after your Custom Event calls back to the delegate with the message 41 | /// -customEvent:didReceiveAd: . 42 | - (void)presentFromRootViewController:(UIViewController *)rootViewController; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADCustomEventInterstitialDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADCustomEventInterstitialDelegate.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2012 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import 11 | 12 | @protocol GADCustomEventInterstitial; 13 | 14 | /// Call back to this delegate in your custom event. You must call 15 | /// customEventInterstitial:didReceiveAd: when there is an ad to show, or 16 | /// customEventInterstitial:didFailAd: when there is no ad to show. Otherwise, if enough time passed 17 | /// (several seconds) after the SDK called the requestInterstitialAdWithParameter: method of your 18 | /// custom event, the mediation SDK will consider the request timed out, and move on to the next ad 19 | /// network. 20 | @protocol GADCustomEventInterstitialDelegate 21 | 22 | /// Your Custom Event object must call this when it receives or creates an interstitial ad. 23 | - (void)customEventInterstitialDidReceiveAd:(id)customEvent; 24 | 25 | /// Your Custom Event object must call this when it fails to receive or create the ad. Pass along 26 | /// any error object sent from the ad network's SDK, or an NSError describing the error. Pass nil if 27 | /// not available. 28 | - (void)customEventInterstitial:(id)customEvent 29 | didFailAd:(NSError *)error; 30 | 31 | /// Your Custom Event object should call this when the user touches or "clicks" the ad to initiate 32 | /// an action. When the SDK receives this callback, it reports the click back to the mediation 33 | /// server. 34 | - (void)customEventInterstitialWasClicked:(id)customEvent; 35 | 36 | /// When you call any of the the following methods, the call will be propagated back to the 37 | /// GADInterstitialDelegate that you implemented and passed to GADInterstitial. 38 | 39 | /// Your Custom Event should call this when the interstitial is being displayed. 40 | - (void)customEventInterstitialWillPresent:(id)customEvent; 41 | 42 | /// Your Custom Event should call this when the interstitial is about to be dismissed. 43 | - (void)customEventInterstitialWillDismiss:(id)customEvent; 44 | 45 | /// Your Custom Event should call this when the interstitial has been dismissed. 46 | - (void)customEventInterstitialDidDismiss:(id)customEvent; 47 | 48 | /// Your Custom Event should call this method when a user action will result in app switching. 49 | - (void)customEventInterstitialWillLeaveApplication:(id)customEvent; 50 | 51 | #pragma mark Deprecated 52 | - (void)customEventInterstitial:(id)customEvent 53 | didReceiveAd:(NSObject *)ad 54 | GAD_DEPRECATED_MSG_ATTRIBUTE("Use customEventInterstitialDidReceiveAd:."); 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADCustomEventNativeAd.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADCustomEventNativeAd.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import "GADCustomEventRequest.h" 11 | 12 | @protocol GADCustomEventNativeAdDelegate; 13 | 14 | /// The protocol for a custom event for a native ad. Your custom event handler object for native ads 15 | /// must implement this protocol. The 16 | /// requestNativeAdWithParameter:request:adTypes:options:rootViewController: method will be called 17 | /// when mediation schedules your custom event to be executed. 18 | @protocol GADCustomEventNativeAd 19 | 20 | /// This method is called by mediation when your custom event is scheduled to be executed. 21 | /// |serverParameter| is the parameter configured in the mediation UI for the custom event. 22 | /// |request| contains ad targeting information. |adTypes| contains the list of native ad types 23 | /// requested. See GADAdLoaderAdTypes.h for available ad types. |options| are any additional options 24 | /// configured by the publisher for requesting a native ad. See GADNativeAdImageAdLoaderOptions.h 25 | /// for available image options. |rootViewController| is the view controller provided by the 26 | /// publisher. 27 | - (void)requestNativeAdWithParameter:(NSString *)serverParameter 28 | request:(GADCustomEventRequest *)request 29 | adTypes:(NSArray *)adTypes 30 | options:(NSArray *)options 31 | rootViewController:(UIViewController *)rootViewController; 32 | 33 | /// The delegate object, used for receiving custom native ad load request progress. 34 | @property(nonatomic, weak) id delegate; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADCustomEventNativeAdDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADCustomEventNativeAdDelegate.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import 11 | #import 12 | 13 | /// The delegate of the GADCustomEventNativeAd object must adopt the GADCustomEventNativeAdDelegate 14 | /// protocol. Methods in this protocol are used for native ad's custom event communication with the 15 | /// Google Mobile Ads SDK. 16 | @protocol GADCustomEventNativeAdDelegate 17 | 18 | /// Tells the delegate that the custom event ad request succeeded and loaded a native ad. 19 | - (void)customEventNativeAd:(id)customEventNativeAd 20 | didReceiveMediatedNativeAd:(id)mediatedNativeAd; 21 | 22 | /// Tells the delegate that the custom event ad request failed. 23 | - (void)customEventNativeAd:(id)customEventNativeAd 24 | didFailToLoadWithError:(NSError *)error; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADCustomEventRequest.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADCustomEventRequest.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2012 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import 11 | 12 | @class GADCustomEventExtras; 13 | 14 | @interface GADCustomEventRequest : NSObject 15 | 16 | /// The end user's gender set in GADRequest. If not specified, returns kGADGenderUnknown. 17 | @property(nonatomic, readonly, assign) GADGender userGender; 18 | 19 | /// The end user's birthday set in GADRequest. If not specified, returns nil. 20 | @property(nonatomic, readonly, copy) NSDate *userBirthday; 21 | 22 | /// The end user's latitude, longitude, and accuracy, set in GADRequest. If not specified, 23 | /// userHasLocation returns NO, and userLatitude, userLongitude and userLocationAccuracyInMeters 24 | /// will all return 0. 25 | @property(nonatomic, readonly, assign) BOOL userHasLocation; 26 | @property(nonatomic, readonly, assign) CGFloat userLatitude; 27 | @property(nonatomic, readonly, assign) CGFloat userLongitude; 28 | @property(nonatomic, readonly, assign) CGFloat userLocationAccuracyInMeters; 29 | 30 | /// Description of the user's location, in free form text, set in GADRequest. If not available, 31 | /// returns nil. This may be set even if userHasLocation is NO. 32 | @property(nonatomic, readonly, copy) NSString *userLocationDescription; 33 | 34 | /// Keywords set in GADRequest. Returns nil if no keywords are set. 35 | @property(nonatomic, readonly, copy) NSArray *userKeywords; 36 | 37 | /// The additional parameters set by the application. This property allows you to pass additional 38 | /// information from your application to your Custom Event object. To do so, create an instance of 39 | /// GADCustomEventExtras to pass to GADRequest -registerAdNetworkExtras:. The instance should have 40 | /// an NSDictionary set for a particular custom event label. That NSDictionary becomes the 41 | /// additionalParameters here. 42 | @property(nonatomic, readonly, copy) NSDictionary *additionalParameters; 43 | 44 | /// Indicates if the testing property has been set in GADRequest. 45 | @property(nonatomic, readonly, assign) BOOL isTesting; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADExtras.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADExtras.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2012 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import 11 | 12 | @interface GADExtras : NSObject 13 | 14 | /// Additional parameters to be sent to Google networks. 15 | @property(nonatomic, copy) NSDictionary *additionalParameters; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADInAppPurchaseDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADInAppPurchaseDelegate.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2013 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @class GADDefaultInAppPurchase; 11 | @class GADInAppPurchase; 12 | 13 | #pragma mark - Default Purchase Flow 14 | 15 | /// In-app purchase delegate protocol for default purchase handling. The delegate must deliver 16 | /// the purchased item then call the GADDefaultInAppPurchase object's finishTransaction method. 17 | @protocol GADDefaultInAppPurchaseDelegate 18 | 19 | /// Called when the user successfully paid for a purchase. You must first deliver the purchased 20 | /// item to the user, then call defaultInAppPurchase's finishTransaction method. 21 | - (void)userDidPayForPurchase:(GADDefaultInAppPurchase *)defaultInAppPurchase; 22 | 23 | @optional 24 | 25 | /// Called when the user clicks on the buy button of an in-app purchase ad. Return YES if the 26 | /// default purchase flow should be started to purchase the item, otherwise return NO. If not 27 | /// implemented, defaults to YES. 28 | - (BOOL)shouldStartPurchaseForProductID:(NSString *)productID quantity:(NSInteger)quantity; 29 | 30 | @end 31 | 32 | #pragma mark - Custom Purchase Flow 33 | 34 | /// In-app purchase delegate protocol for custom purchase handling. The delegate must handle the 35 | /// product purchase flow then call the GADInAppPurchase object's reportPurchaseStatus: method. 36 | @protocol GADInAppPurchaseDelegate 37 | 38 | /// Called when the user clicks on the buy button of an in-app purchase ad. After the receiver 39 | /// handles the purchase, it must call the GADInAppPurchase object's reportPurchaseStatus: method. 40 | - (void)didReceiveInAppPurchase:(GADInAppPurchase *)purchase; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADInterstitialDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADInterstitialDelegate.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2011 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @class GADInterstitial; 11 | @class GADRequestError; 12 | 13 | /// Delegate for receiving state change messages from a GADInterstitial such as interstitial ad 14 | /// requests succeeding/failing. 15 | @protocol GADInterstitialDelegate 16 | 17 | @optional 18 | 19 | #pragma mark Ad Request Lifecycle Notifications 20 | 21 | /// Called when an interstitial ad request succeeded. Show it at the next transition point in your 22 | /// application such as when transitioning between view controllers. 23 | - (void)interstitialDidReceiveAd:(GADInterstitial *)ad; 24 | 25 | /// Called when an interstitial ad request completed without an interstitial to 26 | /// show. This is common since interstitials are shown sparingly to users. 27 | - (void)interstitial:(GADInterstitial *)ad didFailToReceiveAdWithError:(GADRequestError *)error; 28 | 29 | #pragma mark Display-Time Lifecycle Notifications 30 | 31 | /// Called just before presenting an interstitial. After this method finishes the interstitial will 32 | /// animate onto the screen. Use this opportunity to stop animations and save the state of your 33 | /// application in case the user leaves while the interstitial is on screen (e.g. to visit the App 34 | /// Store from a link on the interstitial). 35 | - (void)interstitialWillPresentScreen:(GADInterstitial *)ad; 36 | 37 | /// Called before the interstitial is to be animated off the screen. 38 | - (void)interstitialWillDismissScreen:(GADInterstitial *)ad; 39 | 40 | /// Called just after dismissing an interstitial and it has animated off the screen. 41 | - (void)interstitialDidDismissScreen:(GADInterstitial *)ad; 42 | 43 | /// Called just before the application will background or terminate because the user clicked on an 44 | /// ad that will launch another application (such as the App Store). The normal 45 | /// UIApplicationDelegate methods, like applicationDidEnterBackground:, will be called immediately 46 | /// before this. 47 | - (void)interstitialWillLeaveApplication:(GADInterstitial *)ad; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADMediatedNativeAd.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADMediatedNativeAd.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | /// Base protocol for mediated native ads. 12 | @protocol GADMediatedNativeAd 13 | 14 | /// Returns a delegate object that receives state change notifications. 15 | - (id)mediatedNativeAdDelegate; 16 | 17 | /// Returns a dictionary of asset names and object pairs for assets that are not handled by 18 | /// properties of the GADMediatedNativeAd subclass. 19 | - (NSDictionary *)extraAssets; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADMediatedNativeAdDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADMediatedNativeAdDelegate.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @protocol GADMediatedNativeAd; 12 | 13 | /// GADMediatedNativeAdDelegate objects handle mediated native ad events. 14 | @protocol GADMediatedNativeAdDelegate 15 | 16 | @optional 17 | 18 | /// Tells the delegate that the mediated native ad has rendered in |view|. 19 | - (void)mediatedNativeAd:(id)mediatedNativeAd didRenderInView:(UIView *)view; 20 | 21 | /// Tells the delegate that the mediated native ad has recorded an impression. This method is called 22 | /// only once per mediated native ad. 23 | - (void)mediatedNativeAdDidRecordImpression:(id)mediatedNativeAd; 24 | 25 | /// Tells the delegate that the mediated native ad has recorded a user click on the asset named 26 | /// |assetName|. Full screen actions should be presented from |viewController|. 27 | - (void)mediatedNativeAd:(id)mediatedNativeAd 28 | didRecordClickOnAssetWithName:(NSString *)assetName 29 | view:(UIView *)view 30 | viewController:(UIViewController *)viewController; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADMediatedNativeAdNotificationSource.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADMediatedNativeAdNotificationSource.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | /// Notifies the Google Mobile Ads SDK about the events performed by adapters. Adapters may perform 12 | /// some action (e.g. opening an in app browser or open the iTunes store) when handling callbacks 13 | /// from GADMediatedNativeAdDelegate. Adapters in such case should notify the Google Mobile Ads SDK 14 | /// by calling the relevant methods from this class. 15 | @interface GADMediatedNativeAdNotificationSource : NSObject 16 | 17 | /// Must be called by the adapter just before mediatedNativeAd has opened an in app modal screen. 18 | + (void)mediatedNativeAdWillPresentScreen:(id)mediatedNativeAd; 19 | 20 | /// Must be called by the adapter just before the in app modal screen opened by mediatedNativeAd is 21 | /// dismissed. 22 | + (void)mediatedNativeAdWillDismissScreen:(id)mediatedNativeAd; 23 | 24 | /// Must be called by the adapter after the in app modal screen opened by mediatedNativeAd is 25 | /// dismissed. 26 | + (void)mediatedNativeAdDidDismissScreen:(id)mediatedNativeAd; 27 | 28 | /// Must be called by the adapter just before mediatedNativeAd has left the application. 29 | + (void)mediatedNativeAdWillLeaveApplication:(id)mediatedNativeAd; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADMediatedNativeAppInstallAd.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADMediatedNativeAppInstallAd.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | 12 | /// Provides methods used for constructing native app install ads. The adapter must return an object 13 | /// conforming to this protocol for native app install ad requests. 14 | @protocol GADMediatedNativeAppInstallAd 15 | 16 | /// App title. 17 | - (NSString *)headline; 18 | 19 | /// Array of GADNativeAdImage objects related to the advertised application. 20 | - (NSArray *)images; 21 | 22 | /// App description. 23 | - (NSString *)body; 24 | 25 | /// Application icon. 26 | - (GADNativeAdImage *)icon; 27 | 28 | /// Text that encourages user to take some action with the ad. For example "Install". 29 | - (NSString *)callToAction; 30 | 31 | /// App store rating (0 to 5). 32 | - (NSDecimalNumber *)starRating; 33 | 34 | /// The app store name. For example, "App Store". 35 | - (NSString *)store; 36 | 37 | /// String representation of the app's price. 38 | - (NSString *)price; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADMediatedNativeContentAd.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADMediatedNativeContentAd.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | 12 | /// Provides methods used for constructing native content ads. 13 | @protocol GADMediatedNativeContentAd 14 | 15 | /// Primary text headline. 16 | - (NSString *)headline; 17 | 18 | /// Secondary text. 19 | - (NSString *)body; 20 | 21 | /// List of large images. Each object is an instance of GADNativeAdImage. 22 | - (NSArray *)images; 23 | 24 | /// Small logo image. 25 | - (GADNativeAdImage *)logo; 26 | 27 | /// Text that encourages user to take some action with the ad. 28 | - (NSString *)callToAction; 29 | 30 | /// Identifies the advertiser. For example, the advertiser’s name or visible URL. 31 | - (NSString *)advertiser; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADMobileAds.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADMobileAds.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface GADMobileAds : NSObject 11 | 12 | /// Disables automated in app purchase (IAP) reporting. Must be called before any IAP transaction is 13 | /// initiated. IAP reporting is used to track IAP ad conversions. Do not disable reporting if you 14 | /// use IAP ads. 15 | + (void)disableAutomatedInAppPurchaseReporting; 16 | 17 | /// Disables automated SDK crash reporting. If not called, the SDK records the original exception 18 | /// handler if available and registers a new exception handler. The new exception handler only 19 | /// reports SDK related exceptions and calls the recorded original exception handler. 20 | + (void)disableSDKCrashReporting; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADNativeAd.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADNativeAd.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @protocol GADNativeAdDelegate; 12 | 13 | /// Native ad base class. All native ad types are subclasses of this class. 14 | @interface GADNativeAd : NSObject 15 | 16 | /// Optional delegate to receive state change notifications. 17 | @property(nonatomic, weak) id delegate; 18 | 19 | /// Root view controller for handling ad actions. 20 | @property(nonatomic, weak) UIViewController *rootViewController; 21 | 22 | /// Dictionary of assets which aren't processed by the receiver. 23 | @property(nonatomic, readonly, copy) NSDictionary *extraAssets; 24 | 25 | /// The ad network class name that fetched the current ad. For both standard and mediated Google 26 | /// AdMob ads, this method returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation 27 | /// custom events, this method returns @"GADMAdapterCustomEvents". 28 | @property(nonatomic, readonly, copy) NSString *adNetworkClassName; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADNativeAdDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADNativeAdDelegate.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @class GADNativeAd; 11 | 12 | /// Identifies native ad assets. 13 | @protocol GADNativeAdDelegate 14 | 15 | @optional 16 | 17 | #pragma mark Click-Time Lifecycle Notifications 18 | 19 | /// Called just before presenting the user a full screen view, such as a browser, in response to 20 | /// clicking on an ad. Use this opportunity to stop animations, time sensitive interactions, etc. 21 | /// 22 | /// Normally the user looks at the ad, dismisses it, and control returns to your application with 23 | /// the nativeAdDidDismissScreen: message. However, if the user hits the Home button or clicks on an 24 | /// App Store link, your application will end. The next method called will be the 25 | /// applicationWillResignActive: of your UIApplicationDelegate object.Immediately after that, 26 | /// nativeAdWillLeaveApplication: is called. 27 | - (void)nativeAdWillPresentScreen:(GADNativeAd *)nativeAd; 28 | 29 | /// Called just before dismissing a full screen view. 30 | - (void)nativeAdWillDismissScreen:(GADNativeAd *)nativeAd; 31 | 32 | /// Called just after dismissing a full screen view. Use this opportunity to restart anything you 33 | /// may have stopped as part of nativeAdWillPresentScreen:. 34 | - (void)nativeAdDidDismissScreen:(GADNativeAd *)nativeAd; 35 | 36 | /// Called just before the application will go to the background or terminate due to an ad action 37 | /// that will launch another application (such as the App Store). The normal UIApplicationDelegate 38 | /// methods, like applicationDidEnterBackground:, will be called immediately before this. 39 | - (void)nativeAdWillLeaveApplication:(GADNativeAd *)nativeAd; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADNativeAdImage+Mediation.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADNativeAdImage+Mediation.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google. All rights reserved. 6 | // 7 | 8 | #import "GADNativeAdImage.h" 9 | 10 | @interface GADNativeAdImage (MediationAdditions) 11 | 12 | /// Initializes and returns a native ad image object with the provided image. 13 | - (instancetype)initWithImage:(UIImage *)image; 14 | 15 | /// Initializes and returns a native ad image object with the provided image URL and image scale. 16 | - (instancetype)initWithURL:(NSURL *)URL scale:(CGFloat)scale; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADNativeAdImage.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADNativeAdImage.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | /// Native ad image. 12 | @interface GADNativeAdImage : NSObject 13 | 14 | /// The image. If image autoloading is disabled, this property will be nil. 15 | @property(nonatomic, readonly, strong) UIImage *image; 16 | 17 | /// The image's URL. 18 | @property(nonatomic, readonly, strong) NSURL *imageURL; 19 | 20 | /// The image's scale. 21 | @property(nonatomic, readonly, assign) CGFloat scale; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADNativeAdImageAdLoaderOptions.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADNativeAdImageAdLoaderOptions.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | /// Native ad image orientation preference. 11 | typedef NS_ENUM(NSInteger, GADNativeAdImageAdLoaderOptionsOrientation) { 12 | GADNativeAdImageAdLoaderOptionsOrientationAny, ///< No orientation preference. 13 | GADNativeAdImageAdLoaderOptionsOrientationPortrait, ///< Prefer portrait images. 14 | GADNativeAdImageAdLoaderOptionsOrientationLandscape ///< Prefer landscape images. 15 | }; 16 | 17 | @interface GADNativeAdImageAdLoaderOptions : GADAdLoaderOptions 18 | 19 | /// Indicates if image asset content should be loaded by the SDK. If set to YES, the SDK will not 20 | /// load image asset content and native ad image URLs can be used to fetch content. Defaults to NO, 21 | /// image assets are loaded by the SDK. 22 | @property(nonatomic, assign) BOOL disableImageLoading; 23 | 24 | /// Indicates if multiple images should be loaded for each asset. Defaults to NO. 25 | @property(nonatomic, assign) BOOL shouldRequestMultipleImages; 26 | 27 | /// Indicates preferred image orientation. Defaults to 28 | /// GADNativeAdImageAdLoaderOptionsOrientationAny. 29 | @property(nonatomic, assign) GADNativeAdImageAdLoaderOptionsOrientation preferredImageOrientation; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADNativeAppInstallAd.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADNativeAppInstallAd.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | #import 12 | #import 13 | #import 14 | #import 15 | 16 | /// For use with GADAdLoader's creation methods. If you request this ad type, your delegate must 17 | /// conform to the GADNativeAppInstallAdRequestDelegate protocol. 18 | /// 19 | /// See GADNativeAdImageAdLoaderOptions.h for ad loader image options. 20 | GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeAppInstall; 21 | 22 | /// Native app install ad. 23 | @interface GADNativeAppInstallAd : GADNativeAd 24 | 25 | #pragma mark - Must be displayed 26 | 27 | /// App title. 28 | @property(nonatomic, readonly, copy) NSString *headline; 29 | /// Text that encourages user to take some action with the ad. For example "Install". 30 | @property(nonatomic, readonly, copy) NSString *callToAction; 31 | /// Application icon. 32 | @property(nonatomic, readonly, strong) GADNativeAdImage *icon; 33 | 34 | #pragma mark - Recommended to display 35 | 36 | /// App description. 37 | @property(nonatomic, readonly, copy) NSString *body; 38 | /// The app store name. For example, "App Store". 39 | @property(nonatomic, readonly, copy) NSString *store; 40 | /// String representation of the app's price. 41 | @property(nonatomic, readonly, copy) NSString *price; 42 | /// Array of GADNativeAdImage objects related to the advertised application. 43 | @property(nonatomic, readonly, strong) NSArray *images; 44 | /// App store rating (0 to 5). 45 | @property(nonatomic, readonly, copy) NSDecimalNumber *starRating; 46 | @end 47 | 48 | #pragma mark - Protocol and constants 49 | 50 | /// The delegate of a GADAdLoader object implements this protocol to receive GADNativeAppInstallAd 51 | /// ads. 52 | @protocol GADNativeAppInstallAdLoaderDelegate 53 | /// Called when a native app install ad is received. 54 | - (void)adLoader:(GADAdLoader *)adLoader 55 | didReceiveNativeAppInstallAd:(GADNativeAppInstallAd *)nativeAppInstallAd; 56 | @end 57 | 58 | #pragma mark - Native App Install Ad View 59 | 60 | /// Base class for app install ad views. Your app install ad view must be a subclass of this class 61 | /// and must call superclass methods for all overriden methods. 62 | @interface GADNativeAppInstallAdView : UIView 63 | 64 | /// This property must point to the native app install ad object rendered by this ad view. 65 | @property(nonatomic, strong) GADNativeAppInstallAd *nativeAppInstallAd; 66 | 67 | // Weak references to your ad view's asset views. 68 | @property(nonatomic, weak) IBOutlet UIView *headlineView; 69 | @property(nonatomic, weak) IBOutlet UIView *callToActionView; 70 | @property(nonatomic, weak) IBOutlet UIView *iconView; 71 | @property(nonatomic, weak) IBOutlet UIView *bodyView; 72 | @property(nonatomic, weak) IBOutlet UIView *storeView; 73 | @property(nonatomic, weak) IBOutlet UIView *priceView; 74 | @property(nonatomic, weak) IBOutlet UIView *imageView; 75 | @property(nonatomic, weak) IBOutlet UIView *starRatingView; 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADNativeContentAd.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADNativeContentAd.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | #import 12 | #import 13 | #import 14 | #import 15 | 16 | #pragma mark - Native Content Ad Assets 17 | 18 | /// For use with GADAdLoader's creation methods. If you request this ad type, your delegate must 19 | /// conform to the GADNativeContentAdRequestDelegate protocol. 20 | /// 21 | /// See GADNativeAdImageAdLoaderOptions.h for ad loader image options. 22 | GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeContent; 23 | 24 | /// Native content ad. 25 | @interface GADNativeContentAd : GADNativeAd 26 | 27 | #pragma mark - Must be displayed 28 | 29 | /// Primary text headline. 30 | @property(nonatomic, readonly, copy) NSString *headline; 31 | /// Secondary text. 32 | @property(nonatomic, readonly, copy) NSString *body; 33 | 34 | #pragma mark - Recommended to display 35 | 36 | /// Large images. 37 | @property(nonatomic, readonly, copy) NSArray *images; 38 | /// Small logo image. 39 | @property(nonatomic, readonly, strong) GADNativeAdImage *logo; 40 | /// Text that encourages user to take some action with the ad. 41 | @property(nonatomic, readonly, copy) NSString *callToAction; 42 | /// Identifies the advertiser. For example, the advertiser’s name or visible URL. 43 | @property(nonatomic, readonly, copy) NSString *advertiser; 44 | @end 45 | 46 | #pragma mark - Protocol and constants 47 | 48 | /// The delegate of a GADAdLoader object implements this protocol to receive GADNativeContentAd ads. 49 | @protocol GADNativeContentAdLoaderDelegate 50 | /// Called when native content is received. 51 | - (void)adLoader:(GADAdLoader *)adLoader 52 | didReceiveNativeContentAd:(GADNativeContentAd *)nativeContentAd; 53 | @end 54 | 55 | #pragma mark - Native Content Ad View 56 | 57 | /// Base class for content ad views. Your content ad view must be a subclass of this class and must 58 | /// call superclass methods for all overriden methods. 59 | @interface GADNativeContentAdView : UIView 60 | 61 | /// This property must point to the native content ad object rendered by this ad view. 62 | @property(nonatomic, strong) GADNativeContentAd *nativeContentAd; 63 | 64 | // Weak references to your ad view's asset views. 65 | @property(nonatomic, weak) IBOutlet UIView *headlineView; 66 | @property(nonatomic, weak) IBOutlet UIView *bodyView; 67 | @property(nonatomic, weak) IBOutlet UIView *imageView; 68 | @property(nonatomic, weak) IBOutlet UIView *logoView; 69 | @property(nonatomic, weak) IBOutlet UIView *callToActionView; 70 | @property(nonatomic, weak) IBOutlet UIView *advertiserView; 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADNativeCustomTemplateAd.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADNativeCustomTemplateAd.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | #import 12 | #import 13 | #import 14 | #import 15 | 16 | /// For use with GADAdLoader's creation methods. If you request this ad type, your delegate must 17 | /// conform to the GADNativeCustomTemplateAdLoaderDelegate protocol. 18 | GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeCustomTemplate; 19 | 20 | /// Native custom template ad. 21 | @interface GADNativeCustomTemplateAd : GADNativeAd 22 | 23 | /// The ad's custom template ID. 24 | @property(nonatomic, readonly) NSString *templateID; 25 | 26 | /// Array of available asset keys. 27 | @property(nonatomic, readonly) NSArray *availableAssetKeys; 28 | 29 | /// Returns the native ad image corresponding to the specified key or nil if the image is not 30 | /// available. 31 | - (GADNativeAdImage *)imageForKey:(NSString *)key; 32 | 33 | /// Returns the string corresponding to the specified key or nil if the string is not available. 34 | - (NSString *)stringForKey:(NSString *)key; 35 | 36 | /// Call when the user clicks on the ad. Provide the asset key that best matches the asset the user 37 | /// interacted with. Provide |customClickHandler| only if this template is configured with a custom 38 | /// click action, otherwise pass in nil. If a block is provided, the ad's built-in click actions are 39 | /// ignored and |customClickHandler| is executed after recording the click. 40 | - (void)performClickOnAssetWithKey:(NSString *)assetKey 41 | customClickHandler:(dispatch_block_t)customClickHandler; 42 | 43 | /// Call when the ad is displayed on screen to the user. Can be called multiple times. Only the 44 | /// first impression is recorded. 45 | - (void)recordImpression; 46 | 47 | @end 48 | 49 | #pragma mark - Loading Protocol 50 | 51 | /// The delegate of a GADAdLoader object implements this protocol to receive 52 | /// GADNativeCustomTemplateAd ads. 53 | @protocol GADNativeCustomTemplateAdLoaderDelegate 54 | 55 | /// Called when requesting an ad. Asks the delgate for an array of custom template ID strings. 56 | - (NSArray *)nativeCustomTemplateIDsForAdLoader:(GADAdLoader *)adLoader; 57 | 58 | /// Tells the delegate that a native custom template ad was received. 59 | - (void)adLoader:(GADAdLoader *)adLoader 60 | didReceiveNativeCustomTemplateAd:(GADNativeCustomTemplateAd *)nativeCustomTemplateAd; 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADRequestError.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADRequestError.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2011 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import 11 | 12 | @class GADRequest; 13 | 14 | /// Google AdMob Ads error domain. 15 | GAD_EXTERN NSString *const kGADErrorDomain; 16 | 17 | /// NSError codes for GAD error domain. 18 | typedef NS_ENUM(NSInteger, GADErrorCode) { 19 | /// The ad request is invalid. The localizedFailureReason error description will have more 20 | /// details. Typically this is because the ad did not have the ad unit ID or root view 21 | /// controller set. 22 | kGADErrorInvalidRequest, 23 | 24 | /// The ad request was successful, but no ad was returned. 25 | kGADErrorNoFill, 26 | 27 | /// There was an error loading data from the network. 28 | kGADErrorNetworkError, 29 | 30 | /// The ad server experienced a failure processing the request. 31 | kGADErrorServerError, 32 | 33 | /// The current device's OS is below the minimum required version. 34 | kGADErrorOSVersionTooLow, 35 | 36 | /// The request was unable to be loaded before being timed out. 37 | kGADErrorTimeout, 38 | 39 | /// Will not send request because the interstitial object has already been used. 40 | kGADErrorInterstitialAlreadyUsed, 41 | 42 | /// The mediation response was invalid. 43 | kGADErrorMediationDataError, 44 | 45 | /// Error finding or creating a mediation ad network adapter. 46 | kGADErrorMediationAdapterError, 47 | 48 | /// The mediation request was successful, but no ad was returned from any ad networks. 49 | kGADErrorMediationNoFill, 50 | 51 | /// Attempting to pass an invalid ad size to an adapter. 52 | kGADErrorMediationInvalidAdSize, 53 | 54 | /// Internal error. 55 | kGADErrorInternalError, 56 | 57 | /// Invalid argument error. 58 | kGADErrorInvalidArgument, 59 | 60 | /// Received invalid response. 61 | kGADErrorReceivedInvalidResponse 62 | }; 63 | 64 | /// Represents the error generated due to invalid request parameters. 65 | @interface GADRequestError : NSError 66 | @end 67 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAd.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADRewardBasedVideoAd.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @class GADRequest; 12 | 13 | @protocol GADRewardBasedVideoAdDelegate; 14 | 15 | @interface GADRewardBasedVideoAd : NSObject 16 | 17 | /// Delegate for receiving video notifications. 18 | @property(nonatomic, weak) id delegate; 19 | 20 | /// Indicates if the receiver is ready to be presented full screen. 21 | @property(nonatomic, readonly, assign, getter=isReady) BOOL ready; 22 | 23 | /// Singleton instance. 24 | + (GADRewardBasedVideoAd *)sharedInstance; 25 | 26 | /// Initiate the request to fetch the reward based video ad. 27 | - (void)loadRequest:(GADRequest *)request 28 | withAdUnitID:(NSString *)adUnitID 29 | userID:(NSString *)userID; 30 | 31 | /// Present the reward based video ad with provided view controller. 32 | - (void)presentFromRootViewController:(UIViewController *)viewController; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAdDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADRewardBasedVideoAdDelegate.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import 11 | 12 | /// Delegate for receiving state change messages from a GADRewardBasedVideoAd such as ad requests 13 | /// succeeding/failing. 14 | @protocol GADRewardBasedVideoAdDelegate 15 | 16 | @optional 17 | 18 | /// Tells the delegate that the reward based video ad has been received. 19 | - (void)rewardBasedVideoAdDidReceiveAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd; 20 | 21 | /// Tells the delegate that the reward based video ad is opened. 22 | - (void)rewardBasedVideoAdDidOpen:(GADRewardBasedVideoAd *)rewardBasedVideoAd; 23 | 24 | /// Tells the delegate that the reward based video ad has started playing. 25 | - (void)rewardBasedVideoAdDidStartPlaying:(GADRewardBasedVideoAd *)rewardBasedVideoAd; 26 | 27 | /// Tells the delegate that the reward based video ad is closed. 28 | - (void)rewardBasedVideoAdDidClose:(GADRewardBasedVideoAd *)rewardBasedVideoAd; 29 | 30 | /// Tells the delegate that the reward based video ad will leave the application. 31 | - (void)rewardBasedVideoAdWillLeaveApplication:(GADRewardBasedVideoAd *)rewardBasedVideoAd; 32 | 33 | /// Tells the delegate that the reward based video ad has rewarded the user. 34 | - (void)rewardBasedVideoAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd 35 | didRewardUserWithReward:(GADAdReward *)reward; 36 | 37 | /// Tells the delegate that the reward based video ad has failed to load. 38 | - (void)rewardBasedVideoAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd 39 | didFailToLoadwithError:(NSError *)error; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADSearchBannerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADSearchBannerView.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2011 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | // A view that displays search ads. 11 | // To show search ads: 12 | // 1) Create a GADSearchBannerView and add it to your view controller's view hierarchy. 13 | // 2) Create a GADSearchRequest ad request object to hold the search query and other search data. 14 | // 3) Call GADSearchBannerView's -loadRequest: method with the GADSearchRequest object. 15 | @interface GADSearchBannerView : GADBannerView 16 | @end 17 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GADSearchRequest.h: -------------------------------------------------------------------------------- 1 | // 2 | // GADSearchRequest.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2011 Google Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | #import 12 | 13 | /// Search ad border types. 14 | typedef NS_ENUM(NSUInteger, GADSearchBorderType) { 15 | kGADSearchBorderTypeNone, 16 | kGADSearchBorderTypeDashed, 17 | kGADSearchBorderTypeDotted, 18 | kGADSearchBorderTypeSolid 19 | }; 20 | 21 | typedef NS_ENUM(NSUInteger, GADSearchCallButtonColor) { 22 | kGADSearchCallButtonLight, 23 | kGADSearchCallButtonMedium, 24 | kGADSearchCallButtonDark 25 | }; 26 | 27 | // Specifies parameters for search ads. 28 | @interface GADSearchRequest : GADRequest 29 | 30 | @property(nonatomic, copy) NSString *query; 31 | @property(nonatomic, copy, readonly) UIColor *backgroundColor; 32 | @property(nonatomic, copy, readonly) UIColor *gradientFrom; 33 | @property(nonatomic, copy, readonly) UIColor *gradientTo; 34 | @property(nonatomic, copy) UIColor *headerColor; 35 | @property(nonatomic, copy) UIColor *descriptionTextColor; 36 | @property(nonatomic, copy) UIColor *anchorTextColor; 37 | @property(nonatomic, copy) NSString *fontFamily; 38 | @property(nonatomic, assign) NSUInteger headerTextSize; 39 | @property(nonatomic, copy) UIColor *borderColor; 40 | @property(nonatomic, assign) GADSearchBorderType borderType; 41 | @property(nonatomic, assign) NSUInteger borderThickness; 42 | @property(nonatomic, copy) NSString *customChannels; 43 | @property(nonatomic, assign) GADSearchCallButtonColor callButtonColor; 44 | 45 | // A solid background color for rendering the ad. The background of the ad 46 | // can either be a solid color, or a gradient, which can be specified through 47 | // setBackgroundGradientFrom:toColor: method. If both solid and gradient 48 | // background is requested, only the latter is considered. 49 | - (void)setBackgroundSolid:(UIColor *)color; 50 | 51 | // A linear gradient background color for rendering the ad. The background of 52 | // the ad can either be a linear gradient, or a solid color, which can be 53 | // specified through setBackgroundSolid method. If both solid and gradient 54 | // background is requested, only the latter is considered. 55 | - (void)setBackgroundGradientFrom:(UIColor *)from toColor:(UIColor *)toColor; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GoogleMobileAds.h: -------------------------------------------------------------------------------- 1 | // 2 | // GoogleMobileAds.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright 2014 Google Inc. All rights reserved. 6 | 7 | #import 8 | #import 9 | 10 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0 11 | #error The Google Mobile Ads SDK requires a deployment target of iOS 6.0 or later. 12 | #endif 13 | 14 | //! Project version string for GoogleMobileAds. 15 | FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; 16 | 17 | #import 18 | 19 | #import 20 | #import 21 | #import 22 | #import 23 | #import 24 | #import 25 | #import 26 | #import 27 | #import 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | 34 | #import 35 | #import 36 | #import 37 | #import 38 | #import 39 | #import 40 | #import 41 | #import 42 | 43 | #import 44 | #import 45 | #import 46 | 47 | #import 48 | #import 49 | #import 50 | #import 51 | #import 52 | #import 53 | #import 54 | 55 | #import 56 | 57 | #import 58 | #import 59 | #import 60 | #import 61 | #import 62 | #import 63 | #import 64 | #import 65 | #import 66 | #import 67 | #import 68 | #import 69 | #import 70 | 71 | #import 72 | #import 73 | 74 | #import 75 | #import 76 | #import 77 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h: -------------------------------------------------------------------------------- 1 | // 2 | // GoogleMobileAdsDefines.h 3 | // Google Mobile Ads SDK 4 | // 5 | // Copyright (c) 2015 Google Inc. All rights reserved. 6 | // 7 | 8 | #if defined(__cplusplus) 9 | #define GAD_EXTERN extern "C" __attribute__((visibility("default"))) 10 | #else 11 | #define GAD_EXTERN extern __attribute__((visibility("default"))) 12 | #endif // defined(__cplusplus) 13 | 14 | #if defined(__has_feature) && defined(__has_attribute) 15 | #if __has_feature(attribute_GAD_DEPRECATED_with_message) 16 | #define GAD_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s))) 17 | #elif __has_attribute(deprecated) 18 | #define GAD_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated)) 19 | #else 20 | #define GAD_DEPRECATED_MSG_ATTRIBUTE(s) 21 | #endif // __has_feature(attribute_GAD_DEPRECATED_with_message) 22 | #if __has_attribute(deprecated) 23 | #define GAD_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) 24 | #else 25 | #define GAD_DEPRECATED_ATTRIBUTE 26 | #endif // __has_attribute(deprecated) 27 | #else 28 | #define GAD_DEPRECATED_ATTRIBUTE 29 | #define GAD_DEPRECATED_MSG_ATTRIBUTE(s) 30 | #endif // defined(__has_feature) && defined(__has_attribute) 31 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/ios/GoogleMobileAds.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module GoogleMobileAds { 2 | umbrella header "GoogleMobileAds.h" 3 | 4 | export * 5 | module * { export * } 6 | 7 | link framework "AdSupport" 8 | link framework "AudioToolbox" 9 | link framework "AVFoundation" 10 | link framework "CoreGraphics" 11 | link framework "CoreMedia" 12 | link framework "CoreTelephony" 13 | link framework "EventKit" 14 | link framework "EventKitUI" 15 | link framework "Foundation" 16 | link framework "MessageUI" 17 | link framework "StoreKit" 18 | link framework "SystemConfiguration" 19 | link framework "UIKit" 20 | } 21 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/wp8/AdMobOptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Cordova.Extension.Commands 4 | { 5 | public class AdMobOptions 6 | { 7 | public string adId { get; set; } 8 | public bool? autoShow { get; set; } 9 | 10 | public bool? isTesting { get; set; } 11 | public bool? logVerbose { get; set; } 12 | 13 | public string adSize { get; set; } 14 | public int? width { get; set; } 15 | public int? height { get; set; } 16 | 17 | public bool? overlap { get; set; } 18 | public bool? orientationRenew { get; set; } 19 | 20 | public int? position { get; set; } 21 | public int? x { get; set; } 22 | public int? y { get; set; } 23 | 24 | public string bannerId { get; set; } 25 | public string interstitialId { get; set; } 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/src/wp8/GoogleAds.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/plugins/cordova-plugin-admobpro/src/wp8/GoogleAds.dll -------------------------------------------------------------------------------- /plugins/cordova-plugin-admobpro/test/admob_simple.js: -------------------------------------------------------------------------------- 1 | var admobid = {}; 2 | if( /(android)/i.test(navigator.userAgent) ) { 3 | admobid = { // for Android 4 | banner: 'ca-app-pub-6869992474017983/9375997553', 5 | interstitial: 'ca-app-pub-6869992474017983/1657046752' 6 | }; 7 | } else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) { 8 | admobid = { // for iOS 9 | banner: 'ca-app-pub-6869992474017983/4806197152', 10 | interstitial: 'ca-app-pub-6869992474017983/7563979554' 11 | }; 12 | } else { 13 | admobid = { // for Windows Phone 14 | banner: 'ca-app-pub-6869992474017983/8878394753', 15 | interstitial: 'ca-app-pub-6869992474017983/1355127956' 16 | }; 17 | } 18 | 19 | if(( /(ipad|iphone|ipod|android|windows phone)/i.test(navigator.userAgent) )) { 20 | document.addEventListener('deviceready', initApp, false); 21 | } else { 22 | initApp(); 23 | } 24 | 25 | function initApp() { 26 | if (! AdMob ) { alert( 'admob plugin not ready' ); return; } 27 | 28 | AdMob.createBanner( { 29 | adId: admobid.banner, 30 | isTesting: true, 31 | overlap: false, 32 | offsetTopBar: false, 33 | position: AdMob.AD_POSITION.BOTTOM_CENTER, 34 | bgColor: 'black' 35 | } ); 36 | 37 | AdMob.prepareInterstitial({ 38 | adId: admobid.interstitial, 39 | autoShow: true 40 | }); 41 | } 42 | 43 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-extension/cocos2dx/TODO: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/plugins/cordova-plugin-extension/cocos2dx/TODO -------------------------------------------------------------------------------- /plugins/cordova-plugin-extension/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cordova-plugin-extension", 3 | "version": "1.2.2", 4 | "description": "Cordova Plugin common extension with adapter interface", 5 | "cordova": { 6 | "id": "cordova-plugin-extension", 7 | "platforms": [ 8 | "android", 9 | "ios", 10 | "amazon-fireos" 11 | ] 12 | }, 13 | "keywords": [ 14 | "cordova", 15 | "ecosystem:cordova", 16 | "extension", 17 | "rjfun" 18 | ], 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/floatinghotpot/cordova-extension.git" 22 | }, 23 | "author": { 24 | "name": "Liming Xie", 25 | "email": "rjfun.mobile@gmail.com" 26 | }, 27 | "license": "MIT" 28 | } 29 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-extension/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | Cordova Plugin Extension 9 | Common interface and reusable code, as dependency of other plugins 10 | Liming Xie 11 | MIT 12 | extension,rjfun 13 | https://github.com/floatinghotpot/cordova-extension.git 14 | https://github.com/floatinghotpot/cordova-extension/issues 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | NSAllowsArbitraryLoads 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-extension/src/android/CordovaPluginExt.java: -------------------------------------------------------------------------------- 1 | package com.rjfun.cordova.ext; 2 | 3 | import java.lang.reflect.Method; 4 | 5 | import org.apache.cordova.CallbackContext; 6 | import org.apache.cordova.CordovaPlugin; 7 | import org.apache.cordova.CordovaWebView; 8 | import org.apache.cordova.PluginResult; 9 | 10 | import android.app.Activity; 11 | import android.view.View; 12 | 13 | public class CordovaPluginExt extends CordovaPlugin implements PluginAdapterDelegate { 14 | 15 | protected PluginAdapterDelegate adapter = null; 16 | 17 | public void setAdapter(PluginAdapterDelegate theAdapter) { 18 | adapter = theAdapter; 19 | } 20 | 21 | public PluginAdapterDelegate getAdapter() { 22 | return adapter; 23 | } 24 | 25 | @Override 26 | public View getView() { 27 | if(adapter != null) return adapter.getView(); 28 | else { 29 | // Cordova 3.x, class CordovaWebView extends WebView, -> AbsoluteLayout -> ViewGroup -> View -> Object 30 | if(View.class.isAssignableFrom(CordovaWebView.class)) { 31 | return (View) webView; 32 | } 33 | 34 | // Cordova 4.0.0-dev, interface CordovaWebView { View getView(); } 35 | try { 36 | Method getViewMethod = CordovaWebView.class.getMethod("getView", (Class[]) null); 37 | if(getViewMethod != null) { 38 | Object[] args = {}; 39 | return (View) getViewMethod.invoke(webView, args); 40 | } 41 | } catch (Exception e) { 42 | } 43 | 44 | // or else we return the root view, but this should not happen 45 | return getActivity().getWindow().getDecorView().findViewById(android.R.id.content); 46 | } 47 | } 48 | 49 | @Override 50 | public Activity getActivity() { 51 | if(adapter != null) return adapter.getActivity(); 52 | return cordova.getActivity(); 53 | } 54 | 55 | @Override 56 | public void fireEvent(String obj, String eventName, String jsonData) { 57 | if(adapter != null) adapter.fireEvent(obj, eventName, jsonData); 58 | else { 59 | String js; 60 | if("window".equals(obj)) { 61 | js = "var evt=document.createEvent('UIEvents');evt.initUIEvent('" + eventName + "',true,false,window,0);window.dispatchEvent(evt);"; 62 | } else { 63 | js = "javascript:cordova.fireDocumentEvent('" + eventName + "'"; 64 | if(jsonData != null) { 65 | js += "," + jsonData; 66 | } 67 | js += ");"; 68 | } 69 | webView.loadUrl(js); 70 | } 71 | } 72 | 73 | @Override 74 | public void sendPluginResult(PluginResult result, CallbackContext context) { 75 | if(adapter != null) adapter.sendPluginResult(result, context); 76 | else { 77 | context.sendPluginResult(result); 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-extension/src/android/PluginAdapterDelegate.java: -------------------------------------------------------------------------------- 1 | package com.rjfun.cordova.ext; 2 | 3 | import org.apache.cordova.CallbackContext; 4 | import org.apache.cordova.PluginResult; 5 | 6 | import android.app.Activity; 7 | import android.view.View; 8 | 9 | public interface PluginAdapterDelegate { 10 | // context 11 | public Activity getActivity(); 12 | public View getView(); 13 | 14 | // send message from plugin to container on events 15 | public void fireEvent(String obj, String eventName, String jsonData); 16 | 17 | // send call result 18 | public void sendPluginResult(PluginResult result, CallbackContext context); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-extension/src/android/cordova-generic-ad.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/plugins/cordova-plugin-extension/src/android/cordova-generic-ad.jar -------------------------------------------------------------------------------- /plugins/cordova-plugin-extension/src/ios/CDVPluginExt.h: -------------------------------------------------------------------------------- 1 | // 2 | // CDVPluginExt.h 3 | // TestAdMobCombo 4 | // 5 | // Created by Xie Liming on 14-10-28. 6 | // 7 | // 8 | 9 | #import "PluginAdapterDelegate.h" 10 | 11 | @interface CDVPluginExt : CDVPlugin 12 | 13 | @property(nonatomic, retain) id adapter; 14 | 15 | - (UIView*) getView; 16 | - (UIViewController*) getViewController; 17 | - (void) fireEvent:(NSString *)obj event:(NSString *)eventName withData:(NSString *)jsonStr; 18 | - (void) sendPluginResult:(CDVPluginResult *)result to:(NSString *)callbackId; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-extension/src/ios/CDVPluginExt.m: -------------------------------------------------------------------------------- 1 | // 2 | // CDVPluginExt.m 3 | // TestAdMobCombo 4 | // 5 | // Created by Xie Liming on 14-10-28. 6 | // 7 | // 8 | 9 | #import "CDVPluginExt.h" 10 | 11 | @implementation CDVPluginExt 12 | 13 | - (UIView*) getView 14 | { 15 | if(self.adapter) return [self.adapter getView]; 16 | else return self.webView; 17 | } 18 | 19 | - (UIViewController*) getViewController 20 | { 21 | if(self.adapter) return [self.adapter getViewController]; 22 | else return self.viewController; 23 | } 24 | 25 | - (void) fireEvent:(NSString *)obj event:(NSString *)eventName withData:(NSString *)jsonStr 26 | { 27 | NSLog(@"%@, %@, %@", obj, eventName, jsonStr?jsonStr:@""); 28 | 29 | if(self.adapter) [self.adapter fireEvent:obj event:eventName withData:jsonStr]; 30 | else { 31 | NSString* js; 32 | if(obj && [obj isEqualToString:@"window"]) { 33 | js = [NSString stringWithFormat:@"var evt=document.createEvent(\"UIEvents\");evt.initUIEvent(\"%@\",true,false,window,0);window.dispatchEvent(evt);", eventName]; 34 | } else if(jsonStr && [jsonStr length]>0) { 35 | js = [NSString stringWithFormat:@"javascript:cordova.fireDocumentEvent('%@',%@);", eventName, jsonStr]; 36 | } else { 37 | js = [NSString stringWithFormat:@"javascript:cordova.fireDocumentEvent('%@');", eventName]; 38 | } 39 | [self.commandDelegate evalJs:js]; 40 | } 41 | } 42 | 43 | - (void) sendPluginResult:(CDVPluginResult *)result to:(NSString *)callbackId 44 | { 45 | if(self.adapter) [self.adapter sendPluginResult:result to:callbackId]; 46 | else { 47 | [self.commandDelegate sendPluginResult:result callbackId:callbackId]; 48 | } 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-extension/src/ios/PluginAdapterDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // PluginAdapterDelegate.h 3 | // TestAdMobCombo 4 | // 5 | // Created by Xie Liming on 14-10-20. 6 | // 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @protocol PluginAdapterDelegate 13 | 14 | - (UIView*) getView; 15 | 16 | - (UIViewController*) getViewController; 17 | 18 | - (void) fireEvent:(NSString*)obj event:(NSString*)eventName withData:(NSString*)jsonStr; 19 | 20 | - (void) sendPluginResult:(CDVPluginResult*)result to:(NSString*)callbackId; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-extension/src/ios/libCordovaGenericAd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/plugins/cordova-plugin-extension/src/ios/libCordovaGenericAd.a -------------------------------------------------------------------------------- /plugins/cordova-plugin-extension/unity/PluginAdapterUnity.h: -------------------------------------------------------------------------------- 1 | // 2 | // PluginAdapterUnity.h 3 | // TestAdMobCombo 4 | // 5 | // Created by Xie Liming on 14-10-31. 6 | // 7 | // 8 | 9 | #import "PluginAdapterDelegate.h" 10 | 11 | @interface PluginAdapterUnity : NSObject 12 | 13 | - (UIView*) getView; 14 | 15 | - (UIViewController*) getViewController; 16 | 17 | - (void) fireEvent:(NSString*)obj event:(NSString*)eventName withData:(NSString*)jsonStr; 18 | 19 | - (void) sendPluginResult:(CDVPluginResult*)result to:(NSString*)callbackId; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-extension/unity/PluginAdapterUnity.java: -------------------------------------------------------------------------------- 1 | package com.rjfun.cordova.unity; 2 | 3 | import org.apache.cordova.CallbackContext; 4 | import org.apache.cordova.PluginResult; 5 | 6 | import android.app.Activity; 7 | import android.view.View; 8 | import android.view.ViewGroup.LayoutParams; 9 | import android.widget.RelativeLayout; 10 | 11 | import com.rjfun.cordova.ext.PluginAdapterDelegate; 12 | import com.unity3d.player.UnityPlayer; 13 | 14 | public class PluginAdapterUnity implements PluginAdapterDelegate { 15 | 16 | private static RelativeLayout rootLayout = null; 17 | private static View mainView = null; 18 | 19 | @Override 20 | public Activity getActivity() { 21 | return UnityPlayer.currentActivity; 22 | } 23 | 24 | @Override 25 | public View getView() { 26 | Activity act = getActivity(); 27 | // mock Cordova's webView and the layout container 28 | if(rootLayout == null) { 29 | rootLayout = new RelativeLayout(act); 30 | RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); 31 | getActivity().addContentView(rootLayout, params); 32 | } 33 | if(mainView == null) { 34 | mainView = new RelativeLayout(act); 35 | RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); 36 | rootLayout.addView(mainView, params); 37 | } 38 | return mainView; 39 | } 40 | 41 | @Override 42 | public void fireEvent(String obj, String eventName, String jsonData) { 43 | UnityPlayer.UnitySendMessage(obj, eventName, jsonData); 44 | } 45 | 46 | @Override 47 | public void sendPluginResult(PluginResult result, CallbackContext context) { 48 | String jsonData = "{\"callbackId\":\"" + context.getCallbackId() + 49 | "\",\"status\":" + result.getStatus() + 50 | ",\"keepCallback\":" + (result.getKeepCallback()?1:0) + 51 | ",\"data\":" + result.getMessage() + 52 | "}"; 53 | UnityPlayer.UnitySendMessage("Cordova", "onExecuteCallback", jsonData); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-extension/unity/PluginAdapterUnity.m: -------------------------------------------------------------------------------- 1 | // 2 | // PluginAdapterUnity.m 3 | // TestAdMobCombo 4 | // 5 | // Created by Xie Liming on 14-10-31. 6 | // 7 | // 8 | 9 | #import "PluginAdapterUnity.h" 10 | /* 11 | void UnityPause( bool pause ); 12 | 13 | void UnitySendMessage( const char * className, const char * methodName, const char * param ); 14 | 15 | UIViewController *UnityGetGLViewController(); 16 | 17 | @implementation PluginAdapterUnity 18 | 19 | - (UIView*) getView 20 | { 21 | return [self getViewController].view; 22 | } 23 | 24 | - (UIViewController*) getViewController 25 | { 26 | return UnityGetGLViewController(); 27 | } 28 | 29 | - (void) fireEvent:(NSString*)obj event:(NSString*)eventName withData:(NSString*)jsonStr 30 | { 31 | const char * className = obj ? obj.UTF8String : "Cordova"; 32 | const char * methodName = eventName ? eventName.UTF8String : "onEvent"; 33 | const char * param = jsonStr ? jsonStr.UTF8String : ""; 34 | 35 | UnitySendMessage(className, methodName, param); 36 | } 37 | 38 | - (void) sendPluginResult:(CDVPluginResult*)result to:(NSString*)callbackId 39 | { 40 | NSMutableString* jsonData = [NSMutableString string]; 41 | [jsonData appendFormat: @"{\"callbackId\":\"%@\",\"status\":%d, \"keepCallback\":%d", callbackId, (int)result.status, (int)result.keepCallback ]; 42 | [jsonData appendString: @",\"data\":"]; 43 | [jsonData appendString: [result argumentsAsJSON]]; 44 | [jsonData appendString: @"}"]; 45 | 46 | UnitySendMessage("Cordova", "onExecuteCallback", jsonData.UTF8String); 47 | } 48 | 49 | @end 50 | */ -------------------------------------------------------------------------------- /plugins/fetch.json: -------------------------------------------------------------------------------- 1 | { 2 | "com.cmackay.plugins.googleanalytics": { 3 | "source": { 4 | "type": "registry", 5 | "id": "com.cmackay.plugins.googleanalytics" 6 | }, 7 | "is_top_level": true, 8 | "variables": {} 9 | }, 10 | "org.apache.cordova.device": { 11 | "source": { 12 | "type": "registry", 13 | "id": "org.apache.cordova.device" 14 | } 15 | }, 16 | "com.brodysoft.sqlitePlugin": { 17 | "source": { 18 | "type": "git", 19 | "url": "https://github.com/brodysoft/Cordova-SQLitePlugin", 20 | "subdir": "." 21 | } 22 | }, 23 | "cordova-plugin-device": { 24 | "source": { 25 | "type": "registry", 26 | "id": "cordova-plugin-device" 27 | }, 28 | "is_top_level": true, 29 | "variables": {} 30 | } 31 | } -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 21 | 22 | # Contributing to Apache Cordova 23 | 24 | Anyone can contribute to Cordova. And we need your contributions. 25 | 26 | There are multiple ways to contribute: report bugs, improve the docs, and 27 | contribute code. 28 | 29 | For instructions on this, start with the 30 | [contribution overview](http://cordova.apache.org/#contribute). 31 | 32 | The details are explained there, but the important items are: 33 | - Sign and submit an Apache ICLA (Contributor License Agreement). 34 | - Have a Jira issue open that corresponds to your contribution. 35 | - Run the tests so your patch doesn't break existing functionality. 36 | 37 | We look forward to your contributions! 38 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/NOTICE: -------------------------------------------------------------------------------- 1 | Apache Cordova 2 | Copyright 2012 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/README.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.device 21 | 22 | Plugin documentation: [doc/index.md](doc/index.md) 23 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/blackberry10/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | * 20 | */ 21 | 22 | function getModelName () { 23 | var modelName = window.qnx.webplatform.device.modelName; 24 | //Pre 10.2 (meaning Z10 or Q10) 25 | if (typeof modelName === "undefined") { 26 | if (window.screen.height === 720 && window.screen.width === 720) { 27 | if ( window.matchMedia("(-blackberry-display-technology: -blackberry-display-oled)").matches) { 28 | modelName = "Q10"; 29 | } else { 30 | modelName = "Q5"; 31 | } 32 | } else if ((window.screen.height === 1280 && window.screen.width === 768) || 33 | (window.screen.height === 768 && window.screen.width === 1280)) { 34 | modelName = "Z10"; 35 | } else { 36 | modelName = window.qnx.webplatform.deviceName; 37 | } 38 | } 39 | 40 | return modelName; 41 | } 42 | 43 | function getUUID () { 44 | var uuid = ""; 45 | try { 46 | //Must surround by try catch because this will throw if the app is missing permissions 47 | uuid = window.qnx.webplatform.device.devicePin; 48 | } catch (e) { 49 | //DO Nothing 50 | } 51 | return uuid; 52 | } 53 | 54 | module.exports = { 55 | getDeviceInfo: function (success, fail, args, env) { 56 | var result = new PluginResult(args, env), 57 | modelName = getModelName(), 58 | uuid = getUUID(), 59 | info = { 60 | manufacturer: 'BlackBerry', 61 | platform: "blackberry10", 62 | version: window.qnx.webplatform.device.scmBundle, 63 | model: modelName, 64 | uuid: uuid 65 | }; 66 | 67 | result.ok(info); 68 | } 69 | }; 70 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/browser/DeviceProxy.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | * 20 | */ 21 | var browser = require('cordova/platform'); 22 | var cordova = require('cordova'); 23 | 24 | function getPlatform() { 25 | return "browser"; 26 | } 27 | 28 | function getModel() { 29 | return getBrowserInfo(true); 30 | } 31 | 32 | function getVersion() { 33 | return getBrowserInfo(false); 34 | } 35 | 36 | function getBrowserInfo(getModel) { 37 | var userAgent = navigator.userAgent; 38 | var returnVal = ''; 39 | 40 | if ((offset = userAgent.indexOf('Chrome')) !== -1) { 41 | returnVal = (getModel) ? 'Chrome' : userAgent.substring(offset + 7); 42 | } else if ((offset = userAgent.indexOf('Safari')) !== -1) { 43 | if (getModel) { 44 | returnVal = 'Safari'; 45 | } else { 46 | returnVal = userAgent.substring(offset + 7); 47 | 48 | if ((offset = userAgent.indexOf('Version')) !== -1) { 49 | returnVal = userAgent.substring(offset + 8); 50 | } 51 | } 52 | } else if ((offset = userAgent.indexOf('Firefox')) !== -1) { 53 | returnVal = (getModel) ? 'Firefox' : userAgent.substring(offset + 8); 54 | } else if ((offset = userAgent.indexOf('MSIE')) !== -1) { 55 | returnVal = (getModel) ? 'MSIE' : userAgent.substring(offset + 5); 56 | } else if ((offset = userAgent.indexOf('Trident')) !== -1) { 57 | returnVal = (getModel) ? 'MSIE' : '11'; 58 | } 59 | 60 | if ((offset = returnVal.indexOf(';')) !== -1 || (offset = returnVal.indexOf(' ')) !== -1) { 61 | returnVal = returnVal.substring(0, offset); 62 | } 63 | 64 | return returnVal; 65 | } 66 | 67 | 68 | module.exports = { 69 | getDeviceInfo: function (success, error) { 70 | setTimeout(function () { 71 | success({ 72 | cordova: browser.cordovaVersion, 73 | platform: getPlatform(), 74 | model: getModel(), 75 | version: getVersion(), 76 | uuid: null 77 | }); 78 | }, 0); 79 | } 80 | }; 81 | 82 | require("cordova/exec/proxy").add("Device", module.exports); 83 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/firefoxos/DeviceProxy.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | * 20 | */ 21 | //example UA String for Firefox OS 22 | //Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0 23 | var firefoxos = require('cordova/platform'); 24 | var cordova = require('cordova'); 25 | 26 | //UA parsing not recommended but currently this is the only way to get the Firefox OS version 27 | //https://developer.mozilla.org/en-US/docs/Gecko_user_agent_string_reference 28 | 29 | //Should be replaced when better conversion to Firefox OS Version is available 30 | function convertVersionNumber(ver) { 31 | var hashVersion = { 32 | '18.0': '1.0.1', 33 | '18.1': '1.1', 34 | '26.0': '1.2', 35 | '28.0': '1.3', 36 | '30.0': '1.4', 37 | '32.0': '2.0' 38 | }; 39 | var rver = ver; 40 | var sStr = ver.substring(0, 4); 41 | if (hashVersion[sStr]) { 42 | rver = hashVersion[sStr]; 43 | } 44 | return (rver); 45 | 46 | } 47 | function getVersion() { 48 | if (navigator.userAgent.match(/(mobile|tablet)/i)) { 49 | var ffVersionArray = (navigator.userAgent.match(/Firefox\/([\d]+\.[\w]?\.?[\w]+)/)); 50 | if (ffVersionArray.length === 2) { 51 | return (convertVersionNumber(ffVersionArray[1])); 52 | } 53 | } 54 | return (null); 55 | } 56 | 57 | function getModel() { 58 | var uaArray = navigator.userAgent.split(/\s*[;)(]\s*/); 59 | if (navigator.userAgent.match(/(mobile|tablet)/i)) { 60 | if (uaArray.length === 5) { 61 | return (uaArray[2]); 62 | } 63 | } 64 | return (null); 65 | } 66 | module.exports = { 67 | getDeviceInfo: function (success, error) { 68 | setTimeout(function () { 69 | success({ 70 | platform: 'firefoxos', 71 | model: getModel(), 72 | version: getVersion(), 73 | uuid: null 74 | }); 75 | }, 0); 76 | } 77 | }; 78 | 79 | require("cordova/exec/proxy").add("Device", module.exports); 80 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/ios/CDVDevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import 22 | 23 | @interface CDVDevice : CDVPlugin 24 | {} 25 | 26 | + (NSString*)cordovaVersion; 27 | 28 | - (void)getDeviceInfo:(CDVInvokedUrlCommand*)command; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/tizen/DeviceProxy.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | * 20 | */ 21 | 22 | var tizen = require('cordova/platform'); 23 | var cordova = require('cordova'); 24 | 25 | module.exports = { 26 | getDeviceInfo: function(success, error) { 27 | setTimeout(function () { 28 | success({ 29 | cordova: tizen.cordovaVersion, 30 | platform: 'tizen', 31 | model: null, 32 | version: null, 33 | uuid: null 34 | }); 35 | }, 0); 36 | } 37 | }; 38 | 39 | require("cordova/tizen/commandProxy").add("Device", module.exports); 40 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/ubuntu/device.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Wolfgang Koller - http://www.gofg.at/ 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include 19 | 20 | #include"device.h" 21 | 22 | #define CORDOVA "3.0.0" 23 | 24 | Device::Device(Cordova *cordova) : CPlugin(cordova) { 25 | } 26 | 27 | static QString getOSName() { 28 | #ifdef Q_OS_SYMBIAN 29 | QString platform = "Symbian"; 30 | #endif 31 | #ifdef Q_OS_WIN 32 | QString platform = "Windows"; 33 | #endif 34 | #ifdef Q_OS_WINCE 35 | QString platform = "Windows CE"; 36 | #endif 37 | #ifdef Q_OS_LINUX 38 | QString platform = "Linux"; 39 | #endif 40 | return platform; 41 | } 42 | 43 | void Device::getInfo(int scId, int ecId) { 44 | Q_UNUSED(ecId) 45 | 46 | QDeviceInfo systemDeviceInfo; 47 | QDeviceInfo systemInfo; 48 | 49 | QString platform = getOSName(); 50 | 51 | QString uuid = systemDeviceInfo.uniqueDeviceID(); 52 | if (uuid.isEmpty()) { 53 | QString deviceDescription = systemInfo.imei(0) + ";" + systemInfo.manufacturer() + ";" + systemInfo.model() + ";" + systemInfo.productName() + ";" + platform; 54 | QString user = qgetenv("USER"); 55 | if (user.isEmpty()) { 56 | user = qgetenv("USERNAME"); 57 | if (user.isEmpty()) 58 | user = QDir::homePath(); 59 | } 60 | uuid = QString(QCryptographicHash::hash((deviceDescription + ";" + user).toUtf8(), QCryptographicHash::Md5).toHex()); 61 | } 62 | 63 | this->cb(scId, systemDeviceInfo.model(), CORDOVA, platform, uuid, systemInfo.version(QDeviceInfo::Os)); 64 | } 65 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/ubuntu/device.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Wolfgang Koller - http://www.gofg.at/ 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef DEVICE_H_FDSAFAS 18 | #define DEVICE_H_FDSAFAS 19 | 20 | #include 21 | 22 | #include 23 | 24 | class Device: public CPlugin { 25 | Q_OBJECT 26 | public: 27 | explicit Device(Cordova *cordova); 28 | 29 | virtual const QString fullName() override { 30 | return Device::fullID(); 31 | } 32 | 33 | virtual const QString shortName() override { 34 | return "Device"; 35 | } 36 | 37 | static const QString fullID() { 38 | return "com.cordova.Device"; 39 | } 40 | 41 | signals: 42 | 43 | public slots: 44 | void getInfo(int scId, int ecId); 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/ubuntu/device.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | * 20 | */ 21 | 22 | var cordova = require('cordova'); 23 | var exec = require('cordova/exec'); 24 | 25 | module.exports = { 26 | getInfo:function(win,fail,args) { 27 | Cordova.exec(function (model, cordova, platform, uuid, version) { 28 | win({name: name, model: model, cordova: cordova, 29 | platform: platform, uuid: uuid, version: version}); 30 | }, null, "com.cordova.Device", "getInfo", []); 31 | } 32 | }; 33 | 34 | require("cordova/exec/proxy").add("Device", module.exports); 35 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/tests/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 26 | Cordova Device Plugin Tests 27 | Apache 2.0 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/www/device.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | * 20 | */ 21 | 22 | var argscheck = require('cordova/argscheck'), 23 | channel = require('cordova/channel'), 24 | utils = require('cordova/utils'), 25 | exec = require('cordova/exec'), 26 | cordova = require('cordova'); 27 | 28 | channel.createSticky('onCordovaInfoReady'); 29 | // Tell cordova channel to wait on the CordovaInfoReady event 30 | channel.waitForInitialization('onCordovaInfoReady'); 31 | 32 | /** 33 | * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the 34 | * phone, etc. 35 | * @constructor 36 | */ 37 | function Device() { 38 | this.available = false; 39 | this.platform = null; 40 | this.version = null; 41 | this.uuid = null; 42 | this.cordova = null; 43 | this.model = null; 44 | this.manufacturer = null; 45 | 46 | var me = this; 47 | 48 | channel.onCordovaReady.subscribe(function() { 49 | me.getInfo(function(info) { 50 | //ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js 51 | //TODO: CB-5105 native implementations should not return info.cordova 52 | var buildLabel = cordova.version; 53 | me.available = true; 54 | me.platform = info.platform; 55 | me.version = info.version; 56 | me.uuid = info.uuid; 57 | me.cordova = buildLabel; 58 | me.model = info.model; 59 | me.manufacturer = info.manufacturer || 'unknown'; 60 | channel.onCordovaInfoReady.fire(); 61 | },function(e) { 62 | me.available = false; 63 | utils.alert("[ERROR] Error initializing Cordova: " + e); 64 | }); 65 | }); 66 | } 67 | 68 | /** 69 | * Get device info 70 | * 71 | * @param {Function} successCallback The function to call when the heading data is available 72 | * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL) 73 | */ 74 | Device.prototype.getInfo = function(successCallback, errorCallback) { 75 | argscheck.checkArgs('fF', 'Device.getInfo', arguments); 76 | exec(successCallback, errorCallback, "Device", "getDeviceInfo", []); 77 | }; 78 | 79 | module.exports = new Device(); 80 | -------------------------------------------------------------------------------- /res/iTunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/iTunesArtwork@2x.png -------------------------------------------------------------------------------- /res/icon/android/icon-36-ldpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/android/icon-36-ldpi.png -------------------------------------------------------------------------------- /res/icon/android/icon-48-mdpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/android/icon-48-mdpi.png -------------------------------------------------------------------------------- /res/icon/android/icon-72-hdpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/android/icon-72-hdpi.png -------------------------------------------------------------------------------- /res/icon/android/icon-96-xhdpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/android/icon-96-xhdpi.png -------------------------------------------------------------------------------- /res/icon/bada-wac/icon-48-type5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/bada-wac/icon-48-type5.png -------------------------------------------------------------------------------- /res/icon/bada-wac/icon-50-type3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/bada-wac/icon-50-type3.png -------------------------------------------------------------------------------- /res/icon/bada-wac/icon-80-type4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/bada-wac/icon-80-type4.png -------------------------------------------------------------------------------- /res/icon/bada/icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/bada/icon-128.png -------------------------------------------------------------------------------- /res/icon/blackberry/icon-80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/blackberry/icon-80.png -------------------------------------------------------------------------------- /res/icon/ios/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon-40.png -------------------------------------------------------------------------------- /res/icon/ios/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon-40@2x.png -------------------------------------------------------------------------------- /res/icon/ios/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon-40@3x.png -------------------------------------------------------------------------------- /res/icon/ios/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon-50.png -------------------------------------------------------------------------------- /res/icon/ios/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon-50@2x.png -------------------------------------------------------------------------------- /res/icon/ios/icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon-60.png -------------------------------------------------------------------------------- /res/icon/ios/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon-60@2x.png -------------------------------------------------------------------------------- /res/icon/ios/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon-60@3x.png -------------------------------------------------------------------------------- /res/icon/ios/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon-72.png -------------------------------------------------------------------------------- /res/icon/ios/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon-72@2x.png -------------------------------------------------------------------------------- /res/icon/ios/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon-76.png -------------------------------------------------------------------------------- /res/icon/ios/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon-76@2x.png -------------------------------------------------------------------------------- /res/icon/ios/icon-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon-small.png -------------------------------------------------------------------------------- /res/icon/ios/icon-small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon-small@2x.png -------------------------------------------------------------------------------- /res/icon/ios/icon-small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon-small@3x.png -------------------------------------------------------------------------------- /res/icon/ios/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon.png -------------------------------------------------------------------------------- /res/icon/ios/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/ios/icon@2x.png -------------------------------------------------------------------------------- /res/icon/tizen/icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/tizen/icon-128.png -------------------------------------------------------------------------------- /res/icon/webos/icon-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/webos/icon-64.png -------------------------------------------------------------------------------- /res/icon/windows-phone/icon-173-tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/windows-phone/icon-173-tile.png -------------------------------------------------------------------------------- /res/icon/windows-phone/icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/windows-phone/icon-48.png -------------------------------------------------------------------------------- /res/icon/windows-phone/icon-62-tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/icon/windows-phone/icon-62-tile.png -------------------------------------------------------------------------------- /res/screen/android/screen-hdpi-landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/android/screen-hdpi-landscape.png -------------------------------------------------------------------------------- /res/screen/android/screen-hdpi-portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/android/screen-hdpi-portrait.png -------------------------------------------------------------------------------- /res/screen/android/screen-ldpi-landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/android/screen-ldpi-landscape.png -------------------------------------------------------------------------------- /res/screen/android/screen-ldpi-portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/android/screen-ldpi-portrait.png -------------------------------------------------------------------------------- /res/screen/android/screen-mdpi-landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/android/screen-mdpi-landscape.png -------------------------------------------------------------------------------- /res/screen/android/screen-mdpi-portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/android/screen-mdpi-portrait.png -------------------------------------------------------------------------------- /res/screen/android/screen-xhdpi-landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/android/screen-xhdpi-landscape.png -------------------------------------------------------------------------------- /res/screen/android/screen-xhdpi-portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/android/screen-xhdpi-portrait.png -------------------------------------------------------------------------------- /res/screen/bada-wac/screen-type3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/bada-wac/screen-type3.png -------------------------------------------------------------------------------- /res/screen/bada-wac/screen-type4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/bada-wac/screen-type4.png -------------------------------------------------------------------------------- /res/screen/bada-wac/screen-type5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/bada-wac/screen-type5.png -------------------------------------------------------------------------------- /res/screen/bada/screen-portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/bada/screen-portrait.png -------------------------------------------------------------------------------- /res/screen/blackberry/screen-225.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/blackberry/screen-225.png -------------------------------------------------------------------------------- /res/screen/ios/Default-667h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/ios/Default-667h.png -------------------------------------------------------------------------------- /res/screen/ios/Default-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/ios/Default-736h.png -------------------------------------------------------------------------------- /res/screen/ios/Default-Landscape-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/ios/Default-Landscape-736h.png -------------------------------------------------------------------------------- /res/screen/ios/ipad1x-portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/ios/ipad1x-portrait.png -------------------------------------------------------------------------------- /res/screen/ios/ipad1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/ios/ipad1x.png -------------------------------------------------------------------------------- /res/screen/ios/ipad2x-portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/ios/ipad2x-portrait.png -------------------------------------------------------------------------------- /res/screen/ios/ipad2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/ios/ipad2x.png -------------------------------------------------------------------------------- /res/screen/ios/iphone6@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/ios/iphone6@2x.png -------------------------------------------------------------------------------- /res/screen/ios/iphone6plus-portrait@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/ios/iphone6plus-portrait@3x.png -------------------------------------------------------------------------------- /res/screen/ios/iphone6plus@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/ios/iphone6plus@3x.png -------------------------------------------------------------------------------- /res/screen/ios/screen-iphone-portrait-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/ios/screen-iphone-portrait-2x.png -------------------------------------------------------------------------------- /res/screen/ios/screen-iphone-portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/ios/screen-iphone-portrait.png -------------------------------------------------------------------------------- /res/screen/ios/screen-iphone5-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/ios/screen-iphone5-2x.png -------------------------------------------------------------------------------- /res/screen/tizen/README.md: -------------------------------------------------------------------------------- 1 | # Tizen Splash Screen 2 | 3 | Splash screens are unsupported on the Tizen platform. 4 | -------------------------------------------------------------------------------- /res/screen/webos/screen-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/webos/screen-64.png -------------------------------------------------------------------------------- /res/screen/windows-phone/screen-portrait.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/res/screen/windows-phone/screen-portrait.jpg -------------------------------------------------------------------------------- /sass/_fonts.scss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: DeusEx; 3 | src: url(../fonts/DeusEx.ttf); 4 | } 5 | @font-face { 6 | font-family: UbuntuBold; 7 | src: url(../fonts/Ubuntu-B.ttf); 8 | } 9 | 10 | @font-face { 11 | font-family: Ubuntu; 12 | src: url(../fonts/Ubuntu-R.ttf); 13 | } 14 | -------------------------------------------------------------------------------- /sass/_layout.scss: -------------------------------------------------------------------------------- 1 | html, body { 2 | width: 100%; 3 | height: 100%; 4 | position: relative; 5 | font-family: UbuntuBold; 6 | } 7 | 8 | * { 9 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 10 | @include no-user-select(); 11 | } 12 | 13 | .app-background { 14 | @include transition(opacity, 0.1s, linear); 15 | opacity: 0.1; 16 | &.fullOpacity { opacity: 1; } 17 | position: absolute; 18 | left: 0; 19 | right: 100%; 20 | top:0; 21 | bottom: 100%; 22 | width: 100%; 23 | height: 100%; 24 | z-index: -1; 25 | background-color: #f0f0f0; 26 | 27 | $squareSize: 22px; 28 | .square-item { 29 | display: inline-block; 30 | width: $squareSize; 31 | height: $squareSize; 32 | background-color: transparent; 33 | margin: 0 2px; 34 | &.c2d662 { 35 | background-color: #c2d662; 36 | } 37 | &.d8de3f { 38 | background-color: #d8de3f; 39 | } 40 | &.cbcb44 { 41 | background-color: #cbcb44; 42 | } 43 | &.a2a931 { 44 | background-color: #a2a931; 45 | } 46 | &.e1e35c { 47 | background-color: #e1e35c; 48 | } 49 | &.x8c9830 { 50 | background-color: #8c9830; 51 | } 52 | &.a2c64c { 53 | background-color: #a2c64c; 54 | } 55 | &.ebe85b { 56 | background-color: #ebe85b; 57 | } 58 | } 59 | .top-squares { 60 | position: absolute; 61 | right: 2px; 62 | top: 4px; 63 | text-align: right; 64 | } 65 | .bottom-squares { 66 | position: absolute; 67 | bottom: 0; 68 | left: 2px; 69 | } 70 | } 71 | 72 | .layout { 73 | width: 100%; 74 | height: 100%; 75 | position: relative; 76 | background-color: transparent; 77 | font-family: Tahoma; 78 | box-sizing: border-box; 79 | overflow-x: hidden; 80 | } 81 | 82 | .nav-link { 83 | color: #3443ab; 84 | text-decoration: none; 85 | cursor: pointer; 86 | 87 | &:focus { 88 | outline: none; 89 | } 90 | } 91 | 92 | .table { 93 | display: table; 94 | .t-row { 95 | display: table-row; 96 | .t-cell { 97 | display: table-cell; 98 | } 99 | } 100 | } 101 | 102 | .wh100 { 103 | width: 100%; 104 | height: 100%; 105 | } 106 | 107 | .block { 108 | display: block; 109 | } 110 | 111 | .table { 112 | display: table; 113 | .t-row { 114 | display: table-row; 115 | .t-cell { 116 | display: table-cell; 117 | } 118 | } 119 | } 120 | 121 | .text-left { text-align: left; } 122 | .text-right { text-align: right; } 123 | .text-center { text-align: center; } 124 | .inline-block { display: inline-block; } 125 | 126 | @media only screen and (min-width:768px) { 127 | .layout { 128 | max-width: 768px; 129 | margin: 0 auto; 130 | } 131 | } -------------------------------------------------------------------------------- /sass/_variables.scss: -------------------------------------------------------------------------------- 1 | $color-primary: #9acb40; 2 | $color-hover: #d9df3f; 3 | $iconWidth: 50px; -------------------------------------------------------------------------------- /sass/index.scss: -------------------------------------------------------------------------------- 1 | @import '../bower_components/normalize-scss/_normalize'; 2 | 3 | @import 'variables'; 4 | 5 | @import 'common'; 6 | @import 'layout'; 7 | @import 'fonts'; 8 | @import 'home'; 9 | @import 'game'; 10 | @import '../bower_components/elusive-iconfont/sass/elusive-webfont.scss'; 11 | @import '../bower_components/fontawesome/scss/font-awesome.scss'; 12 | -------------------------------------------------------------------------------- /tasks.txt: -------------------------------------------------------------------------------- 1 | 1) Tutorial screen 2 | 2) Levels screen, swipe + chapters 3 | 3) Add levels 4 | 4) Add admob 5 | 5) Ninja and arcade modes -------------------------------------------------------------------------------- /www/desktopHeaderInclude.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /www/fonts/DeusEx.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/www/fonts/DeusEx.ttf -------------------------------------------------------------------------------- /www/fonts/Ubuntu-B.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/www/fonts/Ubuntu-B.ttf -------------------------------------------------------------------------------- /www/fonts/Ubuntu-R.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/www/fonts/Ubuntu-R.ttf -------------------------------------------------------------------------------- /www/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/www/icon.png -------------------------------------------------------------------------------- /www/images/get-google-play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/www/images/get-google-play.png -------------------------------------------------------------------------------- /www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Digit Square 13 | 28 | 34 | 35 | 36 |
    37 |
    38 |
    39 |
    40 |


    43 |
    44 |
    45 |

    47 |
    48 |
    49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /www/js/analytics.js: -------------------------------------------------------------------------------- 1 | define(['angular', 'app/config', 'app/util'], function(angular) { 2 | 'use strict'; 3 | 4 | angular.module('app.analytics', ['app.config', 'app.util']) 5 | .run($AnalyticsRun); 6 | 7 | $AnalyticsRun.$inject = ['appConfig', 'util', 'cordovaEvent', '$window', '$rootScope', 'device']; 8 | function $AnalyticsRun(config, u, cordovaEvent, $window, $rootScope, device) { 9 | if (config.analytics.enabled) { 10 | cordovaEvent.on('deviceready', initializeAnalytics); 11 | } 12 | 13 | function initializeAnalytics() { 14 | var analytics = $window.navigator.analytics; 15 | if (!analytics) { 16 | return; 17 | } 18 | var trackerId = u.getConfigSettingForPlatform(config.analytics.gaId); 19 | analytics.setTrackingId(trackerId); 20 | 21 | analytics.set("&uid", device.uuid); 22 | 23 | try { 24 | analytics.enableAdvertisingIdCollection(); 25 | } catch(e) { 26 | // Gotta catch them all 27 | } 28 | $rootScope.$on('pageViewed', function(event, pageName) { 29 | analytics.sendAppView(pageName); 30 | }); 31 | $rootScope.$on('analyticsEvent', function(event, arg) { 32 | analytics.sendEvent(arg.category, arg.action, arg.label, arg.value); 33 | }); 34 | } 35 | } 36 | }); -------------------------------------------------------------------------------- /www/js/app.js: -------------------------------------------------------------------------------- 1 | define(['angular', 'angular-ui-router', 'angular-touch', 'app/home', 'app/game', 'app/helper', 'app/analytics', 'app/monetize'], function(angular) { 2 | 'use strict'; 3 | 4 | angular.module('app', [ 5 | 'ui.router', 6 | 'ngTouch', 7 | 8 | /* Modules that represent pages */ 9 | 'app.helper', 10 | 'app.home', 11 | 'app.game', 12 | 13 | /* Optional modules */ 14 | 'app.analytics', 15 | 'app.monetize' 16 | ]) 17 | .config(AppConfig) 18 | .run(AppRun); 19 | 20 | AppConfig.$inject = ['$urlRouterProvider']; 21 | function AppConfig($urlRouterProvider) { 22 | $urlRouterProvider.otherwise('/home'); 23 | } 24 | 25 | AppRun.$inject = ['$rootScope', '$timeout', 'panelModal', '$document', '$state', 'screenSettings']; 26 | function AppRun($rootScope, $timeout, panelModal, $document, $state, screenSettings) { 27 | $rootScope.goToPath = function(stateName, search) { 28 | $state.go(stateName, search, { inherit: false, notify: true }); 29 | }; 30 | $rootScope.paddingValue = Math.max(20, Math.ceil(screenSettings.mainContainerWidth / 20)); 31 | 32 | $rootScope.panelModal = function() { 33 | var modalInstance = panelModal.apply(null, [].slice.call(arguments)); 34 | this.$on('$destroy', function() { 35 | if (!modalInstance.isDestroyed()) { 36 | modalInstance.destroy(); 37 | } 38 | }); 39 | return modalInstance; 40 | }; 41 | $rootScope.watchBack = function(listener) { 42 | $document.on('backbutton', listener); 43 | this.$on('$destroy', function() { 44 | $document.off('backbutton', listener); 45 | }); 46 | }; 47 | $rootScope.navBack = function(state, search) { 48 | function onBackKeyDown(evt) { 49 | evt.preventDefault(); 50 | $rootScope.$apply(function() { 51 | $rootScope.goToPath(where, search); 52 | }); 53 | } 54 | 55 | this.watchBack(onBackKeyDown); 56 | }; 57 | 58 | var statesWithFullOpacityBg = ['home']; 59 | $rootScope.$on('$stateChangeStart', function(event, toState) { 60 | $rootScope.fullOpacityClass = statesWithFullOpacityBg.indexOf(toState.name) !== -1; 61 | }); 62 | } 63 | }); -------------------------------------------------------------------------------- /www/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | requirejs.config({ 4 | baseUrl: 'lib/js', 5 | paths: { 6 | app: '../../js' 7 | }, 8 | shim: { 9 | 'angular' : { exports : 'angular' }, 10 | 'angular-touch': ['angular'], 11 | 'angular-swipe-element': ['angular'], 12 | 'angular-ui-router': ['angular'], 13 | 'localstorage-schema': { 'exports': 'localStorageSchema' }, 14 | 'app/lib/ga': { 'exports': '_gaq'} 15 | }, 16 | //Allow dynamic reloading within the app 17 | urlArgs: (/cacheBust=\d+/.exec(location.href) || [])[0] 18 | }); 19 | 20 | function isPhoneGap() { 21 | return (window.cordova || window.PhoneGap || window.phonegap) 22 | && /^file:\/{3}[^\/]/i.test(window.location.href) 23 | && /ios|iphone|ipod|ipad|android/i.test(navigator.userAgent); 24 | } 25 | 26 | requirejs(['angular', 'app/app'], function(angular) { 27 | angular.element(document).ready(function() { 28 | angular.bootstrap(document, ['app']); 29 | }); 30 | }); -------------------------------------------------------------------------------- /www/js/config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | define(["angular"], function(angular) { 4 | return angular.module('app.config', []) 5 | 6 | .constant('appConfig', {ads:{enabled:false,units:{ios:{banner:'ca-app-pub-4675194603106574/1411325040',interstitial:'ca-app-pub-4675194603106574/1575788641'},android:{banner:'ca-app-pub-4675194603106574/6522522247',interstitial:'ca-app-pub-4675194603106574/9099055449'},wp8:{banner:'ca-app-pub-xxx/9375997559',interstitial:'ca-app-pub-xxx/9099055449'}},isTesting:true,showBanner:false,timeouts:{interstitialRequestTimeout:10000,delayBetweenInterstitials:150000}},analytics:{enabled:true,gaId:{ios:'UA-56704032-2',android:'UA-56704032-3',wp8:'UA-56704032-4',desktop:'UA-56704032-2'}},db:{name:'DigitSquare.db'}}) 7 | 8 | ; 9 | 10 | }); -------------------------------------------------------------------------------- /www/js/helper.js: -------------------------------------------------------------------------------- 1 | define(['angular'], function(angular) { 2 | 'use strict'; 3 | 4 | angular.module('app.helper', []) 5 | .service('panelModal', panelModal) 6 | .directive('includeReplace', includeReplace); 7 | 8 | panelModal.$inject = ['$compile', '$rootScope']; 9 | function panelModal($compile, $rootScope) { 10 | 11 | return function(tpl, scope, options) { 12 | var element = angular.element('
    '), 13 | currentScope = scope || $rootScope.$new(); 14 | 15 | options = options || {}; 16 | var optCallback = options.callback; 17 | var cssClass = options.cssClass; 18 | 19 | if (cssClass) { 20 | element.addClass(cssClass); 21 | } 22 | 23 | function doDestroy() { 24 | element.remove(); 25 | currentScope.$destroy(); 26 | optCallback && optCallback(); 27 | } 28 | 29 | currentScope.closeAndNavigate = function(link, params) { 30 | doDestroy(); 31 | currentScope.goToPath(link, params); 32 | }; 33 | currentScope.closePanel = function(cb) { 34 | doDestroy(); 35 | cb && cb(); 36 | }; 37 | 38 | angular.element(document.body).append(element); 39 | $compile(element)(scope || $rootScope); 40 | 41 | return { 42 | show: function() { 43 | element.css('display', 'block'); 44 | }, 45 | destroy: function() { 46 | doDestroy(); 47 | }, 48 | isDestroyed: function() { 49 | return !!element.parentNode; 50 | } 51 | }; 52 | }; 53 | } 54 | 55 | includeReplace.$inject = ['$templateCache', '$compile', '$http']; 56 | function includeReplace($templateCache, $compile, $http) { 57 | return { 58 | restrict: 'E', 59 | link: function(scope, element, attrs) { 60 | $http.get(attrs.src, { cache: $templateCache }) 61 | .success(function(templateContent) { 62 | element.replaceWith($compile(templateContent)(scope)); 63 | }); 64 | } 65 | }; 66 | } 67 | 68 | }); -------------------------------------------------------------------------------- /www/js/storage/localstorage.js: -------------------------------------------------------------------------------- 1 | define(['angular', 'localstorage-schema'], function(angular, lsSchema) { 2 | 'use strict'; 3 | 4 | angular.module('app.storage', []) 5 | .constant('localStorageSchema', lsSchema) 6 | .factory('playerData', $PlayerData); 7 | 8 | $PlayerData.$inject = ['$q', 'localStorageSchema']; 9 | function $PlayerData($q, localStorageSchema) { 10 | var schema = localStorageSchema(), 11 | gameState = schema.object('gameState'), 12 | levelsScores = schema.collection('levelsScores'); 13 | 14 | return { 15 | getGameState: function() { 16 | return $q(function(resolve) { 17 | resolve(gameState.read()); 18 | }); 19 | }, 20 | updateGameState: function(stateObject) { 21 | return $q(function(resolve) { 22 | resolve(gameState.persist(stateObject)); 23 | }); 24 | }, 25 | setLevelScore: function(levelId, scoreObj) { 26 | return $q(function(resolve) { 27 | if (!levelsScores.get(levelId)) { 28 | resolve(levelsScores.insert(scoreObj, levelId)); 29 | } else { 30 | resolve(levelsScores.object(levelId).persist(scoreObj)); 31 | } 32 | 33 | }); 34 | }, 35 | getLevelScore: function(levelId) { 36 | return $q(function(resolve) { 37 | resolve(levelsScores.get(levelId) || {}); 38 | }); 39 | }, 40 | getFullLevelScores: function() { 41 | return $q(function(resolve) { 42 | var scoresLevels = levelsScores.keys(), 43 | res = {}; 44 | scoresLevels.forEach(function(key) { 45 | res[key] = levelsScores.get(key); 46 | }); 47 | resolve(res); 48 | }); 49 | } 50 | }; 51 | } 52 | }); -------------------------------------------------------------------------------- /www/views/game/game.html: -------------------------------------------------------------------------------- 1 |
    2 | 25 |
    26 |
    27 |
    {{value.label}}
    28 |
    29 |
    30 | 33 |
    -------------------------------------------------------------------------------- /www/views/game/nextLevelModal.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 6 | 12 | 15 | 16 |
    17 | -------------------------------------------------------------------------------- /www/views/game/startGameTutorial.html: -------------------------------------------------------------------------------- 1 |
    2 |
    Cyclically shift rows and columns, dragging any cell up, down, left or right.
    3 |
    4 |
    Tap to proceed
    5 |
    -------------------------------------------------------------------------------- /www/views/home/about.html: -------------------------------------------------------------------------------- 1 |
    2 | 12 |
    13 |

    DigitSquare puzzle game. ©2015 Flatlogic Inc. All rights reserved.

    14 |

    If you find some bugs or want some improvement, feel free to contact us via email: contact@flatlogic.com

    15 |
    16 |
    -------------------------------------------------------------------------------- /www/views/home/exitInterstitial.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akveo/digitsquare/a251a1220ef6212d1bed8c720368435ee1bfdfc2/www/views/home/exitInterstitial.html -------------------------------------------------------------------------------- /www/views/home/help.html: -------------------------------------------------------------------------------- 1 |
    2 | 12 |
    13 |

    1. Game goals

    14 |

    Shifting rows and columns you need the change the state of the big game matrix to goal matrix you see in the top right corner.

    15 |

    2. Game mechanics

    16 |

    Every row (column) can be cyclically shifted left or right (up or down). For example shifting some row to the right means that each cell will be shifted to the 1 position right, except right-most cell which will be shifted to the left most position. Left, top and bottom shifts happen similarly.

    17 |

    3. How to make a shift

    18 |

    To shift some line, you need to touch (drag) some cell from that row or column to the direction you want to shift it. After you start drag, cells from that row or column will start moving in the direction you moving your finger (cursor). To complete shift you need to release your finger (mouse button).

    19 |

    4. Levels

    20 |

    There are several chapters in the game. Each previous chapter has less difficulty than next chapter. Each chapter has 20 levels. Initially, only first level from the chapter is unlocked. You need to complete levels to unlock next ones.

    21 |

    5. Rewards system

    22 |

    For each level there is minimal amount of shifts needed to complete it. If you complete the level using this amount of shifts you will get 3 stars. Additional shifts will reduce amount of stars you get.

    23 |
    24 |
    -------------------------------------------------------------------------------- /www/views/home/homeAvailableIcons.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 |
    -------------------------------------------------------------------------------- /www/views/home/levels.html: -------------------------------------------------------------------------------- 1 |
    2 | 12 |
    13 |
    14 | 28 |
    29 |
    30 | 43 |
    -------------------------------------------------------------------------------- /www/views/home/menu.html: -------------------------------------------------------------------------------- 1 |
    2 |
    Digit2
    3 | 10 | 11 |
    --------------------------------------------------------------------------------