diff --git a/.sourcemaps/main.js.map b/.sourcemaps/main.js.map index 69ee0f8..c5069b6 100644 --- a/.sourcemaps/main.js.map +++ b/.sourcemaps/main.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../node_modules/moment/locale ^/.//.*$","../../src/app/app.component.ts","../../src/pages/tabs/tabs.ts","../../src/pages/venue-list/venue-revealed-users.ts","../../src/pages/welcome/welcome.ts","../../node_modules/@angular/core/@angular lazy","../../src lazy","../../src/services/venues.ts","../../src/services/auth.ts","../../src/services/geo.ts","../../src/services/account.ts","../../src/pages/cohort/cohort.ts","../../src/pages/venue-list/venue-list.ts","../../src/pages/settings/settings.ts","../../src/app/main.ts","../../src/app/app.module.ts","../../src/services/settings.ts"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yB;;;;;;;;;;;;;;;;;;;;;;;;;;ACtP0C;AACD;AACY;AACM;AACnB;AAEM;AACS;AAER;AAM/C,IAAa,KAAK;IAGhB,eAAY,QAAkB,EAClB,SAAoB,EACpB,YAA0B,EAClB,WAAuB,EACvB,OAAe;QAJnC,iBAgBC;QAbmB,gBAAW,GAAX,WAAW,CAAY;QACvB,YAAO,GAAP,OAAO,CAAQ;QAEjC,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC;YACpB,gEAAgE;YAChE,iEAAiE;YACjE,SAAS,CAAC,YAAY,EAAE,CAAC;YACzB,YAAY,CAAC,IAAI,EAAE,CAAC;YAEpB,KAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;YAC7B,KAAI,CAAC,eAAe,EAAE,CAAC;QAEzB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,+BAAe,GAAf;QAAA,iBAaC;QAZC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,WAAC;YAC9B,IAAI,aAAa,GAAG,CAAC,GAAG,IAAI,GAAC,KAAK,CAAC;YACjC,EAAE,EAAC,aAAa,CAAC,EAAC;gBAChB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;gBAC7B,KAAI,CAAC,QAAQ,GAA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;;AChGmB;AAGzC,IAAa,eAAe;IAOxB;IAAe,CAAC;IACpB,sBAAC;AAAD,CAAC;AAPiB,qBAAK,GAAW,IAAI,CAAC;AACrB,2BAAW,GAAU,IAAI,CAAC;AACxC,kGAAkG;AACpF,4BAAY,GAAU,0DAAwD,iBAAe,CAAC,WAAa,CAAC;AAC5G,2BAAW,GAAU,OAAO,CAAC;AALlC,eAAe;IAD3B,iEAAU,EAAE;;GACA,eAAe,CAQ3B;AAR2B","file":"main.js","sourcesContent":["var map = {\n\t\"./af\": 503,\n\t\"./af.js\": 503,\n\t\"./ar\": 504,\n\t\"./ar-dz\": 505,\n\t\"./ar-dz.js\": 505,\n\t\"./ar-kw\": 506,\n\t\"./ar-kw.js\": 506,\n\t\"./ar-ly\": 507,\n\t\"./ar-ly.js\": 507,\n\t\"./ar-ma\": 508,\n\t\"./ar-ma.js\": 508,\n\t\"./ar-sa\": 509,\n\t\"./ar-sa.js\": 509,\n\t\"./ar-tn\": 510,\n\t\"./ar-tn.js\": 510,\n\t\"./ar.js\": 504,\n\t\"./az\": 511,\n\t\"./az.js\": 511,\n\t\"./be\": 512,\n\t\"./be.js\": 512,\n\t\"./bg\": 513,\n\t\"./bg.js\": 513,\n\t\"./bn\": 514,\n\t\"./bn.js\": 514,\n\t\"./bo\": 515,\n\t\"./bo.js\": 515,\n\t\"./br\": 516,\n\t\"./br.js\": 516,\n\t\"./bs\": 517,\n\t\"./bs.js\": 517,\n\t\"./ca\": 518,\n\t\"./ca.js\": 518,\n\t\"./cs\": 519,\n\t\"./cs.js\": 519,\n\t\"./cv\": 520,\n\t\"./cv.js\": 520,\n\t\"./cy\": 521,\n\t\"./cy.js\": 521,\n\t\"./da\": 522,\n\t\"./da.js\": 522,\n\t\"./de\": 523,\n\t\"./de-at\": 524,\n\t\"./de-at.js\": 524,\n\t\"./de-ch\": 525,\n\t\"./de-ch.js\": 525,\n\t\"./de.js\": 523,\n\t\"./dv\": 526,\n\t\"./dv.js\": 526,\n\t\"./el\": 527,\n\t\"./el.js\": 527,\n\t\"./en-au\": 528,\n\t\"./en-au.js\": 528,\n\t\"./en-ca\": 529,\n\t\"./en-ca.js\": 529,\n\t\"./en-gb\": 530,\n\t\"./en-gb.js\": 530,\n\t\"./en-ie\": 531,\n\t\"./en-ie.js\": 531,\n\t\"./en-nz\": 532,\n\t\"./en-nz.js\": 532,\n\t\"./eo\": 533,\n\t\"./eo.js\": 533,\n\t\"./es\": 534,\n\t\"./es-do\": 535,\n\t\"./es-do.js\": 535,\n\t\"./es.js\": 534,\n\t\"./et\": 536,\n\t\"./et.js\": 536,\n\t\"./eu\": 537,\n\t\"./eu.js\": 537,\n\t\"./fa\": 538,\n\t\"./fa.js\": 538,\n\t\"./fi\": 539,\n\t\"./fi.js\": 539,\n\t\"./fo\": 540,\n\t\"./fo.js\": 540,\n\t\"./fr\": 541,\n\t\"./fr-ca\": 542,\n\t\"./fr-ca.js\": 542,\n\t\"./fr-ch\": 543,\n\t\"./fr-ch.js\": 543,\n\t\"./fr.js\": 541,\n\t\"./fy\": 544,\n\t\"./fy.js\": 544,\n\t\"./gd\": 545,\n\t\"./gd.js\": 545,\n\t\"./gl\": 546,\n\t\"./gl.js\": 546,\n\t\"./gom-latn\": 547,\n\t\"./gom-latn.js\": 547,\n\t\"./he\": 548,\n\t\"./he.js\": 548,\n\t\"./hi\": 549,\n\t\"./hi.js\": 549,\n\t\"./hr\": 550,\n\t\"./hr.js\": 550,\n\t\"./hu\": 551,\n\t\"./hu.js\": 551,\n\t\"./hy-am\": 552,\n\t\"./hy-am.js\": 552,\n\t\"./id\": 553,\n\t\"./id.js\": 553,\n\t\"./is\": 554,\n\t\"./is.js\": 554,\n\t\"./it\": 555,\n\t\"./it.js\": 555,\n\t\"./ja\": 556,\n\t\"./ja.js\": 556,\n\t\"./jv\": 557,\n\t\"./jv.js\": 557,\n\t\"./ka\": 558,\n\t\"./ka.js\": 558,\n\t\"./kk\": 559,\n\t\"./kk.js\": 559,\n\t\"./km\": 560,\n\t\"./km.js\": 560,\n\t\"./kn\": 561,\n\t\"./kn.js\": 561,\n\t\"./ko\": 562,\n\t\"./ko.js\": 562,\n\t\"./ky\": 563,\n\t\"./ky.js\": 563,\n\t\"./lb\": 564,\n\t\"./lb.js\": 564,\n\t\"./lo\": 565,\n\t\"./lo.js\": 565,\n\t\"./lt\": 566,\n\t\"./lt.js\": 566,\n\t\"./lv\": 567,\n\t\"./lv.js\": 567,\n\t\"./me\": 568,\n\t\"./me.js\": 568,\n\t\"./mi\": 569,\n\t\"./mi.js\": 569,\n\t\"./mk\": 570,\n\t\"./mk.js\": 570,\n\t\"./ml\": 571,\n\t\"./ml.js\": 571,\n\t\"./mr\": 572,\n\t\"./mr.js\": 572,\n\t\"./ms\": 573,\n\t\"./ms-my\": 574,\n\t\"./ms-my.js\": 574,\n\t\"./ms.js\": 573,\n\t\"./my\": 575,\n\t\"./my.js\": 575,\n\t\"./nb\": 576,\n\t\"./nb.js\": 576,\n\t\"./ne\": 577,\n\t\"./ne.js\": 577,\n\t\"./nl\": 578,\n\t\"./nl-be\": 579,\n\t\"./nl-be.js\": 579,\n\t\"./nl.js\": 578,\n\t\"./nn\": 580,\n\t\"./nn.js\": 580,\n\t\"./pa-in\": 581,\n\t\"./pa-in.js\": 581,\n\t\"./pl\": 582,\n\t\"./pl.js\": 582,\n\t\"./pt\": 583,\n\t\"./pt-br\": 584,\n\t\"./pt-br.js\": 584,\n\t\"./pt.js\": 583,\n\t\"./ro\": 585,\n\t\"./ro.js\": 585,\n\t\"./ru\": 586,\n\t\"./ru.js\": 586,\n\t\"./sd\": 587,\n\t\"./sd.js\": 587,\n\t\"./se\": 588,\n\t\"./se.js\": 588,\n\t\"./si\": 589,\n\t\"./si.js\": 589,\n\t\"./sk\": 590,\n\t\"./sk.js\": 590,\n\t\"./sl\": 591,\n\t\"./sl.js\": 591,\n\t\"./sq\": 592,\n\t\"./sq.js\": 592,\n\t\"./sr\": 593,\n\t\"./sr-cyrl\": 594,\n\t\"./sr-cyrl.js\": 594,\n\t\"./sr.js\": 593,\n\t\"./ss\": 595,\n\t\"./ss.js\": 595,\n\t\"./sv\": 596,\n\t\"./sv.js\": 596,\n\t\"./sw\": 597,\n\t\"./sw.js\": 597,\n\t\"./ta\": 598,\n\t\"./ta.js\": 598,\n\t\"./te\": 599,\n\t\"./te.js\": 599,\n\t\"./tet\": 600,\n\t\"./tet.js\": 600,\n\t\"./th\": 601,\n\t\"./th.js\": 601,\n\t\"./tl-ph\": 602,\n\t\"./tl-ph.js\": 602,\n\t\"./tlh\": 603,\n\t\"./tlh.js\": 603,\n\t\"./tr\": 604,\n\t\"./tr.js\": 604,\n\t\"./tzl\": 605,\n\t\"./tzl.js\": 605,\n\t\"./tzm\": 606,\n\t\"./tzm-latn\": 607,\n\t\"./tzm-latn.js\": 607,\n\t\"./tzm.js\": 606,\n\t\"./uk\": 608,\n\t\"./uk.js\": 608,\n\t\"./ur\": 609,\n\t\"./ur.js\": 609,\n\t\"./uz\": 610,\n\t\"./uz-latn\": 611,\n\t\"./uz-latn.js\": 611,\n\t\"./uz.js\": 610,\n\t\"./vi\": 612,\n\t\"./vi.js\": 612,\n\t\"./x-pseudo\": 613,\n\t\"./x-pseudo.js\": 613,\n\t\"./yo\": 614,\n\t\"./yo.js\": 614,\n\t\"./zh-cn\": 615,\n\t\"./zh-cn.js\": 615,\n\t\"./zh-hk\": 616,\n\t\"./zh-hk.js\": 616,\n\t\"./zh-tw\": 617,\n\t\"./zh-tw.js\": 617\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 1016;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/moment/locale ^\\.\\/.*$\n// module id = 1016\n// module chunks = 0","import { Component } from '@angular/core';\nimport { Platform } from 'ionic-angular';\nimport { StatusBar } from '@ionic-native/status-bar';\nimport { SplashScreen } from '@ionic-native/splash-screen';\nimport {Storage } from '@ionic/storage';\n\nimport { TabsPage } from '../pages/tabs/tabs';\nimport { WelcomePage } from '../pages/welcome/welcome';\n\nimport {AuthService} from './../services/auth';\n\n\n@Component({\n templateUrl: 'app.html'\n})\nexport class MyApp {\n rootPage:any;\n\n constructor(platform: Platform, \n statusBar: StatusBar, \n splashScreen: SplashScreen, \n private authService:AuthService,\n private storage:Storage) {\n\n platform.ready().then(() => {\n // Okay, so the platform is ready and our plugins are available.\n // Here you can do any higher level native things you might need.\n statusBar.styleDefault();\n splashScreen.hide();\n\n this.authService.loadToken();\n this.routeToRootPage();\n\n });\n }\n \n routeToRootPage(){\n this.storage.get('token').then(t => {\n let authenticated = t ? true:false;\n if(authenticated){\n console.log('authenticated');\n this.rootPage = TabsPage;\n \n }else{\n console.log('not authenticated');\n this.rootPage = WelcomePage;\n \n }\n });\n }\n}\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.component.ts","import {Component} from '@angular/core'\n\nimport {CohortPage} from '../cohort/cohort';\nimport {VenueListPage} from '../venue-list/venue-list';\nimport {SettingsPage} from '../settings/settings';\n\n@Component({\n templateUrl: 'tabs.html'\n})\nexport class TabsPage {\n\n private tab1Root: any;\n private tab2Root: any;\n private tab3Root: any;\n\n constructor() {\n // this tells the tabs component which Pages\n // should be each tab's root Page\n this.tab1Root = CohortPage;\n this.tab2Root = VenueListPage;\n this.tab3Root = SettingsPage;\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/pages/tabs/tabs.ts","import {Component} from '@angular/core';\nimport {ViewController, NavParams, AlertController} from 'ionic-angular';\nimport {InAppBrowser} from '@ionic-native/in-app-browser';\n// import {CHART_DIRECTIVES} from 'ng2-charts/ng2-charts';\n// import {GOOGLE_MAPS_DIRECTIVES} from 'angular2-google-maps/core';\nimport {GeoService} from '../../services/geo';\nimport {AccountService} from '../../services/account';\n\nimport {VenueService} from '../../services/venues';\nimport {Venue} from '../../models/venue';\n\n@Component({\n template: `\n\n {{venue.name}}\n \n \n \n \n\n\n \n\n \n \n\n \n \n
\n \n
\n \n \n {{venue.reveals}} out of {{venue.checkins}} have revealed themselves\n \n \n
\n \n \n \n
\n \n
\n \n You have not been here.\n \n
\n
\n \n {{user}}\n \n
\n
\n
\n `,\n\n styles: [`\n agm-map {\n height: 150px;\n touch-action: none;\n pointer-events: none;\n }`],\n})\nexport class RevealedUserListModal {\n venue:Venue;\n iconUrl:string =\"assets/branding/venue.png\";\n chartType:string = 'pie';\n chartLabels:string[] =[];\n chartData:number[] = [];\n chartOptions:any = {\n animation: {\n animateRotate: true,\n animateScale: true,\n },\n responsive: false,\n legend: {\n display: true,\n position: 'bottom',\n fullWidth: true\n }\n };\n\n dataLoaded:boolean = false\n\n constructor(public alertCtrl: AlertController,\n private viewCtrl: ViewController,\n private iab: InAppBrowser,\n public params: NavParams,\n public venueService: VenueService,\n public accountService: AccountService,\n public geoService:GeoService) {\n // console.log(params.data.venue);\n this.venue = params.data.venue;\n\n this.chartLabels = ['Revealed', 'Visited'];\n this.chartData = [this.venue.reveals, this.venue.checkins];\n \n this.accountService.logEvent(`page_enter_venueDetails_${this.venue.id}`);\n }\n\n\n getFill(venue:Venue):string{\n return this.venueService.calculateFillPercent(venue, 80) + 'px';\n }\n\n haveIBeenHere(venue:Venue):boolean{\n let flag = false;\n this.venueService.venues.forEach(v=>{ \n if(v.id == venue.id){ flag = true; }\n });\n return flag; \n }\n\n openInMaps(){\n this.accountService.logEvent(`open_maps_venueDetails_${this.venue.id}`);\n this.iab.create(`http://maps.apple.com/?daddr=${this.venue.lat},${this.venue.lng}`, '_system');\n }\n\n signintoVenue() {\n let alert = this.alertCtrl.create({\n title: `Sign in to ${this.venue.name}`,\n subTitle: 'When you reveal, your signature will only be visible to other people who have also revealed themselves here.',\n buttons: [{\n text: 'Not now',\n handler: data => {\n this.accountService.logEvent(`reveal_dismiss_venueDetails_${this.venue.id}`);\n }\n },{\n text: 'Reveal',\n handler: data => {\n this.venueService.signintoVenue(this.venue).subscribe(\n i => {\n this.venue.revealed = true;\n this.venue.reveals += 1;\n this.venue.revealed_users.push(this.accountService.me.username);\n\n this.accountService.logEvent(`reveal_pass_venueDetails_${this.venue.id}`);\n\n },\n e => console.log(e),\n () => {}\n )\n }\n }]\n });\n alert.present(alert);\n }\n \n\n close() {\n this.viewCtrl.dismiss();\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/pages/venue-list/venue-revealed-users.ts","import {Component, ViewChild, OnInit} from '@angular/core';\nimport {NavController, Slides, AlertController} from 'ionic-angular';\nimport {InAppBrowser} from '@ionic-native/in-app-browser';\nimport { Keyboard } from '@ionic-native/keyboard';\n\nimport {AuthService} from '../../services/auth';\nimport {AccountService} from '../../services/account';\nimport {GeoService} from '../../services/geo';\n\nimport {TabsPage} from '../tabs/tabs';\n\n\n@Component({\n templateUrl: 'welcome.html'\n})\nexport class WelcomePage implements OnInit {\n currentSlide = 0;\n swiper:any;\n\n @ViewChild('slider') slider: Slides;\n slidesOptions = {\n initialSlide: 0,\n onlyExternal: false\n };\n credentials:any = {\n username: '',\n email: '',\n password: ''\n };\n zipcode:number;\n cohort:string;\n\n signupMode:boolean=true;\n\n constructor(private keyboard: Keyboard,\n private nav: NavController,\n public alertCtrl: AlertController,\n private iab: InAppBrowser,\n public authService: AuthService,\n public accountService: AccountService,\n public geoService: GeoService) {\n this.nav = nav;\n }\n \n ngOnInit(){\n this.keyboard.disableScroll(true);\n }\n \n onSlideWillChange(event){\n \n }\n onSlideDidChange(event){\n\n }\n\n onIonDrag(event){\n this.swiper = event;\n this.swiper.lockSwipes();\n }\n\n slideNext(){\n if(this.swiper){\n this.swiper.unlockSwipes();\n }\n this.slider.slideNext();\n }\n\n\n toggleMode(){\n this.signupMode = !this.signupMode;\n }\n\n submitForm(){\n if(this.signupMode){\n this.doSignup();\n }else{\n this.doLogin();\n }\n }\n\n doLogin(){\n if( this.credentials.username && this.credentials.password ){\n this.authService.login({\n username: this.credentials.username.toLowerCase().replace(' ', '_'),\n password: this.credentials.password\n }).subscribe(\n i => {\n if(this.signupMode){\n\n this.accountService.logEvent('consent_given');\n\n this.slideNext();\n }else{\n this.goToApp()\n }\n },\n e => this.presentLoginAlert(),\n () => { }\n );\n }else{\n this.presentImpartialDataAlert();\n }\n }\n\n openPrivacy(){\n this.iab.create('https://s.tech.cornell.edu/MoveMeant/privacy.html', '_system');\n }\n openTerms(){ \n this.iab.create('https://s.tech.cornell.edu/MoveMeant/terms.html', '_system');\n }\n\n doSignup(){\n if(this.credentials.username && this.credentials.email && this.credentials.password){\n \n this.authService.createAccount(\n this.credentials.username.toLowerCase().replace(' ', '_'),\n this.credentials.email.toLowerCase(),\n this.credentials.password\n ).subscribe(\n i => this.doLogin(),\n e => this.presentSignupAlert(),\n () => {}\n );\n\n }else{\n this.presentImpartialDataAlert();\n }\n }\n\n setZipCode(){\n if(this.zipcode){\n this.accountService.associateZipcode(this.zipcode).subscribe(\n i => {\n this.cohort = i.cohort;\n this.slideNext();\n },\n e => this.presentInvalidZipcodeAlert(),\n () => {}\n )\n }else{\n this.presentImpartialDataAlert();\n }\n }\n\n enableVisitTracking(){\n this.geoService.initBackgroundLocation()\n .then(()=>{\n this.slideNext();\n }, ()=>{\n alert(\"Movemeant won't work well without this.\");\n })\n \n }\n\n goToApp(){\n this.nav.setRoot(TabsPage);\n }\n\n presentLoginAlert( ){\n let alert = this.alertCtrl.create({\n title: 'Sorry',\n subTitle: 'We were unable to sign you in, please try again.',\n buttons: ['OK']\n });\n alert.present();\n }\n\n presentSignupAlert( ){\n let alert = this.alertCtrl.create({\n title: 'Sorry',\n subTitle: 'This username seems to be taken.',\n buttons: ['OK']\n });\n alert.present();\n }\n \n\n presentInvalidZipcodeAlert(){\n let alert = this.alertCtrl.create({\n title: 'Sorry',\n subTitle: 'Movemeant is not availible in your region at the moment',\n buttons: ['OK']\n });\n alert.present();\n }\n\n presentImpartialDataAlert( ){\n let alert = this.alertCtrl.create({\n title: 'Sorry',\n subTitle: 'Please fill out all the fields.',\n buttons: ['OK']\n });\n alert.present();\n }\n\n\n presentConsentAlert(){\n let alert = this.alertCtrl.create({\n title: 'Sorry',\n subTitle: 'MoveMeant is a research project from Cornell Tech. We require informed consent for you to use the app. You can delete the app if you do not wish to take part',\n buttons: ['OK']\n });\n alert.present();\n }\n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/pages/welcome/welcome.ts","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncatched exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = 204;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@angular/core/@angular lazy\n// module id = 204\n// module chunks = 0","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncatched exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = 247;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src lazy\n// module id = 247\n// module chunks = 0","import {Injectable} from '@angular/core';\nimport {Http} from '@angular/http';\nimport {Storage } from '@ionic/storage';\n\nimport {Observable} from 'rxjs/Observable';\nimport 'rxjs/add/operator/map';\nimport 'rxjs/add/operator/catch';\n\nimport {Venue} from '../models/venue';\n\nimport {SettingsService} from './settings';\nimport {AuthService} from './auth';\n\n\n@Injectable()\nexport class VenueService {\n cohort:string = '';\n cohortVenues:Venue[] = [];\n venues:Venue[] = [];\n\n categories:string[] = [];\n data:number[] = [];\n\n \n constructor(public http: Http,\n public authService:AuthService,\n private storage:Storage){\n }\n\n fetchCohortVenues():Observable{\n let options = this.authService.getProtectedHeader()\n return this.http.get(`${SettingsService.API_ENDPOINT}/venues/logs/`, options)\n .map(r => r.json() || []);\n }\n\n loadCohortVenues():void{\n\n this.fetchCohortVenues().subscribe(\n r => {\n\n // console.log(r)\n\n this.cohort = r.cohort;\n this.cohortVenues = r.results.filter(v=>{\n return v.checkins > 1;\n });\n\n\n this.cohortVenues.map(v=>{\n let pos = this.categories.indexOf(v.category);\n if( pos > -1 ){\n this.data[pos] += v.checkins;\n }else{\n this.categories.push(v.category);\n this.data.push(1);\n }\n })\n },\n e => console.log(e),\n () => {}\n );\n\n }\n\n fetchVenues(ids:any[]):Observable{\n let queryIds = ids ? ids : [];\n let options = this.authService.getProtectedHeader()\n return this.http.get(`${SettingsService.API_ENDPOINT}/my/venues/logs/?ids=${queryIds.toString()}`, options)\n .map(r => r.json() || []);\n }\n\n loadVenues():void{\n console.log('==========>Loading Venues');\n this.storage.get('ids').then(ids=>{\n ids = ids? JSON.parse(ids) : [];\n if(ids.length>0){\n\n this.fetchVenues(ids).subscribe(\n r => {\n this.venues = r;\n },\n e => console.log(e),\n () => { }\n );\n }\n });\n }\n\n checkintoVenue(coords:any):Observable{\n console.log(\"==========> [js] About to CHECK INTO VENUE\")\n console.log(`==========> ${coords.lat} : ${coords.lng}`);\n let options = this.authService.getProtectedHeader()\n let body = JSON.stringify({\n 'lat': coords.lat,\n 'lng': coords.lng\n });\n return this.http.post(`${SettingsService.API_ENDPOINT}/venues/search/`, body, options)\n .map(r => r.json() || {})\n .map(r => {\n console.log(\"==========>LOOKEDUP THE PLACE\");\n this.storage.get('ids').then(ids => {\n ids = ids ? JSON.parse(ids) : [];\n if( ids.indexOf(r.id) == -1 ){\n console.log(\"==========>SAVING DA PLACE\");\n ids.push(r.id);\n this.storage.set('ids', JSON.stringify(ids));\n\n // checkin to place\n this.http.post(`${SettingsService.API_ENDPOINT}/venues/checkin/`, JSON.stringify({'venue_id': r.id}), options)\n .subscribe(i=>{\n console.log(\"checked in\")\n },e=>{\n console.log(\"error in \")\n console.log(e);\n }, ()=>{\n console.log('done');\n })\n this.loadVenues();\n }\n });\n });\n }\n\n signintoVenue(venue:Venue):Observable{\n let options = this.authService.getProtectedHeader()\n let body = JSON.stringify({\n 'venue_id': venue.id\n });\n return this.http.post(`${SettingsService.API_ENDPOINT}/venues/reveal/`, body, options)\n .map(r => r.json() || {});\n }\n\n clearVenues():void{\n this.storage.get('ids').then(ids => {\n this.storage.set('ids', JSON.stringify([]));\n this.venues = [];\n })\n }\n\n calculateFillPercent(venue:Venue, normalize:number){\n let checkins = venue.checkins;\n let reveals = venue.reveals;\n\n return normalize - Math.ceil( (reveals / checkins) * normalize )\n }\n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/services/venues.ts","import {Injectable} from '@angular/core';\nimport {Http, Headers, RequestOptions} from '@angular/http';\n\nimport {Observable} from 'rxjs/Observable';\nimport 'rxjs/add/operator/map';\nimport 'rxjs/add/operator/catch';\n\nimport {Storage} from '@ionic/storage';\n\nimport {SettingsService} from './settings';\n\n@Injectable()\nexport class AuthService {\n tokenUrl:string = '/api-token-auth/'\n createAccountUrl:string = '/participants/add/'\n\n token:string = '';\n isAuthenticated:boolean = false;\n\n constructor(public http: Http, private storage: Storage){\n \n }\n\n loadToken(){\n this.storage.get('token').then(t => {\n this.isAuthenticated = t ? true:false;\n this.token = t ? t:'';\n });\n }\n\n setToken(token:string){\n this.storage.set('token', token);\n this.isAuthenticated = true;\n this.token = token;\n }\n\n removeToken(){\n this.storage.remove('token');\n this.isAuthenticated = false;\n this.token = '';\n }\n\n\n getProtectedHeader():RequestOptions{\n let headers = new Headers({ \n 'Content-Type': 'application/json',\n 'Authorization': `Token ${this.token}` \n });\n let options = new RequestOptions({ headers: headers });\n return options;\n }\n\n getUnprotectedHeader():RequestOptions{\n let headers = new Headers({ \n 'Content-Type': 'application/json' \n });\n let options = new RequestOptions({ headers: headers });\n return options;\n }\n\n\n\n getToken(username:string, password:string):Observable{\n let options = this.getUnprotectedHeader()\n let body = JSON.stringify({ username: username, password: password });\n return this.http.post(`${SettingsService.API_ENDPOINT}${this.tokenUrl}`, body, options)\n .map(r => r.json())\n .map(t => this.setToken(t.token))\n }\n createAccount(username:string, email:string, password:string):Observable{\n let options = this.getUnprotectedHeader()\n let body = JSON.stringify({ username: username, email: email, password: password });\n return this.http.post(`${SettingsService.API_ENDPOINT}${this.createAccountUrl}`, body, options)\n }\n\n \n\n login(credentials):Observable{\n return Observable.create(observer => {\n this.getToken(credentials.username, credentials.password).subscribe(\n t => { \n observer.next();\n observer.complete(); \n },\n e => { \n observer.error(e);\n observer.complete(); \n },\n () => {}\n );\n });\n }\n \n}\n\n\n// WEBPACK FOOTER //\n// ./src/services/auth.ts","import {Injectable} from '@angular/core';\nimport {Platform} from 'ionic-angular';\n\nimport 'rxjs/add/operator/map';\nimport 'rxjs/add/operator/catch';\n\nimport {VenueService} from './venues';\n\ndeclare var window: any;\n\n@Injectable()\nexport class GeoService {\n currentCoords = {\n lat: 40.740837,\n lng: -74.001806\n }\n bgGeo:any=undefined;\n config:any = {\n // Geolocation config\n desiredAccuracy: 0,\n distanceFilter: 10,\n stationaryRadius: 25,\n locationUpdateInterval: 1000,\n fastestLocationUpdateInterval: 5000,\n\n // Activity Recognition config\n activityType: 'Other',\n activityRecognitionInterval: 5000,\n stopTimeout: 5,\n\n // Application config\n debug: false,\n stopOnTerminate: false,\n startOnBoot: true\n\n };\n state:any = undefined;\n\n constructor(private platform:Platform,\n public venueService:VenueService){ }\n\n\n initBackgroundLocation(){\n return new Promise((resolve, reject) => {\n\n this.platform.ready().then(()=>{\n \n console.log(\"================>initBackgroundLocation<================\")\n console.log(\"STARTING\");\n console.log(\"================>/initBackgroundLocation<================\")\n \n // Get a reference to the plugin.\n this.bgGeo = window.BackgroundGeolocation;\n \n if(this.bgGeo){\n\n // Listen to location events & errors.\n this.bgGeo.on('location', \n (location, taskId)=>{\n\n try {\n\n let coords = location.coords;\n let lat = coords.latitude;\n let lng = coords.longitude;\n\n this.currentCoords.lat = lat;\n this.currentCoords.lng = lng;\n\n // console.log(\"================>:location<================\")\n // console.log(\"LOCATION\");\n // console.log(location);\n // console.log(\"================>/:location<================\")\n\n this.bgGeo.finish(taskId);\n\n } catch (error) {\n \n console.log(\"ERROR => this.bgGeo.on('location)\");\n console.log(error);\n this.bgGeo.finish(taskId);\n }\n \n },\n (error)=>{\n console.log('error');\n console.log(error)\n });\n \n // Fired whenever state changes from moving->stationary or vice-versa.\n this.bgGeo.on('motionchange', \n (isMoving, location, taskId)=>{\n try {\n // console.log(\"================>:motionchange<================\")\n // console.log(\"MOTION CHANGE\");\n // console.log(isMoving);\n // console.log(\"================>/:motionchange<================\")\n\n if(!isMoving){\n let coords = location.coords;\n let lat = coords.latitude;\n let lng = coords.longitude;\n\n this.venueService.checkintoVenue({\n lat: lat,\n lng: lng\n }).subscribe(\n i=>{\n console.log(i);\n },\n e=>{\n console.log(e);\n },\n ()=>{\n this.bgGeo.finish(taskId);\n }\n );\n }else{\n this.bgGeo.finish(taskId);\n }\n \n } catch (error) {\n\n console.log(\"ERROR => this.bgGeo.on('motionchange')\");\n console.log(error);\n this.bgGeo.finish(taskId);\n\n }\n\n });\n \n // BackgroundGeoLocation is highly configurable.\n // https://github.com/transistorsoft/cordova-background-geolocation/tree/master/docs\n\n console.log(\"++++++++++ABOUT TO CONFIGURE PLUGIN++++++++++\")\n try {\n let Fetcher = window.BackgroundFetch;\n if(Fetcher) {\n Fetcher.configure(()=>{\n console.log(\"Fetcher Initiated\");\n Fetcher.finish();\n },\n ()=>{\n console.log(\"Fetcher Failed\");\n }, { \n stopOnTerminate: false \n });\n }else{\n console.log(\"window.BackgroundFetch Not found\")\n }\n \n this.bgGeo.configure(this.config, (state)=>{\n // This callback is executed when the plugin is ready to use.\n // console.log(\"=============this.bgGeo.configure==============\");\n // console.log('BackgroundGeolocation ready: ', JSON.stringify(state));\n this.state = state;\n if (!state.enabled) {\n this.bgGeo.start();\n this.state.enabled = true;\n }\n\n resolve();\n\n });\n\n } catch (error) {\n console.log(\"ERROR => this.bgGeo.configure\");\n console.log(error);\n reject();\n }\n\n }else{\n console.log(\"Plugin not installed\");\n reject();\n } \n\n });\n \n }); \n }\n\n public mapStyle:any = [\n {\n \"featureType\": \"water\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#e9e9e9\"\n },\n {\n \"lightness\": 17\n }\n ]\n },\n {\n \"featureType\": \"landscape\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#f5f5f5\"\n },\n {\n \"lightness\": 20\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [\n {\n \"color\": \"#ffffff\"\n },\n {\n \"lightness\": 17\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry.stroke\",\n \"stylers\": [\n {\n \"color\": \"#ffffff\"\n },\n {\n \"lightness\": 29\n },\n {\n \"weight\": 0.2\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#ffffff\"\n },\n {\n \"lightness\": 18\n }\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#ffffff\"\n },\n {\n \"lightness\": 16\n }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#f5f5f5\"\n },\n {\n \"lightness\": 21\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#dedede\"\n },\n {\n \"lightness\": 21\n }\n ]\n },\n {\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"visibility\": \"on\"\n },\n {\n \"color\": \"#ffffff\"\n },\n {\n \"lightness\": 16\n }\n ]\n },\n {\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"saturation\": 36\n },\n {\n \"color\": \"#333333\"\n },\n {\n \"lightness\": 40\n }\n ]\n },\n {\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#f2f2f2\"\n },\n {\n \"lightness\": 19\n }\n ]\n },\n {\n \"featureType\": \"administrative\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [\n {\n \"color\": \"#fefefe\"\n },\n {\n \"lightness\": 20\n }\n ]\n },\n {\n \"featureType\": \"administrative\",\n \"elementType\": \"geometry.stroke\",\n \"stylers\": [\n {\n \"color\": \"#fefefe\"\n },\n {\n \"lightness\": 17\n },\n {\n \"weight\": 1.2\n }\n ]\n }\n ]; \n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/services/geo.ts","import {Injectable} from '@angular/core';\nimport {Http} from '@angular/http';\n\nimport {Observable} from 'rxjs/Observable';\nimport 'rxjs/add/operator/map';\nimport 'rxjs/add/operator/catch';\n\nimport {Account} from '../models/account';\nimport {SettingsService} from './settings';\nimport {AuthService} from './auth';\n\n\n@Injectable()\nexport class AccountService {\n me:Account;\n\n constructor(public http: Http,\n public auth:AuthService){\n\n }\n\n associateZipcode(zipcode:number):Observable{\n let options = this.auth.getProtectedHeader()\n let body = JSON.stringify({ zipcode: zipcode });\n return this.http.post(`${SettingsService.API_ENDPOINT}/cohorts/affiliate/`, body, options)\n .map(r => r.json())\n }\n\n fetchMe():Observable{\n let options = this.auth.getProtectedHeader()\n return this.http.get(`${SettingsService.API_ENDPOINT}/me/`, options)\n .map(r => r.json())\n }\n\n registerDevice(token:string) {\n let options = this.auth.getProtectedHeader()\n this.http.post(`${SettingsService.API_ENDPOINT}/devices/create/`, JSON.stringify({ device: token }), options)\n .map(r => r.json())\n .subscribe(\n i=>{},\n e=>{},\n ()=>{}\n )\n }\n\n loadLoggedInUser(){\n this.fetchMe().subscribe(\n r => this.me = r,\n e => console.log(e),\n () => {}\n );\n }\n\n logEvent(msg:string){\n let options = this.auth.getProtectedHeader()\n this.http.post(`${SettingsService.API_ENDPOINT}/events/`, JSON.stringify({ trigger: msg }), options)\n .map(r => r.json())\n .subscribe(\n i=>{},\n e=>{},\n ()=>{}\n )\n }\n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/services/account.ts","import {Component} from '@angular/core';\nimport {Platform, NavController, ModalController} from 'ionic-angular';\nimport {\n Push,\n PushToken\n} from '@ionic/cloud-angular';\nimport {Venue} from '../../models/venue';\nimport {VenueService} from '../../services/venues';\nimport {GeoService} from '../../services/geo';\nimport {RevealedUserListModal} from '../venue-list/venue-revealed-users';\nimport {AccountService} from '../../services/account';\n\n@Component({\n templateUrl: 'cohort.html',\n})\nexport class CohortPage {\n recentVenues:Venue[] = [];\n coords ={\n lat: 40.740837,\n lng: -74.001806\n };\n meCoords = {\n lat: 40.740837,\n lng: -74.001806\n }; \n youUrl:string = \"assets/branding/location.png\";\n iconUrl:string =\"assets/branding/venue.png\";\n view_type:string = 'list';\n\n chartType:string = 'doughnut';\t\t\n chartLabels:string[] =[];\t\t\n chartData:number[] = [];\t\t\n chartOptions:any = {\t\t\n animation: {\t\t\n animateRotate: true,\t\t\n animateScale: true,\t\t\n },\t\t\n height: 300,\t\t\n width: 300,\t\t\n responsive: false,\t\t\n legend: {\t\t\n display: true,\t\t\n position: 'bottom',\t\t\n fullWidth: true\t\t\n }\t\t\n };\t\t\n dataLoaded:boolean = false\n \n constructor(private nav: NavController,\n public push: Push,\n public venueService:VenueService,\n public accountService: AccountService,\n public geoService:GeoService,\n private platform:Platform,\n public modalCtrl: ModalController) {\n \n this.nav = nav;\n \n this.accountService.loadLoggedInUser();\n\n }\n\n\n ionViewWillEnter() {\n console.log(\"onPageWillEnter\");\n this.getCurrentCoords();\n this.loadData();\n\n this.accountService.logEvent(\"page_enter_cohort\")\n }\n\n syncCoords(){\n if(this.geoService.bgGeo){\n this.geoService.bgGeo.getCurrentPosition((location,taskId)=>{\n \n this.coords.lat = location.coords.latitude;\n this.coords.lng = location.coords.longitude;\n\n this.meCoords.lat = location.coords.latitude;\n this.meCoords.lng = location.coords.longitude;\n\n this.geoService.bgGeo.finish(taskId);\n\n }, (error)=>{console.log(error);});\n }\n \n }\n\n getFill(venue:Venue):string{\n return this.venueService.calculateFillPercent(venue, 30) + 'px';\n }\n\n getCurrentCoords(){\n console.log(\"getCurrentCoords()\");\n if(this.geoService.state){\n console.log(\"Plugin is initiated so get the coords\");\n this.syncCoords();\n }else{\n console.log(\"Plugin is not initiated so intiate it\")\n this.geoService.initBackgroundLocation().then(()=>{\n this.syncCoords();\n console.log(\"Plugin configured and initialized\");\n }, \n ()=>{\n console.log(\"Unable to initializing the plugin\");\n });\n }\n }\n \n loadData(){\n this.dataLoaded = false;\n this.venueService.loadCohortVenues();\n this.venueService.loadVenues();\n this.chartLabels = this.venueService.categories;\t\t\n this.chartData = this.venueService.data;\n \t\t\n // PATCH-JOB\t\t\n setTimeout(()=>{\t\t\n this.dataLoaded = true;\t\n }, 1000)\n\n \n }\n\n onSelectChange(type:any){\n console.log(\"type is: \"+type);\n if(type == \"pop\"){\n this.venueService.cohortVenues = this.venueService.cohortVenues.sort(function(a,b){if(a.checkins < b.checkins) return 1; else if(a.checkins > b.checkins) return -1; else return 0;});\n console.log(\"pop sort\");\n }\n else if(type == \"loc\"){\n for(let venue of this.venueService.cohortVenues){\n venue.distance = ((venue.lat-this.meCoords.lat)*(venue.lat-this.meCoords.lat)+(venue.lng-this.meCoords.lng)*(venue.lng-this.meCoords.lng));\n }\n this.venueService.cohortVenues = this.venueService.cohortVenues.sort(function(a,b){if(a.distance < b.distance) return -1; else if(a.distance > b.distance) return 1; else return 0;});\n console.log(\"dist sort\");\n }\n else if(type == \"type\"){\n this.venueService.cohortVenues = this.venueService.cohortVenues.sort(function(a,b){if(a.category < b.category) return -1; else if(a.category > b.category) return 1; else return 0;});\n console.log(\"type sort\");\n }\n\n else if(type == \"recent\"){\n this.venueService.cohortVenues = this.recentVenues;\n }\n }\n\n clickedMarker(venue:Venue){\n this.showModal(venue);\n }\n\n centerMap(venue:Venue){\n this.coords.lat = venue.lat;\n this.coords.lng = venue.lng;\n }\n\n showModal(venue:Venue) {\n let modal = this.modalCtrl.create(RevealedUserListModal, { venue: venue });\n modal.present();\n } \n\n haveIBeenThere(venue:Venue){\n let flag = false;\n this.venueService.venues.forEach(v=>{ \n if(v.id == venue.id){ flag = true; }\n });\n if(flag){\n return \"1.0\";\n }else{\n return \"0.5\";\n }\n }\n\n setupPush() {\n this.platform.ready().then(()=>{\n \n this.push.register().then((t: PushToken) => {\n return this.push.saveToken(t);\n }).then((t: PushToken) => {\n console.log('Token saved:', t.token);\n this.accountService.registerDevice(t.token);\n });\n \n });\n }\n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/pages/cohort/cohort.ts","import {Component} from '@angular/core';\nimport {NavController, ModalController} from 'ionic-angular';\n// import {LocalNotifications} from 'ionic-native';\n// import {GOOGLE_MAPS_DIRECTIVES} from 'angular2-google-maps/core';\n\n\nimport {Venue} from '../../models/venue';\nimport {VenueService} from '../../services/venues';\nimport {GeoService} from '../../services/geo';\nimport {AccountService} from '../../services/account';\nimport {RevealedUserListModal} from './venue-revealed-users';\n\n@Component({\n templateUrl: 'venue-list.html',\n// directives: [GOOGLE_MAPS_DIRECTIVES]\n})\nexport class VenueListPage {\n constructor(private nav: NavController,\n public venueService:VenueService,\n public accountService: AccountService,\n public geoService:GeoService,\n public modalCtrl: ModalController) {\n this.nav = nav;\n this.loadVenues();\n\n }\n \n iconUrl:string =\"assets/branding/venue.png\";\n\n loadVenues(){\n this.venueService.loadVenues()\n }\n\n getFill(venue:Venue):string{\n return this.venueService.calculateFillPercent(venue, 30) + 'px';\n }\n\n showModal(venue:Venue) {\n let modal = this.modalCtrl.create(RevealedUserListModal, { venue: venue });\n modal.present();\n }\n\n haveIBeenThere(venue:Venue){\n if(venue.revealed){\n return \"1.0\";\n }else{\n return \"0.5\";\n }\n }\n\n\n debug(){\n this.venueService.checkintoVenue({lat: 40.741139, lng: -74.002845}).subscribe(\n i=>{},\n e=>{},\n ()=>{}\n )\n }\n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/pages/venue-list/venue-list.ts","import {Component} from '@angular/core';\nimport {Platform, NavController, AlertController, App} from 'ionic-angular';\nimport {InAppBrowser} from '@ionic-native/in-app-browser';\nimport {\n Push,\n PushToken\n} from '@ionic/cloud-angular';\nimport {WelcomePage} from '../welcome/welcome';\n\nimport {SettingsService} from '../../services/settings';\nimport {AuthService} from '../../services/auth';\nimport {VenueService} from '../../services/venues';\nimport {GeoService} from '../../services/geo';\nimport {AccountService} from '../../services/account';\n\n@Component({\n templateUrl: 'settings.html'\n})\nexport class SettingsPage {\n APP_VERSION:string;\n enabledGeo:boolean = false;\n enabledPush:boolean = false;\n\n constructor(private nav: NavController,\n private iab: InAppBrowser,\n public app: App,\n public push: Push,\n public alertCtrl: AlertController,\n private platform:Platform,\n public authService: AuthService,\n public venueService: VenueService,\n public accountService:AccountService,\n public geoService:GeoService) {\n this.nav = nav;\n this.APP_VERSION = SettingsService.APP_VERSION;\n this.accountService.loadLoggedInUser();\n\n this.accountService.logEvent(\"page_enter_settings\")\n }\n\n ionViewWillEnter() {\n this.platform.ready().then(()=>{\n this.checkGeoPermissions();\n });\n }\n\n checkGeoPermissions(){\n if(this.geoService.state){\n // console.log(\"Plugin is initiated so get the coords\");\n this.enabledGeo = this.geoService.state.enabled;\n }else{\n // console.log(\"Plugin is not initiated\");\n }\n }\n\n toggleGeoPermissions(){\n\n this.platform.ready().then(()=>{\n console.log(\"===========toggleGeoPermissions===========\");\n\n if(this.geoService.state){\n\n if(this.geoService.state.enabled){\n this.geoService.bgGeo.stop();\n }else{\n this.geoService.bgGeo.start();\n }\n\n }else{\n console.log(\"Plugin is not initiated, starting it\");\n this.geoService.initBackgroundLocation();\n }\n\n });\n }\n\n togglePushPermissions(){\n this.platform.ready().then(()=>{\n\n this.push.register().then((t: PushToken) => {\n return this.push.saveToken(t);\n }).then((t: PushToken) => {\n console.log('Token saved:', t.token);\n this.accountService.registerDevice(t.token);\n });\n\n });\n }\n\n clear(){\n this.venueService.clearVenues();\n }\n\n signout(){\n if(this.geoService.state){\n this.geoService.bgGeo.stop();\n }\n this.clear()\n this.authService.removeToken();\n this.app.getRootNav().setRoot(WelcomePage);\n }\n\n\n sendFeedback(){\n this.iab.create(`mailto:s.tech.cornell@gmail.com?Subject=MoveMeant%20Feedback`, '_system');\n } \n\n goToSite(){\n this.iab.create('http://cornelltech.io/', '_system');\n }\n\n confirmSignout( ){\n let alert = this.alertCtrl.create({\n title: 'Are you sure?',\n subTitle: 'Are you sure you want to sign out?',\n buttons: [{\n text: 'Cancel',\n handler: data => {} \n },{\n text: 'Confirm',\n handler: data => {\n this.signout();\n }\n }]\n });\n alert.present();\n }\n\n confirmLogsClear( ){\n let alert = this.alertCtrl.create({\n title: 'Are you sure?',\n subTitle: `If you erase your local logs, you won't be able to recover them.`,\n buttons: [{\n text: 'Cancel',\n handler: data => {} \n },{\n text: 'Confirm',\n handler: data => {\n this.clear();\n }\n }]\n });\n alert.present();\n }\n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/pages/settings/settings.ts","import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app.module';\n\nplatformBrowserDynamic().bootstrapModule(AppModule);\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/main.ts","import { BrowserModule } from '@angular/platform-browser';\nimport { ErrorHandler, NgModule } from '@angular/core';\nimport { HttpModule } from '@angular/http';\nimport { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';\nimport { SplashScreen } from '@ionic-native/splash-screen';\nimport { StatusBar } from '@ionic-native/status-bar';\n\nimport { CloudSettings, CloudModule } from '@ionic/cloud-angular';\nimport { IonicStorageModule } from '@ionic/storage';\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\nimport { Push, PushObject, PushOptions } from '@ionic-native/push';\nimport { Keyboard } from '@ionic-native/keyboard';\n\nimport { ChartsModule } from 'ng2-charts';\nimport {AgmCoreModule} from '@agm/core';\n\nimport { MyApp } from './app.component';\nimport { CohortPage } from '../pages/cohort/cohort';\nimport { SettingsPage } from '../pages/settings/settings';\nimport { TabsPage } from '../pages/tabs/tabs';\nimport { VenueListPage } from '../pages/venue-list/venue-list';\nimport { RevealedUserListModal } from '../pages/venue-list/venue-revealed-users';\nimport { WelcomePage } from '../pages/welcome/welcome';\n\n\nimport {SettingsService} from './../services/settings';\nimport {AuthService} from './../services/auth';\nimport {AccountService} from './../services/account';\nimport {VenueService} from './../services/venues';\nimport {GeoService} from './../services/geo';\n\nconst cloudSettings: CloudSettings = {\n 'core': {\n 'app_id': 'f37ad9eb'\n },\n 'push': {\n 'sender_id': 'SENDER_ID',\n 'pluginConfig': {\n 'ios': {\n 'badge': true,\n 'sound': true\n },\n 'android': {\n 'iconColor': '#343434'\n }\n }\n }\n};\n\n@NgModule({\n declarations: [\n MyApp,\n CohortPage,\n SettingsPage,\n TabsPage,\n VenueListPage,\n RevealedUserListModal,\n WelcomePage\n ],\n imports: [\n BrowserModule,\n HttpModule,\n ChartsModule,\n AgmCoreModule.forRoot({\n apiKey: 'AIzaSyBa7UgG0KAlZShxva2Dyhg1Hhu7lh0BLSc'\n }),\n IonicModule.forRoot(MyApp),\n CloudModule.forRoot(cloudSettings),\n IonicStorageModule.forRoot()\n ],\n bootstrap: [IonicApp],\n entryComponents: [\n MyApp,\n CohortPage,\n SettingsPage,\n TabsPage,\n VenueListPage,\n RevealedUserListModal,\n WelcomePage\n ],\n providers: [\n StatusBar,\n SplashScreen,\n InAppBrowser,\n Push,\n Keyboard,\n\n SettingsService, \n AuthService, \n AccountService, \n VenueService,\n GeoService,\n \n {provide: ErrorHandler, useClass: IonicErrorHandler}\n ]\n})\nexport class AppModule {}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.module.ts","import {Injectable} from '@angular/core';\n\n@Injectable()\nexport class SettingsService{\n public static DEBUG:boolean = true;\n public static API_VERSION:string = 'v1';\n // public static API_ENDPOINT:string = `http://localhost:8100/api/${SettingsService.API_VERSION}`;\n public static API_ENDPOINT:string = `http://ec2-107-23-148-64.compute-1.amazonaws.com/api/${SettingsService.API_VERSION}`;\n public static APP_VERSION:string = '2.0.0';\n\n constructor(){ }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/services/settings.ts"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["../../node_modules/moment/locale ^/.//.*$","../../src/app/app.component.ts","../../src/pages/tabs/tabs.ts","../../src/pages/venue-list/venue-revealed-users.ts","../../src/pages/welcome/welcome.ts","../../node_modules/@angular/core/@angular lazy","../../src lazy","../../src/services/account.ts","../../src/services/venues.ts","../../src/services/auth.ts","../../src/services/geo.ts","../../src/pages/cohort/cohort.ts","../../src/pages/venue-list/venue-list.ts","../../src/pages/settings/settings.ts","../../src/app/main.ts","../../src/app/app.module.ts","../../src/services/settings.ts"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yB;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtP0C;AACgB;AACL;AACM;AACnB;AAEM;AACS;AACF;AAEN;AACoB;AAKnE,IAAa,KAAK;IAGhB,eAAY,QAAkB,EAClB,SAAoB,EACpB,YAA0B,EAClB,WAAuB,EACxB,IAAS,EACT,cAA8B,EAC9B,SAA0B,EACzB,OAAe;QAPnC,iBAoBC;QAjBmB,gBAAW,GAAX,WAAW,CAAY;QACxB,SAAI,GAAJ,IAAI,CAAK;QACT,mBAAc,GAAd,cAAc,CAAgB;QAC9B,cAAS,GAAT,SAAS,CAAiB;QACzB,YAAO,GAAP,OAAO,CAAQ;QAEjC,QAAQ,CAAC,KAAK,EAAE,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C,aAAa,CAAC;YAClC,0EAAkB,CAAC,OAAO,EAAE;SAC7B;QACD,SAAS,EAAE,CAAC,+DAAQ,CAAC;QACrB,eAAe,EAAE;YACf,8DAAK;YACL,yEAAU;YACV,+EAAY;YACZ,mEAAQ;YACR,oFAAa;YACb,sGAAqB;YACrB,4EAAW;SACZ;QACD,SAAS,EAAE;YACT,2EAAS;YACT,iFAAY;YACZ,kFAAY;YACZ,gEAAI;YACJ,yEAAQ;YACR,4EAAe;YACf,oEAAW;YACX,0EAAc;YACd,uEAAY;YACZ,kEAAU;YAEV,EAAC,OAAO,EAAE,2DAAY,EAAE,QAAQ,EAAE,wEAAiB,EAAC;SACrD;KACF,CAAC;GACW,SAAS,CAAG;AAAH;;;;;;;;;;;;;;;;;;;;AC/FmB;AAGzC,IAAa,eAAe;IAQxB;IAAe,CAAC;IACpB,sBAAC;AAAD,CAAC;AARiB,qBAAK,GAAW,IAAI,CAAC;AACrB,2BAAW,GAAU,IAAI,CAAC;AACxC,kGAAkG;AAClG,6HAA6H;AAC/G,4BAAY,GAAU,+BAA6B,iBAAe,CAAC,WAAa,CAAC;AACjF,2BAAW,GAAU,OAAO,CAAC;AANlC,eAAe;IAD3B,iEAAU,EAAE;;GACA,eAAe,CAS3B;AAT2B","file":"main.js","sourcesContent":["var map = {\n\t\"./af\": 510,\n\t\"./af.js\": 510,\n\t\"./ar\": 511,\n\t\"./ar-dz\": 512,\n\t\"./ar-dz.js\": 512,\n\t\"./ar-kw\": 513,\n\t\"./ar-kw.js\": 513,\n\t\"./ar-ly\": 514,\n\t\"./ar-ly.js\": 514,\n\t\"./ar-ma\": 515,\n\t\"./ar-ma.js\": 515,\n\t\"./ar-sa\": 516,\n\t\"./ar-sa.js\": 516,\n\t\"./ar-tn\": 517,\n\t\"./ar-tn.js\": 517,\n\t\"./ar.js\": 511,\n\t\"./az\": 518,\n\t\"./az.js\": 518,\n\t\"./be\": 519,\n\t\"./be.js\": 519,\n\t\"./bg\": 520,\n\t\"./bg.js\": 520,\n\t\"./bn\": 521,\n\t\"./bn.js\": 521,\n\t\"./bo\": 522,\n\t\"./bo.js\": 522,\n\t\"./br\": 523,\n\t\"./br.js\": 523,\n\t\"./bs\": 524,\n\t\"./bs.js\": 524,\n\t\"./ca\": 525,\n\t\"./ca.js\": 525,\n\t\"./cs\": 526,\n\t\"./cs.js\": 526,\n\t\"./cv\": 527,\n\t\"./cv.js\": 527,\n\t\"./cy\": 528,\n\t\"./cy.js\": 528,\n\t\"./da\": 529,\n\t\"./da.js\": 529,\n\t\"./de\": 530,\n\t\"./de-at\": 531,\n\t\"./de-at.js\": 531,\n\t\"./de-ch\": 532,\n\t\"./de-ch.js\": 532,\n\t\"./de.js\": 530,\n\t\"./dv\": 533,\n\t\"./dv.js\": 533,\n\t\"./el\": 534,\n\t\"./el.js\": 534,\n\t\"./en-au\": 535,\n\t\"./en-au.js\": 535,\n\t\"./en-ca\": 536,\n\t\"./en-ca.js\": 536,\n\t\"./en-gb\": 537,\n\t\"./en-gb.js\": 537,\n\t\"./en-ie\": 538,\n\t\"./en-ie.js\": 538,\n\t\"./en-nz\": 539,\n\t\"./en-nz.js\": 539,\n\t\"./eo\": 540,\n\t\"./eo.js\": 540,\n\t\"./es\": 541,\n\t\"./es-do\": 542,\n\t\"./es-do.js\": 542,\n\t\"./es.js\": 541,\n\t\"./et\": 543,\n\t\"./et.js\": 543,\n\t\"./eu\": 544,\n\t\"./eu.js\": 544,\n\t\"./fa\": 545,\n\t\"./fa.js\": 545,\n\t\"./fi\": 546,\n\t\"./fi.js\": 546,\n\t\"./fo\": 547,\n\t\"./fo.js\": 547,\n\t\"./fr\": 548,\n\t\"./fr-ca\": 549,\n\t\"./fr-ca.js\": 549,\n\t\"./fr-ch\": 550,\n\t\"./fr-ch.js\": 550,\n\t\"./fr.js\": 548,\n\t\"./fy\": 551,\n\t\"./fy.js\": 551,\n\t\"./gd\": 552,\n\t\"./gd.js\": 552,\n\t\"./gl\": 553,\n\t\"./gl.js\": 553,\n\t\"./gom-latn\": 554,\n\t\"./gom-latn.js\": 554,\n\t\"./he\": 555,\n\t\"./he.js\": 555,\n\t\"./hi\": 556,\n\t\"./hi.js\": 556,\n\t\"./hr\": 557,\n\t\"./hr.js\": 557,\n\t\"./hu\": 558,\n\t\"./hu.js\": 558,\n\t\"./hy-am\": 559,\n\t\"./hy-am.js\": 559,\n\t\"./id\": 560,\n\t\"./id.js\": 560,\n\t\"./is\": 561,\n\t\"./is.js\": 561,\n\t\"./it\": 562,\n\t\"./it.js\": 562,\n\t\"./ja\": 563,\n\t\"./ja.js\": 563,\n\t\"./jv\": 564,\n\t\"./jv.js\": 564,\n\t\"./ka\": 565,\n\t\"./ka.js\": 565,\n\t\"./kk\": 566,\n\t\"./kk.js\": 566,\n\t\"./km\": 567,\n\t\"./km.js\": 567,\n\t\"./kn\": 568,\n\t\"./kn.js\": 568,\n\t\"./ko\": 569,\n\t\"./ko.js\": 569,\n\t\"./ky\": 570,\n\t\"./ky.js\": 570,\n\t\"./lb\": 571,\n\t\"./lb.js\": 571,\n\t\"./lo\": 572,\n\t\"./lo.js\": 572,\n\t\"./lt\": 573,\n\t\"./lt.js\": 573,\n\t\"./lv\": 574,\n\t\"./lv.js\": 574,\n\t\"./me\": 575,\n\t\"./me.js\": 575,\n\t\"./mi\": 576,\n\t\"./mi.js\": 576,\n\t\"./mk\": 577,\n\t\"./mk.js\": 577,\n\t\"./ml\": 578,\n\t\"./ml.js\": 578,\n\t\"./mr\": 579,\n\t\"./mr.js\": 579,\n\t\"./ms\": 580,\n\t\"./ms-my\": 581,\n\t\"./ms-my.js\": 581,\n\t\"./ms.js\": 580,\n\t\"./my\": 582,\n\t\"./my.js\": 582,\n\t\"./nb\": 583,\n\t\"./nb.js\": 583,\n\t\"./ne\": 584,\n\t\"./ne.js\": 584,\n\t\"./nl\": 585,\n\t\"./nl-be\": 586,\n\t\"./nl-be.js\": 586,\n\t\"./nl.js\": 585,\n\t\"./nn\": 587,\n\t\"./nn.js\": 587,\n\t\"./pa-in\": 588,\n\t\"./pa-in.js\": 588,\n\t\"./pl\": 589,\n\t\"./pl.js\": 589,\n\t\"./pt\": 590,\n\t\"./pt-br\": 591,\n\t\"./pt-br.js\": 591,\n\t\"./pt.js\": 590,\n\t\"./ro\": 592,\n\t\"./ro.js\": 592,\n\t\"./ru\": 593,\n\t\"./ru.js\": 593,\n\t\"./sd\": 594,\n\t\"./sd.js\": 594,\n\t\"./se\": 595,\n\t\"./se.js\": 595,\n\t\"./si\": 596,\n\t\"./si.js\": 596,\n\t\"./sk\": 597,\n\t\"./sk.js\": 597,\n\t\"./sl\": 598,\n\t\"./sl.js\": 598,\n\t\"./sq\": 599,\n\t\"./sq.js\": 599,\n\t\"./sr\": 600,\n\t\"./sr-cyrl\": 601,\n\t\"./sr-cyrl.js\": 601,\n\t\"./sr.js\": 600,\n\t\"./ss\": 602,\n\t\"./ss.js\": 602,\n\t\"./sv\": 603,\n\t\"./sv.js\": 603,\n\t\"./sw\": 604,\n\t\"./sw.js\": 604,\n\t\"./ta\": 605,\n\t\"./ta.js\": 605,\n\t\"./te\": 606,\n\t\"./te.js\": 606,\n\t\"./tet\": 607,\n\t\"./tet.js\": 607,\n\t\"./th\": 608,\n\t\"./th.js\": 608,\n\t\"./tl-ph\": 609,\n\t\"./tl-ph.js\": 609,\n\t\"./tlh\": 610,\n\t\"./tlh.js\": 610,\n\t\"./tr\": 611,\n\t\"./tr.js\": 611,\n\t\"./tzl\": 612,\n\t\"./tzl.js\": 612,\n\t\"./tzm\": 613,\n\t\"./tzm-latn\": 614,\n\t\"./tzm-latn.js\": 614,\n\t\"./tzm.js\": 613,\n\t\"./uk\": 615,\n\t\"./uk.js\": 615,\n\t\"./ur\": 616,\n\t\"./ur.js\": 616,\n\t\"./uz\": 617,\n\t\"./uz-latn\": 618,\n\t\"./uz-latn.js\": 618,\n\t\"./uz.js\": 617,\n\t\"./vi\": 619,\n\t\"./vi.js\": 619,\n\t\"./x-pseudo\": 620,\n\t\"./x-pseudo.js\": 620,\n\t\"./yo\": 621,\n\t\"./yo.js\": 621,\n\t\"./zh-cn\": 622,\n\t\"./zh-cn.js\": 622,\n\t\"./zh-hk\": 623,\n\t\"./zh-hk.js\": 623,\n\t\"./zh-tw\": 624,\n\t\"./zh-tw.js\": 624\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 1021;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/moment/locale ^\\.\\/.*$\n// module id = 1021\n// module chunks = 0","import { Component } from '@angular/core';\nimport { Platform, AlertController } from 'ionic-angular';\nimport { StatusBar } from '@ionic-native/status-bar';\nimport { SplashScreen } from '@ionic-native/splash-screen';\nimport {Storage } from '@ionic/storage';\n\nimport { TabsPage } from '../pages/tabs/tabs';\nimport { WelcomePage } from '../pages/welcome/welcome';\nimport {AccountService} from './../services/account';\n\nimport {AuthService} from './../services/auth';\nimport { Push, PushObject, PushOptions } from '@ionic-native/push';\n\n@Component({\n templateUrl: 'app.html'\n})\nexport class MyApp {\n rootPage:any;\n\n constructor(platform: Platform,\n statusBar: StatusBar,\n splashScreen: SplashScreen,\n private authService:AuthService,\n public push:Push,\n public accountService: AccountService,\n public alertCtrl: AlertController,\n private storage:Storage) {\n\n platform.ready().then(() => {\n // Okay, so the platform is ready and our plugins are available.\n // Here you can do any higher level native things you might need.\n statusBar.styleDefault();\n splashScreen.hide();\n\n this.authService.loadToken();\n this.pushsetup();\n this.routeToRootPage();\n\n });\n }\n\n routeToRootPage(){\n this.storage.get('token').then(t => {\n let authenticated = t ? true:false;\n if(authenticated){\n console.log('authenticated');\n this.rootPage = TabsPage;\n\n }else{\n console.log('not authenticated');\n this.rootPage = WelcomePage;\n\n }\n });\n }\n pushsetup() {\n const options: PushOptions = {\n android: {},\n ios: {\n alert: 'true',\n badge: true,\n sound: 'false'\n },\n windows: {}\n};\n\nconst pushObject: PushObject = this.push.init(options);\n\npushObject.on('notification').subscribe((notification: any) => {\n if (notification.additionalData.foreground) {\n let youralert = this.alertCtrl.create({\n title: 'New Push notification',\n message: notification.message\n });\n youralert.present();\n }\n});\n\npushObject.on('registration').subscribe((registration: any) => {\n alert(registration.registrationId);\n this.accountService.registerDevice(registration.registrationId);\n console.log(\"Saved Token:\", registration.registrationId);\n});\n\npushObject.on('error').subscribe(error => alert('Error with Push plugin' + error));\n}\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.component.ts","import {Component} from '@angular/core'\n\nimport {CohortPage} from '../cohort/cohort';\nimport {VenueListPage} from '../venue-list/venue-list';\nimport {SettingsPage} from '../settings/settings';\n\n@Component({\n templateUrl: 'tabs.html'\n})\nexport class TabsPage {\n\n private tab1Root: any;\n private tab2Root: any;\n private tab3Root: any;\n\n constructor() {\n // this tells the tabs component which Pages\n // should be each tab's root Page\n this.tab1Root = CohortPage;\n this.tab2Root = VenueListPage;\n this.tab3Root = SettingsPage;\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/pages/tabs/tabs.ts","import {Component} from '@angular/core';\nimport {ViewController, NavParams, AlertController} from 'ionic-angular';\nimport {InAppBrowser} from '@ionic-native/in-app-browser';\n// import {CHART_DIRECTIVES} from 'ng2-charts/ng2-charts';\n// import {GOOGLE_MAPS_DIRECTIVES} from 'angular2-google-maps/core';\nimport {GeoService} from '../../services/geo';\nimport {AccountService} from '../../services/account';\n\nimport {VenueService} from '../../services/venues';\nimport {Venue} from '../../models/venue';\n\n@Component({\n template: `\n\n {{venue.name}}\n \n \n \n \n\n\n \n\n \n \n\n \n \n
\n \n
\n \n \n {{venue.reveals}} out of {{venue.checkins}} have revealed themselves\n \n \n
\n \n \n \n
\n \n
\n \n You have not been here.\n \n
\n
\n \n {{user}}\n \n
\n
\n
\n `,\n\n styles: [`\n agm-map {\n height: 150px;\n touch-action: none;\n pointer-events: none;\n }`],\n})\nexport class RevealedUserListModal {\n venue:Venue;\n iconUrl:string =\"assets/branding/venue.png\";\n chartType:string = 'pie';\n chartLabels:string[] =[];\n chartData:number[] = [];\n chartOptions:any = {\n animation: {\n animateRotate: true,\n animateScale: true,\n },\n responsive: false,\n legend: {\n display: true,\n position: 'bottom',\n fullWidth: true\n }\n };\n\n dataLoaded:boolean = false\n\n constructor(public alertCtrl: AlertController,\n private viewCtrl: ViewController,\n private iab: InAppBrowser,\n public params: NavParams,\n public venueService: VenueService,\n public accountService: AccountService,\n public geoService:GeoService) {\n // console.log(params.data.venue);\n this.venue = params.data.venue;\n\n this.chartLabels = ['Revealed', 'Visited'];\n this.chartData = [this.venue.reveals, this.venue.checkins];\n \n this.accountService.logEvent(`page_enter_venueDetails_${this.venue.id}`);\n }\n\n\n getFill(venue:Venue):string{\n return this.venueService.calculateFillPercent(venue, 80) + 'px';\n }\n\n haveIBeenHere(venue:Venue):boolean{\n let flag = false;\n this.venueService.venues.forEach(v=>{ \n if(v.id == venue.id){ flag = true; }\n });\n return flag; \n }\n\n openInMaps(){\n this.accountService.logEvent(`open_maps_venueDetails_${this.venue.id}`);\n this.iab.create(`http://maps.apple.com/?daddr=${this.venue.lat},${this.venue.lng}`, '_system');\n }\n\n signintoVenue() {\n let alert = this.alertCtrl.create({\n title: `Sign in to ${this.venue.name}`,\n subTitle: 'When you reveal, your signature will only be visible to other people who have also revealed themselves here.',\n buttons: [{\n text: 'Not now',\n handler: data => {\n this.accountService.logEvent(`reveal_dismiss_venueDetails_${this.venue.id}`);\n }\n },{\n text: 'Reveal',\n handler: data => {\n this.venueService.signintoVenue(this.venue).subscribe(\n i => {\n this.venue.revealed = true;\n this.venue.reveals += 1;\n this.venue.revealed_users.push(this.accountService.me.username);\n\n this.accountService.logEvent(`reveal_pass_venueDetails_${this.venue.id}`);\n\n },\n e => console.log(e),\n () => {}\n )\n }\n }]\n });\n alert.present(alert);\n }\n \n\n close() {\n this.viewCtrl.dismiss();\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/pages/venue-list/venue-revealed-users.ts","import {Component, ViewChild, OnInit} from '@angular/core';\nimport {NavController, Slides, AlertController} from 'ionic-angular';\nimport {InAppBrowser} from '@ionic-native/in-app-browser';\nimport { Keyboard } from '@ionic-native/keyboard';\n\nimport {AuthService} from '../../services/auth';\nimport {AccountService} from '../../services/account';\nimport {GeoService} from '../../services/geo';\n\nimport {TabsPage} from '../tabs/tabs';\n\n\n@Component({\n templateUrl: 'welcome.html'\n})\nexport class WelcomePage implements OnInit {\n currentSlide = 0;\n swiper:any;\n\n @ViewChild('slider') slider: Slides;\n slidesOptions = {\n initialSlide: 0,\n onlyExternal: false\n };\n credentials:any = {\n username: '',\n email: '',\n password: ''\n };\n zipcode:number;\n cohort:string;\n\n signupMode:boolean=true;\n\n constructor(private keyboard: Keyboard,\n private nav: NavController,\n public alertCtrl: AlertController,\n private iab: InAppBrowser,\n public authService: AuthService,\n public accountService: AccountService,\n public geoService: GeoService) {\n this.nav = nav;\n }\n \n ngOnInit(){\n this.keyboard.disableScroll(true);\n }\n \n onSlideWillChange(event){\n \n }\n onSlideDidChange(event){\n\n }\n\n onIonDrag(event){\n this.swiper = event;\n this.swiper.lockSwipes();\n }\n\n slideNext(){\n if(this.swiper){\n this.swiper.unlockSwipes();\n }\n this.slider.slideNext();\n }\n\n\n toggleMode(){\n this.signupMode = !this.signupMode;\n }\n\n submitForm(){\n if(this.signupMode){\n this.doSignup();\n }else{\n this.doLogin();\n }\n }\n\n doLogin(){\n if( this.credentials.username && this.credentials.password ){\n this.authService.login({\n username: this.credentials.username.toLowerCase().replace(' ', '_'),\n password: this.credentials.password\n }).subscribe(\n i => {\n if(this.signupMode){\n\n this.accountService.logEvent('consent_given');\n\n this.slideNext();\n }else{\n this.goToApp()\n }\n },\n e => this.presentLoginAlert(),\n () => { }\n );\n }else{\n this.presentImpartialDataAlert();\n }\n }\n\n openPrivacy(){\n this.iab.create('https://s.tech.cornell.edu/MoveMeant/privacy.html', '_system');\n }\n openTerms(){ \n this.iab.create('https://s.tech.cornell.edu/MoveMeant/terms.html', '_system');\n }\n\n doSignup(){\n if(this.credentials.username && this.credentials.email && this.credentials.password){\n \n this.authService.createAccount(\n this.credentials.username.toLowerCase().replace(' ', '_'),\n this.credentials.email.toLowerCase(),\n this.credentials.password\n ).subscribe(\n i => this.doLogin(),\n e => this.presentSignupAlert(),\n () => {}\n );\n\n }else{\n this.presentImpartialDataAlert();\n }\n }\n\n setZipCode(){\n if(this.zipcode){\n this.accountService.associateZipcode(this.zipcode).subscribe(\n i => {\n this.cohort = i.cohort;\n this.slideNext();\n },\n e => this.presentInvalidZipcodeAlert(),\n () => {}\n )\n }else{\n this.presentImpartialDataAlert();\n }\n }\n\n enableVisitTracking(){\n this.geoService.initBackgroundLocation()\n .then(()=>{\n this.slideNext();\n }, ()=>{\n alert(\"Movemeant won't work well without this.\");\n })\n \n }\n\n goToApp(){\n this.nav.setRoot(TabsPage);\n }\n\n presentLoginAlert( ){\n let alert = this.alertCtrl.create({\n title: 'Sorry',\n subTitle: 'We were unable to sign you in, please try again.',\n buttons: ['OK']\n });\n alert.present();\n }\n\n presentSignupAlert( ){\n let alert = this.alertCtrl.create({\n title: 'Sorry',\n subTitle: 'This username seems to be taken.',\n buttons: ['OK']\n });\n alert.present();\n }\n \n\n presentInvalidZipcodeAlert(){\n let alert = this.alertCtrl.create({\n title: 'Sorry',\n subTitle: 'Movemeant is not availible in your region at the moment',\n buttons: ['OK']\n });\n alert.present();\n }\n\n presentImpartialDataAlert( ){\n let alert = this.alertCtrl.create({\n title: 'Sorry',\n subTitle: 'Please fill out all the fields.',\n buttons: ['OK']\n });\n alert.present();\n }\n\n\n presentConsentAlert(){\n let alert = this.alertCtrl.create({\n title: 'Sorry',\n subTitle: 'MoveMeant is a research project from Cornell Tech. We require informed consent for you to use the app. You can delete the app if you do not wish to take part',\n buttons: ['OK']\n });\n alert.present();\n }\n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/pages/welcome/welcome.ts","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncatched exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = 210;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@angular/core/@angular lazy\n// module id = 210\n// module chunks = 0","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncatched exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = 253;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src lazy\n// module id = 253\n// module chunks = 0","import {Injectable} from '@angular/core';\nimport {Http} from '@angular/http';\n\nimport {Observable} from 'rxjs/Observable';\nimport 'rxjs/add/operator/map';\nimport 'rxjs/add/operator/catch';\n\nimport {Account} from '../models/account';\nimport {SettingsService} from './settings';\nimport {AuthService} from './auth';\n\n\n@Injectable()\nexport class AccountService {\n me:Account;\n\n constructor(public http: Http,\n public auth:AuthService){\n\n }\n\n associateZipcode(zipcode:number):Observable{\n let options = this.auth.getProtectedHeader()\n let body = JSON.stringify({ zipcode: zipcode });\n return this.http.post(`${SettingsService.API_ENDPOINT}/cohorts/affiliate/`, body, options)\n .map(r => r.json())\n }\n\n fetchMe():Observable{\n let options = this.auth.getProtectedHeader()\n return this.http.get(`${SettingsService.API_ENDPOINT}/me/`, options)\n .map(r => r.json())\n }\n\n registerDevice(token:string) {\n let options = this.auth.getProtectedHeader()\n this.http.post(`${SettingsService.API_ENDPOINT}/devices/create/`, JSON.stringify({ device: token }), options)\n .map(r => r.json())\n .subscribe(\n i=>{},\n e=>{},\n ()=>{}\n )\n }\n\n loadLoggedInUser(){\n this.fetchMe().subscribe(\n r => this.me = r,\n e => console.log(e),\n () => {}\n );\n }\n\n logEvent(msg:string){\n let options = this.auth.getProtectedHeader()\n this.http.post(`${SettingsService.API_ENDPOINT}/events/`, JSON.stringify({ trigger: msg }), options)\n .map(r => r.json())\n .subscribe(\n i=>{},\n e=>{},\n ()=>{}\n )\n }\n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/services/account.ts","import {Injectable} from '@angular/core';\nimport {Http} from '@angular/http';\nimport {Storage } from '@ionic/storage';\n\nimport {Observable} from 'rxjs/Observable';\nimport 'rxjs/add/operator/map';\nimport 'rxjs/add/operator/catch';\n\nimport {Venue} from '../models/venue';\n\nimport {SettingsService} from './settings';\nimport {AuthService} from './auth';\n\n\n@Injectable()\nexport class VenueService {\n cohort:string = '';\n cohortVenues:Venue[] = [];\n venues:Venue[] = [];\n\n categories:string[] = [];\n data:number[] = [];\n\n \n constructor(public http: Http,\n public authService:AuthService,\n private storage:Storage){\n }\n\n fetchCohortVenues():Observable{\n let options = this.authService.getProtectedHeader()\n return this.http.get(`${SettingsService.API_ENDPOINT}/venues/logs/`, options)\n .map(r => r.json() || []);\n }\n\n loadCohortVenues():void{\n\n this.fetchCohortVenues().subscribe(\n r => {\n\n // console.log(r)\n\n this.cohort = r.cohort;\n this.cohortVenues = r.results.filter(v=>{\n return v.checkins > 1;\n });\n\n\n this.cohortVenues.map(v=>{\n let pos = this.categories.indexOf(v.category);\n if( pos > -1 ){\n this.data[pos] += v.checkins;\n }else{\n this.categories.push(v.category);\n this.data.push(1);\n }\n })\n },\n e => console.log(e),\n () => {}\n );\n\n }\n\n fetchVenues(ids:any[]):Observable{\n let queryIds = ids ? ids : [];\n let options = this.authService.getProtectedHeader()\n return this.http.get(`${SettingsService.API_ENDPOINT}/my/venues/logs/?ids=${queryIds.toString()}`, options)\n .map(r => r.json() || []);\n }\n\n loadVenues():void{\n console.log('==========>Loading Venues');\n this.storage.get('ids').then(ids=>{\n ids = ids? JSON.parse(ids) : [];\n if(ids.length>0){\n\n this.fetchVenues(ids).subscribe(\n r => {\n this.venues = r;\n },\n e => console.log(e),\n () => { }\n );\n }\n });\n }\n\n checkintoVenue(coords:any):Observable{\n console.log(\"==========> [js] About to CHECK INTO VENUE\")\n console.log(`==========> ${coords.lat} : ${coords.lng}`);\n let options = this.authService.getProtectedHeader()\n let body = JSON.stringify({\n 'lat': coords.lat,\n 'lng': coords.lng\n });\n return this.http.post(`${SettingsService.API_ENDPOINT}/venues/search/`, body, options)\n .map(r => r.json() || {})\n .map(r => {\n console.log(\"==========>LOOKEDUP THE PLACE\");\n this.storage.get('ids').then(ids => {\n ids = ids ? JSON.parse(ids) : [];\n if( ids.indexOf(r.id) == -1 ){\n console.log(\"==========>SAVING DA PLACE\");\n ids.push(r.id);\n this.storage.set('ids', JSON.stringify(ids));\n\n // checkin to place\n this.http.post(`${SettingsService.API_ENDPOINT}/venues/checkin/`, JSON.stringify({'venue_id': r.id}), options)\n .subscribe(i=>{\n console.log(\"checked in\")\n },e=>{\n console.log(\"error in \")\n console.log(e);\n }, ()=>{\n console.log('done');\n })\n this.loadVenues();\n }\n });\n });\n }\n\n signintoVenue(venue:Venue):Observable{\n let options = this.authService.getProtectedHeader()\n let body = JSON.stringify({\n 'venue_id': venue.id\n });\n return this.http.post(`${SettingsService.API_ENDPOINT}/venues/reveal/`, body, options)\n .map(r => r.json() || {});\n }\n\n clearVenues():void{\n this.storage.get('ids').then(ids => {\n this.storage.set('ids', JSON.stringify([]));\n this.venues = [];\n })\n }\n\n calculateFillPercent(venue:Venue, normalize:number){\n let checkins = venue.checkins;\n let reveals = venue.reveals;\n\n return normalize - Math.ceil( (reveals / checkins) * normalize )\n }\n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/services/venues.ts","import {Injectable} from '@angular/core';\nimport {Http, Headers, RequestOptions} from '@angular/http';\n\nimport {Observable} from 'rxjs/Observable';\nimport 'rxjs/add/operator/map';\nimport 'rxjs/add/operator/catch';\n\nimport {Storage} from '@ionic/storage';\n\nimport {SettingsService} from './settings';\n\n@Injectable()\nexport class AuthService {\n tokenUrl:string = '/api-token-auth/'\n createAccountUrl:string = '/participants/add/'\n\n token:string = '';\n isAuthenticated:boolean = false;\n\n constructor(public http: Http, private storage: Storage){\n \n }\n\n loadToken(){\n this.storage.get('token').then(t => {\n this.isAuthenticated = t ? true:false;\n this.token = t ? t:'';\n });\n }\n\n setToken(token:string){\n this.storage.set('token', token);\n this.isAuthenticated = true;\n this.token = token;\n }\n\n removeToken(){\n this.storage.remove('token');\n this.isAuthenticated = false;\n this.token = '';\n }\n\n\n getProtectedHeader():RequestOptions{\n let headers = new Headers({ \n 'Content-Type': 'application/json',\n 'Authorization': `Token ${this.token}` \n });\n let options = new RequestOptions({ headers: headers });\n return options;\n }\n\n getUnprotectedHeader():RequestOptions{\n let headers = new Headers({ \n 'Content-Type': 'application/json' \n });\n let options = new RequestOptions({ headers: headers });\n return options;\n }\n\n\n\n getToken(username:string, password:string):Observable{\n let options = this.getUnprotectedHeader()\n let body = JSON.stringify({ username: username, password: password });\n return this.http.post(`${SettingsService.API_ENDPOINT}${this.tokenUrl}`, body, options)\n .map(r => r.json())\n .map(t => this.setToken(t.token))\n }\n createAccount(username:string, email:string, password:string):Observable{\n let options = this.getUnprotectedHeader()\n let body = JSON.stringify({ username: username, email: email, password: password });\n return this.http.post(`${SettingsService.API_ENDPOINT}${this.createAccountUrl}`, body, options)\n }\n\n \n\n login(credentials):Observable{\n return Observable.create(observer => {\n this.getToken(credentials.username, credentials.password).subscribe(\n t => { \n observer.next();\n observer.complete(); \n },\n e => { \n observer.error(e);\n observer.complete(); \n },\n () => {}\n );\n });\n }\n \n}\n\n\n// WEBPACK FOOTER //\n// ./src/services/auth.ts","import {Injectable} from '@angular/core';\nimport {Platform} from 'ionic-angular';\n\nimport 'rxjs/add/operator/map';\nimport 'rxjs/add/operator/catch';\n\nimport {VenueService} from './venues';\n\ndeclare var window: any;\n\n@Injectable()\nexport class GeoService {\n currentCoords = {\n lat: 40.740837,\n lng: -74.001806\n }\n bgGeo:any=undefined;\n config:any = {\n // Geolocation config\n desiredAccuracy: 0,\n distanceFilter: 10,\n stationaryRadius: 25,\n locationUpdateInterval: 1000,\n fastestLocationUpdateInterval: 5000,\n\n // Activity Recognition config\n activityType: 'Other',\n activityRecognitionInterval: 5000,\n stopTimeout: 5,\n\n // Application config\n debug: false,\n stopOnTerminate: false,\n startOnBoot: true\n\n };\n state:any = undefined;\n\n constructor(private platform:Platform,\n public venueService:VenueService){ }\n\n\n initBackgroundLocation(){\n return new Promise((resolve, reject) => {\n\n this.platform.ready().then(()=>{\n \n console.log(\"================>initBackgroundLocation<================\")\n console.log(\"STARTING\");\n console.log(\"================>/initBackgroundLocation<================\")\n \n // Get a reference to the plugin.\n this.bgGeo = window.BackgroundGeolocation;\n \n if(this.bgGeo){\n\n // Listen to location events & errors.\n this.bgGeo.on('location', \n (location, taskId)=>{\n\n try {\n\n let coords = location.coords;\n let lat = coords.latitude;\n let lng = coords.longitude;\n\n this.currentCoords.lat = lat;\n this.currentCoords.lng = lng;\n\n // console.log(\"================>:location<================\")\n // console.log(\"LOCATION\");\n // console.log(location);\n // console.log(\"================>/:location<================\")\n\n this.bgGeo.finish(taskId);\n\n } catch (error) {\n \n console.log(\"ERROR => this.bgGeo.on('location)\");\n console.log(error);\n this.bgGeo.finish(taskId);\n }\n \n },\n (error)=>{\n console.log('error');\n console.log(error)\n });\n \n // Fired whenever state changes from moving->stationary or vice-versa.\n this.bgGeo.on('motionchange', \n (isMoving, location, taskId)=>{\n try {\n // console.log(\"================>:motionchange<================\")\n // console.log(\"MOTION CHANGE\");\n // console.log(isMoving);\n // console.log(\"================>/:motionchange<================\")\n\n if(!isMoving){\n let coords = location.coords;\n let lat = coords.latitude;\n let lng = coords.longitude;\n\n this.venueService.checkintoVenue({\n lat: lat,\n lng: lng\n }).subscribe(\n i=>{\n console.log(i);\n },\n e=>{\n console.log(e);\n },\n ()=>{\n this.bgGeo.finish(taskId);\n }\n );\n }else{\n this.bgGeo.finish(taskId);\n }\n \n } catch (error) {\n\n console.log(\"ERROR => this.bgGeo.on('motionchange')\");\n console.log(error);\n this.bgGeo.finish(taskId);\n\n }\n\n });\n \n // BackgroundGeoLocation is highly configurable.\n // https://github.com/transistorsoft/cordova-background-geolocation/tree/master/docs\n\n console.log(\"++++++++++ABOUT TO CONFIGURE PLUGIN++++++++++\")\n try {\n let Fetcher = window.BackgroundFetch;\n if(Fetcher) {\n Fetcher.configure(()=>{\n console.log(\"Fetcher Initiated\");\n Fetcher.finish();\n },\n ()=>{\n console.log(\"Fetcher Failed\");\n }, { \n stopOnTerminate: false \n });\n }else{\n console.log(\"window.BackgroundFetch Not found\")\n }\n \n this.bgGeo.configure(this.config, (state)=>{\n // This callback is executed when the plugin is ready to use.\n // console.log(\"=============this.bgGeo.configure==============\");\n // console.log('BackgroundGeolocation ready: ', JSON.stringify(state));\n this.state = state;\n if (!state.enabled) {\n this.bgGeo.start();\n this.state.enabled = true;\n }\n\n resolve();\n\n });\n\n } catch (error) {\n console.log(\"ERROR => this.bgGeo.configure\");\n console.log(error);\n reject();\n }\n\n }else{\n console.log(\"Plugin not installed\");\n reject();\n } \n\n });\n \n }); \n }\n\n public mapStyle:any = [\n {\n \"featureType\": \"water\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#e9e9e9\"\n },\n {\n \"lightness\": 17\n }\n ]\n },\n {\n \"featureType\": \"landscape\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#f5f5f5\"\n },\n {\n \"lightness\": 20\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [\n {\n \"color\": \"#ffffff\"\n },\n {\n \"lightness\": 17\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry.stroke\",\n \"stylers\": [\n {\n \"color\": \"#ffffff\"\n },\n {\n \"lightness\": 29\n },\n {\n \"weight\": 0.2\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#ffffff\"\n },\n {\n \"lightness\": 18\n }\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#ffffff\"\n },\n {\n \"lightness\": 16\n }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#f5f5f5\"\n },\n {\n \"lightness\": 21\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#dedede\"\n },\n {\n \"lightness\": 21\n }\n ]\n },\n {\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"visibility\": \"on\"\n },\n {\n \"color\": \"#ffffff\"\n },\n {\n \"lightness\": 16\n }\n ]\n },\n {\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"saturation\": 36\n },\n {\n \"color\": \"#333333\"\n },\n {\n \"lightness\": 40\n }\n ]\n },\n {\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#f2f2f2\"\n },\n {\n \"lightness\": 19\n }\n ]\n },\n {\n \"featureType\": \"administrative\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [\n {\n \"color\": \"#fefefe\"\n },\n {\n \"lightness\": 20\n }\n ]\n },\n {\n \"featureType\": \"administrative\",\n \"elementType\": \"geometry.stroke\",\n \"stylers\": [\n {\n \"color\": \"#fefefe\"\n },\n {\n \"lightness\": 17\n },\n {\n \"weight\": 1.2\n }\n ]\n }\n ]; \n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/services/geo.ts","import {Component} from '@angular/core';\nimport {Platform, NavController, ModalController} from 'ionic-angular';\nimport {\n Push,\n PushToken\n} from '@ionic/cloud-angular';\nimport {Venue} from '../../models/venue';\nimport {VenueService} from '../../services/venues';\nimport {GeoService} from '../../services/geo';\nimport {RevealedUserListModal} from '../venue-list/venue-revealed-users';\nimport {AccountService} from '../../services/account';\n\n@Component({\n templateUrl: 'cohort.html',\n})\nexport class CohortPage {\n recentVenues:Venue[] = [];\n coords ={\n lat: 40.740837,\n lng: -74.001806\n };\n meCoords = {\n lat: 40.740837,\n lng: -74.001806\n }; \n youUrl:string = \"assets/branding/location.png\";\n iconUrl:string =\"assets/branding/venue.png\";\n view_type:string = 'list';\n\n chartType:string = 'doughnut';\t\t\n chartLabels:string[] =[];\t\t\n chartData:number[] = [];\t\t\n chartOptions:any = {\t\t\n animation: {\t\t\n animateRotate: true,\t\t\n animateScale: true,\t\t\n },\t\t\n height: 300,\t\t\n width: 300,\t\t\n responsive: false,\t\t\n legend: {\t\t\n display: true,\t\t\n position: 'bottom',\t\t\n fullWidth: true\t\t\n }\t\t\n };\t\t\n dataLoaded:boolean = false\n \n constructor(private nav: NavController,\n public push: Push,\n public venueService:VenueService,\n public accountService: AccountService,\n public geoService:GeoService,\n private platform:Platform,\n public modalCtrl: ModalController) {\n \n this.nav = nav;\n \n this.accountService.loadLoggedInUser();\n\n }\n\n\n ionViewWillEnter() {\n console.log(\"onPageWillEnter\");\n this.getCurrentCoords();\n this.loadData();\n\n this.accountService.logEvent(\"page_enter_cohort\")\n }\n\n syncCoords(){\n if(this.geoService.bgGeo){\n this.geoService.bgGeo.getCurrentPosition((location,taskId)=>{\n \n this.coords.lat = location.coords.latitude;\n this.coords.lng = location.coords.longitude;\n\n this.meCoords.lat = location.coords.latitude;\n this.meCoords.lng = location.coords.longitude;\n\n this.geoService.bgGeo.finish(taskId);\n\n }, (error)=>{console.log(error);});\n }\n \n }\n\n getFill(venue:Venue):string{\n return this.venueService.calculateFillPercent(venue, 30) + 'px';\n }\n\n getCurrentCoords(){\n console.log(\"getCurrentCoords()\");\n if(this.geoService.state){\n console.log(\"Plugin is initiated so get the coords\");\n this.syncCoords();\n }else{\n console.log(\"Plugin is not initiated so intiate it\")\n this.geoService.initBackgroundLocation().then(()=>{\n this.syncCoords();\n console.log(\"Plugin configured and initialized\");\n }, \n ()=>{\n console.log(\"Unable to initializing the plugin\");\n });\n }\n }\n \n loadData(){\n this.dataLoaded = false;\n this.venueService.loadCohortVenues();\n this.venueService.loadVenues();\n this.chartLabels = this.venueService.categories;\t\t\n this.chartData = this.venueService.data;\n \t\t\n // PATCH-JOB\t\t\n setTimeout(()=>{\t\t\n this.dataLoaded = true;\t\n }, 1000)\n\n \n }\n\n onSelectChange(type:any){\n console.log(\"type is: \"+type);\n if(type == \"pop\"){\n this.venueService.cohortVenues = this.venueService.cohortVenues.sort(function(a,b){if(a.checkins < b.checkins) return 1; else if(a.checkins > b.checkins) return -1; else return 0;});\n console.log(\"pop sort\");\n }\n else if(type == \"loc\"){\n for(let venue of this.venueService.cohortVenues){\n venue.distance = ((venue.lat-this.meCoords.lat)*(venue.lat-this.meCoords.lat)+(venue.lng-this.meCoords.lng)*(venue.lng-this.meCoords.lng));\n }\n this.venueService.cohortVenues = this.venueService.cohortVenues.sort(function(a,b){if(a.distance < b.distance) return -1; else if(a.distance > b.distance) return 1; else return 0;});\n console.log(\"dist sort\");\n }\n else if(type == \"type\"){\n this.venueService.cohortVenues = this.venueService.cohortVenues.sort(function(a,b){if(a.category < b.category) return -1; else if(a.category > b.category) return 1; else return 0;});\n console.log(\"type sort\");\n }\n\n else if(type == \"recent\"){\n this.venueService.cohortVenues = this.recentVenues;\n }\n }\n\n clickedMarker(venue:Venue){\n this.showModal(venue);\n }\n\n centerMap(venue:Venue){\n this.coords.lat = venue.lat;\n this.coords.lng = venue.lng;\n }\n\n showModal(venue:Venue) {\n let modal = this.modalCtrl.create(RevealedUserListModal, { venue: venue });\n modal.present();\n } \n\n haveIBeenThere(venue:Venue){\n let flag = false;\n this.venueService.venues.forEach(v=>{ \n if(v.id == venue.id){ flag = true; }\n });\n if(flag){\n return \"1.0\";\n }else{\n return \"0.5\";\n }\n }\n\n setupPush() {\n this.platform.ready().then(()=>{\n \n this.push.register().then((t: PushToken) => {\n return this.push.saveToken(t);\n }).then((t: PushToken) => {\n console.log('Token saved:', t.token);\n this.accountService.registerDevice(t.token);\n });\n \n });\n }\n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/pages/cohort/cohort.ts","import {Component} from '@angular/core';\nimport {NavController, ModalController} from 'ionic-angular';\n// import {LocalNotifications} from 'ionic-native';\n// import {GOOGLE_MAPS_DIRECTIVES} from 'angular2-google-maps/core';\n\n\nimport {Venue} from '../../models/venue';\nimport {VenueService} from '../../services/venues';\nimport {GeoService} from '../../services/geo';\nimport {AccountService} from '../../services/account';\nimport {RevealedUserListModal} from './venue-revealed-users';\n\n@Component({\n templateUrl: 'venue-list.html',\n// directives: [GOOGLE_MAPS_DIRECTIVES]\n})\nexport class VenueListPage {\n constructor(private nav: NavController,\n public venueService:VenueService,\n public accountService: AccountService,\n public geoService:GeoService,\n public modalCtrl: ModalController) {\n this.nav = nav;\n this.loadVenues();\n\n }\n \n iconUrl:string =\"assets/branding/venue.png\";\n\n loadVenues(){\n this.venueService.loadVenues()\n }\n\n getFill(venue:Venue):string{\n return this.venueService.calculateFillPercent(venue, 30) + 'px';\n }\n\n showModal(venue:Venue) {\n let modal = this.modalCtrl.create(RevealedUserListModal, { venue: venue });\n modal.present();\n }\n\n haveIBeenThere(venue:Venue){\n if(venue.revealed){\n return \"1.0\";\n }else{\n return \"0.5\";\n }\n }\n\n\n debug(){\n this.venueService.checkintoVenue({lat: 40.741139, lng: -74.002845}).subscribe(\n i=>{},\n e=>{},\n ()=>{}\n )\n }\n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/pages/venue-list/venue-list.ts","import {Component} from '@angular/core';\nimport {Platform, NavController, AlertController, App} from 'ionic-angular';\nimport {InAppBrowser} from '@ionic-native/in-app-browser';\nimport {\n Push,\n PushToken\n} from '@ionic/cloud-angular';\nimport {WelcomePage} from '../welcome/welcome';\n\nimport {SettingsService} from '../../services/settings';\nimport {AuthService} from '../../services/auth';\nimport {VenueService} from '../../services/venues';\nimport {GeoService} from '../../services/geo';\nimport {AccountService} from '../../services/account';\n\n@Component({\n templateUrl: 'settings.html'\n})\nexport class SettingsPage {\n APP_VERSION:string;\n enabledGeo:boolean = false;\n enabledPush:boolean = false;\n\n constructor(private nav: NavController,\n private iab: InAppBrowser,\n public app: App,\n public push: Push,\n public alertCtrl: AlertController,\n private platform:Platform,\n public authService: AuthService,\n public venueService: VenueService,\n public accountService:AccountService,\n public geoService:GeoService) {\n this.nav = nav;\n this.APP_VERSION = SettingsService.APP_VERSION;\n this.accountService.loadLoggedInUser();\n\n this.accountService.logEvent(\"page_enter_settings\")\n }\n\n ionViewWillEnter() {\n this.platform.ready().then(()=>{\n this.checkGeoPermissions();\n });\n }\n\n checkGeoPermissions(){\n if(this.geoService.state){\n // console.log(\"Plugin is initiated so get the coords\");\n this.enabledGeo = this.geoService.state.enabled;\n }else{\n // console.log(\"Plugin is not initiated\");\n }\n }\n\n toggleGeoPermissions(){\n\n this.platform.ready().then(()=>{\n console.log(\"===========toggleGeoPermissions===========\");\n\n if(this.geoService.state){\n\n if(this.geoService.state.enabled){\n this.geoService.bgGeo.stop();\n }else{\n this.geoService.bgGeo.start();\n }\n\n }else{\n console.log(\"Plugin is not initiated, starting it\");\n this.geoService.initBackgroundLocation();\n }\n\n });\n }\n\n togglePushPermissions(){\n this.platform.ready().then(()=>{\n\n this.push.register().then((t: PushToken) => {\n return this.push.saveToken(t);\n }).then((t: PushToken) => {\n console.log('Token saved:', t.token);\n this.accountService.registerDevice(t.token);\n });\n\n });\n }\n\n clear(){\n this.venueService.clearVenues();\n }\n\n signout(){\n if(this.geoService.state){\n this.geoService.bgGeo.stop();\n }\n this.clear()\n this.authService.removeToken();\n this.app.getRootNav().setRoot(WelcomePage);\n }\n\n\n sendFeedback(){\n this.iab.create(`mailto:s.tech.cornell@gmail.com?Subject=MoveMeant%20Feedback`, '_system');\n } \n\n goToSite(){\n this.iab.create('http://cornelltech.io/', '_system');\n }\n\n confirmSignout( ){\n let alert = this.alertCtrl.create({\n title: 'Are you sure?',\n subTitle: 'Are you sure you want to sign out?',\n buttons: [{\n text: 'Cancel',\n handler: data => {} \n },{\n text: 'Confirm',\n handler: data => {\n this.signout();\n }\n }]\n });\n alert.present();\n }\n\n confirmLogsClear( ){\n let alert = this.alertCtrl.create({\n title: 'Are you sure?',\n subTitle: `If you erase your local logs, you won't be able to recover them.`,\n buttons: [{\n text: 'Cancel',\n handler: data => {} \n },{\n text: 'Confirm',\n handler: data => {\n this.clear();\n }\n }]\n });\n alert.present();\n }\n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/pages/settings/settings.ts","import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app.module';\n\nplatformBrowserDynamic().bootstrapModule(AppModule);\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/main.ts","import { BrowserModule } from '@angular/platform-browser';\nimport { ErrorHandler, NgModule } from '@angular/core';\nimport { HttpModule } from '@angular/http';\nimport { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';\nimport { SplashScreen } from '@ionic-native/splash-screen';\nimport { StatusBar } from '@ionic-native/status-bar';\n\nimport { CloudSettings, CloudModule } from '@ionic/cloud-angular';\nimport { IonicStorageModule } from '@ionic/storage';\nimport { InAppBrowser } from '@ionic-native/in-app-browser';\nimport { Push } from '@ionic-native/push';\nimport { Keyboard } from '@ionic-native/keyboard';\n\nimport { ChartsModule } from 'ng2-charts';\nimport {AgmCoreModule} from '@agm/core';\n\nimport { MyApp } from './app.component';\nimport { CohortPage } from '../pages/cohort/cohort';\nimport { SettingsPage } from '../pages/settings/settings';\nimport { TabsPage } from '../pages/tabs/tabs';\nimport { VenueListPage } from '../pages/venue-list/venue-list';\nimport { RevealedUserListModal } from '../pages/venue-list/venue-revealed-users';\nimport { WelcomePage } from '../pages/welcome/welcome';\n\n\nimport {SettingsService} from './../services/settings';\nimport {AuthService} from './../services/auth';\nimport {AccountService} from './../services/account';\nimport {VenueService} from './../services/venues';\nimport {GeoService} from './../services/geo';\n\nconst cloudSettings: CloudSettings = {\n 'core': {\n 'app_id': 'f37ad9eb'\n },\n 'push': {\n 'sender_id': '',\n 'pluginConfig': {\n 'ios': {\n 'badge': true,\n 'sound': true\n },\n 'android': {\n 'iconColor': '#343434'\n }\n }\n }\n};\n\n@NgModule({\n declarations: [\n MyApp,\n CohortPage,\n SettingsPage,\n TabsPage,\n VenueListPage,\n RevealedUserListModal,\n WelcomePage\n ],\n imports: [\n BrowserModule,\n HttpModule,\n ChartsModule,\n AgmCoreModule.forRoot({\n apiKey: 'AIzaSyBa7UgG0KAlZShxva2Dyhg1Hhu7lh0BLSc'\n }),\n IonicModule.forRoot(MyApp),\n CloudModule.forRoot(cloudSettings),\n IonicStorageModule.forRoot()\n ],\n bootstrap: [IonicApp],\n entryComponents: [\n MyApp,\n CohortPage,\n SettingsPage,\n TabsPage,\n VenueListPage,\n RevealedUserListModal,\n WelcomePage\n ],\n providers: [\n StatusBar,\n SplashScreen,\n InAppBrowser,\n Push,\n Keyboard,\n SettingsService,\n AuthService,\n AccountService,\n VenueService,\n GeoService,\n\n {provide: ErrorHandler, useClass: IonicErrorHandler}\n ]\n})\nexport class AppModule {}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/app.module.ts","import {Injectable} from '@angular/core';\n\n@Injectable()\nexport class SettingsService{\n public static DEBUG:boolean = true;\n public static API_VERSION:string = 'v1';\n // public static API_ENDPOINT:string = `http://localhost:8100/api/${SettingsService.API_VERSION}`;\n // public static API_ENDPOINT:string = `http://ec2-107-23-148-64.compute-1.amazonaws.com/api/${SettingsService.API_VERSION}`;\n public static API_ENDPOINT:string = `http://127.0.0.1:8000/api/${SettingsService.API_VERSION}`;\n public static APP_VERSION:string = '2.0.0';\n\n constructor(){ }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/services/settings.ts"],"sourceRoot":""} \ No newline at end of file diff --git a/config.xml b/config.xml index b4c63a3..a4ce9b8 100644 --- a/config.xml +++ b/config.xml @@ -77,7 +77,6 @@ - @@ -94,5 +93,9 @@ - + + + + + diff --git a/package.json b/package.json index 766349a..04428f9 100644 --- a/package.json +++ b/package.json @@ -1,82 +1,86 @@ { - "name": "movemeant-app", - "version": "0.0.1", - "author": "Ionic Framework", - "homepage": "http://ionicframework.com/", - "private": true, - "scripts": { - "clean": "ionic-app-scripts clean", - "build": "ionic-app-scripts build", - "lint": "ionic-app-scripts lint", - "ionic:build": "ionic-app-scripts build", - "ionic:serve": "ionic-app-scripts serve" + "name": "movemeant-app", + "version": "0.0.1", + "author": "Ionic Framework", + "homepage": "http://ionicframework.com/", + "private": true, + "scripts": { + "clean": "ionic-app-scripts clean", + "build": "ionic-app-scripts build", + "lint": "ionic-app-scripts lint", + "ionic:build": "ionic-app-scripts build", + "ionic:serve": "ionic-app-scripts serve" + }, + "dependencies": { + "@agm/core": "^1.0.0-beta.1", + "@angular/common": "4.1.3", + "@angular/compiler": "4.1.3", + "@angular/compiler-cli": "4.1.3", + "@angular/core": "4.1.3", + "@angular/forms": "4.1.3", + "@angular/http": "4.1.3", + "@angular/platform-browser": "4.1.3", + "@angular/platform-browser-dynamic": "4.1.3", + "@ionic-native/core": "3.12.1", + "@ionic-native/in-app-browser": "^4.2.1", + "@ionic-native/keyboard": "^4.2.1", + "@ionic-native/push": "^4.4.2", + "@ionic-native/splash-screen": "3.12.1", + "@ionic-native/status-bar": "3.12.1", + "@ionic/cloud-angular": "^0.12.0", + "@ionic/storage": "2.0.1", + "chart.js": "^2.6.0", + "cordova-background-geolocation": "git+https://github.com/transistorsoft/cordova-background-geolocation-lt.git", + "cordova-ios": "^4.4.0", + "cordova-plugin-background-fetch": "^5.0.0", + "cordova-plugin-cocoalumberjack": "0.0.4", + "cordova-plugin-console": "^1.0.5", + "cordova-plugin-device": "^1.1.4", + "cordova-plugin-fcm": "^2.1.2", + "cordova-plugin-inappbrowser": "^1.7.1", + "cordova-plugin-splashscreen": "^4.0.3", + "cordova-plugin-statusbar": "^2.2.2", + "cordova-plugin-whitelist": "^1.3.1", + "ionic-angular": "3.6.0", + "ionic-plugin-keyboard": "^2.2.1", + "ionicons": "3.0.0", + "ng2-charts": "^1.6.0", + "phonegap-plugin-push": "^2.0.0", + "rxjs": "5.4.0", + "sw-toolbox": "3.6.0", + "zone.js": "0.8.12", + "cordova-android": "~6.3.0" + }, + "devDependencies": { + "@ionic/app-scripts": "2.1.4", + "typescript": "2.3.4" + }, + "description": "An Ionic project", + "cordova": { + "plugins": { + "cordova-plugin-console": {}, + "cordova-plugin-device": {}, + "cordova-plugin-splashscreen": {}, + "cordova-plugin-statusbar": {}, + "cordova-plugin-whitelist": {}, + "ionic-plugin-keyboard": {}, + "cordova-background-geolocation": { + "LICENSE": "4bbb513c013111eae951647fd4f9e79f127fce6f7a00e9d327db9ea2a053a0df", + "BACKGROUND_MODE_LOCATION": "location", + "LOCATION_ALWAYS_AND_WHEN_IN_USE_USAGE_DESCRIPTION": "Always use is required for constant background location-tracking", + "LOCATION_ALWAYS_USAGE_DESCRIPTION": "Background location-tracking is required", + "LOCATION_WHEN_IN_USE_USAGE_DESCRIPTION": "Background location-tracking is required", + "MOTION_USAGE_DESCRIPTION": "Using the accelerometer increases battery-efficiency by intelligently toggling location-tracking only when the device is detected to be moving" + }, + "cordova-plugin-inappbrowser": {}, + "phonegap-plugin-push": { + "SENDER_ID": "699558123249" + }, + "cordova-plugin-fcm": {} }, - "dependencies": { - "@agm/core": "^1.0.0-beta.1", - "@angular/common": "4.1.3", - "@angular/compiler": "4.1.3", - "@angular/compiler-cli": "4.1.3", - "@angular/core": "4.1.3", - "@angular/forms": "4.1.3", - "@angular/http": "4.1.3", - "@angular/platform-browser": "4.1.3", - "@angular/platform-browser-dynamic": "4.1.3", - "@ionic-native/core": "3.12.1", - "@ionic-native/in-app-browser": "^4.2.1", - "@ionic-native/keyboard": "^4.2.1", - "@ionic-native/push": "^4.2.1", - "@ionic-native/splash-screen": "3.12.1", - "@ionic-native/status-bar": "3.12.1", - "@ionic/cloud-angular": "^0.12.0", - "@ionic/storage": "2.0.1", - "chart.js": "^2.6.0", - "cordova-android": "^6.2.3", - "cordova-background-geolocation": "git+https://github.com/transistorsoft/cordova-background-geolocation.git", - "cordova-ios": "^4.4.0", - "cordova-plugin-background-fetch": "^5.0.0", - "cordova-plugin-cocoalumberjack": "0.0.4", - "cordova-plugin-console": "^1.0.5", - "cordova-plugin-device": "^1.1.4", - "cordova-plugin-inappbrowser": "^1.7.1", - "cordova-plugin-splashscreen": "^4.0.3", - "cordova-plugin-statusbar": "^2.2.2", - "cordova-plugin-whitelist": "^1.3.1", - "ionic-angular": "3.6.0", - "ionic-plugin-keyboard": "^2.2.1", - "ionicons": "3.0.0", - "ng2-charts": "^1.6.0", - "phonegap-plugin-push": "^2.0.0", - "rxjs": "5.4.0", - "sw-toolbox": "3.6.0", - "zone.js": "0.8.12" - }, - "devDependencies": { - "@ionic/app-scripts": "2.1.4", - "typescript": "2.3.4" - }, - "description": "An Ionic project", - "cordova": { - "plugins": { - "cordova-plugin-console": {}, - "cordova-plugin-device": {}, - "cordova-plugin-splashscreen": {}, - "cordova-plugin-statusbar": {}, - "cordova-plugin-whitelist": {}, - "ionic-plugin-keyboard": {}, - "cordova-background-geolocation": { - "LICENSE": "4bbb513c013111eae951647fd4f9e79f127fce6f7a00e9d327db9ea2a053a0df", - "BACKGROUND_MODE_LOCATION": "location", - "LOCATION_ALWAYS_AND_WHEN_IN_USE_USAGE_DESCRIPTION": "Always use is required for constant background location-tracking", - "LOCATION_ALWAYS_USAGE_DESCRIPTION": "Background location-tracking is required", - "LOCATION_WHEN_IN_USE_USAGE_DESCRIPTION": "Background location-tracking is required", - "MOTION_USAGE_DESCRIPTION": "Using the accelerometer increases battery-efficiency by intelligently toggling location-tracking only when the device is detected to be moving" - }, - "cordova-plugin-inappbrowser": {}, - "phonegap-plugin-push": {} - }, - "platforms": [ - "android", - "ios" - ] - } + "platforms": [ + "ios", + "android" + ] + } } \ No newline at end of file diff --git a/plugins/android.json b/plugins/android.json index c865f70..59f3313 100644 --- a/plugins/android.json +++ b/plugins/android.json @@ -1,47 +1,50 @@ { - "prepare_queue": { - "installed": [], - "uninstalled": [] - }, - "config_munge": { - "files": {} - }, - "installed_plugins": { - "cordova-background-geolocation": { - "LICENSE": "4bbb513c013111eae951647fd4f9e79f127fce6f7a00e9d327db9ea2a053a0df", - "PACKAGE_NAME": "edu.foundry.movemeant" - }, - "cordova-plugin-console": { - "PACKAGE_NAME": "edu.foundry.movemeant" - }, - "cordova-plugin-device": { - "PACKAGE_NAME": "edu.foundry.movemeant" - }, - "cordova-plugin-inappbrowser": { - "PACKAGE_NAME": "edu.foundry.movemeant" - }, - "cordova-plugin-splashscreen": { - "PACKAGE_NAME": "edu.foundry.movemeant" - }, - "cordova-plugin-statusbar": { - "PACKAGE_NAME": "edu.foundry.movemeant" - }, - "cordova-plugin-whitelist": { - "PACKAGE_NAME": "edu.foundry.movemeant" - }, - "ionic-plugin-keyboard": { - "PACKAGE_NAME": "edu.foundry.movemeant" - }, - "phonegap-plugin-push": { - "PACKAGE_NAME": "edu.foundry.movemeant" - } - }, - "dependent_plugins": { - "cordova-plugin-background-fetch": { - "PACKAGE_NAME": "edu.foundry.movemeant" - }, - "cordova-plugin-cocoalumberjack": { - "PACKAGE_NAME": "edu.foundry.movemeant" - } + "prepare_queue": { + "installed": [], + "uninstalled": [] + }, + "config_munge": { + "files": {} + }, + "installed_plugins": { + "cordova-background-geolocation": { + "LICENSE": "4bbb513c013111eae951647fd4f9e79f127fce6f7a00e9d327db9ea2a053a0df", + "PACKAGE_NAME": "edu.foundry.movemeant" + }, + "cordova-plugin-console": { + "PACKAGE_NAME": "edu.foundry.movemeant" + }, + "cordova-plugin-device": { + "PACKAGE_NAME": "edu.foundry.movemeant" + }, + "cordova-plugin-fcm": { + "PACKAGE_NAME": "edu.foundry.movemeant" + }, + "cordova-plugin-inappbrowser": { + "PACKAGE_NAME": "edu.foundry.movemeant" + }, + "cordova-plugin-splashscreen": { + "PACKAGE_NAME": "edu.foundry.movemeant" + }, + "cordova-plugin-statusbar": { + "PACKAGE_NAME": "edu.foundry.movemeant" + }, + "cordova-plugin-whitelist": { + "PACKAGE_NAME": "edu.foundry.movemeant" + }, + "ionic-plugin-keyboard": { + "PACKAGE_NAME": "edu.foundry.movemeant" + }, + "phonegap-plugin-push": { + "PACKAGE_NAME": "edu.foundry.movemeant" + } + }, + "dependent_plugins": { + "cordova-plugin-background-fetch": { + "PACKAGE_NAME": "edu.foundry.movemeant" + }, + "cordova-plugin-cocoalumberjack": { + "PACKAGE_NAME": "edu.foundry.movemeant" } + } } \ No newline at end of file diff --git a/plugins/cordova-plugin-fcm/README.md b/plugins/cordova-plugin-fcm/README.md new file mode 100644 index 0000000..f705fa3 --- /dev/null +++ b/plugins/cordova-plugin-fcm/README.md @@ -0,0 +1,156 @@ +# Google Firebase Cloud Messaging Cordova Push Plugin +> Extremely easy plug&play push notification plugin for Cordova applications with Google Firebase FCM. + +>[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VF654BMGUPQTJ) + +#### Version 2.1.2 (03/06/2017) +- Tested on Android and iOS using Cordova cli 6.4.0, Cordova android 6.0.0 and Cordova ios 4.3.1 +- Available sdk functions: onTokenRefresh, getToken, subscribeToTopic, unsubscribeFromTopic and onNotification +- 'google-services.json' and 'GoogleService-Info.plist' are added automatically from Cordova project root to platform folders +- Added data payload parameter to check whether the user tapped on the notification or was received while in foreground. +- **Free testing server available for free! https://cordova-plugin-fcm.appspot.com** + +## Installation +Make sure you have ‘google-services.json’ for Android or ‘GoogleService-Info.plist’ for iOS in your Cordova project root folder. You don´t need to configure anything else in order to have push notification working for both platforms, everything is magic. +```Bash +cordova plugin add cordova-plugin-fcm + +``` + +#### Firebase configuration files +Get the needed configuration files for Android or iOS from the Firebase Console (see docs: https://firebase.google.com/docs/). + +#### Android compilation details +Put the downloaded file 'google-services.json' in the Cordova project root folder. + +You will need to ensure that you have installed the appropiate Android SDK libraries. + + +:warning: For Android >5.0 status bar icon, you must include transparent solid color icon with name 'fcm_push_icon.png' in the 'res' folder in the same way you add the other application icons. +If you do not set this resource, then the SDK will use the default icon for your app which may not meet the standards for Android >5.0. + +#### iOS compilation details +Put the downloaded file 'GoogleService-Info.plist' in the Cordova project root folder. + +## Usage + +:warning: It's highly recommended to use REST API to send push notifications because Firebase console does not have all the functionalities. **Pay attention to the payload example in order to use the plugin properly**. +You can also test your notifications with the free testing server: https://cordova-plugin-fcm.appspot.com + +#### Receiving Token Refresh + +```javascript +//FCMPlugin.onTokenRefresh( onTokenRefreshCallback(token) ); +//Note that this callback will be fired everytime a new token is generated, including the first time. +FCMPlugin.onTokenRefresh(function(token){ + alert( token ); +}); +``` + +#### Get token + +```javascript +//FCMPlugin.getToken( successCallback(token), errorCallback(err) ); +//Keep in mind the function will return null if the token has not been established yet. +FCMPlugin.getToken(function(token){ + alert(token); +}); +``` + +#### Subscribe to topic + +```javascript +//FCMPlugin.subscribeToTopic( topic, successCallback(msg), errorCallback(err) ); +//All devices are subscribed automatically to 'all' and 'ios' or 'android' topic respectively. +//Must match the following regular expression: "[a-zA-Z0-9-_.~%]{1,900}". +FCMPlugin.subscribeToTopic('topicExample'); +``` + +#### Unsubscribe from topic + +```javascript +//FCMPlugin.unsubscribeFromTopic( topic, successCallback(msg), errorCallback(err) ); +FCMPlugin.unsubscribeFromTopic('topicExample'); +``` + +#### Receiving push notification data + +```javascript +//FCMPlugin.onNotification( onNotificationCallback(data), successCallback(msg), errorCallback(err) ) +//Here you define your application behaviour based on the notification data. +FCMPlugin.onNotification(function(data){ + if(data.wasTapped){ + //Notification was received on device tray and tapped by the user. + alert( JSON.stringify(data) ); + }else{ + //Notification was received in foreground. Maybe the user needs to be notified. + alert( JSON.stringify(data) ); + } +}); +``` + +#### Send notification. Payload example (REST API) +Full documentation: https://firebase.google.com/docs/cloud-messaging/http-server-ref +Free testing server: https://cordova-plugin-fcm.appspot.com +```javascript +//POST: https://fcm.googleapis.com/fcm/send +//HEADER: Content-Type: application/json +//HEADER: Authorization: key=AIzaSy******************* +{ + "notification":{ + "title":"Notification title", + "body":"Notification body", + "sound":"default", + "click_action":"FCM_PLUGIN_ACTIVITY", + "icon":"fcm_push_icon" + }, + "data":{ + "param1":"value1", + "param2":"value2" + }, + "to":"/topics/topicExample", + "priority":"high", + "restricted_package_name":"" +} +//sound: optional field if you want sound with the notification +//click_action: must be present with the specified value for Android +//icon: white icon resource name for Android >5.0 +//data: put any "param":"value" and retreive them in the JavaScript notification callback +//to: device token or /topic/topicExample +//priority: must be set to "high" for delivering notifications on closed iOS apps +//restricted_package_name: optional field if you want to send only to a restricted app package (i.e: com.myapp.test) +``` +## How it works +Send a push notification to a single device or topic. +- 1.a Application is in foreground: + - The notification data is received in the JavaScript callback without notification bar message (this is the normal behaviour of mobile push notifications). +- 1.b Application is in background or closed: + - The device displays the notification message in the device notification bar. + - If the user taps the notification, the application comes to foreground and the notification data is received in the JavaScript callback. + - If the user does not tap the notification but opens the applicacion, nothing happens until the notification is tapped. + + +## License +``` +The MIT License + +Copyright (c) 2017 Felipe Echanique Torres (felipe.echanique in the gmail.com) + +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: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +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. +``` diff --git a/plugins/cordova-plugin-fcm/package.json b/plugins/cordova-plugin-fcm/package.json new file mode 100644 index 0000000..7335015 --- /dev/null +++ b/plugins/cordova-plugin-fcm/package.json @@ -0,0 +1,103 @@ +{ + "_args": [ + [ + { + "raw": "cordova-plugin-fcm", + "scope": null, + "escapedName": "cordova-plugin-fcm", + "name": "cordova-plugin-fcm", + "rawSpec": "", + "spec": "latest", + "type": "tag" + }, + "/Users/gautamchheda/Desktop/movement-app" + ] + ], + "_from": "cordova-plugin-fcm@latest", + "_id": "cordova-plugin-fcm@2.1.2", + "_inCache": true, + "_location": "/cordova-plugin-fcm", + "_nodeVersion": "6.10.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/cordova-plugin-fcm-2.1.2.tgz_1496489321495_0.32410533796064556" + }, + "_npmUser": { + "name": "fechanique", + "email": "felipe.echanique@gmail.com" + }, + "_npmVersion": "3.10.10", + "_phantomChildren": {}, + "_requested": { + "raw": "cordova-plugin-fcm", + "scope": null, + "escapedName": "cordova-plugin-fcm", + "name": "cordova-plugin-fcm", + "rawSpec": "", + "spec": "latest", + "type": "tag" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/cordova-plugin-fcm/-/cordova-plugin-fcm-2.1.2.tgz", + "_shasum": "5f2f7c12c16556d21d3021e7d3ad89e215825747", + "_shrinkwrap": null, + "_spec": "cordova-plugin-fcm", + "_where": "/Users/gautamchheda/Desktop/movement-app", + "author": { + "name": "Felipe Echanique Torres", + "email": "felipe.echanique@gmail.com" + }, + "bugs": { + "url": "https://github.com/fechanique/cordova-plugin-fcm/issues" + }, + "cordova_name": "Cordova FCM Push Plugin", + "dependencies": {}, + "description": "Google Firebase Cloud Messaging Cordova Push Plugin", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "5f2f7c12c16556d21d3021e7d3ad89e215825747", + "tarball": "https://registry.npmjs.org/cordova-plugin-fcm/-/cordova-plugin-fcm-2.1.2.tgz" + }, + "engines": [], + "englishdoc": "", + "gitHead": "037cb5bc6cc17247c46dd433f3440e080f5f1a62", + "homepage": "https://github.com/fechanique/cordova-plugin-fcm#readme", + "issue": "", + "keywords": [ + "ecosystem:cordova", + "cordova-android", + "cordova-ios", + "notifications", + "push", + "firebase", + "fcm", + "ios", + "android", + "cordova" + ], + "license": "MIT", + "maintainers": [ + { + "name": "fechanique", + "email": "felipe.echanique@gmail.com" + } + ], + "name": "cordova-plugin-fcm", + "optionalDependencies": {}, + "platforms": [ + "android", + "ios" + ], + "readme": "ERROR: No README data found!", + "repo": "", + "repository": { + "type": "git", + "url": "git+https://github.com/fechanique/cordova-plugin-fcm.git" + }, + "scripts": {}, + "version": "2.1.2" +} diff --git a/plugins/cordova-plugin-fcm/plugin.xml b/plugins/cordova-plugin-fcm/plugin.xml new file mode 100644 index 0000000..3769683 --- /dev/null +++ b/plugins/cordova-plugin-fcm/plugin.xml @@ -0,0 +1,130 @@ + + + + FCMPlugin + Cordova FCM Plugin + Apache 2.0 + cordova, fcm, push, plugin + + + Cordova FCM plugin v2.1.2 installed + For more details visit https://github.com/fechanique/cordova-plugin-fcm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + development + + + production + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/cordova-plugin-fcm/scripts/fcm_config_files_process.js b/plugins/cordova-plugin-fcm/scripts/fcm_config_files_process.js new file mode 100644 index 0000000..120dac8 --- /dev/null +++ b/plugins/cordova-plugin-fcm/scripts/fcm_config_files_process.js @@ -0,0 +1,86 @@ +#!/usr/bin/env node +'use strict'; + +var fs = require('fs'); + +var getValue = function(config, name) { + var value = config.match(new RegExp('<' + name + '>(.*?)', "i")) + if(value && value[1]) { + return value[1] + } else { + return null + } +} + +function fileExists(path) { + try { + return fs.statSync(path).isFile(); + } + catch (e) { + return false; + } +} + +function directoryExists(path) { + try { + return fs.statSync(path).isDirectory(); + } + catch (e) { + return false; + } +} + +var config = fs.readFileSync("config.xml").toString() +var name = getValue(config, "name") + +if (directoryExists("platforms/ios")) { + var path = "GoogleService-Info.plist"; + + if (fileExists( path )) { + try { + var contents = fs.readFileSync(path).toString(); + fs.writeFileSync("platforms/ios/" + name + "/Resources/GoogleService-Info.plist", contents) + } catch(err) { + process.stdout.write(err); + } + + } else { + throw new Error("cordova-plugin-fcm: You have installed platform ios but file 'GoogleService-Info.plist' was not found in your Cordova project root folder.") + } +} + +if (directoryExists("platforms/android")) { + var path = "google-services.json"; + + if (fileExists( path )) { + try { + var contents = fs.readFileSync(path).toString(); + fs.writeFileSync("platforms/android/google-services.json", contents); + + var json = JSON.parse(contents); + var strings = fs.readFileSync("platforms/android/res/values/strings.xml").toString(); + + // strip non-default value + strings = strings.replace(new RegExp('([^\@<]+?)', "i"), '') + + // strip non-default value + strings = strings.replace(new RegExp('([^\@<]+?)', "i"), '') + + // strip empty lines + strings = strings.replace(new RegExp('(\r\n|\n|\r)[ \t]*(\r\n|\n|\r)', "gm"), '$1') + + // replace the default value + strings = strings.replace(new RegExp('([^<]+?)', "i"), '' + json.client[0].client_info.mobilesdk_app_id + '') + + // replace the default value + strings = strings.replace(new RegExp('([^<]+?)', "i"), '' + json.client[0].api_key[0].current_key + '') + + fs.writeFileSync("platforms/android/res/values/strings.xml", strings); + } catch(err) { + process.stdout.write(err); + } + + } else { + throw new Error("cordova-plugin-fcm: You have installed platform android but file 'google-services.json' was not found in your Cordova project root folder.") + } +} \ No newline at end of file diff --git a/plugins/cordova-plugin-fcm/src/android/FCMPlugin.gradle b/plugins/cordova-plugin-fcm/src/android/FCMPlugin.gradle new file mode 100644 index 0000000..0ac9917 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/android/FCMPlugin.gradle @@ -0,0 +1,13 @@ +buildscript { + repositories { + jcenter() + mavenLocal() + } + dependencies { + classpath 'com.android.tools.build:gradle:+' + classpath 'com.google.gms:google-services:3.0.0' + } +} +// apply plugin: 'com.google.gms.google-services' +// class must be used instead of id(string) to be able to apply plugin from non-root gradle file +apply plugin: com.google.gms.googleservices.GoogleServicesPlugin \ No newline at end of file diff --git a/plugins/cordova-plugin-fcm/src/android/FCMPlugin.java b/plugins/cordova-plugin-fcm/src/android/FCMPlugin.java new file mode 100644 index 0000000..c2cf2e6 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/android/FCMPlugin.java @@ -0,0 +1,163 @@ +package com.gae.scaffolder.plugin; + +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaInterface; +import android.util.Log; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import android.os.Bundle; + +import com.google.firebase.messaging.FirebaseMessaging; +import com.google.firebase.iid.FirebaseInstanceId; + +import java.util.Map; + +public class FCMPlugin extends CordovaPlugin { + + private static final String TAG = "FCMPlugin"; + + public static CordovaWebView gWebView; + public static String notificationCallBack = "FCMPlugin.onNotificationReceived"; + public static String tokenRefreshCallBack = "FCMPlugin.onTokenRefreshReceived"; + public static Boolean notificationCallBackReady = false; + public static Map lastPush = null; + + public FCMPlugin() {} + + public void initialize(CordovaInterface cordova, CordovaWebView webView) { + super.initialize(cordova, webView); + gWebView = webView; + Log.d(TAG, "==> FCMPlugin initialize"); + FirebaseMessaging.getInstance().subscribeToTopic("android"); + FirebaseMessaging.getInstance().subscribeToTopic("all"); + } + + public boolean execute(final String action, final JSONArray args, final CallbackContext callbackContext) throws JSONException { + + Log.d(TAG,"==> FCMPlugin execute: "+ action); + + try{ + // READY // + if (action.equals("ready")) { + // + callbackContext.success(); + } + // GET TOKEN // + else if (action.equals("getToken")) { + cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + try{ + String token = FirebaseInstanceId.getInstance().getToken(); + callbackContext.success( FirebaseInstanceId.getInstance().getToken() ); + Log.d(TAG,"\tToken: "+ token); + }catch(Exception e){ + Log.d(TAG,"\tError retrieving token"); + } + } + }); + } + // NOTIFICATION CALLBACK REGISTER // + else if (action.equals("registerNotification")) { + notificationCallBackReady = true; + cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + if(lastPush != null) FCMPlugin.sendPushPayload( lastPush ); + lastPush = null; + callbackContext.success(); + } + }); + } + // UN/SUBSCRIBE TOPICS // + else if (action.equals("subscribeToTopic")) { + cordova.getThreadPool().execute(new Runnable() { + public void run() { + try{ + FirebaseMessaging.getInstance().subscribeToTopic( args.getString(0) ); + callbackContext.success(); + }catch(Exception e){ + callbackContext.error(e.getMessage()); + } + } + }); + } + else if (action.equals("unsubscribeFromTopic")) { + cordova.getThreadPool().execute(new Runnable() { + public void run() { + try{ + FirebaseMessaging.getInstance().unsubscribeFromTopic( args.getString(0) ); + callbackContext.success(); + }catch(Exception e){ + callbackContext.error(e.getMessage()); + } + } + }); + } + else{ + callbackContext.error("Method not found"); + return false; + } + }catch(Exception e){ + Log.d(TAG, "ERROR: onPluginAction: " + e.getMessage()); + callbackContext.error(e.getMessage()); + return false; + } + + //cordova.getThreadPool().execute(new Runnable() { + // public void run() { + // // + // } + //}); + + //cordova.getActivity().runOnUiThread(new Runnable() { + // public void run() { + // // + // } + //}); + return true; + } + + public static void sendPushPayload(Map payload) { + Log.d(TAG, "==> FCMPlugin sendPushPayload"); + Log.d(TAG, "\tnotificationCallBackReady: " + notificationCallBackReady); + Log.d(TAG, "\tgWebView: " + gWebView); + try { + JSONObject jo = new JSONObject(); + for (String key : payload.keySet()) { + jo.put(key, payload.get(key)); + Log.d(TAG, "\tpayload: " + key + " => " + payload.get(key)); + } + String callBack = "javascript:" + notificationCallBack + "(" + jo.toString() + ")"; + if(notificationCallBackReady && gWebView != null){ + Log.d(TAG, "\tSent PUSH to view: " + callBack); + gWebView.sendJavascript(callBack); + }else { + Log.d(TAG, "\tView not ready. SAVED NOTIFICATION: " + callBack); + lastPush = payload; + } + } catch (Exception e) { + Log.d(TAG, "\tERROR sendPushToView. SAVED NOTIFICATION: " + e.getMessage()); + lastPush = payload; + } + } + + public static void sendTokenRefresh(String token) { + Log.d(TAG, "==> FCMPlugin sendRefreshToken"); + try { + String callBack = "javascript:" + tokenRefreshCallBack + "('" + token + "')"; + gWebView.sendJavascript(callBack); + } catch (Exception e) { + Log.d(TAG, "\tERROR sendRefreshToken: " + e.getMessage()); + } + } + + @Override + public void onDestroy() { + gWebView = null; + notificationCallBackReady = false; + } +} diff --git a/plugins/cordova-plugin-fcm/src/android/FCMPluginActivity.java b/plugins/cordova-plugin-fcm/src/android/FCMPluginActivity.java new file mode 100644 index 0000000..60c0a6b --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/android/FCMPluginActivity.java @@ -0,0 +1,75 @@ +package com.gae.scaffolder.plugin; + +import android.app.Activity; +import android.app.NotificationManager; +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.content.pm.PackageManager; +import android.os.Bundle; +import android.preference.PreferenceManager; +import android.support.v4.content.LocalBroadcastManager; +import android.util.Log; + +import java.util.Map; +import java.util.HashMap; + +public class FCMPluginActivity extends Activity { + private static String TAG = "FCMPlugin"; + + /* + * this activity will be started if the user touches a notification that we own. + * We send it's data off to the push plugin for processing. + * If needed, we boot up the main activity to kickstart the application. + * @see android.app.Activity#onCreate(android.os.Bundle) + */ + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + Log.d(TAG, "==> FCMPluginActivity onCreate"); + + Map data = new HashMap(); + if (getIntent().getExtras() != null) { + Log.d(TAG, "==> USER TAPPED NOTFICATION"); + data.put("wasTapped", true); + for (String key : getIntent().getExtras().keySet()) { + String value = getIntent().getExtras().getString(key); + Log.d(TAG, "\tKey: " + key + " Value: " + value); + data.put(key, value); + } + } + + FCMPlugin.sendPushPayload(data); + + finish(); + + forceMainActivityReload(); + } + + private void forceMainActivityReload() { + PackageManager pm = getPackageManager(); + Intent launchIntent = pm.getLaunchIntentForPackage(getApplicationContext().getPackageName()); + startActivity(launchIntent); + } + + @Override + protected void onResume() { + super.onResume(); + Log.d(TAG, "==> FCMPluginActivity onResume"); + final NotificationManager notificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE); + notificationManager.cancelAll(); + } + + @Override + public void onStart() { + super.onStart(); + Log.d(TAG, "==> FCMPluginActivity onStart"); + } + + @Override + public void onStop() { + super.onStop(); + Log.d(TAG, "==> FCMPluginActivity onStop"); + } + +} \ No newline at end of file diff --git a/plugins/cordova-plugin-fcm/src/android/MyFirebaseInstanceIDService.java b/plugins/cordova-plugin-fcm/src/android/MyFirebaseInstanceIDService.java new file mode 100644 index 0000000..80dcfe7 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/android/MyFirebaseInstanceIDService.java @@ -0,0 +1,25 @@ +package com.gae.scaffolder.plugin; + +import android.util.Log; + +import com.google.firebase.iid.FirebaseInstanceId; +import com.google.firebase.iid.FirebaseInstanceIdService; + +/** + * Created by Felipe Echanique on 08/06/2016. + */ +public class MyFirebaseInstanceIDService extends FirebaseInstanceIdService { + + private static final String TAG = "FCMPlugin"; + + @Override + public void onTokenRefresh(){ + // Get updated InstanceID token. + String refreshedToken = FirebaseInstanceId.getInstance().getToken(); + Log.d(TAG, "Refreshed token: " + refreshedToken); + FCMPlugin.sendTokenRefresh( refreshedToken ); + + // TODO: Implement this method to send any registration to your app's servers. + //sendRegistrationToServer(refreshedToken); + } +} diff --git a/plugins/cordova-plugin-fcm/src/android/MyFirebaseMessagingService.java b/plugins/cordova-plugin-fcm/src/android/MyFirebaseMessagingService.java new file mode 100644 index 0000000..918d45e --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/android/MyFirebaseMessagingService.java @@ -0,0 +1,85 @@ +package com.gae.scaffolder.plugin; + +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.content.Context; +import android.content.Intent; +import android.media.RingtoneManager; +import android.net.Uri; +import android.support.v4.app.NotificationCompat; +import android.util.Log; +import java.util.Map; +import java.util.HashMap; + +import com.google.firebase.messaging.FirebaseMessagingService; +import com.google.firebase.messaging.RemoteMessage; + +/** + * Created by Felipe Echanique on 08/06/2016. + */ +public class MyFirebaseMessagingService extends FirebaseMessagingService { + + private static final String TAG = "FCMPlugin"; + + /** + * Called when message is received. + * + * @param remoteMessage Object representing the message received from Firebase Cloud Messaging. + */ + // [START receive_message] + @Override + public void onMessageReceived(RemoteMessage remoteMessage) { + // TODO(developer): Handle FCM messages here. + // If the application is in the foreground handle both data and notification messages here. + // Also if you intend on generating your own notifications as a result of a received FCM + // message, here is where that should be initiated. See sendNotification method below. + Log.d(TAG, "==> MyFirebaseMessagingService onMessageReceived"); + + if( remoteMessage.getNotification() != null){ + Log.d(TAG, "\tNotification Title: " + remoteMessage.getNotification().getTitle()); + Log.d(TAG, "\tNotification Message: " + remoteMessage.getNotification().getBody()); + } + + Map data = new HashMap(); + data.put("wasTapped", false); + for (String key : remoteMessage.getData().keySet()) { + Object value = remoteMessage.getData().get(key); + Log.d(TAG, "\tKey: " + key + " Value: " + value); + data.put(key, value); + } + + Log.d(TAG, "\tNotification Data: " + data.toString()); + FCMPlugin.sendPushPayload( data ); + //sendNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody(), remoteMessage.getData()); + } + // [END receive_message] + + /** + * Create and show a simple notification containing the received FCM message. + * + * @param messageBody FCM message body received. + */ + private void sendNotification(String title, String messageBody, Map data) { + Intent intent = new Intent(this, FCMPluginActivity.class); + intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + for (String key : data.keySet()) { + intent.putExtra(key, data.get(key).toString()); + } + PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent, + PendingIntent.FLAG_ONE_SHOT); + + Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); + NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) + .setSmallIcon(getApplicationInfo().icon) + .setContentTitle(title) + .setContentText(messageBody) + .setAutoCancel(true) + .setSound(defaultSoundUri) + .setContentIntent(pendingIntent); + + NotificationManager notificationManager = + (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + + notificationManager.notify(0 /* ID of notification */, notificationBuilder.build()); + } +} diff --git a/plugins/cordova-plugin-fcm/src/ios/AppDelegate+FCMPlugin.h b/plugins/cordova-plugin-fcm/src/ios/AppDelegate+FCMPlugin.h new file mode 100644 index 0000000..c0ddd42 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/AppDelegate+FCMPlugin.h @@ -0,0 +1,17 @@ +// +// AppDelegate+FCMPlugin.h +// TestApp +// +// Created by felipe on 12/06/16. +// +// + +#import "AppDelegate.h" +#import +#import + +@interface AppDelegate (FCMPlugin) + ++ (NSData*)getLastPush; + +@end diff --git a/plugins/cordova-plugin-fcm/src/ios/AppDelegate+FCMPlugin.m b/plugins/cordova-plugin-fcm/src/ios/AppDelegate+FCMPlugin.m new file mode 100644 index 0000000..d3da8fc --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/AppDelegate+FCMPlugin.m @@ -0,0 +1,309 @@ +// +// AppDelegate+FCMPlugin.m +// TestApp +// +// Created by felipe on 12/06/16. +// +// +#import "AppDelegate+FCMPlugin.h" +#import "FCMPlugin.h" +#import +#import + +#import "Firebase.h" + +#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 +@import UserNotifications; +#endif + +@import FirebaseInstanceID; +@import FirebaseMessaging; + +// Implement UNUserNotificationCenterDelegate to receive display notification via APNS for devices +// running iOS 10 and above. Implement FIRMessagingDelegate to receive data message via FCM for +// devices running iOS 10 and above. +#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 +@interface AppDelegate () +@end +#endif + +// Copied from Apple's header in case it is missing in some cases (e.g. pre-Xcode 8 builds). +#ifndef NSFoundationVersionNumber_iOS_9_x_Max +#define NSFoundationVersionNumber_iOS_9_x_Max 1299 +#endif + +@implementation AppDelegate (MCPlugin) + +static NSData *lastPush; +NSString *const kGCMMessageIDKey = @"gcm.message_id"; + +//Method swizzling ++ (void)load +{ + Method original = class_getInstanceMethod(self, @selector(application:didFinishLaunchingWithOptions:)); + Method custom = class_getInstanceMethod(self, @selector(application:customDidFinishLaunchingWithOptions:)); + method_exchangeImplementations(original, custom); +} + +- (BOOL)application:(UIApplication *)application customDidFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + + [self application:application customDidFinishLaunchingWithOptions:launchOptions]; + + NSLog(@"DidFinishLaunchingWithOptions"); + + + // Register for remote notifications. This shows a permission dialog on first run, to + // show the dialog at a more appropriate time move this registration accordingly. + if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1) { + // iOS 7.1 or earlier. Disable the deprecation warnings. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + UIRemoteNotificationType allNotificationTypes = + (UIRemoteNotificationTypeSound | + UIRemoteNotificationTypeAlert | + UIRemoteNotificationTypeBadge); + [application registerForRemoteNotificationTypes:allNotificationTypes]; +#pragma clang diagnostic pop + } else { + // iOS 8 or later + // [START register_for_notifications] + if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_9_x_Max) { + UIUserNotificationType allNotificationTypes = + (UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge); + UIUserNotificationSettings *settings = + [UIUserNotificationSettings settingsForTypes:allNotificationTypes categories:nil]; + [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; + } else { + // iOS 10 or later +#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + UNAuthorizationOptions authOptions = + UNAuthorizationOptionAlert + | UNAuthorizationOptionSound + | UNAuthorizationOptionBadge; + [[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions:authOptions completionHandler:^(BOOL granted, NSError * _Nullable error) { + }]; + + // For iOS 10 display notification (sent via APNS) + [UNUserNotificationCenter currentNotificationCenter].delegate = self; + // For iOS 10 data message (sent via FCM) + [FIRMessaging messaging].remoteMessageDelegate = self; +#endif + } + + [[UIApplication sharedApplication] registerForRemoteNotifications]; + // [END register_for_notifications] + } + + // [START configure_firebase] + [FIRApp configure]; + // [END configure_firebase] + // Add observer for InstanceID token refresh callback. + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tokenRefreshNotification:) + name:kFIRInstanceIDTokenRefreshNotification object:nil]; + return YES; +} + +// [START message_handling] +// Receive displayed notifications for iOS 10 devices. + +// Note on the pragma: When compiling with iOS 10 SDK, include methods that +// handle notifications using notification center. +#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +// Handle incoming notification messages while app is in the foreground. +- (void)userNotificationCenter:(UNUserNotificationCenter *)center + willPresentNotification:(UNNotification *)notification + withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler { + // Print message ID. + NSDictionary *userInfo = notification.request.content.userInfo; + if (userInfo[kGCMMessageIDKey]) { + NSLog(@"Message ID 1: %@", userInfo[kGCMMessageIDKey]); + } + + // Print full message. + NSLog(@"%@", userInfo); + + NSError *error; + NSDictionary *userInfoMutable = [userInfo mutableCopy]; + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfoMutable + options:0 + error:&error]; + [FCMPlugin.fcmPlugin notifyOfMessage:jsonData]; + + // Change this to your preferred presentation option + completionHandler(UNNotificationPresentationOptionNone); +} + +// Handle notification messages after display notification is tapped by the user. +- (void)userNotificationCenter:(UNUserNotificationCenter *)center +didReceiveNotificationResponse:(UNNotificationResponse *)response + withCompletionHandler:(void (^)())completionHandler { + NSDictionary *userInfo = response.notification.request.content.userInfo; + if (userInfo[kGCMMessageIDKey]) { + NSLog(@"Message ID 2: %@", userInfo[kGCMMessageIDKey]); + } + + // Print full message. + NSLog(@"aaa%@", userInfo); + + NSError *error; + NSDictionary *userInfoMutable = [userInfo mutableCopy]; + + + NSLog(@"New method with push callback: %@", userInfo); + + [userInfoMutable setValue:@(YES) forKey:@"wasTapped"]; + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfoMutable + options:0 + error:&error]; + NSLog(@"APP WAS CLOSED DURING PUSH RECEPTION Saved data: %@", jsonData); + lastPush = jsonData; + + + completionHandler(); +} +#endif + +// [START receive_message in background iOS < 10] + +// Include the iOS < 10 methods for handling notifications for when running on iOS < 10. +// As in, even if you compile with iOS 10 SDK, when running on iOS 9 the only way to get +// notifications is the didReceiveRemoteNotification. + +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo +{ + // Short-circuit when actually running iOS 10+, let notification centre methods handle the notification. + if (NSFoundationVersionNumber >= NSFoundationVersionNumber_iOS_9_x_Max) { + return; + } + + NSLog(@"Message ID: %@", userInfo[@"gcm.message_id"]); + + NSError *error; + NSDictionary *userInfoMutable = [userInfo mutableCopy]; + + if (application.applicationState != UIApplicationStateActive) { + NSLog(@"New method with push callback: %@", userInfo); + + [userInfoMutable setValue:@(YES) forKey:@"wasTapped"]; + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfoMutable + options:0 + error:&error]; + NSLog(@"APP WAS CLOSED DURING PUSH RECEPTION Saved data: %@", jsonData); + lastPush = jsonData; + } +} +// [END receive_message in background] iOS < 10] + +// [START receive_message iOS < 10] +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo +fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler +{ + // Short-circuit when actually running iOS 10+, let notification centre methods handle the notification. + if (NSFoundationVersionNumber >= NSFoundationVersionNumber_iOS_9_x_Max) { + return; + } + + // If you are receiving a notification message while your app is in the background, + // this callback will not be fired till the user taps on the notification launching the application. + // TODO: Handle data of notification + + // Print message ID. + NSLog(@"Message ID: %@", userInfo[@"gcm.message_id"]); + + // Pring full message. + NSLog(@"%@", userInfo); + NSError *error; + + NSDictionary *userInfoMutable = [userInfo mutableCopy]; + + // Has user tapped the notificaiton? + // UIApplicationStateActive - app is currently active + // UIApplicationStateInactive - app is transitioning from background to + // foreground (user taps notification) + + UIApplicationState state = application.applicationState; + if (application.applicationState == UIApplicationStateActive + || application.applicationState == UIApplicationStateInactive) { + [userInfoMutable setValue:@(NO) forKey:@"wasTapped"]; + NSLog(@"app active"); + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfoMutable + options:0 + error:&error]; + [FCMPlugin.fcmPlugin notifyOfMessage:jsonData]; + + // app is in background + } + + completionHandler(UIBackgroundFetchResultNoData); +} +// [END receive_message iOS < 10] +// [END message_handling] + + +// [START refresh_token] +- (void)tokenRefreshNotification:(NSNotification *)notification +{ + // Note that this callback will be fired everytime a new token is generated, including the first + // time. So if you need to retrieve the token as soon as it is available this is where that + // should be done. + NSString *refreshedToken = [[FIRInstanceID instanceID] token]; + NSLog(@"InstanceID token: %@", refreshedToken); + [FCMPlugin.fcmPlugin notifyOfTokenRefresh:refreshedToken]; + // Connect to FCM since connection may have failed when attempted before having a token. + [self connectToFcm]; + + // TODO: If necessary send token to appliation server. +} +// [END refresh_token] + +// [START connect_to_fcm] +- (void)connectToFcm +{ + + // Won't connect since there is no token + if (![[FIRInstanceID instanceID] token]) { + return; + } + + // Disconnect previous FCM connection if it exists. + [[FIRMessaging messaging] disconnect]; + + [[FIRMessaging messaging] connectWithCompletion:^(NSError * _Nullable error) { + if (error != nil) { + NSLog(@"Unable to connect to FCM. %@", error); + } else { + NSLog(@"Connected to FCM."); + [[FIRMessaging messaging] subscribeToTopic:@"/topics/ios"]; + [[FIRMessaging messaging] subscribeToTopic:@"/topics/all"]; + } + }]; +} +// [END connect_to_fcm] + +- (void)applicationDidBecomeActive:(UIApplication *)application +{ + NSLog(@"app become active"); + [FCMPlugin.fcmPlugin appEnterForeground]; + [self connectToFcm]; +} + +// [START disconnect_from_fcm] +- (void)applicationDidEnterBackground:(UIApplication *)application +{ + NSLog(@"app entered background"); + [[FIRMessaging messaging] disconnect]; + [FCMPlugin.fcmPlugin appEnterBackground]; + NSLog(@"Disconnected from FCM"); +} +// [END disconnect_from_fcm] + ++(NSData*)getLastPush +{ + NSData* returnValue = lastPush; + lastPush = nil; + return returnValue; +} + + +@end diff --git a/plugins/cordova-plugin-fcm/src/ios/FCMPlugin.h b/plugins/cordova-plugin-fcm/src/ios/FCMPlugin.h new file mode 100644 index 0000000..f658469 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/FCMPlugin.h @@ -0,0 +1,20 @@ +#import +#import + +@interface FCMPlugin : CDVPlugin +{ + //NSString *notificationCallBack; +} + ++ (FCMPlugin *) fcmPlugin; +- (void)ready:(CDVInvokedUrlCommand*)command; +- (void)getToken:(CDVInvokedUrlCommand*)command; +- (void)subscribeToTopic:(CDVInvokedUrlCommand*)command; +- (void)unsubscribeFromTopic:(CDVInvokedUrlCommand*)command; +- (void)registerNotification:(CDVInvokedUrlCommand*)command; +- (void)notifyOfMessage:(NSData*) payload; +- (void)notifyOfTokenRefresh:(NSString*) token; +- (void)appEnterBackground; +- (void)appEnterForeground; + +@end diff --git a/plugins/cordova-plugin-fcm/src/ios/FCMPlugin.m b/plugins/cordova-plugin-fcm/src/ios/FCMPlugin.m new file mode 100644 index 0000000..d1f1061 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/FCMPlugin.m @@ -0,0 +1,133 @@ +#include +#include + +#import "AppDelegate+FCMPlugin.h" + +#import +#import "FCMPlugin.h" +#import "Firebase.h" + +@interface FCMPlugin () {} +@end + +@implementation FCMPlugin + +static BOOL notificatorReceptorReady = NO; +static BOOL appInForeground = YES; + +static NSString *notificationCallback = @"FCMPlugin.onNotificationReceived"; +static NSString *tokenRefreshCallback = @"FCMPlugin.onTokenRefreshReceived"; +static FCMPlugin *fcmPluginInstance; + ++ (FCMPlugin *) fcmPlugin { + + return fcmPluginInstance; +} + +- (void) ready:(CDVInvokedUrlCommand *)command +{ + NSLog(@"Cordova view ready"); + fcmPluginInstance = self; + [self.commandDelegate runInBackground:^{ + + CDVPluginResult* pluginResult = nil; + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + }]; + +} + +// GET TOKEN // +- (void) getToken:(CDVInvokedUrlCommand *)command +{ + NSLog(@"get Token"); + [self.commandDelegate runInBackground:^{ + NSString* token = [[FIRInstanceID instanceID] token]; + CDVPluginResult* pluginResult = nil; + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:token]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + }]; +} + +// UN/SUBSCRIBE TOPIC // +- (void) subscribeToTopic:(CDVInvokedUrlCommand *)command +{ + NSString* topic = [command.arguments objectAtIndex:0]; + NSLog(@"subscribe To Topic %@", topic); + [self.commandDelegate runInBackground:^{ + if(topic != nil)[[FIRMessaging messaging] subscribeToTopic:[NSString stringWithFormat:@"/topics/%@", topic]]; + CDVPluginResult* pluginResult = nil; + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:topic]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + }]; +} + +- (void) unsubscribeFromTopic:(CDVInvokedUrlCommand *)command +{ + NSString* topic = [command.arguments objectAtIndex:0]; + NSLog(@"unsubscribe From Topic %@", topic); + [self.commandDelegate runInBackground:^{ + if(topic != nil)[[FIRMessaging messaging] unsubscribeFromTopic:[NSString stringWithFormat:@"/topics/%@", topic]]; + CDVPluginResult* pluginResult = nil; + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:topic]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + }]; +} + +- (void) registerNotification:(CDVInvokedUrlCommand *)command +{ + NSLog(@"view registered for notifications"); + + notificatorReceptorReady = YES; + NSData* lastPush = [AppDelegate getLastPush]; + if (lastPush != nil) { + [FCMPlugin.fcmPlugin notifyOfMessage:lastPush]; + } + + CDVPluginResult* pluginResult = nil; + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; +} + +-(void) notifyOfMessage:(NSData *)payload +{ + NSString *JSONString = [[NSString alloc] initWithBytes:[payload bytes] length:[payload length] encoding:NSUTF8StringEncoding]; + NSString * notifyJS = [NSString stringWithFormat:@"%@(%@);", notificationCallback, JSONString]; + NSLog(@"stringByEvaluatingJavaScriptFromString %@", notifyJS); + + if ([self.webView respondsToSelector:@selector(stringByEvaluatingJavaScriptFromString:)]) { + [(UIWebView *)self.webView stringByEvaluatingJavaScriptFromString:notifyJS]; + } else { + [self.webViewEngine evaluateJavaScript:notifyJS completionHandler:nil]; + } +} + +-(void) notifyOfTokenRefresh:(NSString *)token +{ + NSString * notifyJS = [NSString stringWithFormat:@"%@('%@');", tokenRefreshCallback, token]; + NSLog(@"stringByEvaluatingJavaScriptFromString %@", notifyJS); + + if ([self.webView respondsToSelector:@selector(stringByEvaluatingJavaScriptFromString:)]) { + [(UIWebView *)self.webView stringByEvaluatingJavaScriptFromString:notifyJS]; + } else { + [self.webViewEngine evaluateJavaScript:notifyJS completionHandler:nil]; + } +} + +-(void) appEnterBackground +{ + NSLog(@"Set state background"); + appInForeground = NO; +} + +-(void) appEnterForeground +{ + NSLog(@"Set state foreground"); + NSData* lastPush = [AppDelegate getLastPush]; + if (lastPush != nil) { + [FCMPlugin.fcmPlugin notifyOfMessage:lastPush]; + } + appInForeground = YES; +} + +@end diff --git a/plugins/cordova-plugin-fcm/src/ios/GoogleService-Info.plist b/plugins/cordova-plugin-fcm/src/ios/GoogleService-Info.plist new file mode 100644 index 0000000..c4a6ec0 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/GoogleService-Info.plist @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/Firebase.h b/plugins/cordova-plugin-fcm/src/ios/firebase/Firebase.h new file mode 100644 index 0000000..7e4ba83 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/Firebase.h @@ -0,0 +1,52 @@ +#import +#import + +#if !defined(__has_include) + #error "Firebase.h won't import anything if your compiler doesn't support __has_include. Please \ + import the headers individually." +#else + #if __has_include() + #import + #endif + + #if __has_include() + #import + #endif + + #if __has_include() + #import + #endif + + #if __has_include() + #import + #endif + + #if __has_include() + #import + #endif + + #if __has_include() + #import + #endif + + #if __has_include() + #import + #endif + + #if __has_include() + #import + #endif + + #if __has_include() + #import + #endif + + #if __has_include() + #import + #endif + + #if __has_include() + #import + #endif + +#endif // defined(__has_include) diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/FirebaseAnalytics b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/FirebaseAnalytics new file mode 100644 index 0000000..86b3a4c Binary files /dev/null and b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/FirebaseAnalytics differ diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h new file mode 100644 index 0000000..4008a01 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h @@ -0,0 +1,57 @@ +#import + +#import "FIRAnalytics.h" + +/** + * Provides App Delegate handlers to be used in your App Delegate. + * + * To save time integrating Firebase Analytics in an application, Firebase Analytics does not + * require delegation implementation from the AppDelegate. Instead this is automatically done by + * Firebase Analytics. Should you choose instead to delegate manually, you can turn off the App + * Delegate Proxy by adding FirebaseAppDelegateProxyEnabled into your app's Info.plist and setting + * it to NO, and adding the methods in this category to corresponding delegation handlers. + * + * To handle Universal Links, you must return YES in + * [UIApplicationDelegate application:didFinishLaunchingWithOptions:]. + */ +@interface FIRAnalytics (AppDelegate) + +/** + * Handles events related to a URL session that are waiting to be processed. + * + * For optimal use of Firebase Analytics, call this method from the + * [UIApplicationDelegate application:handleEventsForBackgroundURLSession:completionHandler] + * method of the app delegate in your app. + * + * @param identifier The identifier of the URL session requiring attention. + * @param completionHandler The completion handler to call when you finish processing the events. + * Calling this completion handler lets the system know that your app's user interface is + * updated and a new snapshot can be taken. + */ ++ (void)handleEventsForBackgroundURLSession:(NSString *)identifier + completionHandler:(void (^)(void))completionHandler; + +/** + * Handles the event when the app is launched by a URL. + * + * Call this method from [UIApplicationDelegate application:openURL:options:] (on iOS 9.0 and + * above), or [UIApplicationDelegate application:openURL:sourceApplication:annotation:] (on iOS 8.x + * and below) in your app. + * + * @param url The URL resource to open. This resource can be a network resource or a file. + */ ++ (void)handleOpenURL:(NSURL *)url; + +/** + * Handles the event when the app receives data associated with user activity that includes a + * Universal Link (on iOS 9.0 and above). + * + * Call this method from [UIApplication continueUserActivity:restorationHandler:] in your app + * delegate (on iOS 9.0 and above). + * + * @param userActivity The activity object containing the data associated with the task the user + * was performing. + */ ++ (void)handleUserActivity:(id)userActivity; + +@end diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRAnalytics.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRAnalytics.h new file mode 100644 index 0000000..fc67728 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRAnalytics.h @@ -0,0 +1,71 @@ +#import + +#import "FIREventNames.h" +#import "FIRParameterNames.h" +#import "FIRUserPropertyNames.h" + +/// The top level Firebase Analytics singleton that provides methods for logging events and setting +/// user properties. See the developer guides for general +/// information on using Firebase Analytics in your apps. +@interface FIRAnalytics : NSObject + +/// Logs an app event. The event can have up to 25 parameters. Events with the same name must have +/// the same parameters. Up to 500 event names are supported. Using predefined events and/or +/// parameters is recommended for optimal reporting. +/// +/// The following event names are reserved and cannot be used: +///
    +///
  • app_clear_data
  • +///
  • app_remove
  • +///
  • app_update
  • +///
  • error
  • +///
  • first_open
  • +///
  • in_app_purchase
  • +///
  • notification_dismiss
  • +///
  • notification_foreground
  • +///
  • notification_open
  • +///
  • notification_receive
  • +///
  • os_update
  • +///
  • session_start
  • +///
  • user_engagement
  • +///
