[
  {
    "path": ".gitignore",
    "content": ".idea/\n.vscode/\nnode_modules/\n*.js\n!demo-vue/app/main.js\nsrc/*.d.ts\n!src/index.d.ts\n!src/references.d.ts\ndemo/platforms\ndemo-ng/platforms\npublish/package/\nnative-src/android/.project\nnative-src/android/local.properties\nnative-src/android/.settings/"
  },
  {
    "path": ".travis.yml",
    "content": "matrix:\n  include:\n    - stage: \"Lint\"\n      language: node_js\n      os: linux\n      node_js: \"10\"\n      script: cd src && npm run ci.tslint\n    - stage: \"WebPack, Build\"\n      os: osx\n      env:\n        - WebPack=\"iOS\"\n      osx_image: xcode11.2\n      language: node_js\n      node_js: \"10\"\n      jdk: oraclejdk8\n      before_script: pod repo update\n      script: cd demo && npm run build.plugin && npm i && tns build ios --bundle --env.uglify\n    - language: android\n      os: linux\n      env:\n        - WebPack=\"Android\"\n      jdk: oraclejdk8\n      before_install: nvm install 8\n      script: cd demo && npm run build.plugin && npm i && tns build android --bundle --env.uglify --env.snapshot\n    - language: android\n      env:\n        - BuildAndroid=\"28\"\n      os: linux\n      dist: trusty\n      jdk: oraclejdk8\n      before_install: nvm install 10\n      script:\n        - cd src && npm run build && cd ../demo && tns build android\n    - os: osx\n      osx_image: xcode11.2\n      language: node_js\n      node_js: \"10\"\n      jdk: oraclejdk8\n      before_script: pod repo update\n      script:\n        - cd src && npm run build && cd ../demo && tns build ios\n\nandroid:\n  components:\n    - tools\n    - platform-tools\n    - build-tools-28.0.3\n    - android-28\n    - extra-android-m2repository\n    - sys-img-armeabi-v7a-android-21\n\nbefore_install:\n  - sudo pip install --upgrade pip\n  - sudo pip install six\n\ninstall:\n  - echo no | npm install -g nativescript@6\n  - tns usage-reporting disable\n  - tns error-reporting disable"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "README.md",
    "content": "# NativeScript Local Notifications Plugin\n\n[![NPM version][npm-image]][npm-url]\n[![Downloads][downloads-image]][npm-url]\n[![Twitter Follow][twitter-image]][twitter-url]\n\n[build-status]:https://travis-ci.org/EddyVerbruggen/nativescript-local-notifications.svg?branch=master\n[build-url]:https://travis-ci.org/EddyVerbruggen/nativescript-local-notifications\n[npm-image]:http://img.shields.io/npm/v/nativescript-local-notifications.svg\n[npm-url]:https://npmjs.org/package/nativescript-local-notifications\n[downloads-image]:http://img.shields.io/npm/dm/nativescript-local-notifications.svg\n[twitter-image]:https://img.shields.io/twitter/follow/eddyverbruggen.svg?style=social&label=Follow%20me\n[twitter-url]:https://twitter.com/eddyverbruggen\n\nThe Local Notifications plugin allows your app to show notifications when the app is not running.\nJust like remote push notifications, but a few orders of magnitude easier to set up.\n\n> ⚠️ Plugin version 4.0.0 should be used with NativeScript 6+. If you have an older `tns --version`, please use an older plugin version.\n\n> ⚠️ Looking for NativeScript 7 compatibilty? Go to [the NativeScript/plugins repo](https://github.com/NativeScript/plugins/tree/master/packages/local-notifications).\n\n## Installation\nFrom the command prompt go to your app's root folder and execute:\n```bash\ntns plugin add nativescript-local-notifications\n```\n\n## Setup (since plugin version 3.0.0)\nAdd this so for iOS 10+ we can do some wiring (set the iOS `UNUserNotificationCenter.delegate`, to be precise).\nNot needed if your app loads the plugin on startup anyway.\n\nYou'll know you need this if on iOS 10+ notifications are not received by your app or `addOnMessageReceivedCallback` is not invoked... better safe than sorry, though!\n\n```js\nrequire (\"nativescript-local-notifications\");\n```\n\nNow you can import the plugin as an object into your `.ts` file as follows:\n\n```typescript\n// either\nimport { LocalNotifications } from \"nativescript-local-notifications\";\n// or (if that doesn't work for you)\nimport * as LocalNotifications from \"nativescript-local-notifications\";\n\n// then use it as:\nLocalNotifications.hasPermission()\n```\n\n## Demo apps\n\n### NativeScript-Core (XML)\nThis demo is the one with the most options, so it's a cool one to check out:\n\n```bash\ngit clone https://github.com/EddyVerbruggen/nativescript-local-notifications\ncd nativescript-local-notifications/src\nnpm run demo.ios # or demo.android\n```\n\n### NativeScript-Angular\nThis plugin is part of the [plugin showcase app](https://github.com/EddyVerbruggen/nativescript-pluginshowcase/tree/master/app/feedback) I built using Angular.\n\nThere's also a simple Angular [demo in this repo](https://github.com/EddyVerbruggen/nativescript-local-notifications/tree/master/demo-ng):\n\n```bash\ngit clone https://github.com/EddyVerbruggen/nativescript-local-notifications\ncd nativescript-local-notifications/src\nnpm run demo-ng.ios # or demo-ng.android\n```\n\n### NativeScript-Vue\nWe also have a [Vue demo](https://github.com/EddyVerbruggen/nativescript-local-notifications/tree/master/demo-vue):\n\n```bash\ngit clone https://github.com/EddyVerbruggen/nativescript-local-notifications\ncd nativescript-local-notifications/src\nnpm run demo-vue.ios # or demo-vue.android\n```\n\n## Plugin API\n\n### schedule\nOn iOS you need to ask permission to schedule a notification.\nYou can have the `schedule` funtion do that for you automatically (the notification will be scheduled in case the user granted permission),\nor you can manually invoke `requestPermission` if that's your thing.\n\nYou can pass several options to this function, everything is optional:\n\n|option|description|\n|------|-----------|\n|`id`     |A number so you can easily distinguish your notifications. Will be generated if not set.|\n|`title`  |The title which is shown in the statusbar. Default not set.|\n|`subtitle`  |Shown below the title on iOS, and next to the App name on Android. Default not set. All android and iOS >= 10 only.|\n|`body`   |The text below the title. If not provided, the subtitle or title (in this order or priority) will be swapped for it on iOS, as iOS won't display notifications without a body. Default not set on Android, `' '` on iOS, as otherwise the notification won't show up at all.|\n|`color` |Custom color for the notification icon and title that will be applied when the notification center is expanded. (**Android Only**)|\n|`bigTextStyle`  |Allow more than 1 line of the body text to show in the notification centre. Mutually exclusive with `image`. Default `false`. (**Android Only**)|\n|`groupedMessages`| An array of atmost 5 messages that would be displayed using android's notification [inboxStyle](https://developer.android.com/reference/android/app/Notification.InboxStyle.html). Note: The array would be trimed from the top if the messages exceed five. Default not set |\n|`groupSummary`| An [inboxStyle](https://developer.android.com/reference/android/app/Notification.InboxStyle.html) notification summary. Default empty|\n|`ticker` |On Android you can show a different text in the statusbar, instead of the `body`. Default not set, so `body` is used.|\n|`at`     |A JavaScript Date object indicating when the notification should be shown. Default not set (the notification will be shown immediately).|\n|`badge`  |On iOS (and some Android devices) you see a number on top of the app icon. On most Android devices you'll see this number in the notification center. Default not set (0).|\n|`sound`  |Notification sound. For custom notification sound (iOS only), copy the file to `App_Resources/iOS`. Set this to \"default\" (or do not set at all) in order to use default OS sound. Set this to `null` to suppress sound.|\n|`interval` |Set to one of `second`, `minute`, `hour`, `day`, `week`, `month`, `year` if you want a recurring notification.|\n|`icon`|On Android you can set a custom icon in the system tray. Pass in `res://filename` (without the extension) which lives in `App_Resouces/Android/drawable` folders. If not passed, we'll look there for a file named `ic_stat_notify.png`. By default the app icon is used. Android < Lollipop (21) only (see `silhouetteIcon` below).|\n|`silhouetteIcon`|Same as `icon`, but for Android >= Lollipop (21). Should be an alpha-only image. Defaults to `res://ic_stat_notify_silhouette`, or the app icon if not present.|\n|`image` |*URL* (`http..`) of the image to use as an expandable notification image. On Android this is mutually exclusive with `bigTextStyle`.|\n|`thumbnail` |Custom thumbnail/icon to show in the notification center (to the right) on Android, this can be either: `true` (if you want to use the `image` as the thumbnail), a resource URL (that lives in the `App_Resouces/Android/drawable` folders, e.g.: `res://filename`), or a http URL from anywhere on the web. (**Android Only**). Default not set.|\n|`ongoing` |Default is (`false`). Set whether this is an `ongoing` notification. Ongoing notifications cannot be dismissed by the user, so your application must take care of canceling them. (**Android Only**) |\n|`channel` |Default is (`Channel`). Set the channel name for Android API >= 26, which is shown when the user longpresses a  notification. (**Android Only**) |\n|`forceShowWhenInForeground` |Default is `false`. Set to `true` to always show the notification. Note that on iOS < 10 this is ignored (the notification is not shown), and on newer Androids it's currently ignored as well (the notification always shows, per platform default). |\n|`priority` |Default is `0`. Will override `forceShowWhenInForeground` if set. This can be set to `2` for Android \"heads-up\" notifications. See [#114](https://github.com/EddyVerbruggen/nativescript-local-notifications/issues/114) for details. |\n|`actions` |Add an array of `NotificationAction` objects (see below) to add buttons or text input to a notification. |\n|`notificationLed` |Enable the notification LED light on Android (if supported by the device), this can be either: `true` (if you want to use the default color), or a custom color for the notification LED light (if supported by the device). (**Android Only**). Default not set.|\n\n#### `NotificationAction`\n\n|option|description|\n|------|-----------|\n|`id`     |An id so you can easily distinguish your actions.|\n|`type`   |Either `button` or `input`.|\n|`title`  |The label for `type` = `button`.|\n|`launch` |Launch the app when the action completes.|\n|`submitLabel` |The submit button label for `type` = `input`.|\n|`placeholder` |The placeholder text for `type` = `input`.|\n\n```js\n  LocalNotifications.schedule([{\n    id: 1, // generated id if not set\n    title: 'The title',\n    body: 'Recurs every minute until cancelled',\n    ticker: 'The ticker',\n    color: new Color(\"red\"),\n    badge: 1,\n    groupedMessages:[\"The first\", \"Second\", \"Keep going\", \"one more..\", \"OK Stop\"], //android only\n    groupSummary:\"Summary of the grouped messages above\", //android only\n    ongoing: true, // makes the notification ongoing (Android only)\n    icon: 'res://heart',\n    image: \"https://cdn-images-1.medium.com/max/1200/1*c3cQvYJrVezv_Az0CoDcbA.jpeg\",\n    thumbnail: true,\n    interval: 'minute',\n    channel: 'My Channel', // default: 'Channel'\n    sound: \"customsound-ios.wav\", // falls back to the default sound on Android\n    at: new Date(new Date().getTime() + (10 * 1000)) // 10 seconds from now\n  }]).then(\n      function(scheduledIds) {\n        console.log(\"Notification id(s) scheduled: \" + JSON.stringify(scheduledIds));\n      },\n      function(error) {\n        console.log(\"scheduling error: \" + error);\n      }\n  )\n```\n\n### Notification icons (Android)\n\nThese options default to `res://ic_stat_notify` and `res://ic_stat_notify_silhouette` respectively, or the app icon if not present.\n\n`silhouetteIcon` should be an alpha-only image and will be used in Android >= Lollipop (21).\n\n[These are the official icon size guidelines](https://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html),\nand [here's a great guide on how to easily create these icons on Android](https://developer.android.com/studio/write/image-asset-studio).\n\n| Density qualifier | px | dpi\n| ------- | ------- | ---\n|    ldpi | 18 × 18 | 120\n|    mdpi | 24 × 24 | 160\n|    hdpi | 36 × 36 | 240\n|   xhdpi | 48 × 48 | 320\n|  xxhdpi | 72 × 72 | 480\n| xxxhdpi | 96 × 96 | 640 approx.\n\n__Source:__ [Density Qualifier Docs](https://developer.android.com/guide/topics/resources/providing-resources.html#DensityQualifier)\n\n\n### addOnMessageReceivedCallback\nTapping a notification in the notification center will launch your app.\nBut what if you scheduled two notifications and you want to know which one the user tapped?\n\nUse this function to have a callback invoked when a notification was used to launch your app.\nNote that on iOS it will even be triggered when your app is in the foreground and a notification is received.\n\n```js\n  LocalNotifications.addOnMessageReceivedCallback(\n      function (notification) {\n        console.log(\"ID: \" + notification.id);\n        console.log(\"Title: \" + notification.title);\n        console.log(\"Body: \" + notification.body);\n      }\n  ).then(\n      function() {\n        console.log(\"Listener added\");\n      }\n  )\n```\n\n### getScheduledIds\nIf you want to know the ID's of all notifications which have been scheduled, do this:\n\nNote that all functions have an error handler as well (see `schedule`), but to keep things readable we won't repeat ourselves.\n\n```js\n  LocalNotifications.getScheduledIds().then(\n      function(ids) {\n        console.log(\"ID's: \" + ids);\n      }\n  )\n```\n\n### cancel\nIf you want to cancel a previously scheduled notification (and you know its ID), you can cancel it:\n\n```js\n  LocalNotifications.cancel(5 /* the ID */).then(\n      function(foundAndCanceled) {\n          if (foundAndCanceled) {\n            console.log(\"OK, it's gone!\");\n          } else {\n            console.log(\"No ID 5 was scheduled\");\n          }\n      }\n  )\n```\n\n### cancelAll\nIf you just want to cancel all previously scheduled notifications, do this:\n\n```js\n  LocalNotifications.cancelAll();\n```\n\n### requestPermission\nOn Android you don't need permission, but on iOS you do. Android will simply return true.\n\nIf the `requestPermission` or `schedule` function previously ran the user has already been prompted to grant permission.\nIf the user granted permission this function returns `true`, but if he denied permission this function will return `false`,\nsince an iOS can only request permission once. In which case the user needs to go to the iOS settings app and manually\nenable permissions for your app.\n\n```js\n  LocalNotifications.requestPermission().then(\n      function(granted) {\n        console.log(\"Permission granted? \" + granted);\n      }\n  )\n```\n\n### hasPermission\nOn Android you don't need permission, but on iOS you do. Android will simply return true.\n\nIf the `requestPermission` or `schedule` functions previously ran you may want to check whether or not the user granted permission:\n\n```js\n  LocalNotifications.hasPermission().then(\n      function(granted) {\n        console.log(\"Permission granted? \" + granted);\n      }\n  )\n```\n"
  },
  {
    "path": "demo/app/App_Resources/Android/app.gradle",
    "content": "// Add your native dependencies here:\n\n// Uncomment to add recyclerview-v7 dependency\n//dependencies {\n//\tcompile 'com.android.support:recyclerview-v7:+'\n//}\n\nandroid {  \n  defaultConfig {  \n    generatedDensities = []\n    applicationId = \"org.nativescript.plugindemo.localnotifications\"  \n  }  \n  aaptOptions {  \n    additionalParameters \"--no-version-vectors\"  \n  }  \n} \n"
  },
  {
    "path": "demo/app/App_Resources/Android/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tpackage=\"__PACKAGE__\"\n\tandroid:versionCode=\"1\"\n\tandroid:versionName=\"1.0\">\n\n\t<supports-screens\n\t\tandroid:smallScreens=\"true\"\n\t\tandroid:normalScreens=\"true\"\n\t\tandroid:largeScreens=\"true\"\n\t\tandroid:xlargeScreens=\"true\"/>\n\n\t<uses-sdk\n\t\tandroid:minSdkVersion=\"17\"\n\t\tandroid:targetSdkVersion=\"__APILEVEL__\"/>\n\n\t<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>\n\t<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>\n\t<uses-permission android:name=\"android.permission.INTERNET\"/>\n\n\t<application\n\t\tandroid:name=\"com.tns.NativeScriptApplication\"\n\t\tandroid:allowBackup=\"true\"\n\t\tandroid:icon=\"@drawable/icon\"\n\t\tandroid:label=\"@string/app_name\"\n\t\tandroid:theme=\"@style/AppTheme\">\n\n\t\t<activity\n\t\t\tandroid:name=\"com.tns.NativeScriptActivity\"\n\t\t\tandroid:label=\"@string/title_activity_kimera\"\n\t\t\tandroid:configChanges=\"keyboardHidden|orientation|screenSize\"\n\t\t\tandroid:theme=\"@style/LaunchScreenTheme\">\n\n\t\t\t<meta-data android:name=\"SET_THEME_ON_LAUNCH\" android:resource=\"@style/AppTheme\" />\n\n\t\t\t<intent-filter>\n\t\t\t\t<action android:name=\"android.intent.action.MAIN\" />\n\t\t\t\t<category android:name=\"android.intent.category.LAUNCHER\" />\n\t\t\t</intent-filter>\n\t\t</activity>\n\t\t<activity android:name=\"com.tns.ErrorReportActivity\"/>\n\t</application>\n</manifest>\n"
  },
  {
    "path": "demo/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml",
    "content": "<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\" android:gravity=\"fill\">\n    <item>\n        <bitmap android:gravity=\"fill\" android:src=\"@drawable/background\" />\n    </item>\n    <item>\n        <bitmap android:gravity=\"center\" android:src=\"@drawable/logo\" />\n    </item>\n</layer-list>"
  },
  {
    "path": "demo/app/App_Resources/Android/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"ns_primary\">#F5F5F5</color>\n\t<color name=\"ns_primaryDark\">#757575</color>\n\t<color name=\"ns_accent\">#33B5E5</color>\n    <color name=\"ns_blue\">#272734</color>\n</resources>"
  },
  {
    "path": "demo/app/App_Resources/Android/src/main/res/values/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <!-- theme to use FOR launch screen-->\n    <style name=\"LaunchScreenThemeBase\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n        <item name=\"toolbarStyle\">@style/NativeScriptToolbarStyle</item>\n\n        <item name=\"colorPrimary\">@color/ns_primary</item>\n        <item name=\"colorPrimaryDark\">@color/ns_primaryDark</item>\n        <item name=\"colorAccent\">@color/ns_accent</item>\n\n        <item name=\"android:windowBackground\">@drawable/splash_screen</item>\n        \n        <item name=\"android:windowActionBarOverlay\">true</item>  \n        <item name=\"android:windowTranslucentStatus\">true</item>\n\n    </style>\n\n    <style name=\"LaunchScreenTheme\" parent=\"LaunchScreenThemeBase\">\n    </style>\n\n    <!-- theme to use AFTER launch screen is loaded-->\n    <style name=\"AppThemeBase\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n        <item name=\"toolbarStyle\">@style/NativeScriptToolbarStyle</item>\n\n        <item name=\"colorPrimary\">@color/ns_primary</item>\n        <item name=\"colorPrimaryDark\">@color/ns_primaryDark</item>\n        <item name=\"colorAccent\">@color/ns_accent</item>\n\n    </style>\n\n    <style name=\"AppTheme\" parent=\"AppThemeBase\">\n    </style>\n\n    <!-- theme for action-bar -->\n    <style name=\"NativeScriptToolbarStyleBase\" parent=\"Widget.AppCompat.Toolbar\">\n        <item name=\"android:background\">@color/ns_primary</item>\n        <item name=\"theme\">@style/ThemeOverlay.AppCompat.ActionBar</item>\n        <item name=\"popupTheme\">@style/ThemeOverlay.AppCompat</item>\n\n    </style>\n\n    <style name=\"NativeScriptToolbarStyle\" parent=\"NativeScriptToolbarStyleBase\">\n    </style>\n</resources> \n"
  },
  {
    "path": "demo/app/App_Resources/Android/src/main/res/values-v21/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\t<color name=\"ns_accent\">#3d5afe</color>\n</resources>"
  },
  {
    "path": "demo/app/App_Resources/Android/src/main/res/values-v21/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <!-- Application theme -->\n    <style name=\"AppTheme\" parent=\"AppThemeBase\">\n        <item name=\"android:datePickerStyle\">@style/SpinnerDatePicker</item>\n        <item name=\"android:timePickerStyle\">@style/SpinnerTimePicker</item>\n    </style>\n\n    <!-- Default style for DatePicker - in spinner mode -->\n    <style name=\"SpinnerDatePicker\" parent=\"android:Widget.Material.Light.DatePicker\">\n        <item name=\"android:datePickerMode\">spinner</item>\n    </style>\n\n    <!-- Default style for TimePicker - in spinner mode -->\n    <style name=\"SpinnerTimePicker\" parent=\"android:Widget.Material.Light.TimePicker\">\n        <item name=\"android:timePickerMode\">spinner</item>\n    </style>\n\n    <style name=\"NativeScriptToolbarStyle\" parent=\"NativeScriptToolbarStyleBase\">\n        <item name=\"android:elevation\">4dp</item>\n    </style>    \n</resources>"
  },
  {
    "path": "demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-29.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-29@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-29@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-40@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-40@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-60@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-60@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-29.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-29@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-40.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-40@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"76x76\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-76.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"76x76\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-76@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"83.5x83.5\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-83.5@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"1024x1024\",\n      \"idiom\" : \"ios-marketing\",\n      \"filename\" : \"icon-1024.png\",\n      \"scale\" : \"1x\"\n    } \n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo/app/App_Resources/iOS/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"2436h\",\n      \"filename\" : \"Default-1125h.png\",\n      \"minimum-system-version\" : \"11.0\",\n      \"orientation\" : \"portrait\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"iphone\",\n      \"extent\" : \"full-screen\",\n      \"filename\" : \"Default-Landscape-X.png\",\n      \"minimum-system-version\" : \"11.0\",\n      \"subtype\" : \"2436h\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"736h\",\n      \"filename\" : \"Default-736h@3x.png\",\n      \"minimum-system-version\" : \"8.0\",\n      \"orientation\" : \"portrait\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"736h\",\n      \"filename\" : \"Default-Landscape@3x.png\",\n      \"minimum-system-version\" : \"8.0\",\n      \"orientation\" : \"landscape\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"667h\",\n      \"filename\" : \"Default-667h@2x.png\",\n      \"minimum-system-version\" : \"8.0\",\n      \"orientation\" : \"portrait\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Default@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"minimum-system-version\" : \"7.0\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"retina4\",\n      \"filename\" : \"Default-568h@2x.png\",\n      \"minimum-system-version\" : \"7.0\",\n      \"orientation\" : \"portrait\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Portrait.png\",\n      \"extent\" : \"full-screen\",\n      \"minimum-system-version\" : \"7.0\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Landscape.png\",\n      \"extent\" : \"full-screen\",\n      \"minimum-system-version\" : \"7.0\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Portrait@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"minimum-system-version\" : \"7.0\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Landscape@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"minimum-system-version\" : \"7.0\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Default.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Default@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Default-568h@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"subtype\" : \"retina4\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"extent\" : \"to-status-bar\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Portrait.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"extent\" : \"to-status-bar\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Landscape.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"extent\" : \"to-status-bar\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Portrait@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"extent\" : \"to-status-bar\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Landscape@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"2x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchScreen-AspectFill.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchScreen-AspectFill@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchScreen-Center.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchScreen-Center@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo/app/App_Resources/iOS/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIRequiresFullScreen</key>\n\t<true/>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "demo/app/App_Resources/iOS/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"13771\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <device id=\"retina5_9\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13772\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"Llm-lL-Icb\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"xb3-aO-Qok\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"812\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" image=\"LaunchScreen.AspectFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"wtH-rr-YfP\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"812\"/>\n                            </imageView>\n                            <imageView userInteractionEnabled=\"NO\" contentMode=\"center\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" image=\"LaunchScreen.Center\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"s1z-aa-wYv\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"150\" width=\"375\" height=\"512\"/>\n                            </imageView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"s1z-aa-wYv\" secondAttribute=\"trailing\" id=\"4Rf-kf-vql\"/>\n                            <constraint firstAttribute=\"bottom\" secondItem=\"wtH-rr-YfP\" secondAttribute=\"bottom\" id=\"5CS-At-4ka\"/>\n                            <constraint firstItem=\"wtH-rr-YfP\" firstAttribute=\"top\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"top\" id=\"Awn-b8-xf1\"/>\n                            <constraint firstItem=\"s1z-aa-wYv\" firstAttribute=\"leading\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"leading\" id=\"BpJ-vb-eKA\"/>\n                            <constraint firstItem=\"s1z-aa-wYv\" firstAttribute=\"trailing\" secondItem=\"wtH-rr-YfP\" secondAttribute=\"trailing\" id=\"QIM-7J-OZz\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"wtH-rr-YfP\" secondAttribute=\"trailing\" id=\"RXg-rW-UK8\"/>\n                            <constraint firstItem=\"s1z-aa-wYv\" firstAttribute=\"centerY\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"centerY\" id=\"Rcp-LG-48z\"/>\n                            <constraint firstItem=\"wtH-rr-YfP\" firstAttribute=\"leading\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"leading\" id=\"cch-8E-tYu\"/>\n                        </constraints>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"509.60000000000002\" y=\"237.93103448275863\"/>\n        </scene>\n    </scenes>\n    <resources>\n        <image name=\"LaunchScreen.AspectFill\" width=\"768\" height=\"1024\"/>\n        <image name=\"LaunchScreen.Center\" width=\"384\" height=\"512\"/>\n    </resources>\n</document>\n"
  },
  {
    "path": "demo/app/App_Resources/iOS/build.xcconfig",
    "content": "// You can add custom settings here\n// for example you can uncomment the following line to force distribution code signing\n// CODE_SIGN_IDENTITY = iPhone Distribution \n// To build for device with XCode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html\n// DEVELOPMENT_TEAM = YOUR_TEAM_ID;\nASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\nASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;\n"
  },
  {
    "path": "demo/app/README.md",
    "content": "# NativeScript TypeScript Template\n\nThis template creates a NativeScript app with the NativeScript hello world example,\nhowever, in this template the example is built with TypeScript.\n\nYou can create a new app that uses this template with either the `--template` option.\n\n```\ntns create my-app-name --template tns-template-hello-world-ts\n```\n\nOr the `--tsc` shorthand.\n\n```\ntns create my-app-name --tsc\n```\n\n> Note: Both commands will create a new NativeScript app that uses the latest version of this template published to [npm] (https://www.npmjs.com/package/tns-template-hello-world-ts).\n\nIf you want to create a new app that uses the source of the template from the `master` branch, you can execute the following:\n\n```\ntns create my-app-name --template https://github.com/NativeScript/template-hello-world-ts.git#master\n```\n"
  },
  {
    "path": "demo/app/app-root.xml",
    "content": "<Frame defaultPage=\"main-page\">\n</Frame>\n"
  },
  {
    "path": "demo/app/app.css",
    "content": "﻿@import '~nativescript-theme-core/css/core.light.css';\n\npage {\n  background-color: #F4F4F4;\n}\n\n.tab-content {\n  color: #808080;\n  padding: 18;\n}\n\n.title {\n  font-size: 18;\n  margin: 0 0 8 0;\n  color: #3c3c3c;\n  /*horizontal-align: center;*/\n}\n\nlabel {\n  font-size: 16;\n}\n\nLabel.notification,\nLabel.hint {\n  font-size: 14;\n  margin: 8;\n}\n\nbutton {\n  background-color: #E0A458;\n  padding: 8;\n  margin: 8;\n  font-size: 14;\n  border-radius: 4;\n}\n\n.button {\n  color: #FFFFFF;\n}\n\n.button-positive {\n  background-color: #90A959;\n}\n\n.button-danger {\n  background-color: #A63D40;\n}\n\n.button-neutral {\n  background-color: #6494AA;\n}\n"
  },
  {
    "path": "demo/app/app.ts",
    "content": "﻿import \"./bundle-config\";\nimport * as application from \"tns-core-modules/application\";\n\n// Add this so for iOS 10+ we can do some wiring (set the iOS UNUserNotificationCenter delegate, to be precise).\n// Not needed if your app loads the plugin on startup anyway.\n// You'll know you need this if on iOS 10+ notifications are not received by your app.\nrequire (\"nativescript-local-notifications\");\n\napplication.run({moduleName: \"app-root\"});\n"
  },
  {
    "path": "demo/app/bundle-config.ts",
    "content": "if ((<any>global).TNS_WEBPACK) {\n  // Register tns-core-modules UI framework modules\n  require(\"bundle-entry-points\");\n\n  // Register application modules\n  // This will register each `root`, `page`, `fragment` postfixed xml, css, js, ts, scss file in the app/ folder\n  const context = (<any>require).context(\"~/\", true, /(root|page|fragment)\\.(xml|css|js|ts|scss|less|sass)$/);\n  global.registerWebpackModules(context);\n}\n"
  },
  {
    "path": "demo/app/main-page.ts",
    "content": "import { EventData } from \"tns-core-modules/data/observable\";\nimport { Page } from \"tns-core-modules/ui/page\";\nimport { HelloWorldModel } from \"./main-view-model\";\n\nexport function navigatingTo(args: EventData) {\n  const page = <Page>args.object;\n  page.bindingContext = new HelloWorldModel();\n}\n"
  },
  {
    "path": "demo/app/main-page.xml",
    "content": "<Page xmlns=\"http://www.nativescript.org/tns.xsd\" navigatingTo=\"navigatingTo\">\n  <TabView>\n    <TabView.items>\n\n      <TabViewItem title=\"Demo\">\n        <TabViewItem.view>\n          <ScrollView>\n            <GridLayout columns=\"*,*\" rows=\"auto, auto, auto, auto, auto, auto, auto, auto, auto, auto\" horizontalAlignment=\"center\" class=\"tab-content\">\n\n              <Label row=\"0\" colSpan=\"2\" text=\"You need permission before being able to schedule local notifications. Either defer to when you schedule it, or do it when the app first loads.\" class=\"hint\" textWrap=\"true\" />\n              <Button row=\"1\" col=\"0\" text=\"has permission?\" tap=\"{{ doCheckHasPermission }}\" class=\"button button-neutral\"/>\n              <iOS>\n                <Button row=\"1\" col=\"1\" text=\"request perm.\" tap=\"{{ doRequestPermission }}\" class=\"button button-neutral\"/>\n              </iOS>\n\n              <Label row=\"2\" colSpan=\"2\" text=\"After scheduling a notification, it pops up after 10 sec. In some cases you'll need to close the app first (see 'forceShowWhenInForeground').\" class=\"hint\" textWrap=\"true\" />\n\n              <Button row=\"3\" col=\"0\" text=\"1. with buttons\" tap=\"{{ doScheduleWithButtons }}\" class=\"button\"/>\n              <Button row=\"3\" col=\"1\"  text=\"2. with img\" tap=\"{{ doScheduleNoSound }}\" class=\"button\" />\n\n              <Button row=\"4\" col=\"0\" text=\"3. with badge+img\" tap=\"{{ doScheduleAndSetBadgeNumber }}\" class=\"button\"/>\n              <Button row=\"4\" col=\"1\" text=\"4. custom icon\" tap=\"{{ doScheduleId4GroupedWithCustomIcon }}\" class=\"button\"/>\n\n              <Button row=\"5\" col=\"0\" text=\"5. with input\" tap=\"{{ doScheduleId5WithInput }}\" class=\"button\"/>\n              <Button row=\"5\" col=\"1\" text=\"6. repeat minutely\" tap=\"{{ doScheduleEveryMinute }}\" class=\"button\"/>\n\n              <Button row=\"6\" colSpan=\"2\" text=\"7-10. schedule multiple\" tap=\"{{ doScheduleMultiple }}\" class=\"button\"/>\n\n              <Button row=\"7\" col=\"0\" colSpan=\"2\" text=\"get scheduled id's\" tap=\"{{ doGetScheduledIds }}\" class=\"button button-neutral\"/>\n\n              <Button row=\"8\" col=\"0\"  text=\"cancel all\" tap=\"{{ doCancelAll }}\" class=\"button button-danger\"/>\n              <Button row=\"8\" col=\"1\"  text=\"cancel id 6\" tap=\"{{ doCancelId6 }}\" class=\"button button-danger\"/>\n\n              <Label row=\"9\" colSpan=\"2\" text=\"{{ notification }}\" class=\"notification\" textWrap=\"true\"/>\n\n            </GridLayout>\n          </ScrollView>\n        </TabViewItem.view>\n      </TabViewItem>\n\n      <TabViewItem title=\"About\">\n        <TabViewItem.view>\n          <ScrollView>\n            <StackLayout class=\"tab-content\">\n              <Label text=\"Local Notifications plugin demo\" class=\"title\"/>\n              <Label text=\"The Local Notifications plugin allows your app to show notifications when the app is not running. Just like remote push notifications, but a few orders of magnitude easier to set up.\" textWrap=\"true\"/>\n            </StackLayout>\n          </ScrollView>\n        </TabViewItem.view>\n      </TabViewItem>\n\n    </TabView.items>\n  </TabView>\n</Page>\n"
  },
  {
    "path": "demo/app/main-view-model.ts",
    "content": "import { Observable } from \"tns-core-modules/data/observable\";\nimport { alert } from \"tns-core-modules/ui/dialogs\";\nimport { LocalNotifications } from \"nativescript-local-notifications\";\nimport { Color } from \"tns-core-modules/color\";\nimport { ScheduleOptions } from \"../../src\";\n\nexport class HelloWorldModel extends Observable {\n\n  public notification: string;\n\n  constructor() {\n    super();\n    LocalNotifications.addOnMessageReceivedCallback(notificationData => {\n      console.log(\"Notification received: \" + JSON.stringify(notificationData));\n      this.set(\"notification\", \"Notification received: \" + JSON.stringify(notificationData));\n    });\n  }\n\n  public doCheckHasPermission(): void {\n    LocalNotifications.hasPermission()\n        .then(granted => {\n          alert({\n            title: \"Permission granted?\",\n            message: granted ? \"YES\" : \"NO\",\n            okButtonText: \"OK\"\n          });\n        });\n  };\n\n  public doRequestPermission(): void {\n    LocalNotifications.requestPermission()\n        .then(granted => {\n          alert({\n            title: \"Permission granted?\",\n            message: granted ? \"YES\" : \"NO\",\n            okButtonText: \"OK\"\n          });\n        });\n  }\n\n  public doScheduleWithButtons(): void {\n    const options: Array<ScheduleOptions> = [\n      {\n        id: 1,\n        title: 'THE TITLE',\n        subtitle: 'The subtitle',\n        body: 'The big body. The big body. The big body. The big body. The big body. The big body. The big body. The big body. The big fat body. The big fat body. The big fat body. The big fat body. The big fat body. The big fat body. The big fat body.',\n        bigTextStyle: true, // Allow more than 1 row of the 'body' text\n        sound: \"customsound\",\n        color: new Color(\"green\"),\n        forceShowWhenInForeground: true,\n        channel: \"My Awesome Channel\", // not that this is revealed in the notification tray when you longpress it on Android\n        ticker: \"Special ticker text (Android only)\",\n        at: new Date(new Date().getTime() + (10 * 1000)),\n        notificationLed: true,\n        actions: [\n          {\n            id: \"yes\",\n            type: \"button\",\n            title: \"Yes (and launch app)\",\n            launch: true\n          },\n          {\n            id: \"no\",\n            type: \"button\",\n            title: \"No\",\n            launch: false\n          }\n        ]\n      },\n      {\n        title: 'Generated ID',\n        at: new Date(new Date().getTime() + (5 * 1000))\n      }\n    ];\n    LocalNotifications.schedule(options)\n        .then((scheduledIds: Array<number>) => {\n          alert({\n            title: \"Notification scheduled\",\n            message: `ID: ${JSON.stringify(scheduledIds)}`,\n            okButtonText: \"OK, thanks\"\n          });\n        })\n        .catch(error => console.log(\"doSchedule error: \" + error))\n  };\n\n  public doScheduleNoSound(): void {\n    LocalNotifications.schedule(\n        [{\n          id: 2,\n          title: \"Red Alert\",\n          subtitle: \"Remember this game?\",\n          icon: 'res://ic_stat_notify',\n          color: new Color(\"red\"),\n          image: \"https://images-na.ssl-images-amazon.com/images/I/61mx-VbrS0L.jpg\",\n          thumbnail: \"https://2.bp.blogspot.com/-H_SZ3nAmNsI/VrJeARpbuSI/AAAAAAAABfc/szsV7_F609k/s200/emoji.jpg\",\n          forceShowWhenInForeground: false, // default\n          body: \"RTS FTW!\",\n          sound: null,\n          at: new Date(new Date().getTime() + 10 * 1000)\n        }])\n        .then(() => {\n          alert({\n            title: \"Notification scheduled\",\n            message: 'ID: 2',\n            okButtonText: \"OK, thanks\"\n          });\n        })\n        .catch(error => console.log(\"doScheduleSilent error: \" + error));\n  }\n\n  public doScheduleAndSetBadgeNumber(): void {\n    LocalNotifications.schedule(\n        [{\n          id: 3,\n          title: 'Hi',\n          subtitle: 'Whatsubtitle',\n          image: \"https://2.bp.blogspot.com/-H_SZ3nAmNsI/VrJeARpbuSI/AAAAAAAABfc/szsV7_F609k/s200/emoji.jpg\",\n          thumbnail: true,\n          // body: 'You should see a \\'3\\' somewhere',\n          at: new Date(new Date().getTime() + 10 * 1000),\n          badge: 3\n        }])\n        .then(() => {\n          alert({\n            title: \"Notification scheduled\",\n            message: 'ID: 3',\n            okButtonText: \"OK, thanks\"\n          });\n        })\n        .catch(error => console.log(\"doScheduleAndSetBadgeNumber error: \" + error));\n  }\n\n  public doScheduleId4GroupedWithCustomIcon(): void {\n    LocalNotifications.schedule(\n        [{\n          id: 4,\n          title: 'Custom icon',\n          body: 'Check it out!',\n          thumbnail: \"https://2.bp.blogspot.com/-H_SZ3nAmNsI/VrJeARpbuSI/AAAAAAAABfc/szsV7_F609k/s200/emoji.jpg\",\n          icon: 'res://ic_stat_smiley',\n          at: new Date(new Date().getTime() + 10 * 1000),\n          groupedMessages: [\"The first\", \"Second\", \"Keep going\", \"one more..\", \"OK Stop\"], // android only\n          groupSummary: \"Summary of the grouped messages above\" // android only\n        }])\n        .then(() => {\n          alert({\n            title: \"Notification scheduled\",\n            message: 'ID: 4',\n            okButtonText: \"OK, thanks\"\n          });\n        })\n        .catch(error => console.log(\"doScheduleId4WithCustomIcon error: \" + error));\n  }\n\n  public doScheduleId5WithInput(): void {\n    LocalNotifications.schedule(\n        [{\n          id: 5,\n          thumbnail: true,\n          title: 'Richard wants your input',\n          body: '\"Hey man, what do you think of the new design?\" (swipe down to reply, or tap to open the app)',\n          forceShowWhenInForeground: true,\n          at: new Date(new Date().getTime() + 10 * 1000),\n          actions: [\n            {\n              id: \"input-richard\",\n              type: \"input\",\n              title: \"Tap here to reply\",\n              placeholder: \"Type to reply..\",\n              submitLabel: \"Reply\",\n              launch: true,\n              editable: true,\n              // choices: [\"Red\", \"Yellow\", \"Green\"] // TODO Android only, but yet to see it in action\n            }\n          ]\n        }])\n        .then(() => {\n          alert({\n            title: \"Notification scheduled\",\n            message: \"ID: 5\",\n            okButtonText: \"OK, thanks\"\n          });\n        })\n        .catch(error => console.log(\"doScheduleId5WithInput error: \" + error));\n  }\n\n  public doScheduleEveryMinute(): void {\n    LocalNotifications.schedule(\n        [{\n          id: 6,\n          title: 'Every minute!',\n          interval: 'minute', // some constant\n          body: 'I\\'m repeating until cancelled',\n          icon: 'res://ic_stat_smiley',\n          thumbnail: \"res://ic_stat_notify\",\n          forceShowWhenInForeground: true,\n          at: new Date(new Date().getTime() + 10 * 1000)\n        }])\n        .then(() => {\n          alert({\n            title: \"Notification scheduled\",\n            message: 'ID: 6, repeating',\n            okButtonText: \"OK, thanks\"\n          });\n        })\n        .catch(error => console.log(\"doScheduleEveryMinute error: \" + error));\n  }\n\n  public doScheduleMultiple(): void {\n    LocalNotifications.schedule(\n        [\n          {\n            id: 7,\n            title: 'Multiple - id 7',\n            icon: 'res://ic_stat_smiley',\n            at: new Date(new Date().getTime() + 5 * 1000)\n          },\n          {\n            id: 8,\n            title: 'Multiple - id 8',\n            icon: 'res://ic_stat_notify',\n            at: new Date(new Date().getTime() + 6 * 1000)\n          },\n          {\n            id: 9,\n            title: 'Multiple - id 9',\n            icon: 'res://ic_stat_smiley',\n            at: new Date(new Date().getTime() + 7 * 1000)\n          },\n          {\n            id: 10,\n            title: 'Multiple - id 10',\n            icon: 'res://ic_stat_smiley',\n            at: new Date(new Date().getTime() + 8 * 1000)\n          },\n        ])\n        .then(() => {\n          alert({\n            title: \"Notification 7-10 scheduled\",\n            okButtonText: \"OK, thanks\"\n          });\n        })\n        .catch(error => console.log(\"doScheduleMultiple error: \" + error));\n  }\n\n  public doGetScheduledIds(): void {\n    LocalNotifications.getScheduledIds()\n        .then(ids => {\n          alert({\n            title: \"Scheduled ID's\",\n            message: 'ID\\'s: ' + ids,\n            okButtonText: \"Sweet!\"\n          });\n        })\n        .catch(error => console.log(\"doGetScheduledIds error: \" + error));\n  }\n\n  public doCancelAll(): void {\n    LocalNotifications.cancelAll()\n        .then(() => {\n          alert({\n            title: \"All canceled\",\n            okButtonText: \"Awesome!\"\n          });\n        })\n        .catch(error => console.log(\"doCancelAll error: \" + error));\n  }\n\n  public doCancelId6(): void {\n    LocalNotifications.cancel(6)\n        .then(foundAndCanceled => {\n          if (foundAndCanceled) {\n            alert({\n              title: \"ID 6 canceled\",\n              okButtonText: \"OK, coolness\"\n            });\n          } else {\n            alert({\n              title: \"No ID 6 was scheduled\",\n              okButtonText: \"OK, woops\"\n            });\n          }\n        })\n        .catch(error => console.log(\"doCancelId6 error: \" + error));\n  }\n}\n"
  },
  {
    "path": "demo/app/package.json",
    "content": "{\n  \"android\": {\n    \"v8Flags\": \"--expose_gc\",\n    \"markingMode\": \"none\"\n  },\n  \"main\": \"app.js\",\n  \"name\": \"tns-template-hello-world-ts\",\n  \"version\": \"4.1.0\"\n}"
  },
  {
    "path": "demo/package.json",
    "content": "{\n  \"description\": \"NativeScript Application\",\n  \"license\": \"SEE LICENSE IN <your-license-filename>\",\n  \"readme\": \"NativeScript Application\",\n  \"repository\": \"<fill-your-repository-here>\",\n  \"nativescript\": {\n    \"id\": \"org.nativescript.plugindemo.localnotifications\",\n    \"tns-ios\": {\n      \"version\": \"6.0.1\"\n    },\n    \"tns-android\": {\n      \"version\": \"6.0.0\"\n    }\n  },\n  \"dependencies\": {\n    \"nativescript-local-notifications\": \"file:../src\",\n    \"nativescript-theme-core\": \"~1.0.6\",\n    \"tns-core-modules\": \"~6.0.0\"\n  },\n  \"devDependencies\": {\n    \"babel-traverse\": \"6.26.0\",\n    \"babel-types\": \"6.26.0\",\n    \"babylon\": \"6.18.0\",\n    \"lazy\": \"1.0.11\",\n    \"nativescript-dev-webpack\": \"1.0.1\",\n    \"tns-platform-declarations\": \"~6.0.0\",\n    \"typescript\": \"3.4.5\"\n  },\n  \"scripts\": {\n    \"build.plugin\": \"cd ../src && npm run build\"\n  }\n}\n"
  },
  {
    "path": "demo/references.d.ts",
    "content": "/// <reference path=\"./node_modules/tns-platform-declarations/ios.d.ts\" />\n/// <reference path=\"./node_modules/tns-platform-declarations/android.d.ts\" />\n\n/// <reference path=\"./node_modules/nativescript-local-notifications/platforms/ios/typings/objc!LocalNotificationsPlugin.d.ts\" />"
  },
  {
    "path": "demo/tsconfig.json",
    "content": "{\n    \"compilerOptions\": {\n        \"target\": \"es6\",\n        \"module\": \"commonjs\",\n        \"declaration\": false,\n        \"removeComments\": true,\n        \"noLib\": false,\n        \"emitDecoratorMetadata\": true,\n        \"experimentalDecorators\": true,\n        \"pretty\": true,\n        \"allowUnreachableCode\": false,\n        \"allowUnusedLabels\": false,\n        \"noEmitHelpers\": true,\n        \"noEmitOnError\": false,\n        \"noImplicitAny\": false,\n        \"noImplicitReturns\": true,\n        \"noImplicitUseStrict\": false,\n        \"noFallthroughCasesInSwitch\": true,\n        \"typeRoots\": [\n            \"./node_modules/@types\",\n            \"./node_modules\"\n        ],\n        \"types\": [],\n        \"lib\": [\n            \"es6\",\n            \"dom\"\n        ],\n        \"baseUrl\": \".\",\n        \"paths\": {\n            \"~/*\": [\n                \"app/*\"\n            ],\n            \"*\": [\n                \"./node_modules/tns-core-modules/*\",\n                \"./node_modules/*\"\n            ]\n        }\n    },\n    \"exclude\": [\n        \"node_modules\",\n        \"platforms\"\n    ],\n    \"compileOnSave\": false\n}"
  },
  {
    "path": "demo/tsconfig.tns.json",
    "content": "{\n    \"extends\": \"./tsconfig\",\n    \"compilerOptions\": {\n        \"module\": \"es2015\",\n        \"moduleResolution\": \"node\"\n    }\n}\n"
  },
  {
    "path": "demo-ng/App_Resources/Android/app.gradle",
    "content": "// Add your native dependencies here:\n\n// Uncomment to add recyclerview-v7 dependency\n//dependencies {\n//\timplementation 'com.android.support:recyclerview-v7:+'\n//}\n\n// If you want to add something to be applied before applying plugins' include.gradle files \n// e.g. project.ext.googlePlayServicesVersion = \"15.0.1\"\n// create a file named before-plugins.gradle in the current directory and place it there\n \nandroid {  \n  defaultConfig {  \n    generatedDensities = []\n  }  \n  aaptOptions {  \n    additionalParameters \"--no-version-vectors\"  \n  }  \n} \n"
  },
  {
    "path": "demo-ng/App_Resources/Android/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tpackage=\"__PACKAGE__\"\n\tandroid:versionCode=\"1\"\n\tandroid:versionName=\"1.0\">\n\n\t<supports-screens\n\t\tandroid:smallScreens=\"true\"\n\t\tandroid:normalScreens=\"true\"\n\t\tandroid:largeScreens=\"true\"\n\t\tandroid:xlargeScreens=\"true\"/>\n\n\t<uses-sdk\n\t\tandroid:minSdkVersion=\"17\"\n\t\tandroid:targetSdkVersion=\"__APILEVEL__\"/>\n\n\t<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>\n\t<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>\n\t<uses-permission android:name=\"android.permission.INTERNET\"/>\n\n\t<application\n\t\tandroid:name=\"com.tns.NativeScriptApplication\"\n\t\tandroid:allowBackup=\"true\"\n\t\tandroid:icon=\"@drawable/icon\"\n\t\tandroid:label=\"@string/app_name\"\n\t\tandroid:theme=\"@style/AppTheme\">\n\n\t\t<activity\n\t\t\tandroid:name=\"com.tns.NativeScriptActivity\"\n\t\t\tandroid:label=\"@string/title_activity_kimera\"\n\t\t\tandroid:configChanges=\"keyboardHidden|orientation|screenSize\"\n\t\t\tandroid:theme=\"@style/LaunchScreenTheme\">\n\n\t\t\t<meta-data android:name=\"SET_THEME_ON_LAUNCH\" android:resource=\"@style/AppTheme\" />\n\n\t\t\t<intent-filter>\n\t\t\t\t<action android:name=\"android.intent.action.MAIN\" />\n\t\t\t\t<category android:name=\"android.intent.category.LAUNCHER\" />\n\t\t\t</intent-filter>\n\t\t</activity>\n\t\t<activity android:name=\"com.tns.ErrorReportActivity\"/>\n\t</application>\n</manifest>\n"
  },
  {
    "path": "demo-ng/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml",
    "content": "<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\" android:gravity=\"fill\">\n    <item>\n        <bitmap android:gravity=\"fill\" android:src=\"@drawable/background\" />\n    </item>\n    <item>\n        <bitmap android:gravity=\"center\" android:src=\"@drawable/logo\" />\n    </item>\n</layer-list>"
  },
  {
    "path": "demo-ng/App_Resources/Android/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"ns_primary\">#F5F5F5</color>\n\t<color name=\"ns_primaryDark\">#757575</color>\n\t<color name=\"ns_accent\">#33B5E5</color>\n    <color name=\"ns_blue\">#272734</color>\n</resources>"
  },
  {
    "path": "demo-ng/App_Resources/Android/src/main/res/values/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <!-- theme to use FOR launch screen-->\n    <style name=\"LaunchScreenThemeBase\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n        <item name=\"toolbarStyle\">@style/NativeScriptToolbarStyle</item>\n\n        <item name=\"colorPrimary\">@color/ns_primary</item>\n        <item name=\"colorPrimaryDark\">@color/ns_primaryDark</item>\n        <item name=\"colorAccent\">@color/ns_accent</item>\n\n        <item name=\"android:windowBackground\">@drawable/splash_screen</item>\n        \n        <item name=\"android:windowActionBarOverlay\">true</item>  \n        <item name=\"android:windowTranslucentStatus\">true</item>\n\n    </style>\n\n    <style name=\"LaunchScreenTheme\" parent=\"LaunchScreenThemeBase\">\n    </style>\n\n    <!-- theme to use AFTER launch screen is loaded-->\n    <style name=\"AppThemeBase\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n        <item name=\"toolbarStyle\">@style/NativeScriptToolbarStyle</item>\n\n        <item name=\"colorPrimary\">@color/ns_primary</item>\n        <item name=\"colorPrimaryDark\">@color/ns_primaryDark</item>\n        <item name=\"colorAccent\">@color/ns_accent</item>\n\n    </style>\n\n    <style name=\"AppTheme\" parent=\"AppThemeBase\">\n    </style>\n\n    <!-- theme for action-bar -->\n    <style name=\"NativeScriptToolbarStyleBase\" parent=\"Widget.AppCompat.Toolbar\">\n        <item name=\"android:background\">@color/ns_primary</item>\n        <item name=\"theme\">@style/ThemeOverlay.AppCompat.ActionBar</item>\n        <item name=\"popupTheme\">@style/ThemeOverlay.AppCompat</item>\n\n    </style>\n\n    <style name=\"NativeScriptToolbarStyle\" parent=\"NativeScriptToolbarStyleBase\">\n    </style>\n</resources> \n"
  },
  {
    "path": "demo-ng/App_Resources/Android/src/main/res/values-v21/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\t<color name=\"ns_accent\">#3d5afe</color>\n</resources>"
  },
  {
    "path": "demo-ng/App_Resources/Android/src/main/res/values-v21/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <!-- Application theme -->\n    <style name=\"AppTheme\" parent=\"AppThemeBase\">\n        <item name=\"android:datePickerStyle\">@style/SpinnerDatePicker</item>\n        <item name=\"android:timePickerStyle\">@style/SpinnerTimePicker</item>\n    </style>\n\n    <!-- Default style for DatePicker - in spinner mode -->\n    <style name=\"SpinnerDatePicker\" parent=\"android:Widget.Material.Light.DatePicker\">\n        <item name=\"android:datePickerMode\">spinner</item>\n    </style>\n\n    <!-- Default style for TimePicker - in spinner mode -->\n    <style name=\"SpinnerTimePicker\" parent=\"android:Widget.Material.Light.TimePicker\">\n        <item name=\"android:timePickerMode\">spinner</item>\n    </style>\n\n    <style name=\"NativeScriptToolbarStyle\" parent=\"NativeScriptToolbarStyleBase\">\n        <item name=\"android:elevation\">4dp</item>\n    </style>    \n</resources>"
  },
  {
    "path": "demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-20@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-20@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-29.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-29@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-29@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-40@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-40@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-60@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-60@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-20.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-20@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-29.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-29@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-40.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-40@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"76x76\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-76.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"76x76\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-76@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"83.5x83.5\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-83.5@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"1024x1024\",\n      \"idiom\" : \"ios-marketing\",\n      \"filename\" : \"icon-1024.png\",\n      \"scale\" : \"1x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo-ng/App_Resources/iOS/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"2688h\",\n      \"filename\" : \"Phone XS Max - Portarit iOS 12.png\",\n      \"minimum-system-version\" : \"12.0\",\n      \"orientation\" : \"portrait\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"2688h\",\n      \"filename\" : \"iPhone XS Max – Landscape iOS 12.png\",\n      \"minimum-system-version\" : \"12.0\",\n      \"orientation\" : \"landscape\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"1792h\",\n      \"filename\" : \"iPhone XR - Portarit iOS 12.png\",\n      \"minimum-system-version\" : \"12.0\",\n      \"orientation\" : \"portrait\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"1792h\",\n      \"filename\" : \"iPhone XR - Landscape iOS 12.png\",\n      \"minimum-system-version\" : \"12.0\",\n      \"orientation\" : \"landscape\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"2436h\",\n      \"filename\" : \"Default-1125h.png\",\n      \"minimum-system-version\" : \"11.0\",\n      \"orientation\" : \"portrait\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"2436h\",\n      \"filename\" : \"Default-Landscape-X.png\",\n      \"minimum-system-version\" : \"11.0\",\n      \"orientation\" : \"landscape\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"736h\",\n      \"filename\" : \"Default-736h@3x.png\",\n      \"minimum-system-version\" : \"8.0\",\n      \"orientation\" : \"portrait\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"736h\",\n      \"filename\" : \"Default-Landscape@3x.png\",\n      \"minimum-system-version\" : \"8.0\",\n      \"orientation\" : \"landscape\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"667h\",\n      \"filename\" : \"Default-667h@2x.png\",\n      \"minimum-system-version\" : \"8.0\",\n      \"orientation\" : \"portrait\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Default@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"minimum-system-version\" : \"7.0\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"retina4\",\n      \"filename\" : \"Default-568h@2x.png\",\n      \"minimum-system-version\" : \"7.0\",\n      \"orientation\" : \"portrait\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Portrait.png\",\n      \"extent\" : \"full-screen\",\n      \"minimum-system-version\" : \"7.0\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Landscape.png\",\n      \"extent\" : \"full-screen\",\n      \"minimum-system-version\" : \"7.0\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Portrait@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"minimum-system-version\" : \"7.0\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Landscape@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"minimum-system-version\" : \"7.0\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Default.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Default@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Default-568h@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"subtype\" : \"retina4\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"extent\" : \"to-status-bar\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Portrait.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"extent\" : \"to-status-bar\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Landscape.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"extent\" : \"to-status-bar\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Portrait@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"extent\" : \"to-status-bar\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Landscape@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"2x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchScreen-AspectFill.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchScreen-AspectFill@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchScree.AspectFill@3x.png\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchScreen-Center.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchScreen-Center@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchScreen.Center@3x.png\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo-ng/App_Resources/iOS/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIRequiresFullScreen</key>\n\t<true/>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "demo-ng/App_Resources/iOS/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"13771\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <device id=\"retina5_9\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13772\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"Llm-lL-Icb\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"xb3-aO-Qok\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"812\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" image=\"LaunchScreen.AspectFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"wtH-rr-YfP\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"812\"/>\n                            </imageView>\n                            <imageView userInteractionEnabled=\"NO\" contentMode=\"center\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" image=\"LaunchScreen.Center\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"s1z-aa-wYv\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"150\" width=\"375\" height=\"512\"/>\n                            </imageView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"s1z-aa-wYv\" secondAttribute=\"trailing\" id=\"4Rf-kf-vql\"/>\n                            <constraint firstAttribute=\"bottom\" secondItem=\"wtH-rr-YfP\" secondAttribute=\"bottom\" id=\"5CS-At-4ka\"/>\n                            <constraint firstItem=\"wtH-rr-YfP\" firstAttribute=\"top\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"top\" id=\"Awn-b8-xf1\"/>\n                            <constraint firstItem=\"s1z-aa-wYv\" firstAttribute=\"leading\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"leading\" id=\"BpJ-vb-eKA\"/>\n                            <constraint firstItem=\"s1z-aa-wYv\" firstAttribute=\"trailing\" secondItem=\"wtH-rr-YfP\" secondAttribute=\"trailing\" id=\"QIM-7J-OZz\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"wtH-rr-YfP\" secondAttribute=\"trailing\" id=\"RXg-rW-UK8\"/>\n                            <constraint firstItem=\"s1z-aa-wYv\" firstAttribute=\"centerY\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"centerY\" id=\"Rcp-LG-48z\"/>\n                            <constraint firstItem=\"wtH-rr-YfP\" firstAttribute=\"leading\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"leading\" id=\"cch-8E-tYu\"/>\n                        </constraints>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"509.60000000000002\" y=\"237.93103448275863\"/>\n        </scene>\n    </scenes>\n    <resources>\n        <image name=\"LaunchScreen.AspectFill\" width=\"768\" height=\"1024\"/>\n        <image name=\"LaunchScreen.Center\" width=\"384\" height=\"512\"/>\n    </resources>\n</document>\n"
  },
  {
    "path": "demo-ng/App_Resources/iOS/build.xcconfig",
    "content": "// You can add custom settings here\n// for example you can uncomment the following line to force distribution code signing\n// CODE_SIGN_IDENTITY = iPhone Distribution \n// To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html\n// DEVELOPMENT_TEAM = YOUR_TEAM_ID;\nASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\nASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;\n"
  },
  {
    "path": "demo-ng/README.md",
    "content": "# NativeScript Angular Template\n\nThis template creates a \"Hello, world\" NativeScript app using TypeScript and Angular.\n\nYou can create a new app that uses this template with either the `--template` option.\n\n```\ntns create my-app-name --template tns-template-hello-world-ng\n```\n\nOr the `--ng` shorthand.\n\n```\ntns create my-app-name --ng\n```\n\n> Note: Both commands will create a new NativeScript app that uses the latest version of this template published to [npm] (https://www.npmjs.com/package/tns-template-hello-world-ng).\n\nIf you want to create a new app that uses the source of the template from the `master` branch, you can execute the following:\n\n```\ntns create my-app-name --template https://github.com/NativeScript/template-hello-world-ng.git#master\n```\n\n**NB:** Please, have in mind that the master branch may refer to dependencies that are not on NPM yet!\n\n# Issues\n\nIssues related to `template-hello-world-ng` template should be logged in the https://github.com/NativeScript/NativeScript repository.\n"
  },
  {
    "path": "demo-ng/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"newProjectRoot\": \"projects\",\n  \"cli\": {\n    \"defaultCollection\": \"@nativescript/schematics\"\n  },\n  \"projects\": {\n    \"hello-world\": {\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"projectType\": \"application\",\n      \"prefix\": \"ns\"\n    }\n  },\n  \"defaultProject\": \"hello-world\"\n}\n"
  },
  {
    "path": "demo-ng/nsconfig.json",
    "content": "{\n  \"appResourcesPath\": \"App_Resources\",\n  \"appPath\": \"src\"\n}\n"
  },
  {
    "path": "demo-ng/package.json",
    "content": "{\n    \"nativescript\": {\n        \"id\": \"org.nativescript.demong\",\n        \"tns-android\": {\n            \"version\": \"5.1.0\"\n        },\n        \"tns-ios\": {\n            \"version\": \"5.1.0\"\n        }\n    },\n    \"description\": \"NativeScript Application\",\n    \"license\": \"SEE LICENSE IN <your-license-filename>\",\n    \"repository\": \"<fill-your-repository-here>\",\n    \"dependencies\": {\n        \"@angular/animations\": \"~7.1.0\",\n        \"@angular/common\": \"~7.1.0\",\n        \"@angular/compiler\": \"~7.1.0\",\n        \"@angular/core\": \"~7.1.0\",\n        \"@angular/forms\": \"~7.1.0\",\n        \"@angular/http\": \"~7.1.0\",\n        \"@angular/platform-browser\": \"~7.1.0\",\n        \"@angular/platform-browser-dynamic\": \"~7.1.0\",\n        \"@angular/router\": \"~7.1.0\",\n        \"nativescript-angular\": \"~7.1.0\",\n        \"nativescript-local-notifications\": \"file:../src\",\n        \"nativescript-theme-core\": \"~1.0.4\",\n        \"reflect-metadata\": \"~0.1.8\",\n        \"rxjs\": \"~6.3.0\",\n        \"tns-core-modules\": \"~5.1.0\",\n        \"zone.js\": \"^0.8.26\"\n    },\n    \"devDependencies\": {\n        \"@nativescript/schematics\": \"~0.5.0\",\n        \"nativescript-dev-typescript\": \"libs\",\n        \"nativescript-dev-webpack\": \"~0.19.0\",\n        \"@angular/compiler-cli\": \"~7.1.0\",\n        \"@ngtools/webpack\": \"~7.1.0\"\n    },\n    \"readme\": \"NativeScript Application\"\n}\n"
  },
  {
    "path": "demo-ng/references.d.ts",
    "content": "/// <reference path=\"./node_modules/tns-platform-declarations/ios.d.ts\" />\n/// <reference path=\"./node_modules/tns-platform-declarations/android.d.ts\" />\n/// <reference path=\"./node_modules/nativescript-local-notifications/platforms/ios/typings/objc!LocalNotificationsPlugin.d.ts\" />"
  },
  {
    "path": "demo-ng/src/app/app-routing.module.ts",
    "content": "import { NgModule } from \"@angular/core\";\nimport { Routes } from \"@angular/router\";\nimport { NativeScriptRouterModule } from \"nativescript-angular/router\";\n\nimport { ItemsComponent } from \"./item/items.component\";\n\nconst routes: Routes = [\n  {path: \"\", redirectTo: \"/items\", pathMatch: \"full\"},\n  {path: \"items\", component: ItemsComponent}\n];\n\n@NgModule({\n  imports: [NativeScriptRouterModule.forRoot(routes)],\n  exports: [NativeScriptRouterModule]\n})\nexport class AppRoutingModule {\n}"
  },
  {
    "path": "demo-ng/src/app/app.component.html",
    "content": "<!-- https://docs.nativescript.org/angular/core-concepts/angular-navigation.html#page-router-outlet -->\n<page-router-outlet></page-router-outlet>\n"
  },
  {
    "path": "demo-ng/src/app/app.component.ts",
    "content": "import { Component } from \"@angular/core\";\n\n@Component({\n    selector: \"ns-app\",\n    moduleId: module.id,\n    templateUrl: \"./app.component.html\",\n})\nexport class AppComponent { }\n"
  },
  {
    "path": "demo-ng/src/app/app.module.ts",
    "content": "import { NgModule, NO_ERRORS_SCHEMA } from \"@angular/core\";\nimport { NativeScriptModule } from \"nativescript-angular/nativescript.module\";\n\nimport { AppRoutingModule } from \"./app-routing.module\";\nimport { AppComponent } from \"./app.component\";\nimport { ItemsComponent } from \"./item/items.component\";\n\n// Uncomment and add to NgModule imports if you need to use two-way binding\n// import { NativeScriptFormsModule } from \"nativescript-angular/forms\";\n\n// Uncomment and add to NgModule imports if you need to use the HttpClient wrapper\n// import { NativeScriptHttpClientModule } from \"nativescript-angular/http-client\";\n\n@NgModule({\n  bootstrap: [\n    AppComponent\n  ],\n  imports: [\n    NativeScriptModule,\n    AppRoutingModule\n  ],\n  declarations: [\n    AppComponent,\n    ItemsComponent\n  ],\n  providers: [],\n  schemas: [\n    NO_ERRORS_SCHEMA\n  ]\n})\n\nexport class AppModule {\n}\n"
  },
  {
    "path": "demo-ng/src/app/item/items.component.html",
    "content": "<!--\nThe template defines the view of the component - what is actually rendered.\nIn NativeScript applications the template is defined with XML using NativeScript UI elements.\nIt is different from HTML. So instead of <input>, <span>, <div> etc. - we have <TextField>, <Label> and layouts.\nThe important thing is that although the elements are different - all of the Angular’s template syntax works exactly the same.\nSo you can still use template expressions, bindings, templates as well as all the built-in directives.\n-->\n\n<!--\nThe ActionBar is the NativeScript common abstraction over the Android ActionBar and iOS NavigationBar.\nhttp://docs.nativescript.org/ui/action-bar\n-->\n<ActionBar title=\"My App\" class=\"action-bar\">\n</ActionBar>\n\n<!--\nThe StackLayout stacks UI components on the screen — either vertically or horizontally.\nIn this case, the StackLayout does vertical stacking; you can change the stacking to\nhorizontal by applying a orientation=\"horizontal\" attribute to the <StackLayout> element.\nYou can learn more about NativeScript layouts at https://docs.nativescript.org/ui/layout-containers.\n\nThese components make use of several CSS class names that are part of the NativeScript\ncore theme, such as p-20, btn, h2, and list-group. You can view a full list of the\nclass names available for styling your app at https://docs.nativescript.org/ui/theme.\n-->\n<StackLayout class=\"page\">\n  <Button (tap)=\"schedule()\" text=\"Schedule\"></Button>\n</StackLayout>\n"
  },
  {
    "path": "demo-ng/src/app/item/items.component.ts",
    "content": "import { Component } from \"@angular/core\";\nimport { LocalNotifications } from \"nativescript-local-notifications\";\n\n@Component({\n  selector: \"ns-items\",\n  moduleId: module.id,\n  templateUrl: \"./items.component.html\",\n})\nexport class ItemsComponent {\n\n  constructor() {\n    LocalNotifications.addOnMessageReceivedCallback(notificationData => {\n      console.log(\"Notification received: \" + JSON.stringify(notificationData));\n    });\n  }\n\n  schedule(): void {\n    LocalNotifications.schedule(\n        [{\n          id: 5,\n          thumbnail: true,\n          title: 'Richard wants your input',\n          body: '\"Hey man, what do you think of the new design?\" (swipe down to reply, or tap to open the app)',\n          forceShowWhenInForeground: true,\n          at: new Date(new Date().getTime() + 10 * 1000),\n          actions: [\n            {\n              id: \"input-richard\",\n              type: \"input\",\n              title: \"Tap here to reply\",\n              placeholder: \"Type to reply..\",\n              submitLabel: \"Reply\",\n              launch: true,\n              editable: true,\n              // choices: [\"Red\", \"Yellow\", \"Green\"] // TODO Android only, but yet to see it in action\n            }\n          ]\n        }])\n        .then(() => {\n          alert({\n            title: \"Notification scheduled\",\n            message: \"ID: 5\",\n            okButtonText: \"OK, thanks\"\n          });\n        })\n        .catch(error => console.log(\"doScheduleId5WithInput error: \" + error));\n  }\n}"
  },
  {
    "path": "demo-ng/src/app.css",
    "content": "/*\nIn NativeScript, the app.css file is where you place CSS rules that\nyou would like to apply to your entire application. Check out\nhttp://docs.nativescript.org/ui/styling for a full list of the CSS\nselectors and properties you can use to style UI components.\n\n/*\nIn many cases you may want to use the NativeScript core theme instead\nof writing your own CSS rules. For a full list of class names in the theme\nrefer to http://docs.nativescript.org/ui/theme.\n*/\n@import '~nativescript-theme-core/css/core.light.css';\n"
  },
  {
    "path": "demo-ng/src/main.ts",
    "content": "// this import should be first in order to load some required settings (like globals and reflect-metadata)\nimport { platformNativeScriptDynamic } from \"nativescript-angular/platform\";\n\nimport { AppModule } from \"./app/app.module\";\n\n// Add this so for iOS 10+ we can do some wiring (set the iOS UNUserNotificationCenter delegate, to be precise).\n// Not needed if your app loads the plugin on startup anyway.\n// You'll know you need this if on iOS 10+ notifications are not received by your app.\nrequire (\"nativescript-local-notifications\");\n\n// A traditional NativeScript application starts by initializing global objects, setting up global CSS rules, creating, and navigating to the main page.\n// Angular applications need to take care of their own initialization: modules, components, directives, routes, DI providers.\n// A NativeScript Angular app needs to make both paradigms work together, so we provide a wrapper platform object, platformNativeScriptDynamic,\n// that sets up a NativeScript application and can bootstrap the Angular framework.\nplatformNativeScriptDynamic().bootstrapModule(AppModule);\n"
  },
  {
    "path": "demo-ng/src/package.json",
    "content": "{\n    \"main\": \"main.js\",\n    \"android\": {\n        \"v8Flags\": \"--expose_gc\"\n    }\n}"
  },
  {
    "path": "demo-ng/tsconfig.json",
    "content": "{\n    \"compilerOptions\": {\n        \"module\": \"commonjs\",\n        \"target\": \"es5\",\n        \"experimentalDecorators\": true,\n        \"emitDecoratorMetadata\": true,\n        \"noEmitHelpers\": true,\n        \"noEmitOnError\": true,\n        \"lib\": [\n            \"es6\",\n            \"dom\",\n            \"es2015.iterable\"\n        ],\n        \"baseUrl\": \".\",\n        \"paths\": {\n            \"~/*\": [\n                \"src/*\"\n            ],\n            \"*\": [\n                \"./node_modules/tns-core-modules/*\",\n                \"./node_modules/*\"\n            ]\n        }\n    },\n    \"exclude\": [\n        \"node_modules\",\n        \"platforms\"\n    ]\n}"
  },
  {
    "path": "demo-ng/tsconfig.tns.json",
    "content": "{\n    \"extends\": \"./tsconfig\",\n    \"compilerOptions\": {\n        \"module\": \"es2015\",\n        \"moduleResolution\": \"node\"\n    }\n}\n"
  },
  {
    "path": "demo-vue/.gitignore",
    "content": "# JetBrains project files\n.idea\n\n# NPM\nnode_modules\n\n# NativeScript application\nhooks\nplatforms\n"
  },
  {
    "path": "demo-vue/README.md",
    "content": "# Local Notifications\n\n> Vue demo app for the Local Notifications plugin\n\n## Usage\n\n``` bash\n# Install dependencies\nnpm install\n\n# Build for production\ntns build <platform> --bundle\n\n# Build, watch for changes and debug the application\ntns debug <platform> --bundle\n\n# Build, watch for changes and run the application\ntns run <platform> --bundle\n```"
  },
  {
    "path": "demo-vue/app/App_Resources/Android/app.gradle",
    "content": "// Add your native dependencies here:\n\nandroid {\n  defaultConfig {  \n    generatedDensities = []\n    applicationId = \"org.nativescript.plugindemo.vue.localnotifications\"\n  }\n  aaptOptions {  \n    additionalParameters \"--no-version-vectors\"  \n  }  \n} \n"
  },
  {
    "path": "demo-vue/app/App_Resources/Android/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest\n    xmlns:android=\"http://schemas.android.com/apk/res/android\" package=\"__PACKAGE__\" android:versionCode=\"10000\" android:versionName=\"1.0.0\">\n    <supports-screens android:smallScreens=\"true\" android:normalScreens=\"true\" android:largeScreens=\"true\" android:xlargeScreens=\"true\" />\n    <uses-sdk android:minSdkVersion=\"21\" android:targetSdkVersion=\"__APILEVEL__\" />\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n    <uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />\n    <application android:name=\"com.tns.NativeScriptApplication\" android:allowBackup=\"true\" android:icon=\"@drawable/icon\" android:label=\"@string/app_name\" android:theme=\"@style/AppTheme\">\n        <activity android:name=\"com.tns.NativeScriptActivity\" android:label=\"@string/title_activity_kimera\" android:configChanges=\"keyboardHidden|orientation|screenSize\" android:theme=\"@style/LaunchScreenTheme\">\n            <meta-data android:name=\"SET_THEME_ON_LAUNCH\" android:resource=\"@style/AppTheme\" />\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n        <activity android:name=\"com.tns.ErrorReportActivity\" />\n    </application>\n</manifest>"
  },
  {
    "path": "demo-vue/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml",
    "content": "<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\" android:gravity=\"fill\">\n    <item>\n        <bitmap android:gravity=\"fill\" android:src=\"@drawable/background\" />\n    </item>\n    <item>\n        <bitmap android:gravity=\"center\" android:src=\"@drawable/logo\" />\n    </item>\n</layer-list>"
  },
  {
    "path": "demo-vue/app/App_Resources/Android/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"ns_primary\">#F5F5F5</color>\n    <color name=\"ns_primaryDark\">#53ba82</color>\n    <color name=\"ns_accent\">#33B5E5</color>\n    <color name=\"ns_blue\">#272734</color>\n</resources>\n"
  },
  {
    "path": "demo-vue/app/App_Resources/Android/src/main/res/values/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string name=\"app_name\">Local Notifications</string>\n    <string name=\"title_activity_kimera\">Local Notifications</string>\n</resources>\n"
  },
  {
    "path": "demo-vue/app/App_Resources/Android/src/main/res/values/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <!-- theme to use FOR launch screen-->\n    <style name=\"LaunchScreenThemeBase\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n        <item name=\"toolbarStyle\">@style/NativeScriptToolbarStyle</item>\n\n        <item name=\"colorPrimary\">@color/ns_primary</item>\n        <item name=\"colorPrimaryDark\">@color/ns_primaryDark</item>\n        <item name=\"colorAccent\">@color/ns_accent</item>\n\n        <item name=\"android:windowBackground\">@drawable/splash_screen</item>\n        \n        <item name=\"android:windowActionBarOverlay\">true</item>  \n        <item name=\"android:windowTranslucentStatus\">true</item>\n    </style>\n\n    <style name=\"LaunchScreenTheme\" parent=\"LaunchScreenThemeBase\">\n    </style>\n\n    <!-- theme to use AFTER launch screen is loaded-->\n    <style name=\"AppThemeBase\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n        <item name=\"toolbarStyle\">@style/NativeScriptToolbarStyle</item>\n\n        <item name=\"colorPrimary\">@color/ns_primary</item>\n        <item name=\"colorPrimaryDark\">@color/ns_primaryDark</item>\n        <item name=\"colorAccent\">@color/ns_accent</item>\n    </style>\n\n    <style name=\"AppTheme\" parent=\"AppThemeBase\">\n    </style>\n\n    <!-- theme for actioon-bar -->\n    <style name=\"NativeScriptToolbarStyleBase\" parent=\"Widget.AppCompat.Toolbar\">\n        <item name=\"android:background\">@color/ns_primary</item>\n        <item name=\"theme\">@style/ThemeOverlay.AppCompat.ActionBar</item>\n        <item name=\"popupTheme\">@style/ThemeOverlay.AppCompat</item>\n    </style>\n\n    <style name=\"NativeScriptToolbarStyle\" parent=\"NativeScriptToolbarStyleBase\">\n    </style>\n</resources>\n"
  },
  {
    "path": "demo-vue/app/App_Resources/Android/src/main/res/values-v21/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\t<color name=\"ns_accent\">#3d5afe</color>\n</resources>"
  },
  {
    "path": "demo-vue/app/App_Resources/Android/src/main/res/values-v21/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string name=\"app_name\">Local Notifications</string>\n    <string name=\"title_activity_kimera\">Local Notifications</string>\n</resources>\n"
  },
  {
    "path": "demo-vue/app/App_Resources/Android/src/main/res/values-v21/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <!-- Application theme -->\n    <style name=\"AppTheme\" parent=\"AppThemeBase\">\n        <item name=\"android:datePickerStyle\">@style/SpinnerDatePicker</item>\n        <item name=\"android:timePickerStyle\">@style/SpinnerTimePicker</item>\n    </style>\n\n    <!-- Default style for DatePicker - in spinner mode -->\n    <style name=\"SpinnerDatePicker\" parent=\"android:Widget.Material.Light.DatePicker\">\n        <item name=\"android:datePickerMode\">spinner</item>\n    </style>\n\n    <!-- Default style for TimePicker - in spinner mode -->\n    <style name=\"SpinnerTimePicker\" parent=\"android:Widget.Material.Light.TimePicker\">\n        <item name=\"android:timePickerMode\">spinner</item>\n    </style>\n\n    <style name=\"NativeScriptToolbarStyle\" parent=\"NativeScriptToolbarStyleBase\">\n        <item name=\"android:elevation\">4dp</item>\n    </style>\n</resources>"
  },
  {
    "path": "demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-29.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-29@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-29@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-40@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-40@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-60@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"icon-60@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-29.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-29@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-40.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-40@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"76x76\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-76.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"76x76\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-76@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"83.5x83.5\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"icon-83.5@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"1024x1024\",\n      \"idiom\" : \"ios-marketing\",\n      \"filename\" : \"icon-1024.png\",\n      \"scale\" : \"1x\"\n    } \n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo-vue/app/App_Resources/iOS/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"2436h\",\n      \"filename\" : \"Default-1125h.png\",\n      \"minimum-system-version\" : \"11.0\",\n      \"orientation\" : \"portrait\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"iphone\",\n      \"extent\" : \"full-screen\",\n      \"filename\" : \"Default-Landscape-X.png\",\n      \"minimum-system-version\" : \"11.0\",\n      \"subtype\" : \"2436h\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"736h\",\n      \"filename\" : \"Default-736h@3x.png\",\n      \"minimum-system-version\" : \"8.0\",\n      \"orientation\" : \"portrait\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"736h\",\n      \"filename\" : \"Default-Landscape@3x.png\",\n      \"minimum-system-version\" : \"8.0\",\n      \"orientation\" : \"landscape\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"667h\",\n      \"filename\" : \"Default-667h@2x.png\",\n      \"minimum-system-version\" : \"8.0\",\n      \"orientation\" : \"portrait\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Default@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"minimum-system-version\" : \"7.0\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"extent\" : \"full-screen\",\n      \"idiom\" : \"iphone\",\n      \"subtype\" : \"retina4\",\n      \"filename\" : \"Default-568h@2x.png\",\n      \"minimum-system-version\" : \"7.0\",\n      \"orientation\" : \"portrait\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Portrait.png\",\n      \"extent\" : \"full-screen\",\n      \"minimum-system-version\" : \"7.0\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Landscape.png\",\n      \"extent\" : \"full-screen\",\n      \"minimum-system-version\" : \"7.0\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Portrait@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"minimum-system-version\" : \"7.0\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Landscape@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"minimum-system-version\" : \"7.0\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Default.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Default@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Default-568h@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"subtype\" : \"retina4\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"extent\" : \"to-status-bar\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Portrait.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"extent\" : \"to-status-bar\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Landscape.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"extent\" : \"to-status-bar\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"portrait\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Portrait@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"extent\" : \"to-status-bar\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"orientation\" : \"landscape\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Default-Landscape@2x.png\",\n      \"extent\" : \"full-screen\",\n      \"scale\" : \"2x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchScreen-AspectFill.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchScreen-AspectFill@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchScreen-Center.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchScreen-Center@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo-vue/app/App_Resources/iOS/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>Local Notifications</string>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0.0</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIRequiresFullScreen</key>\n\t<true/>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "demo-vue/app/App_Resources/iOS/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"10116\" systemVersion=\"15F34\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"10085\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"Llm-lL-Icb\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"xb3-aO-Qok\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"600\" height=\"600\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" image=\"LaunchScreen.AspectFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"wtH-rr-YfP\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"600\" height=\"600\"/>\n                            </imageView>\n                            <imageView userInteractionEnabled=\"NO\" contentMode=\"center\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" image=\"LaunchScreen.Center\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"s1z-aa-wYv\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"600\" height=\"600\"/>\n                            </imageView>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>\n                        <constraints>\n                            <constraint firstItem=\"xb3-aO-Qok\" firstAttribute=\"top\" secondItem=\"wtH-rr-YfP\" secondAttribute=\"bottom\" id=\"5FO-pR-qKb\"/>\n                            <constraint firstItem=\"wtH-rr-YfP\" firstAttribute=\"top\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"top\" id=\"Awn-b8-xf1\"/>\n                            <constraint firstItem=\"s1z-aa-wYv\" firstAttribute=\"top\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"top\" id=\"CiP-yX-1sg\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"wtH-rr-YfP\" secondAttribute=\"trailing\" id=\"RXg-rW-UK8\"/>\n                            <constraint firstItem=\"s1z-aa-wYv\" firstAttribute=\"leading\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"leading\" id=\"agC-wa-3bd\"/>\n                            <constraint firstItem=\"wtH-rr-YfP\" firstAttribute=\"leading\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"leading\" id=\"cch-8E-tYu\"/>\n                            <constraint firstItem=\"xb3-aO-Qok\" firstAttribute=\"top\" secondItem=\"s1z-aa-wYv\" secondAttribute=\"bottom\" id=\"fNc-Ro-KaG\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"s1z-aa-wYv\" secondAttribute=\"trailing\" id=\"qoI-OC-Zk7\"/>\n                        </constraints>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"510\" y=\"238\"/>\n        </scene>\n    </scenes>\n    <resources>\n        <image name=\"LaunchScreen.AspectFill\" width=\"768\" height=\"1024\"/>\n        <image name=\"LaunchScreen.Center\" width=\"40\" height=\"40\"/>\n    </resources>\n</document>\n"
  },
  {
    "path": "demo-vue/app/App_Resources/iOS/build.xcconfig",
    "content": "// You can add custom settings here\n// for example you can uncomment the following line to force distribution code signing\n// CODE_SIGN_IDENTITY = iPhone Distribution \n// To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html\n// DEVELOPMENT_TEAM = YOUR_TEAM_ID;\nASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\nASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;\n"
  },
  {
    "path": "demo-vue/app/app.scss",
    "content": "// NativeScript core theme\n// @see https://docs.nativescript.org/ui/theme\n@import '~nativescript-theme-core/scss/dark';\n\n// Override variables here\n\n@import '~nativescript-theme-core/scss/index';\n\n// Global SCSS styling\n// @see https://docs.nativescript.org/ui/styling\n"
  },
  {
    "path": "demo-vue/app/components/App.vue",
    "content": "<template>\n  <Page>\n    <ActionBar title=\"Local Notifications demo\"></ActionBar>\n\n    <StackLayout>\n      <Button @tap=\"onTapHasPermission\" class=\"btn\" text=\"Has Permission?\"></Button>\n      <Button @tap=\"onTapScheduleNotification\" class=\"btn\" text=\"Schedule Notification\"></Button>\n      <Button @tap=\"onTapCancelAll\" class=\"btn\" text=\"Cancel notifications\"></Button>\n      <Label class=\"message\" :text=\"message\" textWrap=\"true\"></Label>\n    </StackLayout>\n  </Page>\n</template>\n\n<script>\n  import { alert } from \"tns-core-modules/ui/dialogs\";\n  import { Color } from \"tns-core-modules/color\";\n  import { LocalNotifications } from \"nativescript-local-notifications\";\n\n  export default {\n    created() {\n      LocalNotifications.addOnMessageReceivedCallback(notificationData => {\n        this.message = \"Notification received: \" + JSON.stringify(notificationData);\n      });\n    },\n\n    data() {\n      return {\n        message: \"Tap a button above..\"\n      }\n    },\n\n    methods: {\n      onTapHasPermission() {\n        LocalNotifications.hasPermission()\n            .then(granted => {\n              alert({\n                title: \"Permission granted?\",\n                message: granted ? \"YES\" : \"NO\",\n                okButtonText: \"OK\"\n              });\n            });\n      },\n\n      onTapScheduleNotification() {\n        LocalNotifications.schedule(\n            [{\n              id: 1,\n              title: 'Would you like a Red Alert poster?',\n              subtitle: 'This poster is awesome!',\n              body: 'The big brown Vue app jumped over the lazy Angular app. The big brown Vue app jumped over the lazy Angular app. The big brown Vue app jumped over the lazy Angular app. The big brown Vue app jumped over the lazy Angular app.',\n              bigTextStyle: false, // Allow more than 1 row of the 'body' text on Android, but setting this to true denies showing the 'image'\n              color: new Color(\"green\"),\n              image: \"https://images-na.ssl-images-amazon.com/images/I/61mx-VbrS0L.jpg\",\n              thumbnail: \"https://2.bp.blogspot.com/-H_SZ3nAmNsI/VrJeARpbuSI/AAAAAAAABfc/szsV7_F609k/s200/emoji.jpg\",\n              forceShowWhenInForeground: true,\n              channel: \"vue-channel\",\n              ticker: \"Special ticker text for Vue (Android only)\",\n              at: new Date(new Date().getTime() + (5 * 1000)), // 5 seconds from now\n              actions: [\n                {\n                  id: \"yes\",\n                  type: \"button\",\n                  title: \"Yes (and launch app)\",\n                  launch: true\n                },\n                {\n                  id: \"no\",\n                  type: \"button\",\n                  title: \"No\",\n                  launch: false\n                }\n              ]\n            }])\n            .then(() => {\n              alert({\n                title: \"Notification scheduled\",\n                message: \"ID: 1\",\n                okButtonText: \"OK, thanks\"\n              });\n            })\n            .catch(error => console.log(\"doSchedule error: \" + error));\n      },\n\n      onTapCancelAll() {\n        LocalNotifications.cancelAll()\n            .then(() => {\n              alert({\n                title: \"All canceled\",\n                okButtonText: \"Awesome!\"\n              });\n            })\n            .catch(error => console.log(\"doCancelAll error: \" + error));\n      }\n    }\n  }\n</script>\n\n<style scoped>\n  ActionBar {\n    background-color: #53ba82;\n    color: #ffffff;\n  }\n\n  .message {\n    font-size: 14;\n    margin: 16;\n    color: #53ba82;\n  }\n\n  Button.btn {\n    font-size: 14;\n    border-radius: 3;\n    border-width: 2;\n    border-color: #63d4a5;\n    color: #63d4a5;\n    padding: 12;\n    margin: 16;\n  }\n</style>\n"
  },
  {
    "path": "demo-vue/app/fonts/.gitkeep",
    "content": ""
  },
  {
    "path": "demo-vue/app/main.js",
    "content": "import Vue from 'nativescript-vue'\nimport App from './components/App'\n\nrequire (\"nativescript-local-notifications\");\n\n// Prints Vue logs when --env.production is *NOT* set while building\nVue.config.silent = (TNS_ENV === 'production')\n\n\nnew Vue({\n  render: h => h('frame', [h(App)])\n}).$start()\n"
  },
  {
    "path": "demo-vue/app/package.json",
    "content": "{\n  \"android\": {\n    \"v8Flags\": \"--expose_gc\"\n  },\n  \"main\": \"main\",\n  \"name\": \"demo-vue\",\n  \"version\": \"1.0.0\"\n}\n"
  },
  {
    "path": "demo-vue/package.json",
    "content": "{\n  \"name\": \"demo-vue\",\n  \"version\": \"1.0.0\",\n  \"description\": \"Vue demo app for the Local Notifications plugin\",\n  \"author\": \"EddyVerbruggen <eddyverbruggen@gmail.com>\",\n  \"license\": \"MIT\",\n  \"nativescript\": {\n    \"id\": \"org.nativescript.plugindemo.vue.localnotifications\",\n    \"tns-ios\": {\n      \"version\": \"5.1.0\"\n    },\n    \"tns-android\": {\n      \"version\": \"5.1.0\"\n    }\n  },\n  \"dependencies\": {\n    \"nativescript-local-notifications\": \"file:../src\",\n    \"nativescript-theme-core\": \"^1.0.4\",\n    \"nativescript-vue\": \"^2.0.0\",\n    \"tns-core-modules\": \"~5.1.0\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.0.0\",\n    \"@babel/preset-env\": \"^7.0.0\",\n    \"babel-loader\": \"^8.0.2\",\n    \"babel-traverse\": \"6.26.0\",\n    \"babel-types\": \"6.26.0\",\n    \"babylon\": \"6.18.0\",\n    \"clean-webpack-plugin\": \"^0.1.19\",\n    \"copy-webpack-plugin\": \"^4.5.2\",\n    \"css-loader\": \"^1.0.0\",\n    \"lazy\": \"1.0.11\",\n    \"nativescript-dev-webpack\": \"next\",\n    \"nativescript-vue-template-compiler\": \"^2.0.0\",\n    \"nativescript-worker-loader\": \"~0.9.0\",\n    \"node-sass\": \"^4.9.2\",\n    \"sass-loader\": \"^7.1.0\",\n    \"terser-webpack-plugin\": \"^1.1.0\",\n    \"typescript\": \"~3.1.6\",\n    \"vue-loader\": \"^15.2.6\",\n    \"webpack\": \"^4.16.4\",\n    \"webpack-bundle-analyzer\": \"~3.6.0\",\n    \"webpack-cli\": \"^3.1.0\"\n  }\n}\n"
  },
  {
    "path": "native-src/android/.gitattributes",
    "content": "* -crlf"
  },
  {
    "path": "native-src/android/.gitignore",
    "content": "out/\r\n.idea/\r\n.gradle/\r\nlocal.properties\r\nbuild/"
  },
  {
    "path": "native-src/android/README.md",
    "content": "# Local Notifications Plugin library for NativeScript Android apps\n\n## Building the framework\n- Open this folder as \"an existing project\" in Android Studio\n- Change anything needed\n- In the Gradle build window run `app > Tasks > build > clean` and `app > Tasks > build > build`\n- Copy the release .aar: from the plugin project root, run: `cp native-src/android/app/build/outputs/aar/app-release.aar src/platforms/android/` \n"
  },
  {
    "path": "native-src/android/android.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module external.linked.project.id=\"android\" external.linked.project.path=\"$MODULE_DIR$\" external.root.project.path=\"$MODULE_DIR$\" external.system.id=\"GRADLE\" type=\"JAVA_MODULE\" version=\"4\">\n  <component name=\"FacetManager\">\n    <facet type=\"java-gradle\" name=\"Java-Gradle\">\n      <configuration>\n        <option name=\"BUILD_FOLDER_PATH\" value=\"$MODULE_DIR$/build\" />\n        <option name=\"BUILDABLE\" value=\"false\" />\n      </configuration>\n    </facet>\n  </component>\n  <component name=\"NewModuleRootManager\" LANGUAGE_LEVEL=\"JDK_1_7\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <excludeFolder url=\"file://$MODULE_DIR$/.gradle\" />\n    </content>\n    <orderEntry type=\"inheritedJdk\" />\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n  </component>\n</module>"
  },
  {
    "path": "native-src/android/app/.gitignore",
    "content": "/build\r\n"
  },
  {
    "path": "native-src/android/app/app.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module external.linked.project.id=\":app\" external.linked.project.path=\"$MODULE_DIR$\" external.root.project.path=\"$MODULE_DIR$/..\" external.system.id=\"GRADLE\" type=\"JAVA_MODULE\" version=\"4\">\n  <component name=\"FacetManager\">\n    <facet type=\"android-gradle\" name=\"Android-Gradle\">\n      <configuration>\n        <option name=\"GRADLE_PROJECT_PATH\" value=\":app\" />\n        <option name=\"LAST_SUCCESSFUL_SYNC_AGP_VERSION\" value=\"3.4.1\" />\n        <option name=\"LAST_KNOWN_AGP_VERSION\" value=\"3.4.1\" />\n      </configuration>\n    </facet>\n    <facet type=\"android\" name=\"Android\">\n      <configuration>\n        <option name=\"SELECTED_BUILD_VARIANT\" value=\"debug\" />\n        <option name=\"ASSEMBLE_TASK_NAME\" value=\"assembleDebug\" />\n        <option name=\"COMPILE_JAVA_TASK_NAME\" value=\"compileDebugSources\" />\n        <afterSyncTasks>\n          <task>generateDebugSources</task>\n        </afterSyncTasks>\n        <option name=\"ALLOW_USER_CONFIGURATION\" value=\"false\" />\n        <option name=\"MANIFEST_FILE_RELATIVE_PATH\" value=\"/src/main/AndroidManifest.xml\" />\n        <option name=\"RES_FOLDER_RELATIVE_PATH\" value=\"/src/main/res\" />\n        <option name=\"RES_FOLDERS_RELATIVE_PATH\" value=\"file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/build/generated/res/resValues/debug\" />\n        <option name=\"TEST_RES_FOLDERS_RELATIVE_PATH\" value=\"\" />\n        <option name=\"ASSETS_FOLDER_RELATIVE_PATH\" value=\"/src/main/assets\" />\n        <option name=\"PROJECT_TYPE\" value=\"1\" />\n      </configuration>\n    </facet>\n  </component>\n  <component name=\"NewModuleRootManager\" LANGUAGE_LEVEL=\"JDK_1_7\">\n    <output url=\"file://$MODULE_DIR$/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes\" />\n    <output-test url=\"file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/compileDebugUnitTestJavaWithJavac/classes\" />\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/source/apt/debug\" isTestSource=\"false\" generated=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out\" isTestSource=\"false\" generated=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/source/buildConfig/debug\" isTestSource=\"false\" generated=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out\" isTestSource=\"false\" generated=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/res/rs/debug\" type=\"java-resource\" generated=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/res/resValues/debug\" type=\"java-resource\" generated=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug\" isTestSource=\"true\" generated=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out\" isTestSource=\"true\" generated=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug\" isTestSource=\"true\" generated=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debugAndroidTest/compileDebugAndroidTestRenderscript/out\" isTestSource=\"true\" generated=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug\" type=\"java-test-resource\" generated=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug\" type=\"java-test-resource\" generated=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/build/generated/source/apt/test/debug\" isTestSource=\"true\" generated=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/debug/res\" type=\"java-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/debug/resources\" type=\"java-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/debug/assets\" type=\"java-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/debug/aidl\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/debug/java\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/debug/rs\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/debug/shaders\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTestDebug/res\" type=\"java-test-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTestDebug/resources\" type=\"java-test-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTestDebug/assets\" type=\"java-test-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTestDebug/aidl\" isTestSource=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTestDebug/java\" isTestSource=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTestDebug/rs\" isTestSource=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTestDebug/shaders\" isTestSource=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/testDebug/res\" type=\"java-test-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/testDebug/resources\" type=\"java-test-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/testDebug/assets\" type=\"java-test-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/testDebug/aidl\" isTestSource=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/testDebug/java\" isTestSource=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/testDebug/rs\" isTestSource=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/testDebug/shaders\" isTestSource=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/main/res\" type=\"java-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/main/resources\" type=\"java-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/main/assets\" type=\"java-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/main/aidl\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/main/java\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/main/rs\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/main/shaders\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTest/res\" type=\"java-test-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTest/resources\" type=\"java-test-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTest/assets\" type=\"java-test-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTest/aidl\" isTestSource=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTest/java\" isTestSource=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTest/rs\" isTestSource=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/androidTest/shaders\" isTestSource=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/test/res\" type=\"java-test-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/test/resources\" type=\"java-test-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/test/assets\" type=\"java-test-resource\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/test/aidl\" isTestSource=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/test/java\" isTestSource=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/test/rs\" isTestSource=\"true\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/src/test/shaders\" isTestSource=\"true\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/build\" />\n    </content>\n    <orderEntry type=\"jdk\" jdkName=\"Android API 28 Platform\" jdkType=\"Android SDK\" />\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.collection:collection:1.0.0@jar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.lifecycle:lifecycle-common:2.0.0@jar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.arch.core:core-common:2.0.0@jar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.annotation:annotation:1.0.0@jar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.legacy:legacy-support-v4:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.media:media:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.fragment:fragment:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.legacy:legacy-support-core-ui:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.legacy:legacy-support-core-utils:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.loader:loader:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.viewpager:viewpager:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.coordinatorlayout:coordinatorlayout:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.drawerlayout:drawerlayout:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.slidingpanelayout:slidingpanelayout:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.customview:customview:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.swiperefreshlayout:swiperefreshlayout:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.asynclayoutinflater:asynclayoutinflater:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.core:core:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.versionedparcelable:versionedparcelable:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.lifecycle:lifecycle-runtime:2.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.documentfile:documentfile:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.localbroadcastmanager:localbroadcastmanager:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.print:print:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.interpolator:interpolator:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.cursoradapter:cursoradapter:1.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.lifecycle:lifecycle-viewmodel:2.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.lifecycle:lifecycle-livedata:2.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.lifecycle:lifecycle-livedata-core:2.0.0@aar\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Gradle: androidx.arch.core:core-runtime:2.0.0@aar\" level=\"project\" />\n  </component>\n</module>"
  },
  {
    "path": "native-src/android/app/build.gradle",
    "content": "apply plugin: 'com.android.library'\r\n\r\nandroid {\r\n    compileSdkVersion 28\r\n    buildToolsVersion \"28.0.3\"\r\n\r\n    defaultConfig {\r\n        minSdkVersion 17\r\n        targetSdkVersion 28\r\n        versionCode 2\r\n        versionName \"1.1.1\"\r\n    }\r\n    buildTypes {\r\n        release {\r\n            minifyEnabled false\r\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\r\n        }\r\n    }\r\n}\r\n\r\ndependencies {\r\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\r\n    implementation 'androidx.legacy:legacy-support-v4:1.0.0'\r\n}\r\n"
  },
  {
    "path": "native-src/android/app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\r\n# By default, the flags in this file are appended to flags specified\r\n# in C:\\Users\\gprodano\\AppData\\Local\\Android\\android-sdk/tools/proguard/proguard-android.txt\r\n# You can edit the include path and order by changing the proguardFiles\r\n# directive in build.gradle.\r\n#\r\n# For more details, see\r\n#   http://developer.android.com/guide/developing/tools/proguard.html\r\n\r\n# Add any project specific keep options here:\r\n\r\n# If your project uses WebView with JS, uncomment the following\r\n# and specify the fully qualified class name to the JavaScript interface\r\n# class:\r\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\r\n#   public *;\r\n#}\r\n"
  },
  {
    "path": "native-src/android/app/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    package=\"com.telerik.localnotifications\">\r\n\r\n    <uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\" />\r\n    <uses-permission android:name=\"android.permission.WAKE_LOCK\" />\r\n\r\n    <application>\r\n        <service\r\n            android:name=\"com.telerik.localnotifications.NotificationActionReceiver\"\r\n            android:exported=\"false\" />\r\n\r\n        <receiver\r\n            android:name=\"com.telerik.localnotifications.NotificationClearedReceiver\"\r\n            android:exported=\"false\" />\r\n\r\n        <receiver\r\n            android:name=\"com.telerik.localnotifications.NotificationAlarmReceiver\"\r\n            android:exported=\"false\" />\r\n\r\n        <receiver\r\n            android:name=\"com.telerik.localnotifications.NotificationRestoreReceiver\"\r\n            android:directBootAware=\"true\"\r\n            android:exported=\"false\">\r\n            <intent-filter>\r\n                <action android:name=\"android.intent.action.LOCKED_BOOT_COMPLETED\" />\r\n                <action android:name=\"android.intent.action.BOOT_COMPLETED\" />\r\n            </intent-filter>\r\n        </receiver>\r\n    </application>\r\n\r\n</manifest>\r\n"
  },
  {
    "path": "native-src/android/app/src/main/java/com/telerik/localnotifications/Action.java",
    "content": "package com.telerik.localnotifications;\n\nimport android.content.Context;\nimport androidx.core.app.RemoteInput;\nimport android.util.Log;\n\nimport org.json.JSONArray;\nimport org.json.JSONObject;\n\nimport static com.telerik.localnotifications.LocalNotificationsPlugin.TAG;\n\n\n/**\n * Holds the icon and title components that would be used in a\n * NotificationCompat.Action object. Does not include the PendingIntent so\n * that it may be generated each time the notification is built. Necessary to\n * compensate for missing functionality in the support library.\n */\npublic final class Action {\n\n  // The id for the click action\n  public static final String CLICK_ACTION_ID = \"default_action\";\n\n  // The application context\n  private final Context context;\n\n  // The action spec\n  private final JSONObject options;\n\n  /**\n   * Structure to encapsulate a named action that can be shown as part of\n   * this notification.\n   *\n   * @param context The application context.\n   * @param options The action options.\n   */\n  Action(Context context, JSONObject options) {\n    this.context = context;\n    this.options = options;\n  }\n\n  /**\n   * Gets the ID for the action.\n   */\n  public String getId() {\n    return options.optString(\"id\", getTitle());\n  }\n\n  /**\n   * Gets the Title for the action.\n   */\n  public String getTitle() {\n    return options.optString(\"title\", \"Tap here\");\n  }\n\n  /**\n   * Gets the icon for the action.\n   */\n  public int getIcon() {\n    // TODO\n    return android.R.drawable.screen_background_dark;\n    /*\n    AssetUtil assets = AssetUtil.getInstance(context);\n    String resPath = options.optString(\"icon\");\n    int resId = assets.getResId(resPath);\n\n    if (resId == 0) {\n      resId = android.R.drawable.screen_background_dark;\n    }\n\n    return resId;\n    */\n  }\n\n  /**\n   * Gets the value of the launch flag.\n   */\n  public boolean isLaunchingApp() {\n    return options.optBoolean(\"launch\", true);\n  }\n\n  /**\n   * Gets the type for the action.\n   */\n  public boolean isWithInput() {\n    String type = options.optString(\"type\");\n    return \"input\".equals(type);\n  }\n\n  /**\n   * Gets the input config in case of the action is of type input.\n   */\n  public RemoteInput getInput() {\n    return new RemoteInput.Builder(getId())\n        .setLabel(options.optString(\"placeholder\"))\n        .setAllowFreeFormInput(options.optBoolean(\"editable\", true))\n        .setChoices(getChoices())\n        .build();\n  }\n\n  /**\n   * List of possible choices for input actions.\n   */\n  private String[] getChoices() {\n    JSONArray opts = options.optJSONArray(\"choices\");\n\n    Log.d(TAG, \"getChoices, opts: \" + opts);\n\n    if (opts == null) {\n      return null;\n    }\n\n    String[] choices = new String[opts.length()];\n\n    for (int i = 0; i < choices.length; i++) {\n      choices[i] = opts.optString(i);\n    }\n\n    Log.d(TAG, \"getChoices, choices: \" + choices);\n    Log.d(TAG, \"getChoices, choices.length: \" + choices.length);\n\n    return choices;\n  }\n\n}"
  },
  {
    "path": "native-src/android/app/src/main/java/com/telerik/localnotifications/ActionGroup.java",
    "content": "package com.telerik.localnotifications;\n\nimport android.content.Context;\nimport android.util.Log;\n\nimport org.json.JSONArray;\nimport org.json.JSONObject;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\nimport static android.os.Build.VERSION.SDK_INT;\nimport static android.os.Build.VERSION_CODES.N;\n\npublic final class ActionGroup {\n\n  // Saves all groups for later lookup.\n  private static final Map<String, ActionGroup> groups = new HashMap<String, ActionGroup>();\n\n  // The ID of the action group.\n  private final String id;\n\n  // List of actions\n  private final Action[] actions;\n\n  /**\n   * Lookup the action groups with the specified group id.\n   *\n   * @param id The ID of the action group to find.\n   * @return Null if no group was found.\n   */\n  public static ActionGroup lookup(String id) {\n    return groups.get(id);\n  }\n\n  /**\n   * Register the action group for later lookup.\n   *\n   * @param group The action group to register.\n   */\n  public static void register(ActionGroup group) {\n    groups.put(group.getId(), group);\n  }\n\n  /**\n   * Unregister the action group.\n   *\n   * @param id The id of the action group to remove.\n   */\n  public static void unregister(String id) {\n    groups.remove(id);\n  }\n\n  /**\n   * Check if a action group with that id is registered.\n   *\n   * @param id The id of the action group to check for.\n   */\n  public static boolean isRegistered(String id) {\n    return groups.containsKey(id);\n  }\n\n  /**\n   * Creates an action group by parsing the specified action specs.\n   *\n   * @param list The list of actions.\n   * @return A new action group.\n   */\n  public static ActionGroup parse(Context context, JSONArray list) {\n    return parse(context, null, list);\n  }\n\n  /**\n   * Creates an action group by parsing the specified action specs.\n   *\n   * @param id   The id for the action group.\n   * @param list The list of actions.\n   * @return A new action group.\n   */\n  public static ActionGroup parse(Context context, String id, JSONArray list) {\n    List<Action> actions = new ArrayList<Action>(list.length());\n\n    for (int i = 0; i < list.length(); i++) {\n      JSONObject opts = list.optJSONObject(i);\n      String type = opts.optString(\"type\", \"button\");\n\n      if (type.equals(\"input\") && SDK_INT < N) {\n        Log.w(\"Action\", \"Type input is not supported\");\n        continue;\n      }\n\n      if (!(type.equals(\"button\") || type.equals(\"input\"))) {\n        Log.w(\"Action\", \"Unknown type: \" + type);\n        continue;\n      }\n\n      actions.add(new Action(context, opts));\n    }\n\n    return new ActionGroup(id, actions.toArray(new Action[actions.size()]));\n  }\n\n  /**\n   * Creates an action group.\n   *\n   * @param id      The ID of the group.\n   * @param actions The list of actions.\n   */\n  private ActionGroup(String id, Action[] actions) {\n    this.id = id;\n    this.actions = actions;\n  }\n\n  /**\n   * Gets the action group id.\n   */\n  public String getId() {\n    return id;\n  }\n\n  /**\n   * Gets the action list.\n   */\n  public Action[] getActions() {\n    return actions;\n  }\n\n}"
  },
  {
    "path": "native-src/android/app/src/main/java/com/telerik/localnotifications/Builder.java",
    "content": "package com.telerik.localnotifications;\n\nimport android.app.Notification;\nimport android.app.NotificationChannel;\nimport android.app.NotificationManager;\nimport android.app.PendingIntent;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.graphics.Bitmap;\nimport android.graphics.Color;\nimport androidx.annotation.Nullable;\nimport androidx.core.app.NotificationCompat;\nimport android.util.Log;\n\nimport org.json.JSONArray;\nimport org.json.JSONException;\nimport org.json.JSONObject;\n\nimport java.util.concurrent.ExecutionException;\n\nimport static android.app.PendingIntent.FLAG_UPDATE_CURRENT;\n\npublic final class Builder {\n\n    public static final String NOTIFICATION_ID = \"NOTIFICATION_ID\";\n\n    private static final String TAG = \"Builder\";\n    private static final String DEFAULT_CHANNEL = \"Notifications\";\n\n    private static final int DEFAULT_NOTIFICATION_COLOR = Color.parseColor(\"#ffffffff\");\n    private static final int DEFAULT_NOTIFICATION_LED_ON = 500;\n    private static final int DEFAULT_NOTIFICATION_LED_OFF = 2000;\n\n    // Methods to build notifications:\n\n    static Notification build(JSONObject options, Context context, int notificationID) {\n        // We use options.channel as both channel id and name. If not set, both default to DEFAULT_CHANNEL:\n        return build(options, context, notificationID, options.optString(\"channel\", DEFAULT_CHANNEL));\n    }\n\n    static Notification build(JSONObject options, Context context, int notificationID, String channelID) {\n        // Set channel for Android 8+:\n\n        if (android.os.Build.VERSION.SDK_INT >= 26) {\n            final NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n            if (notificationManager != null && notificationManager.getNotificationChannel(channelID) == null) {\n                NotificationChannel channel = new NotificationChannel(channelID, channelID, NotificationManager.IMPORTANCE_HIGH);\n                if (shouldEnableNotificationLed(options)) {\n                    channel.enableLights(true);\n                    channel.setLightColor(getLedColor(options));\n                }\n                notificationManager.createNotificationChannel(channel);\n            }\n        }\n\n        // Create the builder:\n\n        NotificationCompat.Builder builder = android.os.Build.VERSION.SDK_INT >= 26 ? new NotificationCompat.Builder(context, channelID) : new NotificationCompat.Builder(context);\n\n        builder\n            .setDefaults(0)\n            .setContentTitle(options.optString(\"title\", null))\n            .setSubText(options.optString(\"subtitle\", null))\n            .setContentText(options.optString(\"body\", null))\n            .setSmallIcon(options.optInt(\"icon\"))\n            .setAutoCancel(true) // Remove the notification from the status bar once tapped.\n            .setNumber(options.optInt(\"badge\"))\n            .setColor(options.optInt(\"color\"))\n            .setOngoing(options.optBoolean(\"ongoing\"))\n            .setPriority(options.optInt(\"priority\", options.optBoolean(\"forceShowWhenInForeground\") ? 1 : 0))\n            .setTicker(options.optString(\"ticker\", null)); // Let the OS handle the default value for the ticker.\n\n        final Object thumbnail = options.opt(\"thumbnail\");\n\n        if (thumbnail instanceof String) {\n            builder.setLargeIcon(getBitmap(context, (String) thumbnail));\n        }\n\n        // TODO sound preference is not doing anything\n        // builder.setSound(options.has(\"sound\") ? Uri.parse(\"android.resource://\" + context.getPackageName() + \"/raw/\" + options.getString(\"sound\")) : Uri.parse(\"android.resource://\" + context.getPackageName() + \"/raw/notify\"))\n        if (options.has(\"sound\")) {\n            builder.setSound(android.media.RingtoneManager.getDefaultUri(android.media.RingtoneManager.TYPE_NOTIFICATION));\n        }\n\n        applyNotificationLed(options, builder);\n        applyStyle(options, builder, context);\n        applyTapReceiver(options, builder, context, notificationID);\n        applyClearReceiver(builder, context, notificationID);\n        applyActions(options, builder, context, notificationID);\n\n        return builder.build();\n    }\n\n\n    // Notification styles:\n\n    private static void applyNotificationLed(JSONObject options, NotificationCompat.Builder builder) {\n        if (shouldEnableNotificationLed(options)) {\n            builder.setLights(getLedColor(options), DEFAULT_NOTIFICATION_LED_ON, DEFAULT_NOTIFICATION_LED_OFF);\n        }\n    }\n\n    private static void applyStyle(JSONObject options, NotificationCompat.Builder builder, Context context) {\n        if (options.has(\"groupedMessages\")) {\n            applyGroup(options, builder);\n        } else if (options.optBoolean(\"bigTextStyle\")) {\n            applyBigTextStyle(options, builder);\n        } else if (options.has(\"image\")) {\n            applyImage(options, builder, context);\n        }\n    }\n\n    private static void applyImage(JSONObject options, NotificationCompat.Builder builder, Context context) {\n        Bitmap bitmap = getBitmap(context, options.optString(\"image\", \"\"));\n\n        if (bitmap == null) {\n            return;\n        }\n\n        final NotificationCompat.BigPictureStyle bigPictureStyle = new NotificationCompat.BigPictureStyle().bigPicture(bitmap);\n\n        builder.setStyle(bigPictureStyle);\n\n        final Object thumbnail = options.opt(\"thumbnail\");\n\n        if (Boolean.TRUE.equals(thumbnail)) {\n            builder.setLargeIcon(bitmap); // Set the thumbnail...\n            bigPictureStyle.bigLargeIcon(null); // ...which goes away when expanded.\n        }\n\n    }\n\n    private static void applyBigTextStyle(JSONObject options, NotificationCompat.Builder builder) {\n        // set big text style (adds an 'expansion arrow' to the notification)\n        if (options.optBoolean(\"bigTextStyle\")) {\n            final NotificationCompat.BigTextStyle bigTextStyle = new NotificationCompat.BigTextStyle();\n            bigTextStyle.setBigContentTitle(options.optString(\"title\"));\n            bigTextStyle.bigText(options.optString(\"body\"));\n            builder.setStyle(bigTextStyle);\n        }\n    }\n\n    private static void applyGroup(JSONObject options, NotificationCompat.Builder builder) {\n        JSONArray groupedMessages = options.optJSONArray(\"groupedMessages\");\n\n        if (groupedMessages == null) {\n            return;\n        }\n\n        final NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();\n\n        // Sets a title for the Inbox in expanded layout\n        // TODO: Is this needed? Should we add a different option for it (bigTitle)?\n        inboxStyle.setBigContentTitle(options.optString(\"title\", null));\n        inboxStyle.setSummaryText(options.optString(\"groupSummary\", null));\n\n        int messagesToDisplay = Math.min(groupedMessages.length(), 5);\n\n        for (int i = 0; i < messagesToDisplay; ++i) {\n            try {\n                inboxStyle.addLine(groupedMessages.getString(i));\n            } catch (JSONException e) {\n                Log.e(TAG, \"Error parsing message at index \" + i, e);\n            }\n\n        }\n\n        builder\n            .setGroup(\"myGroup\") // TODO not sure this needs to be configurable\n            .setStyle(inboxStyle);\n    }\n\n\n    // Notification click and cancel handlers:\n\n    /**\n     * Add the intent that handles the event when the notification is clicked (which should launch the app).\n     */\n    private static void applyTapReceiver(JSONObject options, NotificationCompat.Builder builder, Context context, int notificationID) {\n        final Intent intent = new Intent(context, NotificationActionReceiver.class)\n                .putExtra(NOTIFICATION_ID, notificationID)\n                .putExtra(\"NOTIFICATION_LAUNCH\", options.optBoolean(\"launch\", true))\n                .setAction(Action.CLICK_ACTION_ID)\n                .setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);\n\n        builder.setContentIntent(PendingIntent.getService(\n            context,\n            notificationID,\n            intent,\n            FLAG_UPDATE_CURRENT\n        ));\n    }\n\n    /**\n    * Add the intent that handles the delete event (which is fired when the X or 'clear all'\n    * was pressed in the notification center).\n    */\n    private static void applyClearReceiver(NotificationCompat.Builder builder, Context context, int notificationID) {\n        final Intent intent = new Intent(context, NotificationClearedReceiver.class)\n            .putExtra(NOTIFICATION_ID, notificationID);\n\n        builder.setDeleteIntent(PendingIntent.getBroadcast(\n            context,\n            notificationID,\n            intent,\n            FLAG_UPDATE_CURRENT\n        ));\n    }\n\n    private static void applyActions(JSONObject options, NotificationCompat.Builder builder, Context context, int notificationID) {\n        Action[] actions = getActions(options, context);\n\n        if (actions == null || actions.length == 0) {\n            return;\n        }\n\n        NotificationCompat.Action.Builder btn;\n        for (Action action : actions) {\n            btn = new NotificationCompat.Action.Builder(\n                    action.getIcon(),\n                    action.getTitle(),\n                    getPendingIntentForAction(options, context, action, notificationID));\n\n            if (action.isWithInput()) {\n                Log.d(TAG, \"applyActions, isWithInput\");\n                btn.addRemoteInput(action.getInput());\n            } else {\n                Log.d(TAG, \"applyActions, not isWithInput\");\n            }\n\n            builder.addAction(btn.build());\n        }\n    }\n\n    private static Action[] getActions(JSONObject options, Context context) {\n        Object value = options.opt(\"actions\");\n        String groupId = null;\n        JSONArray actions = null;\n        ActionGroup group = null;\n\n        if (value instanceof String) {\n            groupId = (String) value;\n        } else if (value instanceof JSONArray) {\n            actions = (JSONArray) value;\n        }\n\n        if (groupId != null) {\n            group = ActionGroup.lookup(groupId);\n        } else if (actions != null && actions.length() > 0) {\n            group = ActionGroup.parse(context, actions);\n        }\n\n        return (group != null) ? group.getActions() : null;\n    }\n\n    private static PendingIntent getPendingIntentForAction(JSONObject options, Context context, Action action, int notificationID) {\n        Log.d(TAG, \"getPendingIntentForAction action.id \" + action.getId() + \", action.isLaunchingApp(): \" + action.isLaunchingApp());\n        Intent intent = new Intent(context, NotificationActionReceiver.class)\n                .putExtra(NOTIFICATION_ID, options.optInt(\"id\", 0))\n                // TODO see https://github.com/katzer/cordova-plugin-local-notifications/blob/ca1374325bb27ec983332d55dcb6975d929bca4b/src/android/notification/Builder.java#L396\n                .putExtra(\"NOTIFICATION_LAUNCH\", action.isLaunchingApp())\n                .setAction(action.getId())\n                .setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);\n\n        return PendingIntent.getService(context, notificationID, intent, FLAG_UPDATE_CURRENT);\n    }\n\n    // Utility methods:\n\n    private static @Nullable Bitmap getBitmap(Context context, String src) {\n        if (src.indexOf(\"res://\") == 0) {\n            final int resourceId = context.getResources().getIdentifier(src.substring(6), \"drawable\", context.getApplicationInfo().packageName);\n\n            return resourceId == 0 ? null : android.graphics.BitmapFactory.decodeResource(context.getResources(), resourceId);\n        } else if (src.indexOf(\"http\") == 0) {\n            try {\n                return new DownloadFileFromUrl(src).execute().get();\n            } catch (InterruptedException | ExecutionException e) {\n                return null;\n            }\n        }\n\n        return null;\n    }\n\n    private static boolean shouldEnableNotificationLed(JSONObject options) {\n        return options.has(\"notificationLed\");\n    }\n\n    private static int getLedColor(JSONObject options) {\n        Object notificationLed = options.opt(\"notificationLed\");\n\n        if (Boolean.TRUE.equals(notificationLed)) {\n            return DEFAULT_NOTIFICATION_COLOR;\n        } else if (notificationLed instanceof Integer) {\n            return (int) notificationLed;\n        } else {\n            Log.e(TAG, \"Unable to parse option.notificationLed, using default notification color\");\n            return DEFAULT_NOTIFICATION_COLOR;\n        }\n    }\n}\n"
  },
  {
    "path": "native-src/android/app/src/main/java/com/telerik/localnotifications/DownloadFileFromUrl.java",
    "content": "package com.telerik.localnotifications;\n\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.os.AsyncTask;\nimport android.util.Log;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.net.HttpURLConnection;\nimport java.net.URL;\n\nclass DownloadFileFromUrl extends AsyncTask<String, Void, Bitmap> {\n\n  private static final String TAG = \"DownloadFileFromUrl\";\n\n  private String imageUrl;\n\n  DownloadFileFromUrl(final String imageUrl) {\n    super();\n\n    this.imageUrl = imageUrl;\n  }\n\n  @Override\n  protected Bitmap doInBackground(String... strings) {\n    try {\n      HttpURLConnection connection = (HttpURLConnection) new URL(this.imageUrl).openConnection();\n      connection.setDoInput(true);\n      connection.connect();\n\n      BitmapFactory.Options opts = new BitmapFactory.Options();\n      opts.inJustDecodeBounds = false;\n\n      InputStream is = connection.getInputStream();\n\n      Bitmap bitmap = BitmapFactory.decodeStream(is, null, opts);\n\n      try {\n        is.close();\n      } catch (IOException e) {\n        Log.e(TAG, \"Error closing image InputStream: \" + e.getMessage(), e);\n      }\n\n      return bitmap;\n    } catch (IOException e) {\n      Log.d(TAG, \"Error while loading image: \" + e.getMessage(), e);\n    }\n\n    return null;\n  }\n}\n"
  },
  {
    "path": "native-src/android/app/src/main/java/com/telerik/localnotifications/LifecycleCallbacks.java",
    "content": "package com.telerik.localnotifications;\n\nimport android.app.Activity;\nimport android.app.Application;\nimport android.os.Bundle;\nimport android.util.Log;\n\n/**\n * Subscribe to the Pause and Resume activity events in order to toggle the plugin's status.\n */\npublic class LifecycleCallbacks implements Application.ActivityLifecycleCallbacks {\n\n  private static LifecycleCallbacks callbacks = new LifecycleCallbacks();\n\n  /**\n   * Register for the application's events\n   * @param app\n   */\n  public static void registerCallbacks(Application app) {\n    if (app == null) {\n      Log.d(\"LifecycleCallbacks\", \"The application is null, it's not passed correctly!\");\n      throw new RuntimeException(\"The application is null, it's not passed correctly!\");\n    }\n\n    // clean up, not to leak and register it N times...\n    Log.d(\"LifecycleCallbacks\", \"Unregistering the activity lifecycle callbacks...\");\n    app.unregisterActivityLifecycleCallbacks(callbacks);\n\n    Log.d(\"LifecycleCallbacks\", \"Registering the activity lifecycle callbacks...\");\n    app.registerActivityLifecycleCallbacks(callbacks);\n  }\n\n  public void onActivityPaused(Activity activity) {\n    Log.d(LocalNotificationsPlugin.TAG, \"onActivityPaused: Application has been stopped.\");\n\n    // the application is being stopped -> the push plugin is not in active/foreground state anymore\n    LocalNotificationsPlugin.isActive = false;\n  }\n\n  public void onActivityResumed(Activity activity) {\n    Log.d(LocalNotificationsPlugin.TAG, \"onActivityPaused: Application has been started\");\n\n    // the application has been resumed-> the push plugin is now in active/foreground state\n    LocalNotificationsPlugin.isActive = true;\n  }\n\n  public void onActivityCreated(Activity activity, Bundle bundle) {\n  }\n\n  public void onActivityDestroyed(Activity activity) {\n  }\n\n  public void onActivitySaveInstanceState(Activity activity, Bundle outState) {\n  }\n\n  public void onActivityStarted(Activity activity) {\n  }\n\n  public void onActivityStopped(Activity activity) {\n  }\n}"
  },
  {
    "path": "native-src/android/app/src/main/java/com/telerik/localnotifications/LocalNotificationsPlugin.java",
    "content": "package com.telerik.localnotifications;\n\nimport android.content.Context;\nimport android.util.Log;\n\nimport org.json.JSONObject;\n\npublic class LocalNotificationsPlugin {\n  static final String TAG = \"LocalNotifyPlugin\";\n\n  static boolean isActive = false;\n  private static JSONObject cachedData;\n  private static LocalNotificationsPluginListener onMessageReceivedCallback;\n  private static LocalNotificationsPluginListener onMessageClearedCallback;\n  private static LocalNotificationsPluginListener onMessageClickedCallback;\n  /**\n   * Set the on message received callback\n   *\n   * @param callbacks\n   */\n  public static void setOnMessageReceivedCallback(LocalNotificationsPluginListener callbacks) {\n    onMessageReceivedCallback = callbacks;\n\n    if (cachedData != null) {\n      executeOnMessageReceivedCallback(cachedData);\n      cachedData = null;\n    }\n  }\n\n  /**\n   * Execute the onMessageReceivedCallback with the data passed.\n   * In case the callback is not present, cache the data;\n   *\n   * @param data\n   */\n  public static void executeOnMessageReceivedCallback(JSONObject data) {\n    if (onMessageReceivedCallback != null) {\n      Log.d(TAG, \"Sending message to client\");\n      onMessageReceivedCallback.success(data);\n    } else {\n      Log.d(TAG, \"No callback function - caching the data for later retrieval.\");\n      cachedData = data;\n    }\n  }\n\n  /**\n   * Set the on message clicked callback\n   *\n   * @param callbacks\n   */\n  public static void setOnMessageClickedCallback(LocalNotificationsPluginListener callbacks) {\n    onMessageClickedCallback = callbacks;\n  }\n\n  /**\n   * Execute the onMessageClickedCallback with the click on notification Message.\n   * @param data\n   */\n  public static void executeOnMessageClickedCallback(JSONObject data) {\n    if (onMessageClickedCallback != null) {\n      onMessageClickedCallback.success(data);\n    }\n  }\n\n\n  /**\n   * Set the on message cleared callback\n   *\n   * @param callbacks\n   */\n  public static void setOnMessageClearedCallback(LocalNotificationsPluginListener callbacks) {\n    onMessageClearedCallback = callbacks;\n  }\n\n  /**\n   * Execute the onMessageClearedCallback with the data passed.\n   * In case the callback is not present, cache the data;\n   *\n   * @param data\n   */\n  public static void executeOnMessageClearedCallback(JSONObject data) {\n    if (onMessageClearedCallback != null) {\n      onMessageClearedCallback.success(data);\n    }\n  }\n\n  public static void scheduleNotification(JSONObject options, Context context) throws Exception {\n    // Persist the options so that we can access them later to:\n    // - Restore a notification after reboot.\n    // - Create a notification after an alarm triggers (for recurrent or scheduled notifications).\n    // - Pass them back to the notification clicked or notification cleared callbacks.\n    //\n    // This way we don't need to pass them around as extras in the Intents.\n\n    Store.save(context, options);\n\n    // Display or schedule the notification, depending on the options:\n    // If there's already a notification with the same ID, the intent flags should take care of updating all the\n    // intents but the alarm one, which would be cancelled and rescheduled.\n\n    NotificationRestoreReceiver.scheduleNotification(options, context);\n  }\n}\n\n\n\n"
  },
  {
    "path": "native-src/android/app/src/main/java/com/telerik/localnotifications/LocalNotificationsPluginListener.java",
    "content": "package com.telerik.localnotifications;\r\n\r\n/**\r\n * Defines methods for Success and Error callbacks\r\n */\r\npublic interface LocalNotificationsPluginListener {\r\n    /**\r\n     * Defines a success callback method, which is used to pass success function reference\r\n     * from the nativescript to the Java plugin\r\n     *\r\n     * @param data\r\n     */\r\n    void success(Object data);\r\n\r\n\r\n    /**\r\n     * Defines a error callback method, which is used to pass error function reference\r\n     * from the nativescript to the Java plugin\r\n     *\r\n     * @param data\r\n     */\r\n    void error(Object data);\r\n}\r\n"
  },
  {
    "path": "native-src/android/app/src/main/java/com/telerik/localnotifications/NotificationActionReceiver.java",
    "content": "package com.telerik.localnotifications;\r\n\r\nimport android.app.IntentService;\r\nimport android.app.NotificationManager;\r\nimport android.content.Context;\r\nimport android.content.Intent;\r\nimport android.content.pm.PackageManager;\r\nimport android.os.Bundle;\r\nimport android.util.Log;\r\n\r\nimport androidx.annotation.Nullable;\r\nimport androidx.core.app.RemoteInput;\r\n\r\nimport org.json.JSONException;\r\nimport org.json.JSONObject;\r\n\r\nimport static com.telerik.localnotifications.Action.CLICK_ACTION_ID;\r\n\r\n/**\r\n * IntentService which is an entry point, whenever a notification from the bar is tapped and executed.\r\n * The activity fires, notifies the callback.\r\n */\r\npublic class NotificationActionReceiver extends IntentService {\r\n  private static String TAG = \"NotificationActionReceiver\";\r\n\r\n  // Hold a reference to the intent to handle.\r\n  private Intent intent;\r\n\r\n  public NotificationActionReceiver() {\r\n    super(\"NotificationActionReceiver\");\r\n  }\r\n\r\n  @Override\r\n  protected void onHandleIntent(@Nullable Intent intent) {\r\n    this.intent = intent;\r\n\r\n    if (intent == null) {\r\n      return;\r\n    }\r\n\r\n    Bundle bundle = intent.getExtras();\r\n\r\n    if (bundle == null) {\r\n      return;\r\n    }\r\n\r\n    try {\r\n      final JSONObject jsonData = new JSONObject();\r\n      jsonData.put(\"event\", Builder.NOTIFICATION_ID);\r\n      LocalNotificationsPlugin.executeOnMessageClickedCallback(jsonData);\r\n\r\n      onClick(intent.getAction(), bundle);\r\n    } catch (JSONException e) {\r\n      Log.e(TAG, e.getMessage(), e);\r\n    }\r\n  }\r\n\r\n  private void onClick(String action, Bundle bundle) throws JSONException {\r\n    final Context context = getApplicationContext();\r\n\r\n    // Note that for the non-default action this will be empty:\r\n    final JSONObject opts = Store.get(context, bundle.getInt(Builder.NOTIFICATION_ID), false);\r\n\r\n    boolean isAppActive = LocalNotificationsPlugin.isActive;\r\n    boolean doLaunch = intent.getBooleanExtra(\"NOTIFICATION_LAUNCH\", true);\r\n\r\n    Log.d(TAG, \"doLaunch = \" + doLaunch);\r\n\r\n    if (!isAppActive && doLaunch) {\r\n      forceMainActivityReload();\r\n    }\r\n\r\n    if (setTextInput(action, opts)) {\r\n      opts.put(\"event\", \"input\");\r\n    } else if (!CLICK_ACTION_ID.equals(action)) {\r\n      opts.put(\"event\", \"button\");\r\n      opts.put(\"response\", action);\r\n    } else {\r\n      opts.put(\"event\", \"default\");\r\n    }\r\n\r\n    opts.put(\"foreground\", isAppActive);\r\n    // opts.put(\"coldstart\", !isPluginActive);\r\n\r\n    LocalNotificationsPlugin.executeOnMessageReceivedCallback(opts);\r\n\r\n    if (opts.has(\"id\") && !opts.optBoolean(\"ongoing\", false) && opts.optInt(\"repeatInterval\", 0) == 0) {\r\n      int id = opts.getInt(\"id\");\r\n\r\n      // Clear the notification from the tray, unless it's marker as ongoing/sticky:\r\n      ((NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE)).cancel(id);\r\n\r\n      // And also unpersist it:\r\n      Store.remove(context, id);\r\n    }\r\n  }\r\n\r\n  private boolean setTextInput(String action, JSONObject data) throws JSONException {\r\n    Bundle input = RemoteInput.getResultsFromIntent(intent);\r\n    if (input != null) {\r\n      data.put(\"response\", input.getCharSequence(action));\r\n      return true;\r\n    }\r\n    return false;\r\n  }\r\n\r\n  private void forceMainActivityReload() {\r\n    PackageManager pm = getPackageManager();\r\n    Intent launchIntent = pm.getLaunchIntentForPackage(getApplicationContext().getPackageName());\r\n    Log.d(TAG, \"starting activity for package: \" + getApplicationContext().getPackageName());\r\n    launchIntent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT | Intent.FLAG_ACTIVITY_SINGLE_TOP);\r\n    startActivity(launchIntent);\r\n  }\r\n}"
  },
  {
    "path": "native-src/android/app/src/main/java/com/telerik/localnotifications/NotificationAlarmReceiver.java",
    "content": "package com.telerik.localnotifications;\n\nimport android.app.NotificationManager;\nimport android.content.BroadcastReceiver;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.util.Log;\n\nimport org.json.JSONObject;\n\npublic class NotificationAlarmReceiver extends BroadcastReceiver {\n\n  private static final String TAG = \"NotificationAlarmRcvr\";\n\n  public void onReceive(Context context, Intent intent) {\n    final int id = intent.getIntExtra(Builder.NOTIFICATION_ID, 0);\n    final JSONObject opts = Store.get(context, id);\n\n    if (opts == null) {\n      Log.e(TAG, \"Notification could not be restored, options are null\");\n\n      return;\n    }\n\n    // Create the notification:\n\n    try {\n      ((NotificationManager) context\n        .getSystemService(Context.NOTIFICATION_SERVICE))\n        .notify(id, Builder.build(opts, context, id));\n    } catch (Throwable t) {\n      Log.e(TAG, \"Notification could not be restored!\" + t.getMessage(), t);\n    }\n\n    // Note we don't unpersist this notification just yet, as it might still need to be restored\n    // after a reboot.\n  }\n}\n"
  },
  {
    "path": "native-src/android/app/src/main/java/com/telerik/localnotifications/NotificationClearedReceiver.java",
    "content": "package com.telerik.localnotifications;\r\n\r\nimport android.content.Context;\r\nimport android.content.Intent;\r\n\r\nimport android.content.BroadcastReceiver;\r\nimport androidx.annotation.Nullable;\r\n\r\nimport org.json.JSONObject;\r\n\r\npublic class NotificationClearedReceiver extends BroadcastReceiver {\r\n  private static String TAG = \"NotificationClearedReceiver\";\r\n\r\n  /**\r\n   * Called when the notification is cleared from the notification center.\r\n   *\r\n   * @param context Application context\r\n   * @param intent  Received intent with notification ID\r\n   */\r\n  @Override\r\n  public void onReceive(Context context, @Nullable Intent intent) {\r\n    if (intent == null || !intent.hasExtra(Builder.NOTIFICATION_ID)) {\r\n      return;\r\n    }\r\n\r\n    // Default value not used as above check ensures we have an actual value:\r\n    final int id = intent.getIntExtra(Builder.NOTIFICATION_ID, 0);\r\n    final JSONObject opts = Store.get(context, id);\r\n\r\n    if (opts != null) {\r\n      if (opts.optInt(\"repeatInterval\", 0) == 0) {\r\n        // Remove the persisted notification data if it's not repeating:\r\n        Store.remove(context, id);\r\n      }\r\n\r\n      LocalNotificationsPlugin.executeOnMessageClearedCallback(opts);\r\n    }\r\n  }\r\n}"
  },
  {
    "path": "native-src/android/app/src/main/java/com/telerik/localnotifications/NotificationRestoreReceiver.java",
    "content": "package com.telerik.localnotifications;\n\nimport android.app.AlarmManager;\nimport android.app.NotificationManager;\nimport android.app.PendingIntent;\nimport android.content.BroadcastReceiver;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.util.Log;\n\nimport java.util.Date;\nimport java.util.Map;\n\nimport org.json.JSONException;\nimport org.json.JSONObject;\n\n/**\n * Notifications need to be restored when the device is rebooted,\n * that's what's this class is for.\n */\npublic class NotificationRestoreReceiver extends BroadcastReceiver {\n\n  private static final String TAG = \"NotifyRestoreReceiver\";\n\n  @Override\n  public void onReceive(Context context, Intent intent) {\n    if (context == null || !Intent.ACTION_BOOT_COMPLETED.equalsIgnoreCase(intent.getAction())) {\n      return;\n    }\n\n    try {\n      for (Map.Entry<String, String> entry : Store.getAll(context).entrySet()) {\n        final String notificationString = entry.getValue();\n\n        Log.e(TAG, \"Will restore previously scheduled notification: \" + notificationString);\n\n        scheduleNotification(new JSONObject(notificationString), context);\n      }\n    } catch (IllegalStateException | JSONException e) {\n      Log.e(TAG, \"Notification could not be scheduled! \" + e.getMessage(), e);\n    }\n  }\n\n  static void scheduleNotification(JSONObject options, Context context) {\n\n    // We might create the notification IMMEDIATELY:\n\n    // If no ID is provided, we automatically assign different IDs so that all notifications are persisted:\n    final int notificationID = options.optInt(\"id\", 0);\n    final long triggerTime = options.optLong(\"atTime\", 0);\n\n    if (triggerTime == 0) {\n      // If we just want to show the notification immediately, there's no need to create an Intent,\n      // we just send the notification to the Notification Service:\n      ((NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE)).notify(\n          notificationID, com.telerik.localnotifications.Builder.build(options, context, notificationID)\n      );\n\n      return;\n    }\n\n    // Check if the notification has EXPIRED:\n\n    final long interval = options.optLong(\"repeatInterval\", 0); // in ms\n    final Date triggerDate = new Date(triggerTime);\n\n    if (interval == 0 && new Date().after(triggerDate)) {\n      Store.remove(context, notificationID);\n\n      return;\n    }\n\n    // Or SCHEDULE it for later:\n\n    final AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\n    try {\n      final Intent notificationIntent = new Intent(context, NotificationAlarmReceiver.class)\n          .setAction(options.getString(\"id\"))\n          .putExtra(Builder.NOTIFICATION_ID, notificationID);\n\n      final PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT);\n\n      if (interval > 0) {\n        alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, triggerTime, interval, pendingIntent);\n      } else {\n        alarmManager.set(AlarmManager.RTC_WAKEUP, triggerTime, pendingIntent);\n      }\n    } catch (Exception e) {\n      Log.e(TAG, \"Notification could not be scheduled!\" + e.getMessage(), e);\n    }\n  }\n}\n"
  },
  {
    "path": "native-src/android/app/src/main/java/com/telerik/localnotifications/Store.java",
    "content": "package com.telerik.localnotifications;\n\nimport android.content.Context;\nimport androidx.annotation.Nullable;\nimport android.util.Log;\n\nimport org.json.JSONException;\nimport org.json.JSONObject;\n\nimport java.util.Map;\n\npublic final class Store {\n\n    private static final String TAG = \"Store\";\n    private static final String SHARED_PREFERENCES_KEY = \"LocalNotificationsPlugin\";\n\n    public static @Nullable JSONObject get(Context context, int id) {\n        return get(context, id, true);\n    }\n\n    public static @Nullable JSONObject get(Context context, int id, boolean nullable) {\n        try {\n            return new JSONObject(context\n                .getSharedPreferences(SHARED_PREFERENCES_KEY, Context.MODE_PRIVATE)\n                .getString(String.valueOf(id), \"\"));\n        } catch (JSONException e) {\n            Log.e(TAG, \"Error parsing options\" + e.getMessage(), e);\n        }\n\n        return nullable ? null : new JSONObject();\n    }\n\n    public static Map<String, String> getAll(Context context) {\n        return (Map<String, String>) context.getSharedPreferences(SHARED_PREFERENCES_KEY, Context.MODE_PRIVATE).getAll();\n    }\n\n    public static String[] getKeys(Context context) {\n        return getAll(context).keySet().toArray(new String[0]);\n    }\n\n    public static void save(Context context, JSONObject opts) {\n        save(context, opts.optInt(\"id\", 0), opts);\n    }\n\n    public static void save(Context context, int id, String opts) {\n        try {\n            save(context, id, new JSONObject(opts));\n        } catch (JSONException e) {\n            Log.e(TAG, \"Error saving options\" + e.getMessage(), e);\n        }\n    }\n\n    public static void save(Context context, int id, JSONObject opts) {\n        context.getSharedPreferences(SHARED_PREFERENCES_KEY, Context.MODE_PRIVATE).edit().putString(String.valueOf(id), opts.toString()).apply();\n    }\n\n    public static void remove(Context context, int id) {\n        context.getSharedPreferences(SHARED_PREFERENCES_KEY, Context.MODE_PRIVATE).edit().remove(String.valueOf(id)).apply();\n    }\n}\n"
  },
  {
    "path": "native-src/android/app/src/main/res/values/strings.xml",
    "content": "<resources>\r\n  <string name=\"app_name\">locnotplugin</string>\r\n</resources>\r\n"
  },
  {
    "path": "native-src/android/build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\r\n\r\nbuildscript {\r\n    repositories {\r\n        google()\r\n        jcenter()\r\n    }\r\n    dependencies {\r\n        classpath 'com.android.tools.build:gradle:3.4.1'\r\n\r\n        // NOTE: Do not place your application dependencies here; they belong\r\n        // in the individual module build.gradle files\r\n    }\r\n}\r\n\r\nallprojects {\r\n    repositories {\r\n        google()\r\n        jcenter()\r\n        maven { url \"https://maven.google.com\" }\r\n    }\r\n}\r\n\r\ntask clean(type: Delete) {\r\n    delete rootProject.buildDir\r\n}\r\n"
  },
  {
    "path": "native-src/android/gradle/wrapper/gradle-wrapper.properties",
    "content": "#Thu Jul 04 12:57:28 CEST 2019\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-5.1.1-all.zip\n"
  },
  {
    "path": "native-src/android/gradle.properties",
    "content": "# Project-wide Gradle settings.\r\n\r\n# IDE (e.g. Android Studio) users:\r\n# Gradle settings configured through the IDE *will override*\r\n# any settings specified in this file.\r\n\r\n# For more details on how to configure your build environment visit\r\n# http://www.gradle.org/docs/current/userguide/build_environment.html\r\n\r\n# Specifies the JVM arguments used for the daemon process.\r\n# The setting is particularly useful for tweaking memory settings.\r\n# Default value: -Xmx10248m -XX:MaxPermSize=256m\r\n# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8\r\n\r\n# When configured, Gradle will run in incubating parallel mode.\r\n# This option should only be used with decoupled projects. More details, visit\r\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\r\n# org.gradle.parallel=true\r\nandroid.enableJetifier=true\r\nandroid.useAndroidX=true"
  },
  {
    "path": "native-src/android/gradlew",
    "content": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn ( ) {\n    echo \"$*\"\n}\n\ndie ( ) {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\nesac\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules\nfunction splitJvmOpts() {\n    JVM_OPTS=(\"$@\")\n}\neval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\nJVM_OPTS[${#JVM_OPTS[*]}]=\"-Dorg.gradle.appname=$APP_BASE_NAME\"\n\nexec \"$JAVACMD\" \"${JVM_OPTS[@]}\" -classpath \"$CLASSPATH\" org.gradle.wrapper.GradleWrapperMain \"$@\"\n"
  },
  {
    "path": "native-src/android/gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif \"%ERRORLEVEL%\" == \"0\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:init\r\n@rem Get command-line arguments, handling Windowz variants\r\n\r\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\r\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\r\n\r\n:win9xME_args\r\n@rem Slurp the command line arguments.\r\nset CMD_LINE_ARGS=\r\nset _SKIP=2\r\n\r\n:win9xME_args_slurp\r\nif \"x%~1\" == \"x\" goto execute\r\n\r\nset CMD_LINE_ARGS=%*\r\ngoto execute\r\n\r\n:4NT_args\r\n@rem Get arguments from the 4NT Shell from JP Software\r\nset CMD_LINE_ARGS=%$\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\r\nexit /b 1\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "native-src/android/locnotplugin.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module external.linked.project.id=\"pushplugin\" external.linked.project.path=\"$MODULE_DIR$\" external.root.project.path=\"$MODULE_DIR$\" external.system.id=\"GRADLE\" external.system.module.group=\"\" external.system.module.version=\"unspecified\" type=\"JAVA_MODULE\" version=\"4\">\n  <component name=\"FacetManager\">\n    <facet type=\"java-gradle\" name=\"Java-Gradle\">\n      <configuration>\n        <option name=\"BUILD_FOLDER_PATH\" value=\"$MODULE_DIR$/build\" />\n        <option name=\"BUILDABLE\" value=\"false\" />\n      </configuration>\n    </facet>\n  </component>\n  <component name=\"NewModuleRootManager\" LANGUAGE_LEVEL=\"JDK_1_7\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <excludeFolder url=\"file://$MODULE_DIR$/.gradle\" />\n    </content>\n    <orderEntry type=\"inheritedJdk\" />\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n  </component>\n</module>"
  },
  {
    "path": "native-src/android/settings.gradle",
    "content": "include ':app'\r\n"
  },
  {
    "path": "native-src/ios/.gitattributes",
    "content": "* -crlf"
  },
  {
    "path": "native-src/ios/.gitignore",
    "content": "build/\nxcuserdata/"
  },
  {
    "path": "native-src/ios/LocalNotificationsPlugin/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>FMWK</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(CURRENT_PROJECT_VERSION)</string>\n\t<key>NSPrincipalClass</key>\n\t<string></string>\n</dict>\n</plist>\n"
  },
  {
    "path": "native-src/ios/LocalNotificationsPlugin/LocalNotificationsPlugin.h",
    "content": "#import <UIKit/UIKit.h>\r\n\r\n//! Project version number for LocalNotificationsPlugin.\r\nFOUNDATION_EXPORT double LocalNotificationsVersionNumber;\r\n\r\n//! Project version string for LocalNotificationsPlugin.\r\nFOUNDATION_EXPORT const unsigned char LocalNotificationsPluginVersionString[];\r\n\r\n// In this header, you should import all the public headers of your framework\r\n#import <Notification.h>\r\n#import <NotificationManager.h>"
  },
  {
    "path": "native-src/ios/LocalNotificationsPlugin/Notification.h",
    "content": "#import <Foundation/Foundation.h>\r\n#import <UIKit/UIApplication.h>\r\n\r\n@interface Notification : NSObject <UIApplicationDelegate>\r\n{\r\n    UILocalNotification *notificationMessage;\r\n    BOOL isInline;\r\n}\r\n\r\n@property (nonatomic, strong) UILocalNotification *notificationMessage;\r\n@property BOOL isInline;\r\n@property (nonatomic, retain) UILocalNotification *launchNotification;\r\n\r\n+ (instancetype)sharedInstance;\r\n\r\n//-(void)register:(NSMutableDictionary *)options;\r\n//-(void)registerUserNotificationSettings:(NSDictionary*)options;\r\n-(void)setApplicationIconBadgeNumber:(NSMutableDictionary *)options;\r\n-(void)didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings;\r\n-(void)notificationReceived;\r\n-(void)success:(NSString *)eventName WithMessage:(NSString *)message;\r\n-(void)success:(NSString *)eventName WithDictionary:(NSMutableDictionary *)userInfo;\r\n-(void)fail:(NSString *)eventName WithMessage:(NSString *)message withError:(NSError *)error;\r\n@end\r\n"
  },
  {
    "path": "native-src/ios/LocalNotificationsPlugin/Notification.m",
    "content": "#import \"Notification.h\"\r\n#import <UIKit/UIKit.h>\r\n#import <UIKit/UIUserNotificationSettings.h>\r\n#import <objc/runtime.h>\r\n\r\nconst NSString * badgeKey = @\"badge\";\r\nconst NSString * soundKey = @\"sound\";\r\nconst NSString * alertKey = @\"alert\";\r\nstatic NSString * didRegisterUserNotificationsEventName = @\"didRegisterUserNotificationSettings\";\r\nconst NSString * notificationReceivedEventName = @\"notificationReceived\";\r\nconst NSString * setBadgeNumberEventName = @\"setApplicationIconBadgeNumber\";\r\nconst NSString * didRegisterUserNotificationSettingsEventName = @\"didRegisterUserNotificationSettings\";\r\nconst NSString * failToRegisterUserNotificationSettingsEventName = @\"failToRegisterUserNotificationSettings\";\r\n\r\nstatic char launchNotificationKey;\r\n\r\n@implementation Notification\r\n\r\n@synthesize notificationMessage;\r\n@synthesize isInline;\r\n\r\n+ (instancetype)sharedInstance\r\n{\r\n    static Notification *sharedInstance = nil;\r\n    static dispatch_once_t onceToken;\r\n    dispatch_once(&onceToken, ^{\r\n        sharedInstance = [[Notification alloc] init];\r\n    });\r\n    return sharedInstance;\r\n}\r\n\r\n/*\r\n-(void)register:(NSMutableDictionary *)options\r\n{\r\n#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000\r\n    UIUserNotificationType UserNotificationTypes = UIUserNotificationTypeNone;\r\n    if([self isTrue: badgeKey fromOptions: options]) UserNotificationTypes |= UIUserNotificationTypeBadge;\r\n    if([self isTrue: soundKey fromOptions: options]) UserNotificationTypes |= UIUserNotificationTypeSound;\r\n    if([self isTrue: alertKey fromOptions: options]) UserNotificationTypes |= UIUserNotificationTypeAlert;\r\n#endif\r\n    UIRemoteNotificationType notificationTypes = UIRemoteNotificationTypeNone;\r\n    notificationTypes |= UIRemoteNotificationTypeNewsstandContentAvailability;\r\n    \r\n    if([self isTrue: badgeKey fromOptions: options]) notificationTypes |= UIRemoteNotificationTypeBadge;\r\n    if([self isTrue: soundKey fromOptions: options]) notificationTypes |= UIRemoteNotificationTypeSound;\r\n    if([self isTrue: alertKey fromOptions: options]) notificationTypes |= UIRemoteNotificationTypeAlert;\r\n\r\n#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000\r\n    UserNotificationTypes |= UIUserNotificationActivationModeBackground;\r\n#endif\r\n    \r\n    if (notificationTypes == UIRemoteNotificationTypeNone)\r\n        NSLog(@\"LocalNotificationsPlugin.register: Notification type is set to none\");\r\n    \r\n    isInline = NO;\r\n    \r\n#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000\r\n    if ([[UIApplication sharedApplication]respondsToSelector:@selector(registerUserNotificationSettings:)]) {\r\n        UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UserNotificationTypes categories:nil];\r\n        [[UIApplication sharedApplication] registerUserNotificationSettings:settings];\r\n        [[UIApplication sharedApplication] registerForRemoteNotifications];\r\n    } else {\r\n        [[UIApplication sharedApplication] registerForRemoteNotificationTypes:notificationTypes];\r\n    }\r\n#else\r\n    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:notificationTypes];\r\n#endif\r\n\r\n    [self notificationReceived];\r\n}\r\n*/\r\n\r\n- (BOOL)isTrue:(NSString *)key fromOptions:(NSMutableDictionary *)options\r\n{\r\n    id arg = [options objectForKey:key];\r\n    \r\n    if([arg isKindOfClass:[NSString class]]) return [arg isEqualToString:@\"true\"];\r\n\r\n    if([arg boolValue]) return true;\r\n    \r\n    return false;\r\n}\r\n\r\n- (void)didRegisterUserNotificationSettings:(UIUserNotificationSettings *)settings\r\n{\r\n    UIUserNotificationType types = UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound;\r\n    bool ok = settings.types & types;\r\n    [self success:didRegisterUserNotificationsEventName WithMessage:[NSString stringWithFormat:@\"%@\", ok ? @\"true\" : @\"false\"]];\r\n}\r\n\r\n- (void)notificationReceived\r\n{\r\n    if (self.notificationMessage)\r\n    {\r\n       NSMutableString *jsonStr = [NSMutableString stringWithString:@\"{\"];\r\n        \r\n        if (self.notificationMessage.userInfo != nil) {\r\n            [self parseDictionary:self.notificationMessage.userInfo intoJSON:jsonStr];\r\n        }\r\n\r\n        if (isInline) {\r\n            [jsonStr appendFormat:@\"\\\"foreground\\\":true\"];\r\n            isInline = NO;\r\n        } else {\r\n            [jsonStr appendFormat:@\"\\\"foreground\\\":false\"];\r\n        }\r\n        \r\n        [jsonStr appendString:@\"}\"];\r\n        [self success:notificationReceivedEventName WithMessage:jsonStr];\r\n        self.notificationMessage = nil;\r\n    }\r\n}\r\n\r\n-(void)parseDictionary:(NSDictionary *)inDictionary intoJSON:(NSMutableString *)jsonString\r\n{\r\n    NSArray         *keys = [inDictionary allKeys];\r\n    NSString        *key;\r\n    \r\n    for (key in keys)\r\n    {\r\n        id thisObject = [inDictionary objectForKey:key];\r\n        \r\n        if ([thisObject isKindOfClass:[NSDictionary class]])\r\n            [self parseDictionary:thisObject intoJSON:jsonString];\r\n        else if ([thisObject isKindOfClass:[NSString class]])\r\n            [jsonString appendFormat:@\"\\\"%@\\\":\\\"%@\\\",\",\r\n             key,\r\n             [[[[inDictionary objectForKey:key]\r\n                stringByReplacingOccurrencesOfString:@\"\\\\\" withString:@\"\\\\\\\\\"]\r\n               stringByReplacingOccurrencesOfString:@\"\\\"\" withString:@\"\\\\\\\"\"]\r\n              stringByReplacingOccurrencesOfString:@\"\\n\" withString:@\"\\\\n\"]];\r\n        else {\r\n            [jsonString appendFormat:@\"\\\"%@\\\":\\\"%@\\\",\", key, [inDictionary objectForKey:key]];\r\n        }\r\n    }\r\n}\r\n\r\n- (void)setApplicationIconBadgeNumber:(NSMutableDictionary *)options\r\n{\r\n    int badge = [[options objectForKey:badgeKey] intValue] ?: 0;\r\n    \r\n    [[UIApplication sharedApplication] setApplicationIconBadgeNumber:badge];\r\n    \r\n    [self success:setBadgeNumberEventName WithMessage:[NSString stringWithFormat:@\"app badge count set to %d\", badge]];\r\n}\r\n\r\n/*\r\n- (void)registerUserNotificationSettings:(NSDictionary*)options\r\n{\r\n    NSLog(@\"--- in registerUserNotificationSettings\");\r\n\r\n#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000\r\n    if (![[UIApplication sharedApplication]respondsToSelector:@selector(registerUserNotificationSettings:)]) {\r\n        [self success:didRegisterUserNotificationSettingsEventName WithMessage:[NSString stringWithFormat:@\"%@\", @\"user notifications not supported for this ios version.\"]];\r\n        return;\r\n    }\r\n    \r\n    NSArray *categories = [options objectForKey:@\"categories\"];\r\n    if (categories == nil) {\r\n        [self fail:failToRegisterUserNotificationSettingsEventName WithMessage:@\"No categories specified\" withError:nil];\r\n        return;\r\n    }\r\n    NSMutableArray *nsCategories = [[NSMutableArray alloc] initWithCapacity:[categories count]];\r\n    \r\n    for (NSDictionary *category in categories) {\r\n        // ** 1. create the actions for this category\r\n        NSMutableArray *nsActionsForDefaultContext = [[NSMutableArray alloc] initWithCapacity:4];\r\n        NSArray *actionsForDefaultContext = [category objectForKey:@\"actionsForDefaultContext\"];\r\n        if (actionsForDefaultContext == nil) {\r\n            [self fail:failToRegisterUserNotificationSettingsEventName WithMessage:@\"Category doesn't contain actionsForDefaultContext\" withError:nil];\r\n            return;\r\n        }\r\n        if (![self createNotificationAction:category actions:actionsForDefaultContext nsActions:nsActionsForDefaultContext]) {\r\n            return;\r\n        }\r\n        \r\n        NSMutableArray *nsActionsForMinimalContext = [[NSMutableArray alloc] initWithCapacity:2];\r\n        NSArray *actionsForMinimalContext = [category objectForKey:@\"actionsForMinimalContext\"];\r\n        if (actionsForMinimalContext == nil) {\r\n            [self fail:failToRegisterUserNotificationSettingsEventName WithMessage:@\"Category doesn't contain actionsForMinimalContext\" withError:nil];\r\n            return;\r\n        }\r\n        if (![self createNotificationAction:category actions:actionsForMinimalContext nsActions:nsActionsForMinimalContext]) {\r\n            return;\r\n        }\r\n        \r\n        // ** 2. create the category\r\n        UIMutableUserNotificationCategory *nsCategory = [[UIMutableUserNotificationCategory alloc] init];\r\n        // Identifier to include in your push payload and local notification\r\n        NSString *identifier = [category objectForKey:@\"identifier\"];\r\n        if (identifier == nil) {\r\n            [self fail:failToRegisterUserNotificationSettingsEventName WithMessage:@\"Category doesn't contain identifier\" withError:nil];\r\n            return;\r\n        }\r\n        nsCategory.identifier = identifier;\r\n        // Add the actions to the category and set the action context\r\n        [nsCategory setActions:nsActionsForDefaultContext forContext:UIUserNotificationActionContextDefault];\r\n        // Set the actions to present in a minimal context\r\n        [nsCategory setActions:nsActionsForMinimalContext forContext:UIUserNotificationActionContextMinimal];\r\n        [nsCategories addObject:nsCategory];\r\n    }\r\n    \r\n    // ** 3. Determine the notification types\r\n    NSArray *types = [options objectForKey:@\"types\"];\r\n    if (types == nil) {\r\n        [self fail:failToRegisterUserNotificationSettingsEventName WithMessage:@\"No types specified\" withError:nil];\r\n        return;\r\n    }\r\n    UIUserNotificationType nsTypes = UIUserNotificationTypeNone;\r\n    for (NSString *type in types) {\r\n        if ([type isEqualToString:badgeKey]) {\r\n            nsTypes |= UIUserNotificationTypeBadge;\r\n        } else if ([type isEqualToString:alertKey]) {\r\n            nsTypes |= UIUserNotificationTypeAlert;\r\n        } else if ([type isEqualToString:soundKey]) {\r\n            nsTypes |= UIUserNotificationTypeSound;\r\n        } else {\r\n            [self fail:failToRegisterUserNotificationSettingsEventName WithMessage:[NSString stringWithFormat:@\"Unsupported type: %@, use one of badge, alert, sound\", type] withError:nil];\r\n        }\r\n    }\r\n    \r\n    // ** 4. Register the notification categories\r\n    NSSet *nsCategorySet = [NSSet setWithArray:nsCategories];\r\n    \r\n    \r\n    UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:nsTypes categories:nsCategorySet];\r\n    [[UIApplication sharedApplication] registerUserNotificationSettings:settings];\r\n\r\n    UIUserNotificationSettings *settings = [[UIApplication sharedApplication] currentUserNotificationSettings];\r\n    UIUserNotificationType types = settings.types|UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound;\r\n    settings = [UIUserNotificationSettings settingsForTypes:types categories:nil];\r\n    [[UIApplication sharedApplication] registerUserNotificationSettings:settings];\r\n    \r\n#endif\r\n    [self success:didRegisterUserNotificationSettingsEventName\r\n      WithMessage:[NSString stringWithFormat:@\"%@\", @\"user notifications registered!\"]];\r\n\r\n//    [self checkPendingNotification];\r\n}\r\n*/\r\n\r\n/*\r\n-(void)checkPendingNotification {\r\n    if (notificationMessage) {\r\n        NSLog(@\"--- in checkPendingNotification, notificationMessage\");\r\n        [self notificationReceived];\r\n    } else if (self.launchNotification) {\r\n        NSLog(@\"--- in checkPendingNotification, launchNotification\");\r\n        notificationMessage = self.launchNotification;\r\n        [self notificationReceived];\r\n    } else {\r\n        NSLog(@\"--- in checkPendingNotification, nothing\");\r\n    }\r\n}\r\n*/\r\n\r\n#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000\r\n- (BOOL)createNotificationAction:(NSDictionary *)category\r\n                         actions:(NSArray *) actions\r\n                       nsActions:(NSMutableArray *)nsActions\r\n{\r\n    for (NSDictionary *action in actions) {\r\n        UIMutableUserNotificationAction *nsAction = [[UIMutableUserNotificationAction alloc] init];\r\n        // Define an ID string to be passed back to your app when you handle the action\r\n        NSString *identifier = [action objectForKey:@\"identifier\"];\r\n        if (identifier == nil) {\r\n            [self fail:failToRegisterUserNotificationSettingsEventName WithMessage:@\"Action doesn't contain identifier\" withError:nil];\r\n            return NO;\r\n        }\r\n        nsAction.identifier = identifier;\r\n        // Localized text displayed in the action button\r\n        NSString *title = [action objectForKey:@\"title\"];\r\n        if (title == nil) {\r\n            [self fail:failToRegisterUserNotificationSettingsEventName WithMessage:@\"Action doesn't contain title\" withError:nil];\r\n            return NO;\r\n        }\r\n        nsAction.title = title;\r\n        // If you need to show UI, choose foreground (background gives your app a few seconds to run)\r\n        BOOL isForeground = [@\"foreground\" isEqualToString:[action objectForKey:@\"activationMode\"]];\r\n        nsAction.activationMode = isForeground ? UIUserNotificationActivationModeForeground : UIUserNotificationActivationModeBackground;\r\n        // Destructive actions display in red\r\n        BOOL isDestructive = [[action objectForKey:@\"destructive\"] isEqual:[NSNumber numberWithBool:YES]];\r\n        nsAction.destructive = isDestructive;\r\n        // Set whether the action requires the user to authenticate\r\n        BOOL isAuthRequired = [[action objectForKey:@\"authenticationRequired\"] isEqual:[NSNumber numberWithBool:YES]];\r\n        nsAction.authenticationRequired = isAuthRequired;\r\n        [nsActions addObject:nsAction];\r\n    }\r\n    return YES;\r\n}\r\n#endif\r\n\r\n-(void)success:(NSString *)eventName WithDictionary:(NSMutableDictionary *)userInfo\r\n{\r\n    [[NSNotificationCenter defaultCenter]\r\n     postNotificationName:eventName\r\n     object:self userInfo:userInfo];\r\n}\r\n\r\n-(void)success:(NSString *)eventName WithMessage:(NSString *)message\r\n{\r\n    NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];\r\n    [userInfo setValue:message forKey:@\"message\"];\r\n    [[NSNotificationCenter defaultCenter] postNotificationName:eventName object:self userInfo:userInfo];\r\n}\r\n\r\n-(void)fail:(NSString *)eventName WithMessage:(NSString *)message withError:(NSError *)error\r\n{\r\n    NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];\r\n    NSString *errorMessage = (error) ? [NSString stringWithFormat:@\"%@ - %@\", message, [error localizedDescription]] : message;\r\n    [userInfo setValue:errorMessage forKey:@\"message\"];\r\n    \r\n    [[NSNotificationCenter defaultCenter]\r\n     postNotificationName:eventName\r\n     object:self userInfo:userInfo];\r\n}\r\n\r\n- (NSMutableArray *)launchNotification\r\n{\r\n    return objc_getAssociatedObject(self, &launchNotificationKey);\r\n}\r\n\r\n- (void)setLaunchNotification:(UILocalNotification *)notification\r\n{\r\n    objc_setAssociatedObject(self, &launchNotificationKey, notification, OBJC_ASSOCIATION_RETAIN_NONATOMIC);\r\n}\r\n\r\n- (void)dealloc\r\n{\r\n    self.launchNotification\t= nil;\r\n}\r\n\r\n@end\r\n"
  },
  {
    "path": "native-src/ios/LocalNotificationsPlugin/NotificationManager.h",
    "content": "#import <Foundation/Foundation.h>\r\n#import \"Notification.h\"\r\n\r\n@interface NotificationManager : NSObject\r\n@end\r\n"
  },
  {
    "path": "native-src/ios/LocalNotificationsPlugin/NotificationManager.m",
    "content": "#import \"NotificationManager.h\"\r\n#import <UIKit/UIApplication.h>\r\n#import <UIKit/UILocalNotification.h>\r\n#import <objc/runtime.h>\r\n\r\n@implementation NotificationManager\r\n\r\nstatic IMP didRegisterOriginalMethod = NULL;\r\nstatic IMP didRegisterUserOriginalMethod = NULL;\r\nstatic IMP didReceiveOriginalMethod = NULL;\r\nstatic IMP didReceiveLocalOriginalMethod = NULL;\r\nstatic IMP handleActionWithIdentifierLocalOriginalMethod = NULL;\r\n\r\n+ (void)load {\r\n\r\n    [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidBecomeActiveNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) {\r\n        [NotificationManager myApplicationDidBecomeActive:[UIApplication sharedApplication]];\r\n    }];\r\n    \r\n    [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidFinishLaunchingNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) {\r\n        \r\n        UIApplication *app = [UIApplication sharedApplication];\r\n        id<UIApplicationDelegate> appDelegate = app.delegate;\r\n        \r\n        // didRegisterUserNotificationSettings swizzle\r\n        Method didRegisterUserMethod = class_getInstanceMethod([NotificationManager class], @selector(my_application:didRegisterUserNotificationSettings:));\r\n        IMP didRegisterUserMethodImp = method_getImplementation(didRegisterUserMethod);\r\n        const char* didRegisterUserTypes = method_getTypeEncoding(didRegisterUserMethod);\r\n        \r\n        Method didRegisterUserOriginal = class_getInstanceMethod(appDelegate.class, @selector(application:didRegisterUserNotificationSettings:));\r\n        if (didRegisterUserOriginal) {\r\n            didRegisterUserOriginalMethod = method_getImplementation(didRegisterUserOriginal);\r\n            method_exchangeImplementations(didRegisterUserOriginal, didRegisterUserMethod);\r\n        } else {\r\n            class_addMethod(appDelegate.class, @selector(application:didRegisterUserNotificationSettings:), didRegisterUserMethodImp, didRegisterUserTypes);\r\n        }\r\n        \r\n        // didReceiveLocalNotification swizzle\r\n        Method didReceiveLocalMethod = class_getInstanceMethod([NotificationManager class], @selector(my_application:didReceiveLocalNotification:));\r\n        IMP didReceiveLocalMethodImp = method_getImplementation(didReceiveLocalMethod);\r\n        const char* didReceiveLocalTypes = method_getTypeEncoding(didReceiveLocalMethod);\r\n        \r\n        Method didReceiveLocalOriginal = class_getInstanceMethod(appDelegate.class, @selector(application:didReceiveLocalNotification:));\r\n        if (didReceiveLocalOriginal) {\r\n            didReceiveLocalOriginalMethod = method_getImplementation(didReceiveLocalOriginal);\r\n            method_exchangeImplementations(didReceiveLocalOriginal, didReceiveLocalMethod);\r\n        } else {\r\n            class_addMethod(appDelegate.class, @selector(application:didReceiveLocalNotification:), didReceiveLocalMethodImp, didReceiveLocalTypes);\r\n        }\r\n        \r\n#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000\r\n\r\n        // handleActionWithIdentifier local swizzle\r\n        Method handleActionWithIdentifierLocalMethod = class_getInstanceMethod([NotificationManager class], @selector(my_application:handleActionWithIdentifier:forLocalNotification:completionHandler:));\r\n        IMP handleActionWithIdentifierMethodLocalImp = method_getImplementation(handleActionWithIdentifierLocalMethod);\r\n        const char* handleActionWithIdentifierTypesLocal = method_getTypeEncoding(handleActionWithIdentifierLocalMethod);\r\n        \r\n        Method handleActionWithIdentifierLocalOriginal = class_getInstanceMethod(appDelegate.class, @selector(application:handleActionWithIdentifier:forLocalNotification:completionHandler:));\r\n        if (handleActionWithIdentifierLocalOriginal) {\r\n            handleActionWithIdentifierLocalOriginalMethod = method_getImplementation(handleActionWithIdentifierLocalOriginal);\r\n            method_exchangeImplementations(handleActionWithIdentifierLocalOriginal, handleActionWithIdentifierLocalMethod);\r\n        } else {\r\n            class_addMethod(appDelegate.class, @selector(application:handleActionWithIdentifier:forLocalNotification:completionHandler:), handleActionWithIdentifierMethodLocalImp, handleActionWithIdentifierTypesLocal);\r\n        }\r\n#endif\r\n    }];\r\n    \r\n}\r\n\r\n-(id)init\r\n{\r\n    [[NSNotificationCenter defaultCenter] addObserver:self\r\n                                             selector:@selector(createNotificationChecker:)\r\n                                                 name:@\"UIApplicationDidFinishLaunchingNotification\" object:nil];\r\n    return self;\r\n}\r\n\r\n- (void)createNotificationChecker:(NSNotification *)notification\r\n{\r\n    if (notification)\r\n    {\r\n        NSDictionary *launchOptions = [notification userInfo];\r\n        if (launchOptions)\r\n            [Notification sharedInstance].launchNotification = [launchOptions objectForKey: @\"UIApplicationLaunchOptionsRemoteNotificationKey\"];\r\n    }\r\n}\r\n\r\n+ (void)myApplicationDidBecomeActive:(UIApplication *)application\r\n{\r\n    application.applicationIconBadgeNumber = 0;\r\n    if ([Notification sharedInstance].launchNotification) {\r\n        [Notification sharedInstance].launchNotification = nil;\r\n        [[Notification sharedInstance] performSelectorOnMainThread:@selector(notificationReceived) withObject:[Notification sharedInstance] waitUntilDone:NO];\r\n    }\r\n}\r\n\r\n- (void)my_application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {\r\n    if (didRegisterOriginalMethod) {\r\n        void (*originalImp)(id, SEL, UIApplication *, NSData *) = didRegisterOriginalMethod;\r\n        originalImp(self, @selector(application:didRegisterUserNotificationSettings:), application, notificationSettings);\r\n    }\r\n    NSLog(@\"%@\", notificationSettings);\r\n    [[Notification sharedInstance] didRegisterUserNotificationSettings:notificationSettings];\r\n}\r\n\r\n- (void)my_application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {\r\n    if (didReceiveLocalOriginalMethod) {\r\n        void (*originalImp)(id, SEL, UIApplication *, UILocalNotification *) = didReceiveOriginalMethod;\r\n        originalImp(self, @selector(application:didReceiveLocalNotification:), application, notification);\r\n    }\r\n    \r\n    UIApplicationState appState = UIApplicationStateActive;\r\n    if ([application respondsToSelector:@selector(applicationState)]) {\r\n        appState = application.applicationState;\r\n    }\r\n    \r\n    if (appState == UIApplicationStateActive) {\r\n        [Notification sharedInstance].notificationMessage = notification;\r\n        [Notification sharedInstance].isInline = YES;\r\n        [[Notification sharedInstance] notificationReceived];\r\n    } else {\r\n        [Notification sharedInstance].launchNotification = notification;\r\n        [Notification sharedInstance].notificationMessage = notification;\r\n        [Notification sharedInstance].isInline = NO;\r\n    }\r\n}\r\n\r\n- (void)my_application:(UIApplication *) application handleActionWithIdentifier: (NSString *) identifier forLocalNotification: (UILocalNotification *) notification completionHandler: (void (^)()) completionHandler {\r\n    \r\n    if (application.applicationState == UIApplicationStateActive) {\r\n        [Notification sharedInstance].notificationMessage = notification;\r\n        [Notification sharedInstance].isInline = YES;\r\n        [[Notification sharedInstance] notificationReceived];\r\n    } else {\r\n        [Notification sharedInstance].notificationMessage = notification;\r\n        [[Notification sharedInstance] performSelectorOnMainThread:@selector(notificationReceived) withObject:[Notification sharedInstance] waitUntilDone:NO];\r\n    }\r\n    \r\n    if (handleActionWithIdentifierLocalOriginalMethod) {\r\n        void (*originalImp)(id, SEL, UIApplication *, NSString *, UILocalNotification *, void(^)()) = handleActionWithIdentifierLocalOriginalMethod;\r\n        originalImp(self, @selector(application:handleActionWithIdentifier:forLocalNotification:completionHandler:), application, identifier, notification, completionHandler);\r\n    } else {\r\n        completionHandler();\r\n    }\r\n}\r\n\r\n@end\r\n"
  },
  {
    "path": "native-src/ios/LocalNotificationsPlugin.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXAggregateTarget section */\n\t\t2B6E19381B454A67006A7B46 /* LocalNotificationsPluginLibrary */ = {\n\t\t\tisa = PBXAggregateTarget;\n\t\t\tbuildConfigurationList = 2B6E19391B454A68006A7B46 /* Build configuration list for PBXAggregateTarget \"LocalNotificationsPluginLibrary\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t2B1764CF1B454AF200936DC0 /* ShellScript */,\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = LocalNotificationsPluginLibrary;\n\t\t\tproductName = PushPluginLibrary;\n\t\t};\n/* End PBXAggregateTarget section */\n\n/* Begin PBXBuildFile section */\n\t\t2B1764D41B4567E500936DC0 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B1764D31B4567E500936DC0 /* UIKit.framework */; };\n\t\t2B6E19231B454838006A7B46 /* LocalNotificationsPlugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B6E19171B454838006A7B46 /* LocalNotificationsPlugin.framework */; };\n\t\tA325E9481C45871900C9F16B /* LocalNotificationsPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = A325E9421C45871900C9F16B /* LocalNotificationsPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tA325E9491C45871900C9F16B /* Notification.h in Headers */ = {isa = PBXBuildFile; fileRef = A325E9431C45871900C9F16B /* Notification.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tA325E94A1C45871900C9F16B /* Notification.m in Sources */ = {isa = PBXBuildFile; fileRef = A325E9441C45871900C9F16B /* Notification.m */; };\n\t\tA325E94B1C45871900C9F16B /* NotificationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = A325E9451C45871900C9F16B /* NotificationManager.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tA325E94C1C45871900C9F16B /* NotificationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = A325E9461C45871900C9F16B /* NotificationManager.m */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\t2B6E19241B454838006A7B46 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 2B6E190E1B454838006A7B46 /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 2B6E19161B454838006A7B46;\n\t\t\tremoteInfo = PushPlugin;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXFileReference section */\n\t\t2B1764D31B4567E500936DC0 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };\n\t\t2B6E19171B454838006A7B46 /* LocalNotificationsPlugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LocalNotificationsPlugin.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t2B6E19221B454838006A7B46 /* LocalNotificationsPlugin.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LocalNotificationsPlugin.xctest; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tA325E9411C45871900C9F16B /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\tA325E9421C45871900C9F16B /* LocalNotificationsPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalNotificationsPlugin.h; sourceTree = \"<group>\"; };\n\t\tA325E9431C45871900C9F16B /* Notification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Notification.h; sourceTree = \"<group>\"; };\n\t\tA325E9441C45871900C9F16B /* Notification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Notification.m; sourceTree = \"<group>\"; };\n\t\tA325E9451C45871900C9F16B /* NotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotificationManager.h; sourceTree = \"<group>\"; };\n\t\tA325E9461C45871900C9F16B /* NotificationManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NotificationManager.m; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t2B6E19131B454838006A7B46 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t2B1764D41B4567E500936DC0 /* UIKit.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t2B6E191F1B454838006A7B46 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t2B6E19231B454838006A7B46 /* LocalNotificationsPlugin.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t2B6E190D1B454838006A7B46 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA325E9401C45871900C9F16B /* LocalNotificationsPlugin */,\n\t\t\t\t2B1764D31B4567E500936DC0 /* UIKit.framework */,\n\t\t\t\t2B6E19181B454838006A7B46 /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t2B6E19181B454838006A7B46 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t2B6E19171B454838006A7B46 /* LocalNotificationsPlugin.framework */,\n\t\t\t\t2B6E19221B454838006A7B46 /* LocalNotificationsPlugin.xctest */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA325E9401C45871900C9F16B /* LocalNotificationsPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA325E9411C45871900C9F16B /* Info.plist */,\n\t\t\t\tA325E9421C45871900C9F16B /* LocalNotificationsPlugin.h */,\n\t\t\t\tA325E9431C45871900C9F16B /* Notification.h */,\n\t\t\t\tA325E9441C45871900C9F16B /* Notification.m */,\n\t\t\t\tA325E9451C45871900C9F16B /* NotificationManager.h */,\n\t\t\t\tA325E9461C45871900C9F16B /* NotificationManager.m */,\n\t\t\t);\n\t\t\tpath = LocalNotificationsPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXHeadersBuildPhase section */\n\t\t2B6E19141B454838006A7B46 /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tA325E94B1C45871900C9F16B /* NotificationManager.h in Headers */,\n\t\t\t\tA325E9481C45871900C9F16B /* LocalNotificationsPlugin.h in Headers */,\n\t\t\t\tA325E9491C45871900C9F16B /* Notification.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXHeadersBuildPhase section */\n\n/* Begin PBXNativeTarget section */\n\t\t2B6E19161B454838006A7B46 /* LocalNotificationsPlugin */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 2B6E192D1B454838006A7B46 /* Build configuration list for PBXNativeTarget \"LocalNotificationsPlugin\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t2B6E19121B454838006A7B46 /* Sources */,\n\t\t\t\t2B6E19131B454838006A7B46 /* Frameworks */,\n\t\t\t\t2B6E19141B454838006A7B46 /* Headers */,\n\t\t\t\t2B6E19151B454838006A7B46 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = LocalNotificationsPlugin;\n\t\t\tproductName = PushPlugin;\n\t\t\tproductReference = 2B6E19171B454838006A7B46 /* LocalNotificationsPlugin.framework */;\n\t\t\tproductType = \"com.apple.product-type.framework\";\n\t\t};\n\t\t2B6E19211B454838006A7B46 /* LocalNotificationsPluginTests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 2B6E19301B454838006A7B46 /* Build configuration list for PBXNativeTarget \"LocalNotificationsPluginTests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t2B6E191E1B454838006A7B46 /* Sources */,\n\t\t\t\t2B6E191F1B454838006A7B46 /* Frameworks */,\n\t\t\t\t2B6E19201B454838006A7B46 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t2B6E19251B454838006A7B46 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = LocalNotificationsPluginTests;\n\t\t\tproductName = PushPluginTests;\n\t\t\tproductReference = 2B6E19221B454838006A7B46 /* LocalNotificationsPlugin.xctest */;\n\t\t\tproductType = \"com.apple.product-type.bundle.unit-test\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t2B6E190E1B454838006A7B46 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 0720;\n\t\t\t\tORGANIZATIONNAME = Telerik;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t2B6E19161B454838006A7B46 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 6.2;\n\t\t\t\t\t};\n\t\t\t\t\t2B6E19211B454838006A7B46 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 6.2;\n\t\t\t\t\t};\n\t\t\t\t\t2B6E19381B454A67006A7B46 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 6.2;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 2B6E19111B454838006A7B46 /* Build configuration list for PBXProject \"LocalNotificationsPlugin\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t);\n\t\t\tmainGroup = 2B6E190D1B454838006A7B46;\n\t\t\tproductRefGroup = 2B6E19181B454838006A7B46 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t2B6E19161B454838006A7B46 /* LocalNotificationsPlugin */,\n\t\t\t\t2B6E19211B454838006A7B46 /* LocalNotificationsPluginTests */,\n\t\t\t\t2B6E19381B454A67006A7B46 /* LocalNotificationsPluginLibrary */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t2B6E19151B454838006A7B46 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t2B6E19201B454838006A7B46 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t2B1764CF1B454AF200936DC0 /* ShellScript */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal\\n\\n# make sure the output directory exists\\nmkdir -p \\\"${UNIVERSAL_OUTPUTFOLDER}\\\"\\n\\n# Step 1. Build Device and Simulator versions\\nxcodebuild -target \\\"${PROJECT_NAME}\\\" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos  BUILD_DIR=\\\"${BUILD_DIR}\\\" BUILD_ROOT=\\\"${BUILD_ROOT}\\\" clean build\\nxcodebuild -target \\\"${PROJECT_NAME}\\\" -configuration ${CONFIGURATION} -sdk iphonesimulator BUILD_DIR=\\\"${BUILD_DIR}\\\" BUILD_ROOT=\\\"${BUILD_ROOT}\\\" clean build\\n\\n# Step 2. Copy the framework structure to the universal folder\\ncp -R \\\"${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework\\\" \\\"${UNIVERSAL_OUTPUTFOLDER}/\\\"\\n\\n# Step 3. Create universal binary file using lipo and place the combined executable in the copied framework directory\\nlipo -create -output \\\"${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework/${PROJECT_NAME}\\\" \\\"${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${PROJECT_NAME}.framework/${PROJECT_NAME}\\\" \\\"${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework/${PROJECT_NAME}\\\"\";\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t2B6E19121B454838006A7B46 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tA325E94C1C45871900C9F16B /* NotificationManager.m in Sources */,\n\t\t\t\tA325E94A1C45871900C9F16B /* Notification.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t2B6E191E1B454838006A7B46 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXTargetDependency section */\n\t\t2B6E19251B454838006A7B46 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 2B6E19161B454838006A7B46 /* LocalNotificationsPlugin */;\n\t\t\ttargetProxy = 2B6E19241B454838006A7B46 /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin XCBuildConfiguration section */\n\t\t2B6E192B1B454838006A7B46 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_SYMBOLS_PRIVATE_EXTERN = NO;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t\tVERSION_INFO_PREFIX = \"\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t2B6E192C1B454838006A7B46 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t\tVERSION_INFO_PREFIX = \"\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t2B6E192E1B454838006A7B46 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tDEFINES_MODULE = YES;\n\t\t\t\tDYLIB_COMPATIBILITY_VERSION = 1;\n\t\t\t\tDYLIB_CURRENT_VERSION = 1;\n\t\t\t\tDYLIB_INSTALL_NAME_BASE = \"@rpath\";\n\t\t\t\tINFOPLIST_FILE = LocalNotificationsPlugin/Info.plist;\n\t\t\t\tINSTALL_PATH = \"$(LOCAL_LIBRARY_DIR)/Frameworks\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tONLY_ACTIVE_ARCH = NO;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.telerik.localnotifications.$(PRODUCT_NAME:rfc1034identifier)\";\n\t\t\t\tPRODUCT_NAME = LocalNotificationsPlugin;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t2B6E192F1B454838006A7B46 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tDEFINES_MODULE = YES;\n\t\t\t\tDYLIB_COMPATIBILITY_VERSION = 1;\n\t\t\t\tDYLIB_CURRENT_VERSION = 1;\n\t\t\t\tDYLIB_INSTALL_NAME_BASE = \"@rpath\";\n\t\t\t\tINFOPLIST_FILE = LocalNotificationsPlugin/Info.plist;\n\t\t\t\tINSTALL_PATH = \"$(LOCAL_LIBRARY_DIR)/Frameworks\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tONLY_ACTIVE_ARCH = NO;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.telerik.localnotifications.$(PRODUCT_NAME:rfc1034identifier)\";\n\t\t\t\tPRODUCT_NAME = LocalNotificationsPlugin;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t2B6E19311B454838006A7B46 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(SDKROOT)/Developer/Library/Frameworks\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = LocalNotificationsPlugin/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.telerik.localnotifications.$(PRODUCT_NAME:rfc1034identifier)\";\n\t\t\t\tPRODUCT_NAME = LocalNotificationsPlugin;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t2B6E19321B454838006A7B46 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(SDKROOT)/Developer/Library/Frameworks\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = LocalNotificationsPlugin/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.telerik.localnotifications.$(PRODUCT_NAME:rfc1034identifier)\";\n\t\t\t\tPRODUCT_NAME = LocalNotificationsPlugin;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t2B6E193A1B454A68006A7B46 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tPRODUCT_NAME = LocalNotificationsPlugin;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t2B6E193B1B454A68006A7B46 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tPRODUCT_NAME = LocalNotificationsPlugin;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t2B6E19111B454838006A7B46 /* Build configuration list for PBXProject \"LocalNotificationsPlugin\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t2B6E192B1B454838006A7B46 /* Debug */,\n\t\t\t\t2B6E192C1B454838006A7B46 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t2B6E192D1B454838006A7B46 /* Build configuration list for PBXNativeTarget \"LocalNotificationsPlugin\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t2B6E192E1B454838006A7B46 /* Debug */,\n\t\t\t\t2B6E192F1B454838006A7B46 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t2B6E19301B454838006A7B46 /* Build configuration list for PBXNativeTarget \"LocalNotificationsPluginTests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t2B6E19311B454838006A7B46 /* Debug */,\n\t\t\t\t2B6E19321B454838006A7B46 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t2B6E19391B454A68006A7B46 /* Build configuration list for PBXAggregateTarget \"LocalNotificationsPluginLibrary\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t2B6E193A1B454A68006A7B46 /* Debug */,\n\t\t\t\t2B6E193B1B454A68006A7B46 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 2B6E190E1B454838006A7B46 /* Project object */;\n}\n"
  },
  {
    "path": "native-src/ios/LocalNotificationsPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:/Users/eddyverbruggen/sandboxes/nativescript-local-notifications/native-src/ios/LocalNotificationsPlugin.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "native-src/ios/LocalNotificationsPlugin.xcodeproj/project.xcworkspace/xcshareddata/PushPlugin.xccheckout",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\r\n<plist version=\"1.0\">\r\n<dict>\r\n\t<key>IDESourceControlProjectFavoriteDictionaryKey</key>\r\n\t<false/>\r\n\t<key>IDESourceControlProjectIdentifier</key>\r\n\t<string>BC8B754B-9C8D-47D0-ABA9-1598CAAC06C3</string>\r\n\t<key>IDESourceControlProjectName</key>\r\n\t<string>PushPlugin</string>\r\n\t<key>IDESourceControlProjectOriginsDictionary</key>\r\n\t<dict>\r\n\t\t<key>E8C553F8FBDE6C62B10352AA36517C14BC12A66F</key>\r\n\t\t<string>https://github.com/telerik/push-plugin-ios.git</string>\r\n\t</dict>\r\n\t<key>IDESourceControlProjectPath</key>\r\n\t<string>PushPlugin.xcodeproj</string>\r\n\t<key>IDESourceControlProjectRelativeInstallPathDictionary</key>\r\n\t<dict>\r\n\t\t<key>E8C553F8FBDE6C62B10352AA36517C14BC12A66F</key>\r\n\t\t<string>../..</string>\r\n\t</dict>\r\n\t<key>IDESourceControlProjectURL</key>\r\n\t<string>https://github.com/telerik/push-plugin-ios.git</string>\r\n\t<key>IDESourceControlProjectVersion</key>\r\n\t<integer>111</integer>\r\n\t<key>IDESourceControlProjectWCCIdentifier</key>\r\n\t<string>E8C553F8FBDE6C62B10352AA36517C14BC12A66F</string>\r\n\t<key>IDESourceControlProjectWCConfigurations</key>\r\n\t<array>\r\n\t\t<dict>\r\n\t\t\t<key>IDESourceControlRepositoryExtensionIdentifierKey</key>\r\n\t\t\t<string>public.vcs.git</string>\r\n\t\t\t<key>IDESourceControlWCCIdentifierKey</key>\r\n\t\t\t<string>E8C553F8FBDE6C62B10352AA36517C14BC12A66F</string>\r\n\t\t\t<key>IDESourceControlWCCName</key>\r\n\t\t\t<string>push-plugin-ios</string>\r\n\t\t</dict>\r\n\t</array>\r\n</dict>\r\n</plist>\r\n"
  },
  {
    "path": "native-src/ios/README.md",
    "content": "# Local Notifications Plugin library for NativeScript iOS apps\r\n\r\nThis is the native iOS for the Telerik NativeScript Local Notifications plugin.\r\nNot really useful for usage outside this plugin.\r\n\r\n## Building the framework\r\n- Run the target for simulator and device, make sure to not only build for the active architecture\r\n- Right-click the file in the Products folder and open in Finder\r\n- In a Terminal `cd` to that folder, move up to the `Products` folder\r\n- Run `lipo -create -output \"LocalNotificationsPlugin\" \"Debug-iphonesimulator/LocalNotificationsPlugin.framework/LocalNotificationsPlugin\" \"Debug-iphoneos/LocalNotificationsPlugin.framework/LocalNotificationsPlugin\"`\r\n- Use the resulting `LocalNotificationsPlugin` file instead of the one generated inside any of the target"
  },
  {
    "path": "publish/pack.sh",
    "content": "#!/bin/bash\n\nSOURCE_DIR=../src;\nTO_SOURCE_DIR=src;\nPACK_DIR=package;\nROOT_DIR=..;\nPUBLISH=--publish\n\ninstall(){\n    npm i\n}\n\npack() {\n\n    echo 'Clearing /src and /package...'\n    node_modules/.bin/rimraf \"$TO_SOURCE_DIR\"\n    node_modules/.bin/rimraf \"$PACK_DIR\"\n\n    # copy src\n    echo 'Copying src...'\n    node_modules/.bin/ncp \"$SOURCE_DIR\" \"$TO_SOURCE_DIR\"\n\n    # copy README & LICENSE to src\n    echo 'Copying README and LICENSE to /src...'\n    node_modules/.bin/ncp \"$ROOT_DIR\"/LICENSE \"$TO_SOURCE_DIR\"/LICENSE\n    node_modules/.bin/ncp \"$ROOT_DIR\"/README.md \"$TO_SOURCE_DIR\"/README.md\n\n    # compile package and copy files required by npm\n    echo 'Building /src...'\n    cd \"$TO_SOURCE_DIR\"\n    node_modules/.bin/tsc\n    cd ..\n\n    echo 'Creating package...'\n    # create package dir\n    mkdir \"$PACK_DIR\"\n\n    # create the package\n    cd \"$PACK_DIR\"\n    npm pack ../\"$TO_SOURCE_DIR\"\n\n    # delete source directory used to create the package\n    cd ..\n    node_modules/.bin/rimraf \"$TO_SOURCE_DIR\"\n}\n\ninstall && pack"
  },
  {
    "path": "publish/package.json",
    "content": "{\n  \"name\": \"nativescript-publish\",\n  \"version\": \"1.0.0\",\n  \"description\": \"Publish helper\",\n  \"devDependencies\": {\n    \"ncp\": \"^2.0.0\",\n    \"rimraf\": \"^2.5.0\"\n  }\n}\n"
  },
  {
    "path": "publish/publish.sh",
    "content": "#!/bin/bash\n\nPACK_DIR=package;\n\npublish() {\n    cd $PACK_DIR\n    echo 'Publishing to npm...'\n    npm publish *.tgz\n}\n\n./pack.sh && publish\n"
  },
  {
    "path": "src/.npmignore",
    "content": ".idea/\n.vscode/\nnative-src/\n*.ts\n!*.d.ts\ntsconfig.json\nreferences.d.ts\n"
  },
  {
    "path": "src/index.d.ts",
    "content": "/**\n * iOS and Android apis should match.\n * It doesn't matter if you export `.ios` or `.android`, either one but only one.\n */\nexport * from \"./local-notifications.ios\";\n\n// Export any shared classes, constants, etc.\nexport * from \"./local-notifications-common\";\n"
  },
  {
    "path": "src/local-notifications-common.ts",
    "content": "import { Color } from \"tns-core-modules/color/color\";\n\nexport type ScheduleInterval = \"second\" | \"minute\" | \"hour\" | \"day\" | \"week\" | \"month\" | \"quarter\" | \"year\";\n\nexport interface NotificationAction {\n  id: string;\n  type: \"button\" | \"input\";\n  title?: string;\n  /**\n   * Launch the app when the action is triggered.\n   * Default false.\n   */\n  launch?: boolean;\n  submitLabel?: string;\n  placeholder?: string;\n  /**\n   * For type = \"input\".\n   * Default true.\n   * Android only.\n   */\n  editable?: boolean;\n  /**\n   * For type = \"input\".\n   * Android only.\n   */\n  choices?: Array<string>;\n}\n\n/**\n * The options object passed into the schedule function.\n */\nexport interface ScheduleOptions {\n  /**\n   * A number so you can easily distinguish your notifications.\n   * Default <generated>.\n   */\n  id?: number;\n\n  /**\n   * The title which is shown in the statusbar.\n   * Default not set.\n   */\n  title?: string;\n\n  /**\n   * Shown below the title on iOS >= 10, and next to the App name on Android.\n   * Default not set.\n   * All android and iOS >= 10 only.\n   */\n  subtitle?: string;\n\n  /**\n   * The text below the title.\n   * Default not set on Android. On iOS, the subtitle, title (in this order or priority) will be swapped for it on iOS,\n   * as iOS won't display notifications without a body. If none of them are set, `' '` will be used.\n   */\n  body?: string;\n\n  /**\n   * On Android you can show a different text in the statusbar, instead of the 'body'.\n   * Default not set, so `body` is used.\n   */\n  ticker?: string;\n\n  /**\n   * A JavaScript Date object indicating when the notification should be shown.\n   * Default 'now'.\n   */\n  at?: Date;\n\n  // TODO\n  trigger?: \"timeInterval\";\n\n  /**\n   * On iOS (and some Android devices) you see a number on top of the app icon. On most Android devices you'll see this number in the notification center.\n   * Default not set (0).\n   */\n  badge?: number;\n\n  /**\n   * Currently this is only used on Android where you can set this to 'null' to suppress the sound.\n   * Default 'the default notification sound'.\n   */\n  sound?: string;\n\n  /**\n   * Custom color for the notification icon and title that will be applied when the notification center is expanded.\n   * Android >= Lollipop (21) only.\n   */\n  color?: Color;\n\n  interval?: ScheduleInterval;\n\n  /**\n   * On Android you can set a custom icon in the system tray.\n   * Pass in `res://filename` (without the extension) which lives in `App_Resouces/Android/drawable` folders.\n   * If not passed, we'll look there for a file named `ic_stat_notify.png`.\n   * By default the app icon is used.\n   * Android < Lollipop (21) only (also see 'silhouetteIcon').\n   */\n  icon?: string;\n\n  /**\n   * Same as `icon`, but for Android >= Lollipop (21) (also see 'icon').\n   * Should be an alpha-only image.\n   * Defaults to `res://ic_stat_notify_silhouette`, or the app icon if not present.\n   */\n  silhouetteIcon?: string;\n\n  /**\n   * Custom thumbnail/icon to show in the notification center on Android, this can be:\n   * - true if you want to use the image as the thumbnail as well.\n   * - A resource url that lives in App_Resouces/Android/drawable folders. E.g.: 'res://filename.png'.\n   * - A http url from anywhere on the web.\n   *\n   * Android only.\n   * Default not set.\n   */\n  thumbnail?: boolean | string;\n\n  /**\n   * Set whether this is an \"ongoing\" notification.\n   * Ongoing notifications cannot be dismissed by the user,\n   * so your application or must take care of canceling them.\n   *\n   * Android only.\n   * Default false.\n   */\n  ongoing?: boolean;\n\n  /**\n   * An array of messages to be displayed as a single notification using the inbox style\n   * Note: the length of the array cannot be greater than five, in a situation where it\n   * is, the array would be trimmed from the top\n   *\n   * Android only.\n   */\n  groupedMessages?: Array<string>;\n\n  /**\n   * The summary of the grouped message (see #groupedMessage) when using the inbox style\n   *\n   * Android only.\n   */\n  groupSummary?: string;\n\n  /**\n   * URL (http) of the image to use as an expandable notification image.\n   */\n  image?: string;\n\n  /**\n   * Using the big text style\n   *\n   * Android only.\n   * Default false.\n   */\n  bigTextStyle?: boolean;\n\n  /**\n   * Enable the notification LED light with optional LED light style settings\n   * - true if you want to use default color\n   * - Custom color if you would like to use custom color for the notification LED light.\n   *\n   * Android only.\n   * Default not set.\n   */\n  notificationLed?: boolean | Color;\n\n  /**\n   * When longpressing a notification on Android (API >= 26), this 'channel' name is revealed.\n   * Default 'Channel'.\n   */\n  channel?: string;\n\n  /**\n   * Default false.\n   */\n  forceShowWhenInForeground?: boolean;\n\n  priority?: number;\n\n  /**\n   * Buttons or text input.\n   */\n  actions?: Array<NotificationAction>;\n}\n\nexport interface ReceivedNotification {\n  id: number;\n  foreground: boolean;\n  title?: string;\n  body?: string;\n  event?: string;\n  response?: string;\n}\n\nexport interface LocalNotificationsApi {\n  /**\n   * On iOS you need to ask permission to schedule a notification.\n   * You can have the `schedule` funtion do that for you automatically\n   * (the notification will be scheduled in case the user granted permission),\n   * or you can manually invoke `requestPermission` if that's your thing.\n   */\n  schedule(options: ScheduleOptions[]): Promise<Array<number>>;\n\n  /**\n   * Tapping a notification in the notification center will launch your app.\n   * But what if you scheduled two notifications and you want to know which one the user tapped?\n   *\n   * Use this function to have a callback invoked when a notification was used to launch your app.\n   * Note that on iOS it will even be triggered when your app is in the foreground and a notification is received.\n   */\n  addOnMessageReceivedCallback(onReceived: (data: ReceivedNotification) => void): Promise<any>;\n\n  /**\n   * Use when you want to know the id's of all notifications which have been scheduled.\n   */\n  getScheduledIds(): Promise<number[]>;\n\n  /**\n   * Cancels the 'id' passed in.\n   * On iOS returns whether or not it was found (and cancelled).\n   * On Android we always return true currently.\n   */\n  cancel(id: number): Promise<boolean>;\n\n  /**\n   * Use when you just want to cancel all previously scheduled notifications.\n   */\n  cancelAll(): Promise<any>;\n\n  /**\n   * On Android you don't need permission, but on iOS you do.\n   * Android will simply return true.\n   *\n   * If the 'requestPermission' or 'schedule' functions previously ran\n   * you may want to check whether or not the user granted permission.\n   */\n  hasPermission(): Promise<boolean>;\n\n  /**\n   * On Android you don't need permission, but on iOS you do.\n   * Android will simply return true.\n   *\n   * If the 'requestPermission' or 'schedule' function previously ran\n   * the user has already been prompted to grant permission.\n   *\n   * If the user granted permission this function returns true,\n   * but if he denied permission this function will return false\n   * since an iOS can only request permission once. In which case the user needs\n   * to go to the iOS settings app and manually enable permissions for your app.\n   */\n  requestPermission(): Promise<boolean>;\n}\n\n// TODO: This could be just an utils file!\n\nexport abstract class LocalNotificationsCommon {\n  protected static defaults = {\n    badge: 0,\n    interval: undefined,\n    ongoing: false,\n    groupSummary: null,\n    bigTextStyle: false,\n    channel: \"Channel\",\n    forceShowWhenInForeground: false\n  };\n\n  protected static merge(obj1: {}, obj2: {}): any {\n    let result = {};\n    for (let i in obj1) {\n      if ((i in obj2) && (typeof obj1[i] === \"object\") && (i !== null)) {\n        result[i] = this.merge(obj1[i], obj2[i]);\n      } else {\n        result[i] = obj1[i];\n      }\n    }\n    for (let i in obj2) {\n      if (i in result) {\n        continue;\n      }\n      result[i] = obj2[i];\n    }\n    return result;\n  }\n\n  protected static generateUUID(): string {\n    // Not the best, but it will work. See https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\n    const s4 = () => Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n    return `${s4()}${s4()}-${s4()}-${s4()}-${s4()}-${s4()}${s4()}${s4()}`;\n  }\n\n  protected static generateNotificationID(): number {\n    return Math.round((Date.now() + Math.round((100000 * Math.random()))) / 1000);\n  }\n\n  protected static ensureID(opts: ScheduleOptions): number {\n    const id = opts.id;\n\n    if (typeof id === \"number\") {\n      return id;\n    } else {\n      // We need unique IDs in all notifications to be able to persist them without overwriting one another:\n      return opts.id = LocalNotificationsCommon.generateNotificationID();\n    }\n  }\n}\n"
  },
  {
    "path": "src/local-notifications.android.ts",
    "content": "import * as app from \"tns-core-modules/application\";\nimport * as utils from \"tns-core-modules/utils/utils\";\nimport {\n  LocalNotificationsApi,\n  LocalNotificationsCommon,\n  ReceivedNotification,\n  ScheduleInterval,\n  ScheduleOptions\n} from \"./local-notifications-common\";\n\ndeclare const android, com, global: any;\n\nconst NotificationManagerCompatPackageName = useAndroidX() ? global.androidx.core.app : android.support.v4.app;\n\nfunction useAndroidX () {\n  return global.androidx && global.androidx.appcompat;\n}\n\n(() => {\n  const registerLifecycleEvents = () => {\n    com.telerik.localnotifications.LifecycleCallbacks.registerCallbacks(app.android.nativeApp);\n  };\n\n  // Hook on the application events\n  if (app.android.nativeApp) {\n    registerLifecycleEvents();\n  } else {\n    app.on(app.launchEvent, registerLifecycleEvents);\n  }\n})();\n\nexport class LocalNotificationsImpl extends LocalNotificationsCommon implements LocalNotificationsApi {\n\n  private static IS_GTE_LOLLIPOP: boolean = android.os.Build.VERSION.SDK_INT >= 21;\n\n  private static getInterval(interval: ScheduleInterval): number {\n    if (interval === \"second\") {\n      return 1000; // it's in ms\n    } else if (interval === \"minute\") {\n      return android.app.AlarmManager.INTERVAL_FIFTEEN_MINUTES / 15;\n    } else if (interval === \"hour\") {\n      return android.app.AlarmManager.INTERVAL_HOUR;\n    } else if (interval === \"day\") {\n      return android.app.AlarmManager.INTERVAL_DAY;\n    } else if (interval === \"week\") {\n      return android.app.AlarmManager.INTERVAL_DAY * 7;\n    } else if (interval === \"month\") {\n      return android.app.AlarmManager.INTERVAL_DAY * 31; // well that's almost accurate\n    } else if (interval === \"year\") {\n      return android.app.AlarmManager.INTERVAL_DAY * 365; // same here\n    } else {\n      return undefined;\n    }\n  }\n\n  private static getIcon(context: any /* android.content.Context */, resources: any, iconLocation?: string): string {\n    const packageName: string = context.getApplicationInfo().packageName;\n    return iconLocation\n        && iconLocation.indexOf(utils.RESOURCE_PREFIX) === 0\n        && resources.getIdentifier(iconLocation.substr(utils.RESOURCE_PREFIX.length), \"drawable\", packageName)\n        || (LocalNotificationsImpl.IS_GTE_LOLLIPOP && resources.getIdentifier(\"ic_stat_notify_silhouette\", \"drawable\", packageName))\n        || resources.getIdentifier(\"ic_stat_notify\", \"drawable\", packageName)\n        || context.getApplicationInfo().icon;\n  }\n\n  private static cancelById(id: number): void {\n    const context = utils.ad.getApplicationContext();\n    const notificationIntent = new android.content.Intent(context, com.telerik.localnotifications.NotificationAlarmReceiver.class).setAction(\"\" + id);\n    const pendingIntent = android.app.PendingIntent.getBroadcast(context, 0, notificationIntent, 0);\n    const alarmManager = context.getSystemService(android.content.Context.ALARM_SERVICE);\n    alarmManager.cancel(pendingIntent);\n    const notificationManager = context.getSystemService(android.content.Context.NOTIFICATION_SERVICE);\n    notificationManager.cancel(id);\n\n    com.telerik.localnotifications.Store.remove(context, id);\n  }\n\n  hasPermission(): Promise<boolean> {\n    return new Promise((resolve, reject) => {\n      try {\n        resolve(LocalNotificationsImpl.hasPermission());\n      } catch (ex) {\n        console.log(\"Error in LocalNotifications.hasPermission: \" + ex);\n        reject(ex);\n      }\n    });\n  }\n\n  requestPermission(): Promise<boolean> {\n    return new Promise((resolve, reject) => {\n      try {\n        // AFAIK can't do it on this platform.. when 'false' is returned, the app could prompt the user to manually enable them in the Device Settings\n        resolve(LocalNotificationsImpl.hasPermission());\n      } catch (ex) {\n        console.log(\"Error in LocalNotifications.requestPermission: \" + ex);\n        reject(ex);\n      }\n    });\n  }\n\n  addOnMessageReceivedCallback(onReceived: (data: ReceivedNotification) => void): Promise<any> {\n    return new Promise((resolve, reject) => {\n      try {\n        // note that this is ONLY triggered when the user clicked the notification in the statusbar\n        com.telerik.localnotifications.LocalNotificationsPlugin.setOnMessageReceivedCallback(\n            new com.telerik.localnotifications.LocalNotificationsPluginListener({\n              success: notification => {\n                onReceived(JSON.parse(notification));\n              }\n            })\n        );\n        resolve();\n      } catch (ex) {\n        console.log(\"Error in LocalNotifications.addOnMessageReceivedCallback: \" + ex);\n        reject(ex);\n      }\n    });\n  }\n\n  addOnMessageClearedCallback(onReceived: (data: ReceivedNotification) => void): Promise<any> {\n    return new Promise((resolve, reject) => {\n      try {\n        // note that this is ONLY triggered when the user clicked the notification in the statusbar\n        com.telerik.localnotifications.LocalNotificationsPlugin.setOnMessageClearedCallback(\n            new com.telerik.localnotifications.LocalNotificationsPluginListener({\n              success: notification => {\n                onReceived(JSON.parse(notification));\n              }\n            })\n        );\n        resolve();\n      } catch (ex) {\n        console.log(\"Error in LocalNotifications.addOnMessageClearedCallback: \" + ex);\n        reject(ex);\n      }\n    });\n  }\n\n  cancel(id: number): Promise<boolean> {\n    return new Promise((resolve, reject) => {\n      try {\n        LocalNotificationsImpl.cancelById(id);\n        resolve(true);\n      } catch (ex) {\n        console.log(\"Error in LocalNotifications.cancel: \" + ex);\n        reject(ex);\n      }\n    });\n  }\n\n  cancelAll(): Promise<void> {\n    return new Promise((resolve, reject) => {\n      try {\n        const context = utils.ad.getApplicationContext();\n\n        // if (android.os.Build.VERSION.SDK_INT >= 26) {\n        //   const notificationManager = context.getSystemService(android.content.Context.NOTIFICATION_SERVICE);\n        //   console.log(\">> >= 26, getActiveNotifications: \" + notificationManager.getActiveNotifications());\n        // } else {\n        //   console.log(\">> < 26, StatusBarNotification[0]: \" + new android.service.notification.StatusBarNotification[0]);\n        // }\n\n        const keys: Array<string> = com.telerik.localnotifications.Store.getKeys(utils.ad.getApplicationContext());\n\n        for (let i = 0; i < keys.length; i++) {\n          LocalNotificationsImpl.cancelById(parseInt(keys[i]));\n        }\n\n        NotificationManagerCompatPackageName.NotificationManagerCompat.from(context).cancelAll();\n        resolve();\n      } catch (ex) {\n        console.log(\"Error in LocalNotifications.cancelAll: \" + ex);\n        reject(ex);\n      }\n    });\n  }\n\n  getScheduledIds(): Promise<number[]> {\n    return new Promise((resolve, reject) => {\n      try {\n        const keys: Array<string> = com.telerik.localnotifications.Store.getKeys(utils.ad.getApplicationContext());\n\n        const ids: number[] = [];\n        for (let i = 0; i < keys.length; i++) {\n          ids.push(parseInt(keys[i]));\n        }\n\n        resolve(ids);\n      } catch (ex) {\n        console.log(\"Error in LocalNotifications.getScheduledIds: \" + ex);\n        reject(ex);\n      }\n    });\n  }\n\n  schedule(scheduleOptions: ScheduleOptions[]): Promise<Array<number>> {\n    return new Promise((resolve, reject) => {\n      try {\n        if (!LocalNotificationsImpl.hasPermission()) {\n          reject(\"Permission not granted\");\n          return;\n        }\n\n        const context = utils.ad.getApplicationContext();\n        const resources = context.getResources();\n        const scheduledIds: Array<number> = [];\n\n        // TODO: All these changes in the options (other than setting the ID) should rather be done in Java so that\n        // the persisted options are exactly like the original ones.\n\n        for (let n in scheduleOptions) {\n          const options = LocalNotificationsImpl.merge(scheduleOptions[n], LocalNotificationsImpl.defaults);\n\n          options.icon = LocalNotificationsImpl.getIcon(\n              context,\n              resources,\n              LocalNotificationsImpl.IS_GTE_LOLLIPOP && options.silhouetteIcon || options.icon\n          );\n\n          options.atTime = options.at ? options.at.getTime() : 0;\n\n          // Used when restoring the notification after a reboot:\n          options.repeatInterval = LocalNotificationsImpl.getInterval(options.interval);\n\n          if (options.color) {\n            options.color = options.color.android;\n          }\n\n          if (options.notificationLed && options.notificationLed !== true) {\n            options.notificationLed = options.notificationLed.android;\n          }\n\n          LocalNotificationsImpl.ensureID(options);\n\n          com.telerik.localnotifications.LocalNotificationsPlugin.scheduleNotification(\n              new org.json.JSONObject(JSON.stringify(options)),\n              context);\n\n          scheduledIds.push(options.id);\n        }\n\n        resolve(scheduledIds);\n      } catch (ex) {\n        console.log(\"Error in LocalNotifications.schedule: \" + ex);\n        reject(ex);\n      }\n    });\n  }\n\n  private static hasPermission(): boolean {\n    const context = utils.ad.getApplicationContext();\n    return !context || NotificationManagerCompatPackageName.NotificationManagerCompat.from(context).areNotificationsEnabled();\n  }\n}\n\nexport const LocalNotifications = new LocalNotificationsImpl();"
  },
  {
    "path": "src/local-notifications.ios.ts",
    "content": "import { DelegateObserver, SharedNotificationDelegate } from \"nativescript-shared-notification-delegate\";\nimport * as fileSystemModule from \"tns-core-modules/file-system\";\nimport { fromUrl } from \"tns-core-modules/image-source\";\nimport { LocalNotificationsApi, LocalNotificationsCommon, ReceivedNotification, ScheduleInterval, ScheduleOptions } from \"./local-notifications-common\";\n\ndeclare const Notification: any;\n\nexport class LocalNotificationsImpl extends LocalNotificationsCommon implements LocalNotificationsApi {\n\n  private static didRegisterUserNotificationSettingsObserver: any;\n  private notificationReceivedObserver: any;\n  private pendingReceivedNotifications: Array<ReceivedNotification> = [];\n  private receivedNotificationCallback: (data: ReceivedNotification) => void;\n  private notificationHandler: Notification;\n  private notificationManager: NotificationManager;\n  private observer: LocalNotificationsDelegateObserverImpl;\n\n  constructor() {\n    super();\n    if (LocalNotificationsImpl.isUNUserNotificationCenterAvailable()) {\n      this.observer = new LocalNotificationsDelegateObserverImpl(new WeakRef(this));\n      SharedNotificationDelegate.addObserver(this.observer);\n\n    } else {\n      // grab 'em here, store 'em in JS, and give them to the callback when addOnMessageReceivedCallback is wired\n      this.notificationReceivedObserver = LocalNotificationsImpl.addObserver(\"notificationReceived\", result => {\n        const notificationDetails = JSON.parse(result.userInfo.objectForKey(\"message\"));\n        this.addOrProcessNotification(notificationDetails);\n      });\n\n      this.notificationHandler = Notification.new();\n      this.notificationManager = NotificationManager.new();\n    }\n  }\n\n  static isUNUserNotificationCenterAvailable(): boolean {\n    try {\n      // available since iOS 10\n      return !!UNUserNotificationCenter;\n    } catch (ignore) {\n      return false;\n    }\n  }\n\n  private static hasPermission(): boolean {\n    const settings = UIApplication.sharedApplication.currentUserNotificationSettings;\n    const types = UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound;\n    return (settings.types & types) > 0;\n  }\n\n  private static getImageName(imageURL: string = \"\", extension: \"png\" | \"jpeg\" | \"jpg\" = \"png\"): [string, string] {\n    const name: string = imageURL.split(/[\\/\\.]/).slice(-2, -1)[0] || LocalNotificationsImpl.generateUUID();\n    return [name, `${name}.${extension}`];\n  }\n\n  private static addObserver(eventName, callback): any {\n    return NSNotificationCenter.defaultCenter.addObserverForNameObjectQueueUsingBlock(eventName, null, NSOperationQueue.mainQueue, callback);\n  }\n\n  private static getInterval(interval: ScheduleInterval): NSCalendarUnit {\n    if (interval === \"minute\") {\n      return NSCalendarUnit.CalendarUnitSecond;\n    } else if (interval === \"hour\") {\n      return NSCalendarUnit.CalendarUnitMinute | NSCalendarUnit.CalendarUnitSecond;\n    } else if (interval === \"day\") {\n      return NSCalendarUnit.CalendarUnitHour | NSCalendarUnit.CalendarUnitMinute | NSCalendarUnit.CalendarUnitSecond;\n    } else if (interval === \"week\") {\n      return NSCalendarUnit.CalendarUnitWeekday | NSCalendarUnit.CalendarUnitHour | NSCalendarUnit.CalendarUnitMinute | NSCalendarUnit.CalendarUnitSecond;\n    } else if (interval === \"month\") {\n      return NSCalendarUnit.CalendarUnitDay | NSCalendarUnit.CalendarUnitHour | NSCalendarUnit.CalendarUnitMinute | NSCalendarUnit.CalendarUnitSecond;\n    } else if (interval === \"year\") {\n      return NSCalendarUnit.CalendarUnitMonth | NSCalendarUnit.CalendarUnitDay | NSCalendarUnit.CalendarUnitHour | NSCalendarUnit.CalendarUnitMinute | NSCalendarUnit.CalendarUnitSecond;\n    } else {\n      return NSCalendarUnit.CalendarUnitYear | NSCalendarUnit.CalendarUnitMonth | NSCalendarUnit.CalendarUnitDay | NSCalendarUnit.CalendarUnitHour | NSCalendarUnit.CalendarUnitMinute | NSCalendarUnit.CalendarUnitSecond;\n    }\n  }\n\n  private static getIntervalSeconds(interval: ScheduleInterval, ticks: number): number {\n    if (!interval) {\n      return ticks;\n    } else if (interval === \"second\") {\n      return ticks;\n    } else if (interval === \"minute\") {\n      return ticks * 60;\n    } else if (interval === \"hour\") {\n      return ticks * 60 * 60;\n    } else if (interval === \"day\") {\n      return ticks * 60 * 60 * 24;\n    } else if (interval === \"week\") {\n      return ticks * 60 * 60 * 24 * 7;\n    } else if (interval === \"month\") {\n      return ticks * 60 * 60 * 24 * 30.438;\n    } else if (interval === \"quarter\") {\n      return ticks * 60 * 60 * 24 * 91.313;\n    } else if (interval === \"year\") {\n      return ticks * 60 * 60 * 24 * 365;\n    } else {\n      return ticks;\n    }\n  }\n\n  private static schedulePendingNotifications(pending: ScheduleOptions[]): Array<number> {\n    if (LocalNotificationsImpl.isUNUserNotificationCenterAvailable()) {\n      return LocalNotificationsImpl.schedulePendingNotificationsNew(pending);\n    } else {\n      return LocalNotificationsImpl.schedulePendingNotificationsLegacy(pending);\n    }\n  }\n\n  private static schedulePendingNotificationsNew(pending: ScheduleOptions[]): Array<number> {\n    const scheduledIds: Array<number> = [];\n    for (const n in pending) {\n      const options: ScheduleOptions = LocalNotificationsImpl.merge(pending[n], LocalNotificationsImpl.defaults);\n\n      LocalNotificationsImpl.ensureID(options);\n      scheduledIds.push(options.id);\n\n      // Notification content\n      const content = UNMutableNotificationContent.new();\n\n      const {title, subtitle, body} = options;\n      content.title = body || subtitle ? title : undefined;\n      content.subtitle = body ? subtitle : undefined;\n      // On iOS, a notification with no body won't show up, so the subtitle or title will be used in this case as body\n      // instead. If none of them is set, we set it to ' ' and will show up as an empty line in the notification:\n      content.body = body || subtitle || title || \" \";\n\n      content.badge = options.badge;\n\n      if (options.sound === undefined || options.sound === \"default\") {\n        content.sound = UNNotificationSound.defaultSound;\n      }\n\n      const userInfoDict = new NSMutableDictionary({capacity: 3});\n      userInfoDict.setObjectForKey(\"nativescript-local-notifications\", \"__NotificationType\");\n      userInfoDict.setObjectForKey(options.forceShowWhenInForeground, \"forceShowWhenInForeground\");\n      userInfoDict.setObjectForKey(options.priority || 0, \"priority\");\n      content.userInfo = userInfoDict;\n\n      // Notification trigger and repeat\n      let trigger: UNNotificationTrigger;\n      if (options.at) {\n        const cal = LocalNotificationsImpl.calendarWithMondayAsFirstDay();\n        const date = cal.componentsFromDate(LocalNotificationsImpl.getInterval(options.interval), options.at);\n        date.timeZone = NSTimeZone.defaultTimeZone;\n        trigger = UNCalendarNotificationTrigger.triggerWithDateMatchingComponentsRepeats(date, options.interval !== undefined);\n      } else {\n        trigger = UNTimeIntervalNotificationTrigger.triggerWithTimeIntervalRepeats(2, false);\n      }\n\n      // actions\n      if (options.actions) {\n        let categoryIdentifier = \"CATEGORY\";\n        const actions: Array<UNNotificationAction> = [];\n\n        options.actions.forEach(action => {\n          categoryIdentifier += (\"_\" + action.id);\n\n          let notificationActionOptions: UNNotificationActionOptions = UNNotificationActionOptionNone;\n\n          if (action.launch) {\n            notificationActionOptions = UNNotificationActionOptions.Foreground;\n          }\n\n          if (action.type === \"input\") {\n            actions.push(UNTextInputNotificationAction.actionWithIdentifierTitleOptionsTextInputButtonTitleTextInputPlaceholder(\n                \"\" + action.id,\n                action.title,\n                notificationActionOptions,\n                action.submitLabel || \"Submit\",\n                action.placeholder));\n\n          } else if (action.type === \"button\") {\n            actions.push(UNNotificationAction.actionWithIdentifierTitleOptions(\n                \"\" + action.id,\n                action.title,\n                notificationActionOptions));\n\n          } else {\n            console.log(\"Unsupported action type: \" + action.type);\n          }\n\n        });\n        const notificationCategory = UNNotificationCategory.categoryWithIdentifierActionsIntentIdentifiersOptions(\n            categoryIdentifier,\n            <any>actions,\n            <any>[],\n            UNNotificationCategoryOptions.CustomDismissAction);\n\n        content.categoryIdentifier = categoryIdentifier;\n\n        UNUserNotificationCenter.currentNotificationCenter().getNotificationCategoriesWithCompletionHandler((categories: NSSet<UNNotificationCategory>) => {\n          if (categories) {\n            UNUserNotificationCenter.currentNotificationCenter().setNotificationCategories(categories.setByAddingObject(notificationCategory));\n          } else {\n            UNUserNotificationCenter.currentNotificationCenter().setNotificationCategories(NSSet.setWithObject<UNNotificationCategory>(notificationCategory));\n          }\n        });\n      }\n\n      if (!options.image) {\n        UNUserNotificationCenter.currentNotificationCenter().addNotificationRequestWithCompletionHandler(\n            UNNotificationRequest.requestWithIdentifierContentTrigger(\"\" + options.id, content, trigger),\n            (error: NSError) => error ? console.log(`Error scheduling notification (id ${options.id}): ${error.localizedDescription}`) : null);\n      } else {\n        fromUrl(options.image).then(image => {\n          const [imageName, imageNameWithExtension] = LocalNotificationsImpl.getImageName(options.image, \"png\");\n          const path: string = fileSystemModule.path.join(\n              fileSystemModule.knownFolders.temp().path,\n              imageNameWithExtension,\n          );\n          const saved = image.saveToFile(path, \"png\");\n          if (saved || fileSystemModule.File.exists(path)) {\n            try {\n              content.attachments = NSArray.arrayWithObject<UNNotificationAttachment>(\n                  UNNotificationAttachment.attachmentWithIdentifierURLOptionsError(\n                      imageName,\n                      NSURL.fileURLWithPath(path),\n                      null\n                  ));\n            } catch (err) {\n              console.log(\"Error adding image attachment - ignoring the image. Error: \" + err);\n              // Just fall back to a normal notification...\n            }\n          }\n          UNUserNotificationCenter.currentNotificationCenter().addNotificationRequestWithCompletionHandler(\n              UNNotificationRequest.requestWithIdentifierContentTrigger(\"\" + options.id, content, trigger),\n              (error: NSError) => error ? console.log(`Error scheduling notification (id ${options.id}): ${error.localizedDescription}`) : null);\n        });\n      }\n    }\n    return scheduledIds;\n  }\n\n  private static calendarWithMondayAsFirstDay(): NSCalendar {\n    const cal = NSCalendar.alloc().initWithCalendarIdentifier(NSCalendarIdentifierISO8601);\n    cal.firstWeekday = 2;\n    cal.minimumDaysInFirstWeek = 1;\n    return cal;\n  }\n\n  private static schedulePendingNotificationsLegacy(pending: ScheduleOptions[]): Array<number> {\n    const scheduledIds: Array<number> = [];\n    for (const n in pending) {\n      const options = LocalNotificationsImpl.merge(pending[n], LocalNotificationsImpl.defaults);\n\n      LocalNotificationsImpl.ensureID(options);\n      scheduledIds.push(options.id);\n\n      const notification = UILocalNotification.new();\n      notification.fireDate = options.at ? options.at : new Date();\n      notification.alertTitle = options.title;\n      notification.alertBody = options.body;\n\n      notification.timeZone = NSTimeZone.defaultTimeZone;\n      notification.applicationIconBadgeNumber = options.badge;\n\n      // these are sent back to the plugin when a notification is received\n      const userInfoDict = NSMutableDictionary.alloc().initWithCapacity(4);\n      userInfoDict.setObjectForKey(options.id, \"id\");\n      userInfoDict.setObjectForKey(options.title, \"title\");\n      userInfoDict.setObjectForKey(options.body, \"body\");\n      userInfoDict.setObjectForKey(options.interval, \"interval\");\n      notification.userInfo = userInfoDict;\n\n      switch (options.sound) {\n        case null:\n        case false:\n          break;\n        case undefined:\n        case \"default\":\n          notification.soundName = UILocalNotificationDefaultSoundName;\n          break;\n        default:\n          notification.soundName = options.sound;\n          break;\n      }\n\n      // Used when restoring the notification after a reboot:\n      options.repeatInterval = LocalNotificationsImpl.getInterval(options.interval);\n\n      // notification.soundName = custom..;\n      // notification.resumeApplicationInBackground = true;\n\n      UIApplication.sharedApplication.scheduleLocalNotification(notification);\n    }\n    return scheduledIds;\n  }\n\n  addOrProcessNotification(notificationDetails: ReceivedNotification): void {\n    if (this.receivedNotificationCallback) {\n      this.receivedNotificationCallback(notificationDetails);\n    } else {\n      this.pendingReceivedNotifications.push(notificationDetails);\n    }\n  }\n\n  hasPermission(): Promise<boolean> {\n    return new Promise((resolve, reject) => {\n      try {\n        resolve(LocalNotificationsImpl.hasPermission());\n      } catch (ex) {\n        console.log(\"Error in LocalNotifications.hasPermission: \" + ex);\n        reject(ex);\n      }\n    });\n  }\n\n  requestPermission(): Promise<boolean> {\n    return new Promise((resolve, reject) => {\n      if (LocalNotificationsImpl.isUNUserNotificationCenterAvailable()) {\n        // iOS >= 10\n        const center = UNUserNotificationCenter.currentNotificationCenter();\n        center.requestAuthorizationWithOptionsCompletionHandler(\n            UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound,\n            (granted: boolean, error: NSError) => resolve(granted));\n\n      } else {\n        // iOS < 10\n        LocalNotificationsImpl.didRegisterUserNotificationSettingsObserver = LocalNotificationsImpl.addObserver(\"didRegisterUserNotificationSettings\", result => {\n          NSNotificationCenter.defaultCenter.removeObserver(LocalNotificationsImpl.didRegisterUserNotificationSettingsObserver);\n          LocalNotificationsImpl.didRegisterUserNotificationSettingsObserver = undefined;\n          const granted = result.userInfo.objectForKey(\"message\");\n          resolve(granted !== \"false\" && granted !== false);\n        });\n\n        const types = UIApplication.sharedApplication.currentUserNotificationSettings.types | UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound;\n        const settings = UIUserNotificationSettings.settingsForTypesCategories(types, null);\n        UIApplication.sharedApplication.registerUserNotificationSettings(settings);\n      }\n    });\n  }\n\n  addOnMessageReceivedCallback(onReceived: (data: ReceivedNotification) => void): Promise<any> {\n    return new Promise((resolve, reject) => {\n      try {\n        this.receivedNotificationCallback = onReceived;\n        for (const pendingReceivedNotification of this.pendingReceivedNotifications) {\n          onReceived(pendingReceivedNotification);\n        }\n        this.pendingReceivedNotifications = [];\n\n        resolve(true);\n      } catch (ex) {\n        console.log(\"Error in LocalNotifications.addOnMessageReceivedCallback: \" + ex);\n        reject(ex);\n      }\n    });\n  }\n\n  addOnMessageClearedCallback(onReceived: (data: ReceivedNotification) => void): Promise<any> {\n    // Not possible on iOS. It looks like this would only work if the notification has categories set, which might not\n    // be the case. Therefore, this method is just a placeholder in case users use it without checking the platform\n    // they are in. See:\n    // - https://stackoverflow.com/questions/44009707/customdismissaction-not-working-for-remote-notifications\n    // - https://stackoverflow.com/questions/31929274/know-if-ios-notification-was-dismiss.\n\n    return Promise.resolve(false);\n  }\n\n  cancel(id: number): Promise<boolean> {\n    return new Promise((resolve, reject) => {\n      try {\n        if (LocalNotificationsImpl.isUNUserNotificationCenterAvailable()) {\n          UNUserNotificationCenter.currentNotificationCenter().removePendingNotificationRequestsWithIdentifiers(<any>[\"\" + id]);\n          resolve(true);\n\n        } else {\n          const scheduled = UIApplication.sharedApplication.scheduledLocalNotifications;\n          for (let i = 0, l = scheduled.count; i < l; i++) {\n            const noti = scheduled.objectAtIndex(i);\n            if (id === +noti.userInfo.valueForKey(\"id\")) {\n              UIApplication.sharedApplication.cancelLocalNotification(noti);\n              resolve(true);\n              return;\n            }\n          }\n          resolve(false);\n        }\n      } catch (ex) {\n        console.log(\"Error in LocalNotifications.cancel: \" + ex);\n        reject(ex);\n      }\n    });\n  }\n\n  cancelAll(): Promise<any> {\n    return new Promise((resolve, reject) => {\n      try {\n        if (LocalNotificationsImpl.isUNUserNotificationCenterAvailable()) {\n          UNUserNotificationCenter.currentNotificationCenter().removeAllPendingNotificationRequests();\n        } else {\n          UIApplication.sharedApplication.cancelAllLocalNotifications();\n        }\n        UIApplication.sharedApplication.applicationIconBadgeNumber = 0;\n        resolve();\n      } catch (ex) {\n        console.log(\"Error in LocalNotifications.cancelAll: \" + ex);\n        reject(ex);\n      }\n    });\n  }\n\n  getScheduledIds(): Promise<number[]> {\n    return new Promise((resolve, reject) => {\n      try {\n        const scheduledIds = [];\n\n        if (LocalNotificationsImpl.isUNUserNotificationCenterAvailable()) {\n          UNUserNotificationCenter.currentNotificationCenter().getPendingNotificationRequestsWithCompletionHandler((notRequests: NSArray<UNNotificationRequest>) => {\n            if (notRequests) {\n              for (let i = 0; i < notRequests.count; i++) {\n                scheduledIds.push(notRequests[i].identifier);\n              }\n            }\n            resolve(scheduledIds.map(Number));\n          });\n\n        } else {\n          const scheduled = UIApplication.sharedApplication.scheduledLocalNotifications;\n          for (let i = 0, l = scheduled.count; i < l; i++) {\n            scheduledIds.push(scheduled.objectAtIndex(i).userInfo.valueForKey(\"id\"));\n          }\n          resolve(scheduledIds.map(Number));\n        }\n\n      } catch (ex) {\n        console.log(\"Error in LocalNotifications.getScheduledIds: \" + ex);\n        reject(ex);\n      }\n    });\n  }\n\n  schedule(options: ScheduleOptions[]): Promise<Array<number>> {\n    return new Promise((resolve, reject) => {\n      try {\n        if (!LocalNotificationsImpl.hasPermission()) {\n          this.requestPermission().then(granted => {\n            if (granted) {\n              resolve(LocalNotificationsImpl.schedulePendingNotifications(options));\n            } else {\n              reject(\"Permission not granted\");\n            }\n          });\n        } else {\n          resolve(LocalNotificationsImpl.schedulePendingNotifications(options));\n        }\n      } catch (ex) {\n        console.log(\"Error in LocalNotifications.schedule: \" + ex);\n        reject(ex);\n      }\n    });\n  }\n}\n\nclass LocalNotificationsDelegateObserverImpl implements DelegateObserver {\n\n  private _owner: WeakRef<LocalNotificationsImpl>;\n  private receivedInForeground = false;\n\n  observerUniqueKey = \"nativescript-local-notifications\";\n\n  constructor(owner: WeakRef<LocalNotificationsImpl>) {\n    this._owner = owner;\n  }\n\n  /**\n   * Called when the app was opened by a notification.\n   */\n  userNotificationCenterDidReceiveNotificationResponseWithCompletionHandler(center: UNUserNotificationCenter, notificationResponse: UNNotificationResponse, completionHandler: () => void, next: () => void): void {\n    if (notificationResponse.notification.request.content.userInfo.valueForKey(\"__NotificationType\") !== \"nativescript-local-notifications\") {\n      next();\n      return;\n    }\n    const request = notificationResponse.notification.request,\n        notificationContent = request.content,\n        action = notificationResponse.actionIdentifier;\n\n    // let's ignore dismiss actions\n    if (action === UNNotificationDismissActionIdentifier) {\n      completionHandler();\n      return;\n    }\n\n    let event = \"default\";\n    if (action !== UNNotificationDefaultActionIdentifier) {\n      event = notificationResponse instanceof UNTextInputNotificationResponse ? \"input\" : \"button\";\n    }\n\n    let response = notificationResponse.actionIdentifier;\n    if (response === UNNotificationDefaultActionIdentifier) {\n      response = undefined;\n    } else if (notificationResponse instanceof UNTextInputNotificationResponse) {\n      response = (<UNTextInputNotificationResponse>notificationResponse).userText;\n    }\n\n    this._owner.get().addOrProcessNotification({\n      id: +request.identifier,\n      title: notificationContent.title,\n      body: notificationContent.body,\n      foreground: this.receivedInForeground || UIApplication.sharedApplication.applicationState === UIApplicationState.Active,\n      event,\n      response\n    });\n\n    this.receivedInForeground = false;\n\n    completionHandler();\n  }\n\n  /**\n   * Called when the app is in the foreground.\n   */\n  userNotificationCenterWillPresentNotificationWithCompletionHandler(center: UNUserNotificationCenter, notification: UNNotification, completionHandler: (presentationOptions: UNNotificationPresentationOptions) => void, next: () => void): void {\n    if (notification.request.content.userInfo.valueForKey(\"__NotificationType\") !== \"nativescript-local-notifications\"\n        || notification.request.trigger instanceof UNPushNotificationTrigger) {\n      next();\n      return;\n    }\n\n    this.receivedInForeground = true;\n\n    if (notification.request.content.userInfo.valueForKey(\"forceShowWhenInForeground\") || notification.request.content.userInfo.valueForKey(\"priority\")) {\n      completionHandler(UNNotificationPresentationOptions.Badge | UNNotificationPresentationOptions.Sound | UNNotificationPresentationOptions.Alert);\n    } else {\n      completionHandler(UNNotificationPresentationOptions.Badge | UNNotificationPresentationOptions.Sound);\n    }\n  }\n}\n\nconst instance = new LocalNotificationsImpl();\nexport const LocalNotifications = instance;\n"
  },
  {
    "path": "src/package.json",
    "content": "{\n  \"name\": \"nativescript-local-notifications\",\n  \"version\": \"4.2.1\",\n  \"description\": \"The Local Notifications plugin allows your app to show notifications when the app is not running. Just like remote push notifications, but a few orders of magnitude easier to set up.\",\n  \"main\": \"local-notifications\",\n  \"typings\": \"index.d.ts\",\n  \"nativescript\": {\n    \"platforms\": {\n      \"android\": \"6.0.0\",\n      \"ios\": \"6.0.0\"\n    }\n  },\n  \"scripts\": {\n    \"build\": \"npm i && tsc --skipLibCheck\",\n    \"demo.ios\": \"npm run build && cd ../demo && tns run ios\",\n    \"demo.android\": \"npm run build && cd ../demo && tns run android\",\n    \"demo-ng.ios\": \"npm run build && cd ../demo-ng && tns run ios\",\n    \"demo-ng.android\": \"npm run build && cd ../demo-ng && tns run android\",\n    \"demo-vue.ios\": \"npm run build && cd ../demo-vue && tns run ios --bundle\",\n    \"demo-vue.android\": \"npm run build && cd ../demo-vue && tns run android --bundle\",\n    \"test\": \"npm run tslint && npm run tslint.demo && cd ../demo && tns build ios && tns build android\",\n    \"test.ios\": \"cd ../demo && tns test ios --emulator\",\n    \"test.ios.device\": \"cd ../demo && tns test ios\",\n    \"test.android\": \"cd ../demo && tns test android --justlaunch\",\n    \"plugin.link\": \"npm link && cd ../demo && npm link nativescript-mapbox && cd ../src\",\n    \"preparedemo\": \"npm run build && cd ../demo && tns plugin remove nativescript-mapbox && tns plugin add ../src && tns install\",\n    \"setup\": \"npm run build && cd ../demo && npm i\",\n    \"setupandinstall\": \"npm i && cd ../demo && npm i && cd ../src && npm run build && cd ../demo && tns plugin add ../src && cd ../src\",\n    \"tslint\": \"tslint --config '../tslint.json' '*.ts' --exclude '**/node_modules/**'\",\n    \"tslint.demo\": \"tslint --config '../tslint.json' '../demo/app/*.ts' --exclude '**/node_modules/**'\",\n    \"ci.tslint\": \"npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**' --exclude '**/platforms/**'\",\n    \"prepublishOnly\": \"npm run build\",\n    \"development.setup\": \"npm run setup && npm link && cd ../demo && npm link nativescript-mapbox && cd ../src\",\n    \"generate.typings.ios\": \"cd ../demo && TNS_DEBUG_METADATA_PATH=\\\"$(pwd)/metadata\\\" tns build ios && TNS_TYPESCRIPT_DECLARATIONS_PATH=\\\"$(pwd)/typings\\\" tns build ios && echo 'Now look for your library typings in demo/typings!'\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/eddyverbruggen/nativescript-local-notifications.git\"\n  },\n  \"keywords\": [\n    \"ecosystem:NativeScript\",\n    \"NativeScript\",\n    \"Alarm\",\n    \"Notification\",\n    \"Local Notification\"\n  ],\n  \"author\": {\n    \"name\": \"Eddy Verbruggen\",\n    \"url\": \"https://github.com/EddyVerbruggen/\"\n  },\n  \"contributors\": [\n    {\n      \"name\": \"Dani Gámez Franco\",\n      \"url\": \"https://github.com/Danziger\"\n    }\n  ],\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/eddyverbruggen/nativescript-local-notifications/issues\"\n  },\n  \"homepage\": \"https://github.com/eddyverbruggen/nativescript-local-notifications\",\n  \"devDependencies\": {\n    \"nativescript-dev-typescript\": \"~0.10.0\",\n    \"tns-core-modules\": \"~6.1.2\",\n    \"tns-platform-declarations\": \"~6.1.2\",\n    \"tslint\": \"^5.10.0\",\n    \"typescript\": \"~3.4.5\"\n  },\n  \"dependencies\": {\n    \"nativescript-shared-notification-delegate\": \"~1.0.0\"\n  }\n}\n"
  },
  {
    "path": "src/platforms/ios/LocalNotificationsPlugin.framework/Headers/LocalNotificationsPlugin.h",
    "content": "#import <UIKit/UIKit.h>\n\n//! Project version number for LocalNotificationsPlugin.\nFOUNDATION_EXPORT double LocalNotificationsVersionNumber;\n\n//! Project version string for LocalNotificationsPlugin.\nFOUNDATION_EXPORT const unsigned char LocalNotificationsPluginVersionString[];\n\n// In this header, you should import all the public headers of your framework\n#import <Notification.h>\n#import <NotificationManager.h>"
  },
  {
    "path": "src/platforms/ios/LocalNotificationsPlugin.framework/Headers/Notification.h",
    "content": "#import <Foundation/Foundation.h>\n#import <UIKit/UIApplication.h>\n\n@interface Notification : NSObject <UIApplicationDelegate>\n{\n    UILocalNotification *notificationMessage;\n    BOOL isInline;\n}\n\n@property (nonatomic, strong) UILocalNotification *notificationMessage;\n@property BOOL isInline;\n@property (nonatomic, retain) UILocalNotification *launchNotification;\n\n+ (instancetype)sharedInstance;\n\n//-(void)register:(NSMutableDictionary *)options;\n//-(void)registerUserNotificationSettings:(NSDictionary*)options;\n-(void)setApplicationIconBadgeNumber:(NSMutableDictionary *)options;\n-(void)didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings;\n-(void)notificationReceived;\n-(void)success:(NSString *)eventName WithMessage:(NSString *)message;\n-(void)success:(NSString *)eventName WithDictionary:(NSMutableDictionary *)userInfo;\n-(void)fail:(NSString *)eventName WithMessage:(NSString *)message withError:(NSError *)error;\n@end\n"
  },
  {
    "path": "src/platforms/ios/LocalNotificationsPlugin.framework/Headers/NotificationManager.h",
    "content": "#import <Foundation/Foundation.h>\n#import \"Notification.h\"\n\n@interface NotificationManager : NSObject\n@end\n"
  },
  {
    "path": "src/platforms/ios/LocalNotificationsPlugin.framework/Modules/module.modulemap",
    "content": "framework module LocalNotificationsPlugin {\n  umbrella header \"LocalNotificationsPlugin.h\"\n\n  export *\n  module * { export * }\n}\n"
  },
  {
    "path": "src/platforms/ios/typings/objc!LocalNotificationsPlugin.d.ts",
    "content": "\ndeclare var LocalNotificationsPluginVersionString: interop.Reference<number>;\n\ndeclare var LocalNotificationsVersionNumber: number;\n\n// @ts-ignore\ndeclare class Notification extends NSObject implements UIApplicationDelegate {\n\n\tstatic alloc(): Notification; // inherited from NSObject\n\n\tstatic new(): Notification; // inherited from NSObject\n\n\tstatic sharedInstance(): Notification;\n\n\tisInline: boolean;\n\n\tlaunchNotification: UILocalNotification;\n\n\tnotificationMessage: UILocalNotification;\n\n\treadonly debugDescription: string; // inherited from NSObjectProtocol\n\n\treadonly description: string; // inherited from NSObjectProtocol\n\n\treadonly hash: number; // inherited from NSObjectProtocol\n\n\treadonly isProxy: boolean; // inherited from NSObjectProtocol\n\n\treadonly superclass: typeof NSObject; // inherited from NSObjectProtocol\n\n\twindow: UIWindow; // inherited from UIApplicationDelegate\n\n\treadonly  // inherited from NSObjectProtocol\n\n\tapplicationContinueUserActivityRestorationHandler(application: UIApplication, userActivity: NSUserActivity, restorationHandler: (p1: NSArray<UIUserActivityRestoring>) => void): boolean;\n\n\tapplicationDidBecomeActive(application: UIApplication): void;\n\n\tapplicationDidChangeStatusBarFrame(application: UIApplication, oldStatusBarFrame: CGRect): void;\n\n\tapplicationDidChangeStatusBarOrientation(application: UIApplication, oldStatusBarOrientation: UIInterfaceOrientation): void;\n\n\tapplicationDidDecodeRestorableStateWithCoder(application: UIApplication, coder: NSCoder): void;\n\n\tapplicationDidEnterBackground(application: UIApplication): void;\n\n\tapplicationDidFailToContinueUserActivityWithTypeError(application: UIApplication, userActivityType: string, error: NSError): void;\n\n\tapplicationDidFailToRegisterForRemoteNotificationsWithError(application: UIApplication, error: NSError): void;\n\n\tapplicationDidFinishLaunching(application: UIApplication): void;\n\n\tapplicationDidFinishLaunchingWithOptions(application: UIApplication, launchOptions: NSDictionary<any, any>): boolean;\n\n\tapplicationDidReceiveLocalNotification(application: UIApplication, notification: UILocalNotification): void;\n\n\tapplicationDidReceiveMemoryWarning(application: UIApplication): void;\n\n\tapplicationDidReceiveRemoteNotification(application: UIApplication, userInfo: NSDictionary<any, any>): void;\n\n\tapplicationDidReceiveRemoteNotificationFetchCompletionHandler(application: UIApplication, userInfo: NSDictionary<any, any>, completionHandler: (p1: UIBackgroundFetchResult) => void): void;\n\n\tapplicationDidRegisterForRemoteNotificationsWithDeviceToken(application: UIApplication, deviceToken: NSData): void;\n\n\tapplicationDidRegisterUserNotificationSettings(application: UIApplication, notificationSettings: UIUserNotificationSettings): void;\n\n\tapplicationDidUpdateUserActivity(application: UIApplication, userActivity: NSUserActivity): void;\n\n\tapplicationHandleActionWithIdentifierForLocalNotificationCompletionHandler(application: UIApplication, identifier: string, notification: UILocalNotification, completionHandler: () => void): void;\n\n\tapplicationHandleActionWithIdentifierForLocalNotificationWithResponseInfoCompletionHandler(application: UIApplication, identifier: string, notification: UILocalNotification, responseInfo: NSDictionary<any, any>, completionHandler: () => void): void;\n\n\tapplicationHandleActionWithIdentifierForRemoteNotificationCompletionHandler(application: UIApplication, identifier: string, userInfo: NSDictionary<any, any>, completionHandler: () => void): void;\n\n\tapplicationHandleActionWithIdentifierForRemoteNotificationWithResponseInfoCompletionHandler(application: UIApplication, identifier: string, userInfo: NSDictionary<any, any>, responseInfo: NSDictionary<any, any>, completionHandler: () => void): void;\n\n\tapplicationHandleEventsForBackgroundURLSessionCompletionHandler(application: UIApplication, identifier: string, completionHandler: () => void): void;\n\n\tapplicationHandleIntentCompletionHandler(application: UIApplication, intent: INIntent, completionHandler: (p1: INIntentResponse) => void): void;\n\n\tapplicationHandleOpenURL(application: UIApplication, url: NSURL): boolean;\n\n\tapplicationHandleWatchKitExtensionRequestReply(application: UIApplication, userInfo: NSDictionary<any, any>, reply: (p1: NSDictionary<any, any>) => void): void;\n\n\tapplicationOpenURLOptions(app: UIApplication, url: NSURL, options: NSDictionary<string, any>): boolean;\n\n\tapplicationOpenURLSourceApplicationAnnotation(application: UIApplication, url: NSURL, sourceApplication: string, annotation: any): boolean;\n\n\tapplicationPerformActionForShortcutItemCompletionHandler(application: UIApplication, shortcutItem: UIApplicationShortcutItem, completionHandler: (p1: boolean) => void): void;\n\n\tapplicationPerformFetchWithCompletionHandler(application: UIApplication, completionHandler: (p1: UIBackgroundFetchResult) => void): void;\n\n\tapplicationProtectedDataDidBecomeAvailable(application: UIApplication): void;\n\n\tapplicationProtectedDataWillBecomeUnavailable(application: UIApplication): void;\n\n\tapplicationShouldAllowExtensionPointIdentifier(application: UIApplication, extensionPointIdentifier: string): boolean;\n\n\tapplicationShouldRequestHealthAuthorization(application: UIApplication): void;\n\n\tapplicationShouldRestoreApplicationState(application: UIApplication, coder: NSCoder): boolean;\n\n\tapplicationShouldSaveApplicationState(application: UIApplication, coder: NSCoder): boolean;\n\n\tapplicationSignificantTimeChange(application: UIApplication): void;\n\n\tapplicationSupportedInterfaceOrientationsForWindow(application: UIApplication, window: UIWindow): UIInterfaceOrientationMask;\n\n\tapplicationUserDidAcceptCloudKitShareWithMetadata(application: UIApplication, cloudKitShareMetadata: CKShareMetadata): void;\n\n\tapplicationViewControllerWithRestorationIdentifierPathCoder(application: UIApplication, identifierComponents: NSArray<string> | string[], coder: NSCoder): UIViewController;\n\n\tapplicationWillChangeStatusBarFrame(application: UIApplication, newStatusBarFrame: CGRect): void;\n\n\tapplicationWillChangeStatusBarOrientationDuration(application: UIApplication, newStatusBarOrientation: UIInterfaceOrientation, duration: number): void;\n\n\tapplicationWillContinueUserActivityWithType(application: UIApplication, userActivityType: string): boolean;\n\n\tapplicationWillEncodeRestorableStateWithCoder(application: UIApplication, coder: NSCoder): void;\n\n\tapplicationWillEnterForeground(application: UIApplication): void;\n\n\tapplicationWillFinishLaunchingWithOptions(application: UIApplication, launchOptions: NSDictionary<any, any>): boolean;\n\n\tapplicationWillResignActive(application: UIApplication): void;\n\n\tapplicationWillTerminate(application: UIApplication): void;\n\n\tclass(): typeof NSObject;\n\n\tconformsToProtocol(aProtocol: any /* Protocol */): boolean;\n\n\tdidRegisterUserNotificationSettings(notificationSettings: UIUserNotificationSettings): void;\n\n\tfailWithMessageWithError(eventName: string, message: string, error: NSError): void;\n\n\tisEqual(object: any): boolean;\n\n\tisKindOfClass(aClass: typeof NSObject): boolean;\n\n\tisMemberOfClass(aClass: typeof NSObject): boolean;\n\n\tnotificationReceived(): void;\n\n\tperformSelector(aSelector: string): any;\n\n\tperformSelectorWithObject(aSelector: string, object: any): any;\n\n\tperformSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any;\n\n\trespondsToSelector(aSelector: string): boolean;\n\n\tretainCount(): number;\n\n\tself(): this;\n\n\tsetApplicationIconBadgeNumber(options: NSMutableDictionary<any, any>): void;\n\n\tsuccessWithDictionary(eventName: string, userInfo: NSMutableDictionary<any, any>): void;\n\n\tsuccessWithMessage(eventName: string, message: string): void;\n}\n\ndeclare class NotificationManager extends NSObject {\n\n\tstatic alloc(): NotificationManager; // inherited from NSObject\n\n\tstatic new(): NotificationManager; // inherited from NSObject\n}\n"
  },
  {
    "path": "src/references.d.ts",
    "content": "/// <reference path=\"./node_modules/tns-platform-declarations/ios.d.ts\" />\n/// <reference path=\"./node_modules/tns-platform-declarations/android.d.ts\" />\n\n/// <reference path=\"./platforms/ios/typings/objc!LocalNotificationsPlugin.d.ts\" />"
  },
  {
    "path": "src/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"es5\",\n    \"module\": \"commonjs\",\n    \"declaration\": true,\n    \"removeComments\": true,\n    \"noLib\": false,\n    \"emitDecoratorMetadata\": true,\n    \"experimentalDecorators\": true,\n    \"lib\": [\n      \"es6\",\n      \"dom\"\n    ],\n    \"sourceMap\": false,\n    \"pretty\": true,\n    \"allowUnreachableCode\": false,\n    \"allowUnusedLabels\": false,\n    \"noEmitHelpers\": true,\n    \"noEmitOnError\": false,\n    \"noImplicitAny\": false,\n    \"noImplicitReturns\": true,\n    \"noImplicitUseStrict\": false,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"exclude\": [\n    \"node_modules\",\n    \"typings\"\n  ],\n  \"compileOnSave\": false\n}\n"
  },
  {
    "path": "tslint.json",
    "content": "{\n    \"rules\": {\n        \"class-name\": true,\n        \"comment-format\": [\n            true,\n            \"check-space\"\n        ],\n        \"indent\": [\n            true,\n            \"spaces\"\n        ],\n        \"no-duplicate-variable\": true,\n        \"no-eval\": true,\n        \"no-internal-module\": true,\n        \"no-trailing-whitespace\": true,\n        \"no-var-keyword\": true,\n        \"one-line\": [\n            true,\n            \"check-open-brace\",\n            \"check-whitespace\"\n        ],\n        \"quotemark\": [\n            true,\n            \"double\"\n        ],\n        \"semicolon\": [\n            true,\n            \"always\"\n        ],\n        \"triple-equals\": [\n            true,\n            \"allow-null-check\"\n        ],\n        \"typedef-whitespace\": [\n            true,\n            {\n                \"call-signature\": \"nospace\",\n                \"index-signature\": \"nospace\",\n                \"parameter\": \"nospace\",\n                \"property-declaration\": \"nospace\",\n                \"variable-declaration\": \"nospace\"\n            }\n        ],\n        \"variable-name\": [\n            true,\n            \"ban-keywords\"\n        ],\n        \"whitespace\": [\n            true,\n            \"check-branch\",\n            \"check-decl\",\n            \"check-operator\",\n            \"check-separator\",\n            \"check-type\"\n        ]\n    }\n}\n"
  }
]