+/// +/// @param name The name of the event. Should contain 1 to 32 alphanumeric characters or +/// underscores. The name must start with an alphabetic character. Some event names are +/// reserved. See FIREventNames.h for the list of reserved event names. The "firebase_" prefix +/// is reserved and should not be used. Note that event names are case-sensitive and that +/// logging two events whose names differ only in case will result in two distinct events. +/// @param parameters The dictionary of event parameters. Passing nil indicates that the event has +/// no parameters. Parameter names can be up to 24 characters long and must start with an +/// alphabetic character and contain only alphanumeric characters and underscores. Only NSString +/// and NSNumber (signed 64-bit integer and 64-bit floating-point number) parameter types are +/// supported. NSString parameter values can be up to 36 characters long. The "firebase_" prefix +/// is reserved and should not be used for parameter names. ++ (void)logEventWithName:(nonnull NSString *)name + parameters:(nullable NSDictionary *)parameters; + +/// Sets a user property to a given value. Up to 25 user property names are supported. Once set, +/// user property values persist throughout the app lifecycle and across sessions. +/// +/// The following user property names are reserved and cannot be used: +///
    +///
  • first_open_time
  • +///
  • last_deep_link_referrer
  • +///
  • user_id
  • +///
+/// +/// @param value The value of the user property. Values can be up to 36 characters long. Setting the +/// value to nil removes the user property. +/// @param name The name of the user property to set. Should contain 1 to 24 alphanumeric characters +/// or underscores and must start with an alphabetic character. The "firebase_" prefix is +/// reserved and should not be used for user property names. ++ (void)setUserPropertyString:(nullable NSString *)value forName:(nonnull NSString *)name; + +/// Sets the user ID property. This feature must be used in accordance with +/// Google's Privacy Policy +/// +/// @param userID The user ID to ascribe to the user of this app on this device, which must be +/// non-empty and no more than 36 characters long. Setting userID to nil removes the user ID. ++ (void)setUserID:(nullable NSString *)userID; + +@end diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h new file mode 100644 index 0000000..9ad3432 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h @@ -0,0 +1 @@ +#import diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRApp.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRApp.h new file mode 100644 index 0000000..0cac503 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRApp.h @@ -0,0 +1 @@ +#import diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRConfiguration.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRConfiguration.h new file mode 100644 index 0000000..b5ae062 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRConfiguration.h @@ -0,0 +1 @@ +#import diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIREventNames.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIREventNames.h new file mode 100644 index 0000000..810dd01 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIREventNames.h @@ -0,0 +1,321 @@ +/// @file FIREventNames.h +/// +/// Predefined event names. +/// +/// An Event is an important occurrence in your app that you want to measure. You can report up to +/// 500 different types of Events per app and you can associate up to 25 unique parameters with each +/// Event type. Some common events are suggested below, but you may also choose to specify custom +/// Event types that are associated with your specific app. Each event type is identified by a +/// unique name. Event names can be up to 32 characters long, may only contain alphanumeric +/// characters and underscores ("_"), and must start with an alphabetic character. The "firebase_" +/// prefix is reserved and should not be used. + +/// Add Payment Info event. This event signifies that a user has submitted their payment information +/// to your app. +static NSString *const kFIREventAddPaymentInfo = @"add_payment_info"; + +/// E-Commerce Add To Cart event. This event signifies that an item was added to a cart for +/// purchase. Add this event to a funnel with kFIREventEcommercePurchase to gauge the effectiveness +/// of your checkout process. Note: If you supply the {@link kFIRParameterValue} parameter, you must +/// also supply the {@link kFIRParameterCurrency} parameter so that revenue metrics can be computed +/// accurately. Params: +/// +///
    +///
  • {@link kFIRParameterQuantity} (signed 64-bit integer as NSNumber)
  • +///
  • {@link kFIRParameterItemID} (NSString)
  • +///
  • {@link kFIRParameterItemName} (NSString)
  • +///
  • {@link kFIRParameterItemCategory} (NSString)
  • +///
  • {@link kFIRParameterItemLocationID} (NSString) (optional)
  • +///
  • {@link kFIRParameterPrice} (double as NSNumber) (optional)
  • +///
  • {@link kFIRParameterCurrency} (NSString) (optional)
  • +///
  • {@link kFIRParameterValue} (double as NSNumber) (optional)
  • +///
  • {@link kFIRParameterOrigin} (NSString) (optional)
  • +///
  • {@link kFIRParameterDestination} (NSString) (optional)
  • +///
  • {@link kFIRParameterStartDate} (NSString) (optional)
  • +///
  • {@link kFIRParameterEndDate} (NSString) (optional)
  • +///
+static NSString *const kFIREventAddToCart = @"add_to_cart"; + +/// E-Commerce Add To Wishlist event. This event signifies that an item was added to a wishlist. +/// Use this event to identify popular gift items in your app. Note: If you supply the +/// {@link kFIRParameterValue} parameter, you must also supply the {@link kFIRParameterCurrency} +/// parameter so that revenue metrics can be computed accurately. Params: +/// +///
    +///
  • {@link kFIRParameterQuantity} (signed 64-bit integer as NSNumber)
  • +///
  • {@link kFIRParameterItemID} (NSString)
  • +///
  • {@link kFIRParameterItemName} (NSString)
  • +///
  • {@link kFIRParameterItemCategory} (NSString)
  • +///
  • {@link kFIRParameterItemLocationID} (NSString) (optional)
  • +///
  • {@link kFIRParameterPrice} (double as NSNumber) (optional)
  • +///
  • {@link kFIRParameterCurrency} (NSString) (optional)
  • +///
  • {@link kFIRParameterValue} (double as NSNumber) (optional)
  • +///
+static NSString *const kFIREventAddToWishlist = @"add_to_wishlist"; + +/// App Open event. By logging this event when an App is moved to the foreground, developers can +/// understand how often users leave and return during the course of a Session. Although Sessions +/// are automatically reported, this event can provide further clarification around the continuous +/// engagement of app-users. +static NSString *const kFIREventAppOpen = @"app_open"; + +/// E-Commerce Begin Checkout event. This event signifies that a user has begun the process of +/// checking out. Add this event to a funnel with your kFIREventEcommercePurchase event to gauge the +/// effectiveness of your checkout process. Note: If you supply the {@link kFIRParameterValue} +/// parameter, you must also supply the {@link kFIRParameterCurrency} parameter so that revenue +/// metrics can be computed accurately. Params: +/// +///
    +///
  • {@link kFIRParameterValue} (double as NSNumber) (optional)
  • +///
  • {@link kFIRParameterCurrency} (NSString) (optional)
  • +///
  • {@link kFIRParameterTransactionID} (NSString) (optional)
  • +///
  • {@link kFIRParameterStartDate} (NSString) (optional)
  • +///
  • {@link kFIRParameterEndDate} (NSString) (optional)
  • +///
  • {@link kFIRParameterNumberOfNights} (signed 64-bit integer as NSNumber) (optional) for +/// hotel bookings
  • +///
  • {@link kFIRParameterNumberOfRooms} (signed 64-bit integer as NSNumber) (optional) for +/// hotel bookings
  • +///
  • {@link kFIRParameterNumberOfPassengers} (signed 64-bit integer as NSNumber) (optional) +/// for travel bookings
  • +///
  • {@link kFIRParameterOrigin} (NSString) (optional)
  • +///
  • {@link kFIRParameterDestination} (NSString) (optional)
  • +///
  • {@link kFIRParameterTravelClass} (NSString) (optional) for travel bookings
  • +///
+static NSString *const kFIREventBeginCheckout = @"begin_checkout"; + +/// Earn Virtual Currency event. This event tracks the awarding of virtual currency in your app. Log +/// this along with {@link kFIREventSpendVirtualCurrency} to better understand your virtual economy. +/// Params: +/// +///
    +///
  • {@link kFIRParameterVirtualCurrencyName} (NSString)
  • +///
  • {@link kFIRParameterValue} (signed 64-bit integer or double as NSNumber)
  • +///
+static NSString *const kFIREventEarnVirtualCurrency = @"earn_virtual_currency"; + +/// E-Commerce Purchase event. This event signifies that an item was purchased by a user. Note: +/// This is different from the in-app purchase event, which is reported automatically for App +/// Store-based apps. Note: If you supply the {@link kFIRParameterValue} parameter, you must also +/// supply the {@link kFIRParameterCurrency} parameter so that revenue metrics can be computed +/// accurately. Params: +/// +///
    +///
  • {@link kFIRParameterCurrency} (NSString) (optional)
  • +///
  • {@link kFIRParameterValue} (double as NSNumber) (optional)
  • +///
  • {@link kFIRParameterTransactionID} (NSString) (optional)
  • +///
  • {@link kFIRParameterTax} (double as NSNumber) (optional)
  • +///
  • {@link kFIRParameterShipping} (double as NSNumber) (optional)
  • +///
  • {@link kFIRParameterCoupon} (NSString) (optional)
  • +///
  • {@link kFIRParameterLocation} (NSString) (optional)
  • +///
  • {@link kFIRParameterStartDate} (NSString) (optional)
  • +///
  • {@link kFIRParameterEndDate} (NSString) (optional)
  • +///
  • {@link kFIRParameterNumberOfNights} (signed 64-bit integer as NSNumber) (optional) for +/// hotel bookings
  • +///
  • {@link kFIRParameterNumberOfRooms} (signed 64-bit integer as NSNumber) (optional) for +/// hotel bookings
  • +///
  • {@link kFIRParameterNumberOfPassengers} (signed 64-bit integer as NSNumber) (optional) +/// for travel bookings
  • +///
  • {@link kFIRParameterOrigin} (NSString) (optional)
  • +///
  • {@link kFIRParameterDestination} (NSString) (optional)
  • +///
  • {@link kFIRParameterTravelClass} (NSString) (optional) for travel bookings
  • +///
+static NSString *const kFIREventEcommercePurchase = @"ecommerce_purchase"; + +/// Generate Lead event. Log this event when a lead has been generated in the app to understand the +/// efficacy of your install and re-engagement campaigns. Note: If you supply the +/// {@link kFIRParameterValue} parameter, you must also supply the {@link kFIRParameterCurrency} +/// parameter so that revenue metrics can be computed accurately. Params: +/// +///
    +///
  • {@link kFIRParameterCurrency} (NSString) (optional)
  • +///
  • {@link kFIRParameterValue} (double as NSNumber) (optional)
  • +///
+static NSString *const kFIREventGenerateLead = @"generate_lead"; + +/// Join Group event. Log this event when a user joins a group such as a guild, team or family. Use +/// this event to analyze how popular certain groups or social features are in your app. Params: +/// +///
    +///
  • {@link kFIRParameterGroupID} (NSString)
  • +///
+static NSString *const kFIREventJoinGroup = @"join_group"; + +/// Level Up event. This event signifies that a player has leveled up in your gaming app. It can +/// help you gauge the level distribution of your userbase and help you identify certain levels that +/// are difficult to pass. Params: +/// +///
    +///
  • {@link kFIRParameterLevel} (signed 64-bit integer as NSNumber)
  • +///
  • {@link kFIRParameterCharacter} (NSString) (optional)
  • +///
+static NSString *const kFIREventLevelUp = @"level_up"; + +/// Login event. Apps with a login feature can report this event to signify that a user has logged +/// in. +static NSString *const kFIREventLogin = @"login"; + +/// Post Score event. Log this event when the user posts a score in your gaming app. This event can +/// help you understand how users are actually performing in your game and it can help you correlate +/// high scores with certain audiences or behaviors. Params: +/// +///
    +///
  • {@link kFIRParameterScore} (signed 64-bit integer as NSNumber)
  • +///
  • {@link kFIRParameterLevel} (signed 64-bit integer as NSNumber) (optional)
  • +///
  • {@link kFIRParameterCharacter} (NSString) (optional)
  • +///
+static NSString *const kFIREventPostScore = @"post_score"; + +/// Present Offer event. This event signifies that the app has presented a purchase offer to a user. +/// Add this event to a funnel with the kFIREventAddToCart and kFIREventEcommercePurchase to gauge +/// your conversion process. Note: If you supply the {@link kFIRParameterValue} parameter, you must +/// also supply the {@link kFIRParameterCurrency} parameter so that revenue metrics can be computed +/// accurately. Params: +/// +///
    +///
  • {@link kFIRParameterQuantity} (signed 64-bit integer as NSNumber)
  • +///
  • {@link kFIRParameterItemID} (NSString)
  • +///
  • {@link kFIRParameterItemName} (NSString)
  • +///
  • {@link kFIRParameterItemCategory} (NSString)
  • +///
  • {@link kFIRParameterItemLocationID} (NSString) (optional)
  • +///
  • {@link kFIRParameterPrice} (double as NSNumber) (optional)
  • +///
  • {@link kFIRParameterCurrency} (NSString) (optional)
  • +///
  • {@link kFIRParameterValue} (double as NSNumber) (optional)
  • +///
+static NSString *const kFIREventPresentOffer = @"present_offer"; + +/// E-Commerce Purchase Refund event. This event signifies that an item purchase was refunded. +/// Note: If you supply the {@link kFIRParameterValue} parameter, you must also supply the +/// {@link kFIRParameterCurrency} parameter so that revenue metrics can be computed accurately. +/// Params: +/// +///
    +///
  • {@link kFIRParameterCurrency} (NSString) (optional)
  • +///
  • {@link kFIRParameterValue} (double as NSNumber) (optional)
  • +///
  • {@link kFIRParameterTransactionID} (NSString) (optional)
  • +///
+static NSString *const kFIREventPurchaseRefund = @"purchase_refund"; + +/// Search event. Apps that support search features can use this event to contextualize search +/// operations by supplying the appropriate, corresponding parameters. This event can help you +/// identify the most popular content in your app. Params: +/// +///
    +///
  • {@link kFIRParameterSearchTerm} (NSString)
  • +///
  • {@link kFIRParameterStartDate} (NSString) (optional)
  • +///
  • {@link kFIRParameterEndDate} (NSString) (optional)
  • +///
  • {@link kFIRParameterNumberOfNights} (signed 64-bit integer as NSNumber) (optional) for +/// hotel bookings
  • +///
  • {@link kFIRParameterNumberOfRooms} (signed 64-bit integer as NSNumber) (optional) for +/// hotel bookings
  • +///
  • {@link kFIRParameterNumberOfPassengers} (signed 64-bit integer as NSNumber) (optional) +/// for travel bookings
  • +///
  • {@link kFIRParameterOrigin} (NSString) (optional)
  • +///
  • {@link kFIRParameterDestination} (NSString) (optional)
  • +///
  • {@link kFIRParameterTravelClass} (NSString) (optional) for travel bookings
  • +///
+static NSString *const kFIREventSearch = @"search"; + +/// Select Content event. This general purpose event signifies that a user has selected some content +/// of a certain type in an app. The content can be any object in your app. This event can help you +/// identify popular content and categories of content in your app. Params: +/// +///
    +///
  • {@link kFIRParameterContentType} (NSString)
  • +///
  • {@link kFIRParameterItemID} (NSString)
  • +///
+static NSString *const kFIREventSelectContent = @"select_content"; + +/// Share event. Apps with social features can log the Share event to identify the most viral +/// content. Params: +/// +///
    +///
  • {@link kFIRParameterContentType} (NSString)
  • +///
  • {@link kFIRParameterItemID} (NSString)
  • +///
+static NSString *const kFIREventShare = @"share"; + +/// Sign Up event. This event indicates that a user has signed up for an account in your app. The +/// parameter signifies the method by which the user signed up. Use this event to understand the +/// different behaviors between logged in and logged out users. Params: +/// +///
    +///
  • {@link kFIRParameterSignUpMethod} (NSString)
  • +///
+static NSString *const kFIREventSignUp = @"sign_up"; + +/// Spend Virtual Currency event. This event tracks the sale of virtual goods in your app and can +/// help you identify which virtual goods are the most popular objects of purchase. Params: +/// +///
    +///
  • {@link kFIRParameterItemName} (NSString)
  • +///
  • {@link kFIRParameterVirtualCurrencyName} (NSString)
  • +///
  • {@link kFIRParameterValue} (signed 64-bit integer or double as NSNumber)
  • +///
+static NSString *const kFIREventSpendVirtualCurrency = @"spend_virtual_currency"; + +/// Tutorial Begin event. This event signifies the start of the on-boarding process in your app. Use +/// this in a funnel with kFIREventTutorialComplete to understand how many users complete this +/// process and move on to the full app experience. +static NSString *const kFIREventTutorialBegin = @"tutorial_begin"; + +/// Tutorial End event. Use this event to signify the user's completion of your app's on-boarding +/// process. Add this to a funnel with kFIREventTutorialBegin to gauge the completion rate of your +/// on-boarding process. +static NSString *const kFIREventTutorialComplete = @"tutorial_complete"; + +/// Unlock Achievement event. Log this event when the user has unlocked an achievement in your +/// game. Since achievements generally represent the breadth of a gaming experience, this event can +/// help you understand how many users are experiencing all that your game has to offer. Params: +/// +///
    +///
  • {@link kFIRParameterAchievementID} (NSString)
  • +///
+static NSString *const kFIREventUnlockAchievement = @"unlock_achievement"; + +/// View Item event. This event signifies that some content was shown to the user. This content may +/// be a product, a webpage or just a simple image or text. Use the appropriate parameters to +/// contextualize the event. Use this event to discover the most popular items viewed in your app. +/// Note: If you supply the {@link kFIRParameterValue} parameter, you must also supply the +/// {@link kFIRParameterCurrency} parameter so that revenue metrics can be computed accurately. +/// Params: +/// +///
    +///
  • {@link kFIRParameterItemID} (NSString)
  • +///
  • {@link kFIRParameterItemName} (NSString)
  • +///
  • {@link kFIRParameterItemCategory} (NSString)
  • +///
  • {@link kFIRParameterItemLocationID} (NSString) (optional)
  • +///
  • {@link kFIRParameterPrice} (double as NSNumber) (optional)
  • +///
  • {@link kFIRParameterQuantity} (signed 64-bit integer as NSNumber) (optional)
  • +///
  • {@link kFIRParameterCurrency} (NSString) (optional)
  • +///
  • {@link kFIRParameterValue} (double as NSNumber) (optional)
  • +///
  • {@link kFIRParameterStartDate} (NSString) (optional)
  • +///
  • {@link kFIRParameterEndDate} (NSString) (optional)
  • +///
  • {@link kFIRParameterFlightNumber} (NSString) (optional) for travel bookings
  • +///
  • {@link kFIRParameterNumberOfPassengers} (signed 64-bit integer as NSNumber) (optional) +/// for travel bookings
  • +///
  • {@link kFIRParameterNumberOfNights} (signed 64-bit integer as NSNumber) (optional) for +/// travel bookings
  • +///
  • {@link kFIRParameterNumberOfRooms} (signed 64-bit integer as NSNumber) (optional) for +/// travel bookings
  • +///
  • {@link kFIRParameterOrigin} (NSString) (optional)
  • +///
  • {@link kFIRParameterDestination} (NSString) (optional)
  • +///
  • {@link kFIRParameterSearchTerm} (NSString) (optional) for travel bookings
  • +///
  • {@link kFIRParameterTravelClass} (NSString) (optional) for travel bookings
  • +///
+static NSString *const kFIREventViewItem = @"view_item"; + +/// View Item List event. Log this event when the user has been presented with a list of items of a +/// certain category. Params: +/// +///
    +///
  • {@link kFIRParameterItemCategory} (NSString)
  • +///
+static NSString *const kFIREventViewItemList = @"view_item_list"; + +/// View Search Results event. Log this event when the user has been presented with the results of a +/// search. Params: +/// +///
    +///
  • {@link kFIRParameterSearchTerm} (NSString)
  • +///
+static NSString *const kFIREventViewSearchResults = @"view_search_results"; diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIROptions.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIROptions.h new file mode 100644 index 0000000..1ede0e8 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIROptions.h @@ -0,0 +1 @@ +#import diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRParameterNames.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRParameterNames.h new file mode 100644 index 0000000..756df7a --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRParameterNames.h @@ -0,0 +1,304 @@ +/// @file FIRParameterNames.h +/// +/// Predefined event parameter names. +/// +/// Params supply information that contextualize Events. You can associate up to 25 unique Params +/// with each Event type. Some Params are suggested below for certain common Events, but you are +/// not limited to these. You may supply extra Params for suggested Events or custom Params for +/// Custom events. Param names can be up to 24 characters long, may only contain alphanumeric +/// characters and underscores ("_"), and must start with an alphabetic character. Param values can +/// be up to 36 characters long. The "firebase_" prefix is reserved and should not be used. + +/// Game achievement ID (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterAchievementID : @"10_matches_won",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterAchievementID = @"achievement_id"; + +/// Character used in game (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterCharacter : @"beat_boss",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterCharacter = @"character"; + +/// Type of content selected (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterContentType : @"news article",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterContentType = @"content_type"; + +/// Coupon code for a purchasable item (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterCoupon : @"zz123",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterCoupon = @"coupon"; + +/// Purchase currency in 3-letter +/// ISO_4217 format (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterCurrency : @"USD",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterCurrency = @"currency"; + +/// Flight or Travel destination (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterDestination : @"Mountain View, CA",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterDestination = @"destination"; + +/// The arrival date, check-out date or rental end date for the item. This should be in +/// YYYY-MM-DD format (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterEndDate : @"2015-09-14",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterEndDate = @"end_date"; + +/// Flight number for travel events (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterFlightNumber : @"ZZ800",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterFlightNumber = @"flight_number"; + +/// Group/clan/guild ID (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterGroupID : @"g1",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterGroupID = @"group_id"; + +/// Item category (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterItemCategory : @"t-shirts",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterItemCategory = @"item_category"; + +/// Item ID (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterItemID : @"p7654",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterItemID = @"item_id"; + +/// The Google Place ID (NSString) that +/// corresponds to the associated item. Alternatively, you can supply your own custom Location ID. +///
+///     NSDictionary *params = @{
+///       kFIRParameterItemLocationID : @"ChIJiyj437sx3YAR9kUWC8QkLzQ",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterItemLocationID = @"item_location_id"; + +/// Item name (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterItemName : @"abc",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterItemName = @"item_name"; + +/// Level in game (signed 64-bit integer as NSNumber). +///
+///     NSDictionary *params = @{
+///       kFIRParameterLevel : @(42),
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterLevel = @"level"; + +/// Location (NSString). The Google Place ID +/// that corresponds to the associated event. Alternatively, you can supply your own custom +/// Location ID. +///
+///     NSDictionary *params = @{
+///       kFIRParameterLocation : @"ChIJiyj437sx3YAR9kUWC8QkLzQ",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterLocation = @"location"; + +/// Number of nights staying at hotel (signed 64-bit integer as NSNumber). +///
+///     NSDictionary *params = @{
+///       kFIRParameterNumberOfNights : @(3),
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterNumberOfNights = @"number_of_nights"; + +/// Number of passengers traveling (signed 64-bit integer as NSNumber). +///
+///     NSDictionary *params = @{
+///       kFIRParameterNumberOfPassengers : @(11),
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterNumberOfPassengers = @"number_of_passengers"; + +/// Number of rooms for travel events (signed 64-bit integer as NSNumber). +///
+///     NSDictionary *params = @{
+///       kFIRParameterNumberOfRooms : @(2),
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterNumberOfRooms = @"number_of_rooms"; + +/// Flight or Travel origin (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterOrigin : @"Mountain View, CA",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterOrigin = @"origin"; + +/// Purchase price (double as NSNumber). +///
+///     NSDictionary *params = @{
+///       kFIRParameterPrice : @(1.0),
+///       kFIRParameterCurrency : @"USD",  // e.g. $1.00 USD
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterPrice = @"price"; + +/// Purchase quantity (signed 64-bit integer as NSNumber). +///
+///     NSDictionary *params = @{
+///       kFIRParameterQuantity : @(1),
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterQuantity = @"quantity"; + +/// Score in game (signed 64-bit integer as NSNumber). +///
+///     NSDictionary *params = @{
+///       kFIRParameterScore : @(4200),
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterScore = @"score"; + +/// The search string/keywords used (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterSearchTerm : @"periodic table",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterSearchTerm = @"search_term"; + +/// Shipping cost (double as NSNumber). +///
+///     NSDictionary *params = @{
+///       kFIRParameterShipping : @(9.50),
+///       kFIRParameterCurrency : @"USD",  // e.g. $9.50 USD
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterShipping = @"shipping"; + +/// Sign up method (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterSignUpMethod : @"google",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterSignUpMethod = @"sign_up_method"; + +/// The departure date, check-in date or rental start date for the item. This should be in +/// YYYY-MM-DD format (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterStartDate : @"2015-09-14",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterStartDate = @"start_date"; + +/// Tax amount (double as NSNumber). +///
+///     NSDictionary *params = @{
+///       kFIRParameterTax : @(1.0),
+///       kFIRParameterCurrency : @"USD",  // e.g. $1.00 USD
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterTax = @"tax"; + +/// A single ID for a ecommerce group transaction (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterTransactionID : @"ab7236dd9823",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterTransactionID = @"transaction_id"; + +/// Travel class (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterTravelClass : @"business",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterTravelClass = @"travel_class"; + +/// A context-specific numeric value which is accumulated automatically for each event type. This is +/// a general purpose parameter that is useful for accumulating a key metric that pertains to an +/// event. Examples include revenue, distance, time and points. Value should be specified as signed +/// 64-bit integer or double as NSNumber. Notes: Currency-related values should be supplied using +/// double as NSNumber and must be accompanied by a {@link kFIRParameterCurrency} parameter. The +/// valid range of accumulated values is [-9,223,372,036,854.77, 9,223,372,036,854.77]. +///
+///     NSDictionary *params = @{
+///       kFIRParameterValue : @(3.99),
+///       kFIRParameterCurrency : @"USD",  // e.g. $3.99 USD
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterValue = @"value"; + +/// Name of virtual currency type (NSString). +///
+///     NSDictionary *params = @{
+///       kFIRParameterVirtualCurrencyName : @"virtual_currency_name",
+///       // ...
+///     };
+/// 
+static NSString *const kFIRParameterVirtualCurrencyName = @"virtual_currency_name"; diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h new file mode 100644 index 0000000..6f3d683 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h @@ -0,0 +1,13 @@ +/// @file FIRUserPropertyNames.h +/// +/// Predefined user property names. +/// +/// A UserProperty is an attribute that describes the app-user. By supplying UserProperties, you can +/// later analyze different behaviors of various segments of your userbase. You may supply up to 25 +/// unique UserProperties per app, and you can use the name and value of your choosing for each one. +/// UserProperty names can be up to 24 characters long, may only contain alphanumeric characters and +/// underscores ("_"), and must start with an alphabetic character. UserProperty values can be up to +/// 36 characters long. The "firebase_" prefix is reserved and should not be used. + +/// The method used to sign in. For example, "google", "facebook" or "twitter". +static NSString *const kFIRUserPropertySignUpMethod = @"sign_up_method"; diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h new file mode 100644 index 0000000..a56cf5f --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h @@ -0,0 +1,11 @@ +// Generated umbrella header for FirebaseAnalytics. + +#import "FIRAnalytics+AppDelegate.h" +#import "FIRAnalytics.h" +#import "FIRAnalyticsConfiguration.h" +#import "FIRApp.h" +#import "FIRConfiguration.h" +#import "FIREventNames.h" +#import "FIROptions.h" +#import "FIRParameterNames.h" +#import "FIRUserPropertyNames.h" diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Modules/module.modulemap b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Modules/module.modulemap new file mode 100644 index 0000000..e1d1c5f --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseAnalytics.framework/Modules/module.modulemap @@ -0,0 +1,23 @@ +framework module FirebaseAnalytics { + + export * + + umbrella header "FirebaseAnalytics.h" + + header "FIRAnalytics+AppDelegate.h" + header "FIRAnalytics.h" + header "FIRAnalyticsConfiguration.h" + header "FIRApp.h" + header "FIRConfiguration.h" + header "FIREventNames.h" + header "FIROptions.h" + header "FIRParameterNames.h" + header "FIRUserPropertyNames.h" + + link framework "AddressBook" + link framework "StoreKit" + + link "c++" + link "sqlite3" + link "z" +} diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/FirebaseCore b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/FirebaseCore new file mode 100644 index 0000000..5f3dcec Binary files /dev/null and b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/FirebaseCore differ diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h new file mode 100644 index 0000000..b0b59fc --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h @@ -0,0 +1,38 @@ +#import + +/** + * This class provides configuration fields for Firebase Analytics. + */ +@interface FIRAnalyticsConfiguration : NSObject + +/** + * Returns the shared instance of FIRAnalyticsConfiguration. + */ ++ (FIRAnalyticsConfiguration *)sharedInstance; + +/** + * Sets the minimum engagement time in seconds required to start a new session. The default value + * is 10 seconds. + */ +- (void)setMinimumSessionInterval:(NSTimeInterval)minimumSessionInterval; + +/** + * Sets the interval of inactivity in seconds that terminates the current session. The default + * value is 1800 seconds (30 minutes). + */ +- (void)setSessionTimeoutInterval:(NSTimeInterval)sessionTimeoutInterval; + +/** + * Sets whether analytics collection is enabled for this app on this device. This setting is + * persisted across app sessions. By default it is enabled. + */ +- (void)setAnalyticsCollectionEnabled:(BOOL)analyticsCollectionEnabled; + +/** + * Deprecated. Sets whether measurement and reporting are enabled for this app on this device. By + * default they are enabled. + */ +- (void)setIsEnabled:(BOOL)isEnabled + DEPRECATED_MSG_ATTRIBUTE("Use setAnalyticsCollectionEnabled: instead."); + +@end diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Headers/FIRApp.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Headers/FIRApp.h new file mode 100644 index 0000000..0c814a6 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Headers/FIRApp.h @@ -0,0 +1,94 @@ +#import +#import + +@class FIROptions; + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^FIRAppVoidBoolCallback)(BOOL success); + +/** + * The entry point of Firebase SDKs. + * + * Initialize and configure FIRApp using [FIRApp configure]; + * Or other customized ways as shown below. + * + * The logging system has two modes: default mode and debug mode. In default mode, only logs with + * log level Notice, Warning and Error will be sent to device. In debug mode, all logs will be sent + * to device. The log levels that Firebase uses are consistent with the ASL log levels. + * + * Enable debug mode by passing the -FIRDebugEnabled argument to the application. You can add this + * argument in the application's Xcode scheme. When debug mode is enabled via -FIRDebugEnabled, + * further executions of the application will also be in debug mode. In order to return to default + * mode, you must explicitly disable the debug mode with the application argument -FIRDebugDisabled. + */ +@interface FIRApp : NSObject + +/** + * Configures a default Firebase app. Raises an exception if any configuration step fails. The + * default app is named "__FIRAPP_DEFAULT". This method should be called after the app is launched + * and before using Firebase services. This method is thread safe. + */ ++ (void)configure; + +/** + * Configures the default Firebase app with the provided options. The default app is named + * "__FIRAPP_DEFAULT". Raises an exception if any configuration step fails. This method is thread + * safe. + * + * @param options The Firebase application options used to configure the service. + */ ++ (void)configureWithOptions:(FIROptions *)options; + +/** + * Configures a Firebase app with the given name and options. Raises an exception if any + * configuration step fails. This method is thread safe. + * + * @param name The application's name given by the developer. The name should should only contain + Letters, Numbers and Underscore. + * @param options The Firebase application options used to configure the services. + */ ++ (void)configureWithName:(NSString *)name options:(FIROptions *)options; + +/** + * Returns the default app, or nil if the default app does not exist. + */ ++ (nullable FIRApp *)defaultApp NS_SWIFT_NAME(defaultApp()); + +/** + * Returns a previously created FIRApp instance with the given name, or nil if no such app exists. + * This method is thread safe. + */ ++ (nullable FIRApp *)appNamed:(NSString *)name; + +/** + * Returns the set of all extant FIRApp instances, or nil if there is no FIRApp instance. This + * method is thread safe. + */ ++ (nullable NSDictionary *)allApps; + +/** + * Cleans up the current FIRApp, freeing associated data and returning its name to the pool for + * future use. This method is thread safe in class level. + */ +- (void)deleteApp:(FIRAppVoidBoolCallback)completion; + +/** + * FIRFirebaseApp instances should not be initialized directly. Call |FIRApp configure|, or + * |FIRApp configureWithOptions:|, or |FIRApp configureWithNames:options| directly. + */ +- (nullable instancetype)init NS_UNAVAILABLE; + +/** + * Gets the name of this app. + */ +@property(nonatomic, copy, readonly) NSString *name; + +/** + * Gets the options for this app. + */ +@property(nonatomic, readonly) FIROptions *options; + +@end + +NS_ASSUME_NONNULL_END diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Headers/FIRConfiguration.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Headers/FIRConfiguration.h new file mode 100644 index 0000000..b176929 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Headers/FIRConfiguration.h @@ -0,0 +1,33 @@ +#import + +#import "FIRAnalyticsConfiguration.h" + +/** + * The log levels used by FIRConfiguration. + */ +typedef NS_ENUM(NSInteger, FIRLogLevel) { + kFIRLogLevelError __deprecated = 0, + kFIRLogLevelWarning __deprecated, + kFIRLogLevelInfo __deprecated, + kFIRLogLevelDebug __deprecated, + kFIRLogLevelAssert __deprecated, + kFIRLogLevelMax __deprecated = kFIRLogLevelAssert +} DEPRECATED_MSG_ATTRIBUTE( + "Use -FIRDebugEnabled and -FIRDebugDisabled. See FIRApp.h for more details."); + +/** + * This interface provides global level properties that the developer can tweak, and the singleton + * of the Firebase Analytics configuration class. + */ +@interface FIRConfiguration : NSObject + ++ (FIRConfiguration *)sharedInstance; + +// The configuration class for Firebase Analytics. +@property(nonatomic, readwrite) FIRAnalyticsConfiguration *analyticsConfiguration; + +// Global log level. Defaults to kFIRLogLevelError. +@property(nonatomic, readwrite, assign) FIRLogLevel logLevel DEPRECATED_MSG_ATTRIBUTE( + "Use -FIRDebugEnabled and -FIRDebugDisabled. See FIRApp.h for more details."); + +@end diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Headers/FIROptions.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Headers/FIROptions.h new file mode 100644 index 0000000..dc7d410 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Headers/FIROptions.h @@ -0,0 +1,87 @@ +#import + +/** + * This class provides constant fields of Google APIs. + */ +@interface FIROptions : NSObject + +/** + * Returns the default options. + */ ++ (FIROptions *)defaultOptions; + +/** + * An iOS API key used for authenticating requests from your app, e.g. + * @"AIzaSyDdVgKwhZl0sTTTLZ7iTmt1r3N2cJLnaDk", used to identify your app to Google servers. + */ +@property(nonatomic, readonly, copy) NSString *APIKey; + +/** + * The OAuth2 client ID for iOS application used to authenticate Google users, for example + * @"12345.apps.googleusercontent.com", used for signing in with Google. + */ +@property(nonatomic, readonly, copy) NSString *clientID; + +/** + * The tracking ID for Google Analytics, e.g. @"UA-12345678-1", used to configure Google Analytics. + */ +@property(nonatomic, readonly, copy) NSString *trackingID; + +/** + * The Project Number from the Google Developer's console, for example @"012345678901", used to + * configure Google Cloud Messaging. + */ +@property(nonatomic, readonly, copy) NSString *GCMSenderID; + +/** + * The Android client ID used in Google AppInvite when an iOS app has its Android version, for + * example @"12345.apps.googleusercontent.com". + */ +@property(nonatomic, readonly, copy) NSString *androidClientID; + +/** + * The Google App ID that is used to uniquely identify an instance of an app. + */ +@property(nonatomic, readonly, copy) NSString *googleAppID; + +/** + * The database root URL, e.g. @"http://abc-xyz-123.firebaseio.com". + */ +@property(nonatomic, readonly, copy) NSString *databaseURL; + +/** + * The URL scheme used to set up Durable Deep Link service. + */ +@property(nonatomic, readwrite, copy) NSString *deepLinkURLScheme; + +/** + * The Google Cloud Storage bucket name, e.g. @"abc-xyz-123.storage.firebase.com". + */ +@property(nonatomic, readonly, copy) NSString *storageBucket; + +/** + * Initializes a customized instance of FIROptions with keys. googleAppID, bundleID and GCMSenderID + * are required. Other keys may required for configuring specific services. + */ +- (instancetype)initWithGoogleAppID:(NSString *)googleAppID + bundleID:(NSString *)bundleID + GCMSenderID:(NSString *)GCMSenderID + APIKey:(NSString *)APIKey + clientID:(NSString *)clientID + trackingID:(NSString *)trackingID + androidClientID:(NSString *)androidClientID + databaseURL:(NSString *)databaseURL + storageBucket:(NSString *)storageBucket + deepLinkURLScheme:(NSString *)deepLinkURLScheme; + +/** + * Initializes a customized instance of FIROptions from the file at the given plist file path. + * For example, + * NSString *filePath = + * [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"]; + * FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath]; + * Returns nil if the plist file does not exist or is invalid. + */ +- (instancetype)initWithContentsOfFile:(NSString *)plistPath; + +@end diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Headers/FirebaseCore.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Headers/FirebaseCore.h new file mode 100644 index 0000000..8d5e33d --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Headers/FirebaseCore.h @@ -0,0 +1,6 @@ +// Generated umbrella header for FirebaseCore. + +#import "FIRAnalyticsConfiguration.h" +#import "FIRApp.h" +#import "FIRConfiguration.h" +#import "FIROptions.h" diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Modules/module.modulemap b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Modules/module.modulemap new file mode 100644 index 0000000..09a6dda --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseCore.framework/Modules/module.modulemap @@ -0,0 +1,15 @@ +framework module FirebaseCore { + + export * + + umbrella header "FirebaseCore.h" + + header "FIRAnalyticsConfiguration.h" + header "FIRApp.h" + header "FIRConfiguration.h" + header "FIROptions.h" + + link framework "SystemConfiguration" + + link "c++" +} diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseInstanceID.framework/FirebaseInstanceID b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseInstanceID.framework/FirebaseInstanceID new file mode 100644 index 0000000..5d67d05 Binary files /dev/null and b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseInstanceID.framework/FirebaseInstanceID differ diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseInstanceID.framework/Headers/FIRInstanceID.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseInstanceID.framework/Headers/FIRInstanceID.h new file mode 100644 index 0000000..f55c4bb --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseInstanceID.framework/Headers/FIRInstanceID.h @@ -0,0 +1,245 @@ +#import + +/** + * @memberof FIRInstanceID + * + * The scope to be used when fetching/deleting a token for Firebase Messaging. + */ +FOUNDATION_EXPORT NSString * __nonnull const kFIRInstanceIDScopeFirebaseMessaging; + +/** + * Called when the system determines that tokens need to be refreshed. + * This method is also called if Instance ID has been reset in which + * case, tokens and FCM topic subscriptions also need to be refreshed. + * + * Instance ID service will throttle the refresh event across all devices + * to control the rate of token updates on application servers. + */ +FOUNDATION_EXPORT NSString * __nonnull const kFIRInstanceIDTokenRefreshNotification; + +/** + * @related FIRInstanceID + * + * The completion handler invoked when the InstanceID token returns. If + * the call fails we return the appropriate `error code` as described below. + * + * @param token The valid token as returned by InstanceID backend. + * + * @param error The error describing why generating a new token + * failed. See the error codes below for a more detailed + * description. + */ +typedef void(^FIRInstanceIDTokenHandler)( NSString * __nullable token, NSError * __nullable error); + + +/** + * @related FIRInstanceID + * + * The completion handler invoked when the InstanceID `deleteToken` returns. If + * the call fails we return the appropriate `error code` as described below + * + * @param error The error describing why deleting the token failed. + * See the error codes below for a more detailed description. + */ +typedef void(^FIRInstanceIDDeleteTokenHandler)(NSError * __nullable error); + +/** + * @related FIRInstanceID + * + * The completion handler invoked when the app identity is created. If the + * identity wasn't created for some reason we return the appropriate error code. + * + * @param identity A valid identity for the app instance, nil if there was an error + * while creating an identity. + * @param error The error if fetching the identity fails else nil. + */ +typedef void(^FIRInstanceIDHandler)(NSString * __nullable identity, NSError * __nullable error); + +/** + * @related FIRInstanceID + * + * The completion handler invoked when the app identity and all the tokens associated + * with it are deleted. Returns a valid error object in case of failure else nil. + * + * @param error The error if deleting the identity and all the tokens associated with + * it fails else nil. + */ +typedef void(^FIRInstanceIDDeleteHandler)(NSError * __nullable error); + +/** + * @enum FIRInstanceIDError + */ +typedef NS_ENUM(NSUInteger, FIRInstanceIDError) { + // Http related errors. + + /// Unknown error. + FIRInstanceIDErrorUnknown = 0, + + /// Auth Error -- GCM couldn't validate request from this client. + FIRInstanceIDErrorAuthentication = 1, + + /// NoAccess -- InstanceID service cannot be accessed. + FIRInstanceIDErrorNoAccess = 2, + + /// Timeout -- Request to InstanceID backend timed out. + FIRInstanceIDErrorTimeout = 3, + + /// Network -- No network available to reach the servers. + FIRInstanceIDErrorNetwork = 4, + + /// OperationInProgress -- Another similar operation in progress, + /// bailing this one. + FIRInstanceIDErrorOperationInProgress = 5, + + /// InvalidRequest -- Some parameters of the request were invalid. + FIRInstanceIDErrorInvalidRequest = 7, +}; + +/** + * The APNS token type for the app. If the token type is set to `UNKNOWN` + * InstanceID will implicitly try to figure out what the actual token type + * is from the provisioning profile. + */ +typedef NS_ENUM(NSInteger, FIRInstanceIDAPNSTokenType) { + /// Unknown token type. + FIRInstanceIDAPNSTokenTypeUnknown, + /// Sandbox token type. + FIRInstanceIDAPNSTokenTypeSandbox, + /// Production token type. + FIRInstanceIDAPNSTokenTypeProd, +}; + +/** + * Instance ID provides a unique identifier for each app instance and a mechanism + * to authenticate and authorize actions (for example, sending a GCM message). + * + * Instance ID is long lived but, may be reset if the device is not used for + * a long time or the Instance ID service detects a problem. + * If Instance ID is reset, the app will be notified with a `com.firebase.iid.token-refresh` + * notification. + * + * If the Instance ID has become invalid, the app can request a new one and + * send it to the app server. + * To prove ownership of Instance ID and to allow servers to access data or + * services associated with the app, call + * `[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler]`. + */ +@interface FIRInstanceID : NSObject + +/** + * FIRInstanceID. + * + * @return A shared instance of FIRInstanceID. + */ ++ (nonnull instancetype)instanceID NS_SWIFT_NAME(instanceID()); + +/** + * Unavailable. Use +instanceID instead. + */ +- (nonnull instancetype)init __attribute__((unavailable("Use +instanceID instead."))); + +/** + * Set APNS token for the application. This APNS token will be used to register + * with Firebase Messaging using `token` or + * `tokenWithAuthorizedEntity:scope:options:handler`. If the token type is set to + * `FIRInstanceIDAPNSTokenTypeUnknown` InstanceID will read the provisioning profile + * to find out the token type. + * + * @param token The APNS token for the application. + * @param type The APNS token type for the above token. + */ +- (void)setAPNSToken:(nonnull NSData *)token + type:(FIRInstanceIDAPNSTokenType)type; + +#pragma mark - Tokens + +/** + * Returns a Firebase Messaging scoped token for the firebase app. + * + * @return Null Returns null if the device has not yet been registerd with + * Firebase Message else returns a valid token. + */ +- (nullable NSString *)token; + +/** + * Returns a token that authorizes an Entity (example: cloud service) to perform + * an action on behalf of the application identified by Instance ID. + * + * This is similar to an OAuth2 token except, it applies to the + * application instance instead of a user. + * + * This is an asynchronous call. If the token fetching fails for some reason + * we invoke the completion callback with nil `token` and the appropriate + * error. + * + * Note, you can only have one `token` or `deleteToken` call for a given + * authorizedEntity and scope at any point of time. Making another such call with the + * same authorizedEntity and scope before the last one finishes will result in an + * error with code `OperationInProgress`. + * + * @see FIRInstanceID deleteTokenWithAuthorizedEntity:scope:handler: + * + * @param authorizedEntity Entity authorized by the token. + * @param scope Action authorized for authorizedEntity. + * @param options The extra options to be sent with your token request. The + * value for the `apns_token` should be the NSData object + * passed to UIApplication's + * `didRegisterForRemoteNotificationsWithDeviceToken` method. + * All other keys and values in the options dict need to be + * instances of NSString or else they will be discarded. Bundle + * keys starting with 'GCM.' and 'GOOGLE.' are reserved. + * @param handler The callback handler which is invoked when the token is + * successfully fetched. In case of success a valid `token` and + * `nil` error are returned. In case of any error the `token` + * is nil and a valid `error` is returned. The valid error + * codes have been documented above. + */ +- (void)tokenWithAuthorizedEntity:(nonnull NSString *)authorizedEntity + scope:(nonnull NSString *)scope + options:(nullable NSDictionary *)options + handler:(nonnull FIRInstanceIDTokenHandler)handler; + +/** + * Revokes access to a scope (action) for an entity previously + * authorized by `[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler]`. + * + * This is an asynchronous call. Call this on the main thread since InstanceID lib + * is not thread safe. In case token deletion fails for some reason we invoke the + * `handler` callback passed in with the appropriate error code. + * + * Note, you can only have one `token` or `deleteToken` call for a given + * authorizedEntity and scope at a point of time. Making another such call with the + * same authorizedEntity and scope before the last one finishes will result in an error + * with code `OperationInProgress`. + * + * @param authorizedEntity Entity that must no longer have access. + * @param scope Action that entity is no longer authorized to perform. + * @param handler The handler that is invoked once the unsubscribe call ends. + * In case of error an appropriate error object is returned + * else error is nil. + */ +- (void)deleteTokenWithAuthorizedEntity:(nonnull NSString *)authorizedEntity + scope:(nonnull NSString *)scope + handler:(nonnull FIRInstanceIDDeleteTokenHandler)handler; + +#pragma mark - Identity + +/** + * Asynchronously fetch a stable identifier that uniquely identifies the app + * instance. If the identifier has been revoked or has expired, this method will + * return a new identifier. + * + * + * @param handler The handler to invoke once the identifier has been fetched. + * In case of error an appropriate error object is returned else + * a valid identifier is returned and a valid identifier for the + * application instance. + */ +- (void)getIDWithHandler:(nonnull FIRInstanceIDHandler)handler; + +/** + * Resets Instance ID and revokes all tokens. + */ +- (void)deleteIDWithHandler:(nonnull FIRInstanceIDDeleteHandler)handler; + +@end diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h new file mode 100644 index 0000000..32212eb --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h @@ -0,0 +1 @@ +#import "FIRInstanceID.h" diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseInstanceID.framework/Modules/module.modulemap b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseInstanceID.framework/Modules/module.modulemap new file mode 100644 index 0000000..3192e9b --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseInstanceID.framework/Modules/module.modulemap @@ -0,0 +1,8 @@ +framework module FirebaseInstanceID { + + export * + + umbrella header "FirebaseInstanceID.h" + + header "FIRInstanceID.h" +} diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseMessaging.framework/FirebaseMessaging b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseMessaging.framework/FirebaseMessaging new file mode 100644 index 0000000..de75366 Binary files /dev/null and b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseMessaging.framework/FirebaseMessaging differ diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseMessaging.framework/Headers/FIRMessaging.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseMessaging.framework/Headers/FIRMessaging.h new file mode 100644 index 0000000..b0600cf --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseMessaging.framework/Headers/FIRMessaging.h @@ -0,0 +1,236 @@ +#import + +/** + * The completion handler invoked once the data connection with FIRMessaging is + * established. The data connection is used to send a continous stream of + * data and all the FIRMessaging data notifications arrive through this connection. + * Once the connection is established we invoke the callback with `nil` error. + * Correspondingly if we get an error while trying to establish a connection + * we invoke the handler with an appropriate error object and do an + * exponential backoff to try and connect again unless successful. + * + * @param error The error object if any describing why the data connection + * to FIRMessaging failed. + */ +typedef void(^FIRMessagingConnectCompletion)(NSError * __nullable error); + +/** + * Notification sent when the upstream message has been delivered + * successfully to the server. The notification object will be the messageID + * of the successfully delivered message. + */ +FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingSendSuccessNotification; + +/** + * Notification sent when the upstream message was failed to be sent to the + * server. The notification object will be the messageID of the failed + * message. The userInfo dictionary will contain the relevant error + * information for the failure. + */ +FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingSendErrorNotification; + +/** + * Notification sent when the Firebase messaging server deletes pending + * messages due to exceeded storage limits. This may occur, for example, when + * the device cannot be reached for an extended period of time. + * + * It is recommended to retrieve any missing messages directly from the + * server. + */ +FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingMessagesDeletedNotification; + +/** + * @enum FIRMessagingError + */ +typedef NS_ENUM(NSUInteger, FIRMessagingError) { + // Unknown error. + FIRMessagingErrorUnknown = 0, + + // Auth Error -- FIRMessaging couldn't validate request from this client. + FIRMessagingErrorAuthentication = 1, + + // NoAccess -- InstanceID service cannot be accessed. + FIRMessagingErrorNoAccess = 2, + + // Timeout -- Request to InstanceID backend timed out. + FIRMessagingErrorTimeout = 3, + + // Network -- No network available to reach the servers. + FIRMessagingErrorNetwork = 4, + + // OperationInProgress -- Another similar operation in progress, + // bailing this one. + FIRMessagingErrorOperationInProgress = 5, + + // InvalidRequest -- Some parameters of the request were invalid. + FIRMessagingErrorInvalidRequest = 7, +}; + +/// Status for the downstream message received by the app. +typedef NS_ENUM(NSInteger, FIRMessagingMessageStatus) { + FIRMessagingMessageStatusUnknown, + /// New downstream message received by the app. + FIRMessagingMessageStatusNew, +}; + +/// Information about a downstream message received by the app. +@interface FIRMessagingMessageInfo : NSObject + +@property(nonatomic, readonly, assign) FIRMessagingMessageStatus status; + +@end + +/** + * A remote data message received by the app via FCM (not just the APNs interface). + * + * This is only for devices running iOS 10 or above. To support devices running iOS 9 or below, use + * the local and remote notifications handlers defined in UIApplicationDelegate protocol. + */ +@interface FIRMessagingRemoteMessage : NSObject + +/// The downstream message received by the application. +@property(nonatomic, readonly, strong, nonnull) NSDictionary *appData; + +@end + +/** + * A protocol to receive data message via FCM for devices running iOS 10 or above. + * + * To support devices running iOS 9 or below, use the local and remote notifications handlers + * defined in UIApplicationDelegate protocol. + */ +@protocol FIRMessagingDelegate + +/// The callback to handle data message received via FCM for devices running iOS 10 or above. +- (void)applicationReceivedRemoteMessage:(nonnull FIRMessagingRemoteMessage *)remoteMessage; + +@end + +/** + * Firebase Messaging enables apps to communicate with their app servers + * using simple messages. + * + * To send or receive messages, the app must get a + * registration token from GGLInstanceID, which authorizes an + * app server to send messages to an app instance. Pass your sender ID and + * `kGGLInstanceIDScopeFIRMessaging` as parameters to the method. + * + * A sender ID is a project number created when you configure your API project. + * It is labeled "Project Number" in the Google Developers Console. + * + * In order to receive FIRMessaging messages, declare application:didReceiveRemoteNotification: + * + * Client apps can send upstream messages back to the app server using the XMPP-based + * Cloud Connection Server, + * + */ +@interface FIRMessaging : NSObject + +/** + * Delegate to handle remote data messages received via FCM for devices running iOS 10 or above. + */ +@property(nonatomic, weak, nullable) id remoteMessageDelegate; + +/** + * FIRMessaging + * + * @return An instance of FIRMessaging. + */ ++ (nonnull instancetype)messaging NS_SWIFT_NAME(messaging()); + +/** + * Unavailable. Use +messaging instead. + */ +- (nonnull instancetype)init __attribute__((unavailable("Use +messaging instead."))); + +#pragma mark - Connect + +/** + * Create a FIRMessaging data connection which will be used to send the data notifications + * send by your server. It will also be used to send ACKS and other messages based + * on the FIRMessaging ACKS and other messages based on the FIRMessaging protocol. + * + * Use the `disconnect` method to disconnect the connection. + * + * @see FIRMessagingService disconnect + * + * @param handler The handler to be invoked once the connection is established. + * If the connection fails we invoke the handler with an + * appropriate error code letting you know why it failed. At + * the same time, FIRMessaging performs exponential backoff to retry + * establishing a connection and invoke the handler when successful. + */ +- (void)connectWithCompletion:(nonnull FIRMessagingConnectCompletion)handler; + +/** + * Disconnect the current FIRMessaging data connection. This stops any attempts to + * connect to FIRMessaging. Calling this on an already disconnected client is a no-op. + * + * Call this before `teardown` when your app is going to the background. + * Since the FIRMessaging connection won't be allowed to live when in background it is + * prudent to close the connection. + */ +- (void)disconnect; + +#pragma mark - Topics + +/** + * Asynchronously subscribes to a topic. + * + * @param topic The name of the topic, for example @"sports". + */ +- (void)subscribeToTopic:(nonnull NSString *)topic; + +/** + * Asynchronously unsubscribe to a topic. + * + * @param topic The name of the topic, for example @"sports". + */ +- (void)unsubscribeFromTopic:(nonnull NSString *)topic; + +#pragma mark - Upstream + +/** + * Sends an upstream ("device to cloud") message. + * + * The message will be queued if we don't have an active connection. + * You can only use the upstream feature if your GCM implementation + * uses the XMPP-based Cloud Connection Server. + * + * @param message Key/Value pairs to be sent. Values must be String, any + * other type will be ignored. + * @param to A string identifying the receiver of the message. For GCM + * project IDs the value is `SENDER_ID@gcm.googleapis.com`. + * @param messageID The ID of the message. This is generated by the application. It + * must be unique for each message generated by this application. + * It allows error callbacks and debugging, to uniquely identify + * each message. + * @param ttl The time to live for the message. In case we aren't able to + * send the message before the TTL expires we will send you a + * callback. If 0, we'll attempt to send immediately and return + * an error if we're not connected. Otherwise, the message will + * be queued. As for server-side messages, we don't return an error + * if the message has been dropped because of TTL; this can happen + * on the server side, and it would require extra communication. + */ +- (void)sendMessage:(nonnull NSDictionary *)message + to:(nonnull NSString *)receiver + withMessageID:(nonnull NSString *)messageID + timeToLive:(int64_t)ttl; + +#pragma mark - Analytics + +/** + * Call this when the app received a downstream message. Used to track message + * delivery and analytics for messages. You don't need to call this if you + * don't set the `FIRMessagingAutoSetupEnabled` flag in your Info.plist. In the + * latter case the library will call this implicitly to track relevant + * messages. + * + * @param message The downstream message received by the application. + * + * @return Information about the downstream message. + */ +- (nonnull FIRMessagingMessageInfo *)appDidReceiveMessage:(nonnull NSDictionary *)message; + +@end diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseMessaging.framework/Headers/FirebaseMessaging.h b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseMessaging.framework/Headers/FirebaseMessaging.h new file mode 100644 index 0000000..27cbd84 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseMessaging.framework/Headers/FirebaseMessaging.h @@ -0,0 +1 @@ +#import "FIRMessaging.h" diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseMessaging.framework/Modules/module.modulemap b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseMessaging.framework/Modules/module.modulemap new file mode 100644 index 0000000..6f49d16 --- /dev/null +++ b/plugins/cordova-plugin-fcm/src/ios/firebase/FirebaseMessaging.framework/Modules/module.modulemap @@ -0,0 +1,13 @@ +framework module FirebaseMessaging { + + export * + + umbrella header "FirebaseMessaging.h" + + header "FIRMessaging.h" + + link framework "AddressBook" + link framework "SystemConfiguration" + + link "sqlite3" +} diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/GoogleIPhoneUtilities.framework/GoogleIPhoneUtilities b/plugins/cordova-plugin-fcm/src/ios/firebase/GoogleIPhoneUtilities.framework/GoogleIPhoneUtilities new file mode 100644 index 0000000..7ab2cf2 Binary files /dev/null and b/plugins/cordova-plugin-fcm/src/ios/firebase/GoogleIPhoneUtilities.framework/GoogleIPhoneUtilities differ diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/GoogleInterchangeUtilities.framework/GoogleInterchangeUtilities b/plugins/cordova-plugin-fcm/src/ios/firebase/GoogleInterchangeUtilities.framework/GoogleInterchangeUtilities new file mode 100644 index 0000000..de40424 Binary files /dev/null and b/plugins/cordova-plugin-fcm/src/ios/firebase/GoogleInterchangeUtilities.framework/GoogleInterchangeUtilities differ diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/GoogleSymbolUtilities.framework/GoogleSymbolUtilities b/plugins/cordova-plugin-fcm/src/ios/firebase/GoogleSymbolUtilities.framework/GoogleSymbolUtilities new file mode 100644 index 0000000..408a002 Binary files /dev/null and b/plugins/cordova-plugin-fcm/src/ios/firebase/GoogleSymbolUtilities.framework/GoogleSymbolUtilities differ diff --git a/plugins/cordova-plugin-fcm/src/ios/firebase/GoogleUtilities.framework/GoogleUtilities b/plugins/cordova-plugin-fcm/src/ios/firebase/GoogleUtilities.framework/GoogleUtilities new file mode 100644 index 0000000..0fd17b6 Binary files /dev/null and b/plugins/cordova-plugin-fcm/src/ios/firebase/GoogleUtilities.framework/GoogleUtilities differ diff --git a/plugins/cordova-plugin-fcm/www/FCMPlugin.js b/plugins/cordova-plugin-fcm/www/FCMPlugin.js new file mode 100644 index 0000000..f24fbe6 --- /dev/null +++ b/plugins/cordova-plugin-fcm/www/FCMPlugin.js @@ -0,0 +1,47 @@ +var exec = require('cordova/exec'); + +function FCMPlugin() { + console.log("FCMPlugin.js: is created"); +} + +// SUBSCRIBE TO TOPIC // +FCMPlugin.prototype.subscribeToTopic = function( topic, success, error ){ + exec(success, error, "FCMPlugin", 'subscribeToTopic', [topic]); +} +// UNSUBSCRIBE FROM TOPIC // +FCMPlugin.prototype.unsubscribeFromTopic = function( topic, success, error ){ + exec(success, error, "FCMPlugin", 'unsubscribeFromTopic', [topic]); +} +// NOTIFICATION CALLBACK // +FCMPlugin.prototype.onNotification = function( callback, success, error ){ + FCMPlugin.prototype.onNotificationReceived = callback; + exec(success, error, "FCMPlugin", 'registerNotification',[]); +} +// TOKEN REFRESH CALLBACK // +FCMPlugin.prototype.onTokenRefresh = function( callback ){ + FCMPlugin.prototype.onTokenRefreshReceived = callback; +} +// GET TOKEN // +FCMPlugin.prototype.getToken = function( success, error ){ + exec(success, error, "FCMPlugin", 'getToken', []); +} + +// DEFAULT NOTIFICATION CALLBACK // +FCMPlugin.prototype.onNotificationReceived = function(payload){ + console.log("Received push notification") + console.log(payload) +} +// DEFAULT TOKEN REFRESH CALLBACK // +FCMPlugin.prototype.onTokenRefreshReceived = function(token){ + console.log("Received token refresh") + console.log(token) +} +// FIRE READY // +exec(function(result){ console.log("FCMPlugin Ready OK") }, function(result){ console.log("FCMPlugin Ready ERROR") }, "FCMPlugin",'ready',[]); + + + + + +var fcmPlugin = new FCMPlugin(); +module.exports = fcmPlugin; diff --git a/plugins/fetch.json b/plugins/fetch.json index 477c787..125840c 100644 --- a/plugins/fetch.json +++ b/plugins/fetch.json @@ -1,97 +1,107 @@ { - "cordova-plugin-console": { - "source": { - "type": "registry", - "id": "cordova-plugin-console@1.0.5" - }, - "is_top_level": true, - "variables": {} + "cordova-plugin-console": { + "source": { + "type": "registry", + "id": "cordova-plugin-console@1.0.5" }, - "cordova-plugin-device": { - "source": { - "type": "registry", - "id": "cordova-plugin-device@1.1.4" - }, - "is_top_level": true, - "variables": {} + "is_top_level": true, + "variables": {} + }, + "cordova-plugin-device": { + "source": { + "type": "registry", + "id": "cordova-plugin-device@1.1.4" }, - "cordova-plugin-splashscreen": { - "source": { - "type": "registry", - "id": "cordova-plugin-splashscreen@~4.0.1" - }, - "is_top_level": true, - "variables": {} + "is_top_level": true, + "variables": {} + }, + "cordova-plugin-splashscreen": { + "source": { + "type": "registry", + "id": "cordova-plugin-splashscreen@~4.0.1" }, - "cordova-plugin-statusbar": { - "source": { - "type": "registry", - "id": "cordova-plugin-statusbar@2.2.2" - }, - "is_top_level": true, - "variables": {} + "is_top_level": true, + "variables": {} + }, + "cordova-plugin-statusbar": { + "source": { + "type": "registry", + "id": "cordova-plugin-statusbar@2.2.2" }, - "cordova-plugin-whitelist": { - "source": { - "type": "registry", - "id": "cordova-plugin-whitelist@1.3.1" - }, - "is_top_level": true, - "variables": {} + "is_top_level": true, + "variables": {} + }, + "cordova-plugin-whitelist": { + "source": { + "type": "registry", + "id": "cordova-plugin-whitelist@1.3.1" }, - "ionic-plugin-keyboard": { - "source": { - "type": "registry", - "id": "ionic-plugin-keyboard@^2.2.1" - }, - "is_top_level": true, - "variables": {} + "is_top_level": true, + "variables": {} + }, + "ionic-plugin-keyboard": { + "source": { + "type": "registry", + "id": "ionic-plugin-keyboard@^2.2.1" }, - "cordova-background-geolocation": { - "source": { - "type": "registry", - "id": "https://github.com/transistorsoft/cordova-background-geolocation.git" - }, - "is_top_level": true, - "variables": { - "LICENSE": "4bbb513c013111eae951647fd4f9e79f127fce6f7a00e9d327db9ea2a053a0df", - "BACKGROUND_MODE_LOCATION": "location", - "LOCATION_ALWAYS_AND_WHEN_IN_USE_USAGE_DESCRIPTION": "Always use is required for constant background location-tracking", - "LOCATION_ALWAYS_USAGE_DESCRIPTION": "Background location-tracking is required", - "LOCATION_WHEN_IN_USE_USAGE_DESCRIPTION": "Background location-tracking is required", - "MOTION_USAGE_DESCRIPTION": "Using the accelerometer increases battery-efficiency by intelligently toggling location-tracking only when the device is detected to be moving" - } + "is_top_level": true, + "variables": {} + }, + "cordova-background-geolocation": { + "source": { + "type": "registry", + "id": "https://github.com/transistorsoft/cordova-background-geolocation.git" }, - "cordova-plugin-background-fetch": { - "source": { - "type": "registry", - "id": "cordova-plugin-background-fetch@~5.0.0" - }, - "is_top_level": false, - "variables": {} + "is_top_level": true, + "variables": { + "LICENSE": "4bbb513c013111eae951647fd4f9e79f127fce6f7a00e9d327db9ea2a053a0df", + "BACKGROUND_MODE_LOCATION": "location", + "LOCATION_ALWAYS_AND_WHEN_IN_USE_USAGE_DESCRIPTION": "Always use is required for constant background location-tracking", + "LOCATION_ALWAYS_USAGE_DESCRIPTION": "Background location-tracking is required", + "LOCATION_WHEN_IN_USE_USAGE_DESCRIPTION": "Background location-tracking is required", + "MOTION_USAGE_DESCRIPTION": "Using the accelerometer increases battery-efficiency by intelligently toggling location-tracking only when the device is detected to be moving" + } + }, + "cordova-plugin-background-fetch": { + "source": { + "type": "registry", + "id": "cordova-plugin-background-fetch@~5.0.0" + }, + "is_top_level": false, + "variables": {} + }, + "cordova-plugin-cocoalumberjack": { + "source": { + "type": "registry", + "id": "cordova-plugin-cocoalumberjack@~0.0.4" }, - "cordova-plugin-cocoalumberjack": { - "source": { - "type": "registry", - "id": "cordova-plugin-cocoalumberjack@~0.0.4" - }, - "is_top_level": false, - "variables": {} + "is_top_level": false, + "variables": {} + }, + "cordova-plugin-inappbrowser": { + "source": { + "type": "registry", + "id": "cordova-plugin-inappbrowser@1.7.1" }, - "cordova-plugin-inappbrowser": { - "source": { - "type": "registry", - "id": "cordova-plugin-inappbrowser@1.7.1" - }, - "is_top_level": true, - "variables": {} + "is_top_level": true, + "variables": {} + }, + "phonegap-plugin-push": { + "source": { + "type": "registry", + "id": "phonegap-plugin-push@^2.0.0" }, - "phonegap-plugin-push": { - "source": { - "type": "registry", - "id": "phonegap-plugin-push@2.0.0" - }, - "is_top_level": true, - "variables": {} + "is_top_level": true, + "variables": { + "SENDER_ID": "699558123249" } + }, + "cordova-plugin-fcm": { + "source": { + "type": "registry", + "id": "cordova-plugin-fcm@^2.1.2" + }, + "is_top_level": true, + "variables": {} + } } \ No newline at end of file diff --git a/resources/android/icon/drawable-hdpi-icon.png b/resources/android/icon/drawable-hdpi-icon.png index 760ba5f..f69032d 100755 Binary files a/resources/android/icon/drawable-hdpi-icon.png and b/resources/android/icon/drawable-hdpi-icon.png differ diff --git a/resources/android/icon/drawable-ldpi-icon.png b/resources/android/icon/drawable-ldpi-icon.png index d730b51..865ae35 100755 Binary files a/resources/android/icon/drawable-ldpi-icon.png and b/resources/android/icon/drawable-ldpi-icon.png differ diff --git a/resources/android/icon/drawable-mdpi-icon.png b/resources/android/icon/drawable-mdpi-icon.png index cbada7c..0ca11e5 100755 Binary files a/resources/android/icon/drawable-mdpi-icon.png and b/resources/android/icon/drawable-mdpi-icon.png differ diff --git a/resources/android/icon/drawable-xhdpi-icon.png b/resources/android/icon/drawable-xhdpi-icon.png index fb18f31..1a08bd0 100755 Binary files a/resources/android/icon/drawable-xhdpi-icon.png and b/resources/android/icon/drawable-xhdpi-icon.png differ diff --git a/resources/android/icon/drawable-xxhdpi-icon.png b/resources/android/icon/drawable-xxhdpi-icon.png index cae542b..de3de7d 100755 Binary files a/resources/android/icon/drawable-xxhdpi-icon.png and b/resources/android/icon/drawable-xxhdpi-icon.png differ diff --git a/resources/android/icon/drawable-xxxhdpi-icon.png b/resources/android/icon/drawable-xxxhdpi-icon.png index 45853a8..d99bbd3 100755 Binary files a/resources/android/icon/drawable-xxxhdpi-icon.png and b/resources/android/icon/drawable-xxxhdpi-icon.png differ diff --git a/resources/android/splash/drawable-land-hdpi-screen.png b/resources/android/splash/drawable-land-hdpi-screen.png index cf48b6f..9d65854 100644 Binary files a/resources/android/splash/drawable-land-hdpi-screen.png and b/resources/android/splash/drawable-land-hdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-ldpi-screen.png b/resources/android/splash/drawable-land-ldpi-screen.png index 244cb6f..7a6dfae 100644 Binary files a/resources/android/splash/drawable-land-ldpi-screen.png and b/resources/android/splash/drawable-land-ldpi-screen.png differ diff --git a/resources/android/splash/drawable-land-mdpi-screen.png b/resources/android/splash/drawable-land-mdpi-screen.png index 4b2907f..71dee64 100644 Binary files a/resources/android/splash/drawable-land-mdpi-screen.png and b/resources/android/splash/drawable-land-mdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-xhdpi-screen.png b/resources/android/splash/drawable-land-xhdpi-screen.png index d028959..9cca855 100644 Binary files a/resources/android/splash/drawable-land-xhdpi-screen.png and b/resources/android/splash/drawable-land-xhdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-xxhdpi-screen.png b/resources/android/splash/drawable-land-xxhdpi-screen.png index b67a5eb..c8f8bd4 100644 Binary files a/resources/android/splash/drawable-land-xxhdpi-screen.png and b/resources/android/splash/drawable-land-xxhdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-xxxhdpi-screen.png b/resources/android/splash/drawable-land-xxxhdpi-screen.png index d5a4462..a1cf279 100644 Binary files a/resources/android/splash/drawable-land-xxxhdpi-screen.png and b/resources/android/splash/drawable-land-xxxhdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-hdpi-screen.png b/resources/android/splash/drawable-port-hdpi-screen.png index 36bc62f..615bd0a 100644 Binary files a/resources/android/splash/drawable-port-hdpi-screen.png and b/resources/android/splash/drawable-port-hdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-ldpi-screen.png b/resources/android/splash/drawable-port-ldpi-screen.png index 0a1a48d..ee288e2 100644 Binary files a/resources/android/splash/drawable-port-ldpi-screen.png and b/resources/android/splash/drawable-port-ldpi-screen.png differ diff --git a/resources/android/splash/drawable-port-mdpi-screen.png b/resources/android/splash/drawable-port-mdpi-screen.png index 249766e..3738cb7 100644 Binary files a/resources/android/splash/drawable-port-mdpi-screen.png and b/resources/android/splash/drawable-port-mdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-xhdpi-screen.png b/resources/android/splash/drawable-port-xhdpi-screen.png index 9e2fbf3..c70938e 100644 Binary files a/resources/android/splash/drawable-port-xhdpi-screen.png and b/resources/android/splash/drawable-port-xhdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-xxhdpi-screen.png b/resources/android/splash/drawable-port-xxhdpi-screen.png index 92819d1..bbbbdcc 100644 Binary files a/resources/android/splash/drawable-port-xxhdpi-screen.png and b/resources/android/splash/drawable-port-xxhdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-xxxhdpi-screen.png b/resources/android/splash/drawable-port-xxxhdpi-screen.png index 4d8278e..ef1d906 100644 Binary files a/resources/android/splash/drawable-port-xxxhdpi-screen.png and b/resources/android/splash/drawable-port-xxxhdpi-screen.png differ diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 56ebbf6..f4fd4a9 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,14 +1,15 @@ import { Component } from '@angular/core'; -import { Platform } from 'ionic-angular'; +import { Platform, AlertController } from 'ionic-angular'; import { StatusBar } from '@ionic-native/status-bar'; import { SplashScreen } from '@ionic-native/splash-screen'; import {Storage } from '@ionic/storage'; import { TabsPage } from '../pages/tabs/tabs'; import { WelcomePage } from '../pages/welcome/welcome'; +import {AccountService} from './../services/account'; import {AuthService} from './../services/auth'; - +import { Push, PushObject, PushOptions } from '@ionic-native/push'; @Component({ templateUrl: 'app.html' @@ -16,10 +17,13 @@ import {AuthService} from './../services/auth'; export class MyApp { rootPage:any; - constructor(platform: Platform, - statusBar: StatusBar, - splashScreen: SplashScreen, + constructor(platform: Platform, + statusBar: StatusBar, + splashScreen: SplashScreen, private authService:AuthService, + public push:Push, + public accountService: AccountService, + public alertCtrl: AlertController, private storage:Storage) { platform.ready().then(() => { @@ -29,24 +33,56 @@ export class MyApp { splashScreen.hide(); this.authService.loadToken(); + this.pushsetup(); this.routeToRootPage(); }); } - + routeToRootPage(){ this.storage.get('token').then(t => { let authenticated = t ? true:false; if(authenticated){ console.log('authenticated'); this.rootPage = TabsPage; - + }else{ console.log('not authenticated'); this.rootPage = WelcomePage; - + } }); } + pushsetup() { + const options: PushOptions = { + android: {}, + ios: { + alert: 'true', + badge: true, + sound: 'false' + }, + windows: {} +}; + +const pushObject: PushObject = this.push.init(options); + +pushObject.on('notification').subscribe((notification: any) => { + if (notification.additionalData.foreground) { + let youralert = this.alertCtrl.create({ + title: 'New Push notification', + message: notification.message + }); + youralert.present(); + } +}); + +pushObject.on('registration').subscribe((registration: any) => { + // alert(registration.registrationId); + this.accountService.registerDevice(registration.registrationId); + console.log("Saved Token:", registration.registrationId); +}); + +pushObject.on('error').subscribe(error => alert('Error with Push plugin' + error)); } +} diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 12bb44c..d50b8b7 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -8,7 +8,7 @@ import { StatusBar } from '@ionic-native/status-bar'; import { CloudSettings, CloudModule } from '@ionic/cloud-angular'; import { IonicStorageModule } from '@ionic/storage'; import { InAppBrowser } from '@ionic-native/in-app-browser'; -import { Push, PushObject, PushOptions } from '@ionic-native/push'; +import { Push } from '@ionic-native/push'; import { Keyboard } from '@ionic-native/keyboard'; import { ChartsModule } from 'ng2-charts'; @@ -34,7 +34,7 @@ const cloudSettings: CloudSettings = { 'app_id': 'f37ad9eb' }, 'push': { - 'sender_id': 'SENDER_ID', + 'sender_id': '', 'pluginConfig': { 'ios': { 'badge': true, @@ -84,13 +84,12 @@ const cloudSettings: CloudSettings = { InAppBrowser, Push, Keyboard, - - SettingsService, - AuthService, - AccountService, + SettingsService, + AuthService, + AccountService, VenueService, GeoService, - + {provide: ErrorHandler, useClass: IonicErrorHandler} ] }) diff --git a/src/services/settings.ts b/src/services/settings.ts index fc5460d..de98a87 100644 --- a/src/services/settings.ts +++ b/src/services/settings.ts @@ -5,8 +5,9 @@ export class SettingsService{ public static DEBUG:boolean = true; public static API_VERSION:string = 'v1'; // public static API_ENDPOINT:string = `http://localhost:8100/api/${SettingsService.API_VERSION}`; - public static API_ENDPOINT:string = `http://ec2-107-23-148-64.compute-1.amazonaws.com/api/${SettingsService.API_VERSION}`; + // public static API_ENDPOINT:string = `http://ec2-107-23-148-64.compute-1.amazonaws.com/api/${SettingsService.API_VERSION}`; + public static API_ENDPOINT:string = `http://127.0.0.1:8000/api/${SettingsService.API_VERSION}`; public static APP_VERSION:string = '2.0.0'; constructor(){ } -} \ No newline at end of file +} diff --git a/www/assets/fonts/roboto-bold.woff b/www/assets/fonts/roboto-bold.woff deleted file mode 100644 index 3143de2..0000000 Binary files a/www/assets/fonts/roboto-bold.woff and /dev/null differ diff --git a/www/assets/fonts/roboto-bold.woff2 b/www/assets/fonts/roboto-bold.woff2 deleted file mode 100644 index e9d591e..0000000 Binary files a/www/assets/fonts/roboto-bold.woff2 and /dev/null differ diff --git a/www/assets/fonts/roboto-light.woff b/www/assets/fonts/roboto-light.woff deleted file mode 100644 index 1bff3ec..0000000 Binary files a/www/assets/fonts/roboto-light.woff and /dev/null differ diff --git a/www/assets/fonts/roboto-light.woff2 b/www/assets/fonts/roboto-light.woff2 deleted file mode 100644 index 94a60b9..0000000 Binary files a/www/assets/fonts/roboto-light.woff2 and /dev/null differ diff --git a/www/assets/fonts/roboto-medium.woff b/www/assets/fonts/roboto-medium.woff deleted file mode 100644 index d3c82e1..0000000 Binary files a/www/assets/fonts/roboto-medium.woff and /dev/null differ diff --git a/www/assets/fonts/roboto-medium.woff2 b/www/assets/fonts/roboto-medium.woff2 deleted file mode 100644 index 74aaff4..0000000 Binary files a/www/assets/fonts/roboto-medium.woff2 and /dev/null differ diff --git a/www/assets/fonts/roboto-regular.woff b/www/assets/fonts/roboto-regular.woff deleted file mode 100644 index 5e353cf..0000000 Binary files a/www/assets/fonts/roboto-regular.woff and /dev/null differ diff --git a/www/assets/fonts/roboto-regular.woff2 b/www/assets/fonts/roboto-regular.woff2 deleted file mode 100644 index 96a6015..0000000 Binary files a/www/assets/fonts/roboto-regular.woff2 and /dev/null differ