[
  {
    "path": ".gitignore",
    "content": "shell.nix\n\n.settings\n\n# node files\ndist/\nnode_modules/\n\n# iOS files\nPods\nBuild\nxcuserdata\nxcshareddata\nDerivedData\n\n# macOS files\n.DS_Store\n\n\n\n# Based on Android gitignore template: https://github.com/github/gitignore/blob/master/Android.gitignore\n\n# Built application files\n*.apk\n*.ap_\n\n# Files for the ART/Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbin/\ngen/\nout/\n\n# Gradle files\n.gradle/\nbuild/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Proguard folder generated by Eclipse\nproguard/\n\n# Log Files\n*.log\n\n# Android Studio Navigation editor temp files\n.navigation/\n\n# Android Studio captures folder\ncaptures/\n\n# IntelliJ\n*.iml\n.idea\n\n# Keystore files\n# Uncomment the following line if you do not want to check your keystore files in.\n#*.jks\n\n# External native build folder generated in Android Studio 2.2 and later\n.externalNativeBuild\n"
  },
  {
    "path": "CapacitorCommunityBackgroundGeolocation.podspec",
    "content": "require 'json'\n\npackage = JSON.parse(File.read(File.join(__dir__, 'package.json')))\n\nPod::Spec.new do |s|\n    s.name = 'CapacitorCommunityBackgroundGeolocation'\n    s.version = package['version']\n    s.summary = package['description']\n    s.license = package['license']\n    s.homepage = package['repository']['url']\n    s.author = package['author']\n    s.source = { :git => package['repository']['url'], :tag => s.version.to_s }\n    s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'\n    s.ios.deployment_target  = '12.0'\n    s.dependency 'Capacitor'\nend\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright 2021 James Diacono\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject 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, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "Package.swift",
    "content": "// swift-tools-version: 5.9\nimport PackageDescription\n\nlet package = Package(\n    name: \"CapacitorCommunityBackgroundGeolocation\",\n    platforms: [.iOS(.v12)],\n    products: [\n        .library(\n            name: \"CapacitorCommunityBackgroundGeolocation\",\n            targets: [\"BackgroundGeolocationPlugin\"]\n        )\n    ],\n    dependencies: [\n        .package(\n            url: \"https://github.com/ionic-team/capacitor-swift-pm.git\",\n            from: \"7.0.0\"\n        )\n    ],\n    targets: [\n        .target(\n            name: \"BackgroundGeolocationPlugin\",\n            dependencies: [\n                .product(name: \"Capacitor\", package: \"capacitor-swift-pm\"),\n                .product(name: \"Cordova\", package: \"capacitor-swift-pm\")\n            ],\n            path: \"ios/Plugin/Swift\"\n        )\n    ]\n)\n"
  },
  {
    "path": "README.md",
    "content": "# Background Geolocation\nA Capacitor plugin that lets you receive geolocation updates even while the app is backgrounded. Only iOS and Android platforms are supported.\n\n## Usage\n\n```javascript\nimport {registerPlugin} from \"@capacitor/core\";\nconst BackgroundGeolocation = registerPlugin(\"BackgroundGeolocation\");\n\n// To start listening for changes in the device's location, add a new watcher.\n// You do this by calling 'addWatcher' with an options object and a callback. A\n// Promise is returned, which resolves to the callback ID used to remove the\n// watcher in the future. The callback will be called every time a new location\n// is available. Watchers can not be paused, only removed. Multiple watchers may\n// exist simultaneously.\nBackgroundGeolocation.addWatcher(\n    {\n        // If the \"backgroundMessage\" option is defined, the watcher will\n        // provide location updates whether the app is in the background or the\n        // foreground. If it is not defined, location updates are only\n        // guaranteed in the foreground. This is true on both platforms.\n\n        // On Android, a notification must be shown to continue receiving\n        // location updates in the background. This option specifies the text of\n        // that notification.\n        backgroundMessage: \"Cancel to prevent battery drain.\",\n\n        // The title of the notification mentioned above. Defaults to \"Using\n        // your location\".\n        backgroundTitle: \"Tracking You.\",\n        \n        // Whether permissions should be requested from the user automatically,\n        // if they are not already granted. Defaults to \"true\".\n        requestPermissions: true,\n\n        // If \"true\", stale locations may be delivered while the device\n        // obtains a GPS fix. You are responsible for checking the \"time\"\n        // property. If \"false\", locations are guaranteed to be up to date.\n        // Defaults to \"false\".\n        stale: false,\n\n        // The minimum number of metres between subsequent locations. Defaults\n        // to 0.\n        distanceFilter: 50\n    },\n    function callback(location, error) {\n        if (error) {\n            if (error.code === \"NOT_AUTHORIZED\") {\n                if (window.confirm(\n                    \"This app needs your location, \" +\n                    \"but does not have permission.\\n\\n\" +\n                    \"Open settings now?\"\n                )) {\n                    // It can be useful to direct the user to their device's\n                    // settings when location permissions have been denied. The\n                    // plugin provides the 'openSettings' method to do exactly\n                    // this.\n                    BackgroundGeolocation.openSettings();\n                }\n            }\n            return console.error(error);\n        }\n\n        return console.log(location);\n    }\n).then(function after_the_watcher_has_been_added(watcher_id) {\n    // When a watcher is no longer needed, it should be removed by calling\n    // 'removeWatcher' with an object containing its ID.\n    BackgroundGeolocation.removeWatcher({\n        id: watcher_id\n    });\n});\n\n// The location object.\n{\n    // Longitude in degrees.\n    longitude: 131.723423719132,\n    // Latitude in degrees.\n    latitude: -22.40106297456,\n    // Radius of horizontal uncertainty in metres, with 68% confidence.\n    accuracy: 11,\n    // Metres above sea level (or null).\n    altitude: 65,\n    // Vertical uncertainty in metres, with 68% confidence (or null).\n    altitudeAccuracy: 4,\n    // Deviation from true north in degrees (or null).\n    bearing: 159.60000610351562,\n    // True if the location was simulated by software, rather than GPS.\n    simulated: false,\n    // Speed in metres per second (or null).\n    speed: 23.51068878173828,\n    // Time the location was produced, in milliseconds since the unix epoch.\n    time: 1562731602000\n}\n\n// If you just want the current location, try something like this. The longer\n// the timeout, the more accurate the guess will be. I wouldn't go below about\n// 100ms.\nfunction guess_location(callback, timeout) {\n    let last_location;\n    BackgroundGeolocation.addWatcher(\n        {\n            requestPermissions: false,\n            stale: true\n        },\n        function (location) {\n            last_location = location || undefined;\n        }\n    ).then(function (id) {\n        setTimeout(function () {\n            callback(last_location);\n            Plugins.BackgroundGeolocation.removeWatcher({id});\n        }, timeout);\n    });\n}\n```\n\n### Typescript support\n\n```typescript\nimport {BackgroundGeolocationPlugin} from \"@capacitor-community/background-geolocation\";\nconst BackgroundGeolocation = registerPlugin<BackgroundGeolocationPlugin>(\"BackgroundGeolocation\");\n```\n\n## Installation\n\nDifferent versions of the plugin support different versions of Capacitor:\n\n| Capacitor  | Plugin |\n|------------|--------|\n| v2         | v0.3   |\n| v3         | v1     |\n| v4         | v1     |\n| v5         | v1     |\n| v6         | v1     |\n| v7         | v1     |\n\nRead the documentation for v0.3 [here](https://github.com/capacitor-community/background-geolocation/tree/0.3.x).\n\n```sh\nnpm install @capacitor-community/background-geolocation\nnpx cap update\n```\n\n### iOS\nAdd the following keys to `Info.plist.`:\n\n```xml\n<dict>\n  ...\n  <key>NSLocationWhenInUseUsageDescription</key>\n  <string>We need to track your location</string>\n  <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>\n  <string>We need to track your location while your device is locked.</string>\n  <key>UIBackgroundModes</key>\n  <array>\n    <string>location</string>\n  </array>\n  ...\n</dict>\n```\n\n### Android\n\nSet the the `android.useLegacyBridge` option to `true` in your Capacitor configuration. This prevents location updates halting after 5 minutes in the background. See https://capacitorjs.com/docs/config and https://github.com/capacitor-community/background-geolocation/issues/89.\n\nOn Android 13+, the app needs the `POST_NOTIFICATIONS` runtime permission to show the persistent notification informing the user that their location is being used in the background. You may need to [request this permission](https://developer.android.com/develop/ui/views/notifications/notification-permission) from the user, this can be accomplished [using the `@capacitor/local-notifications` plugin](https://capacitorjs.com/docs/apis/local-notifications#checkpermissions).\n\nIf your app forwards location updates to a server in real time, be aware that after 5 minutes in the background Android will throttle HTTP requests initiated from the WebView. The solution is to use a native HTTP plugin such as [CapacitorHttp](https://capacitorjs.com/docs/apis/http). See https://github.com/capacitor-community/background-geolocation/issues/14.\n\nConfigration specific to Android can be made in `strings.xml`:\n```xml\n<resources>\n    <!--\n        The channel name for the background notification. This will be visible\n        when the user presses & holds the notification. It defaults to\n        \"Background Tracking\".\n    -->\n    <string name=\"capacitor_background_geolocation_notification_channel_name\">\n        Background Tracking\n    </string>\n\n    <!--\n        The icon to use for the background notification. Note the absence of a\n        leading \"@\". It defaults to \"mipmap/ic_launcher\", the app's launch icon.\n\n        If a raster image is used to generate the icon (as opposed to a vector\n        image), it must have a transparent background. To make sure your image\n        is compatible, select \"Notification Icons\" as the Icon Type when\n        creating the image asset in Android Studio.\n\n        An incompatible image asset will cause the notification to misbehave in\n        a few telling ways, even if the icon appears correctly:\n\n          - The notification may be dismissable by the user when it should not\n            be.\n          - Tapping the notification may open the settings, not the app.\n          - The notification text may be incorrect.\n    -->\n    <string name=\"capacitor_background_geolocation_notification_icon\">\n        drawable/ic_tracking\n    </string>\n\n    <!--\n        The color of the notification as a string parseable by\n        android.graphics.Color.parseColor. Optional.\n    -->\n    <string name=\"capacitor_background_geolocation_notification_color\">\n        yellow\n    </string>\n</resources>\n\n```\n\n## Changelog\n\n### v1.2.26\n- Add support for Swift Package Manager (SPM).\n\n### v1.2.25\n- Add support for Capacitor v7.\n\n### v1.2.24\n- Avoid crash introduced in v1.2.23.\n\n### v1.2.23\n- Perhaps make location updates more persistent on Android, see #137.\n\n### v1.2.22\n- Avoid interfering with safe area insets on Android\n\n### v1.2.21\n- Customize the notification color on Android.\n\n### v1.2.19\n- Fix a bug preventing the foreground service starting on Android.\n\n### v1.2.18\n- Always show the notification when a background watcher exists, improving the reliability of location updates on Android.\n\n### v1.2.17\n- Add support for Capacitor v6.\n\n### v1.2.16\n- Fix background location updates for Android 14.\n\n### v1.2.14\n- Add support for Capacitor v5.\n\n### v1.2.3\n- Add support for Capacitor v4.\n\n### v1.2.2\n- Prevent location updates from halting on iOS due to extended inactivity.\n\n### v1.2.1\n- Fix background location updates for some devices running Android 12.\n\n### v1.2.0\n- On iOS, the status bar now turns blue whilst the location is being watched in the background. This provides the user a straightforward way to return to the app.\n\n### v1.0.4\n- Add the `ACCESS_COARSE_LOCATION` permission. This is required for apps that target Android 12 (API level 31). A preceeding example shows how to add this permission to your app's manifest.\n\n### v1.0.0\n- BREAKING: `addWatcher` now returns a Promise that resolves to the callback ID, rather than the callback ID itself.\n- BREAKING: The plugin is imported via Capacitor's `registerPlugin` function, rather than from the `Plugins` object.\n- BREAKING: Drops support for iOS v11 and Capacitor v2.\n- Add support for Capacitor v3.\n"
  },
  {
    "path": "android/build.gradle",
    "content": "ext {\n    androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'\n    androidxLocalbroadcastmanagerVersion = project.hasProperty('androidxLocalbroadcastmanagerVersion') ? rootProject.ext.androidxLocalbroadcastmanagerVersion : '1.0.0'\n    playServicesLocationVersion = project.hasProperty('playServicesLocationVersion') ? rootProject.ext.playServicesLocationVersion : '21.0.1'\n}\n\nbuildscript {\n    repositories {\n        google()\n        mavenCentral()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:8.0.0'\n    }\n}\n\napply plugin: 'com.android.library'\n\nandroid {\n    namespace \"com.equimaps.capacitor_background_geolocation\"\n    compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33\n    defaultConfig {\n        minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22\n        targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33\n        versionCode 1\n        versionName \"1.0\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n    lintOptions {\n        abortOnError false\n    }\n}\n\nrepositories {\n    google()\n    mavenCentral()\n}\n\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    implementation project(':capacitor-android')\n    implementation \"androidx.appcompat:appcompat:$androidxAppCompatVersion\"\n    implementation \"androidx.localbroadcastmanager:localbroadcastmanager:$androidxLocalbroadcastmanagerVersion\"\n    implementation \"com.google.android.gms:play-services-location:$playServicesLocationVersion\"\n}\n"
  },
  {
    "path": "android/gradle/wrapper/gradle-wrapper.properties",
    "content": "#Fri Dec 01 12:41:00 CST 2017\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.0.2-all.zip\n"
  },
  {
    "path": "android/gradle.properties",
    "content": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx1536m\n\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n\n# Supports AndroidX\nandroid.useAndroidX=true\n"
  },
  {
    "path": "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": "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": "android/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "android/settings.gradle",
    "content": "include ':capacitor-android'\nproject(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')"
  },
  {
    "path": "android/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <application>\n        <service\n            android:name=\"com.equimaps.capacitor_background_geolocation.BackgroundGeolocationService\"\n            android:enabled=\"true\"\n            android:exported=\"true\"\n            android:foregroundServiceType=\"location\" />\n    </application>\n\n    <uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />\n    <uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />\n    <uses-permission android:name=\"android.permission.FOREGROUND_SERVICE\" />\n    <!-- Android SDK 34+ additionally requires the FOREGROUND_SERVICE_LOCATION\n    runtime permission to start a foreground service of type \"location\". -->\n    <uses-permission android:name=\"android.permission.FOREGROUND_SERVICE_LOCATION\" />\n    <!-- Android SDK 33+ requires the POST_NOTIFICATIONS runtime permission to\n    display the foreground service notification. -->\n    <uses-permission android:name=\"android.permission.POST_NOTIFICATIONS\" />\n    <uses-feature android:name=\"android.hardware.location.gps\" />\n</manifest>\n  \n"
  },
  {
    "path": "android/src/main/java/com/equimaps/capacitor_background_geolocation/BackgroundGeolocation.java",
    "content": "package com.equimaps.capacitor_background_geolocation;\n\nimport android.Manifest;\nimport android.app.Notification;\nimport android.app.NotificationChannel;\nimport android.app.NotificationManager;\nimport android.graphics.Color;\nimport android.app.PendingIntent;\nimport android.content.BroadcastReceiver;\nimport android.content.ComponentName;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.IntentFilter;\nimport android.content.ServiceConnection;\nimport android.content.pm.PackageManager;\nimport android.location.Location;\nimport android.location.LocationManager;\nimport android.net.Uri;\nimport android.os.Build;\nimport android.os.IBinder;\nimport android.provider.Settings;\n\nimport com.getcapacitor.JSObject;\nimport com.getcapacitor.Logger;\nimport com.getcapacitor.PermissionState;\nimport com.getcapacitor.Plugin;\nimport com.getcapacitor.PluginCall;\nimport com.getcapacitor.PluginMethod;\nimport com.getcapacitor.annotation.CapacitorPlugin;\nimport com.getcapacitor.annotation.Permission;\nimport com.getcapacitor.annotation.PermissionCallback;\nimport com.google.android.gms.location.LocationServices;\nimport com.google.android.gms.tasks.OnSuccessListener;\n\nimport org.json.JSONObject;\n\nimport androidx.localbroadcastmanager.content.LocalBroadcastManager;\n\n@CapacitorPlugin(\n        name = \"BackgroundGeolocation\",\n        permissions = {\n                @Permission(\n                        strings = {\n                                Manifest.permission.ACCESS_COARSE_LOCATION,\n                                Manifest.permission.ACCESS_FINE_LOCATION\n                        },\n                        alias = \"location\"\n                )\n        }\n)\npublic class BackgroundGeolocation extends Plugin {\n    private BackgroundGeolocationService.LocalBinder service = null;\n    private Boolean stoppedWithoutPermissions = false;\n\n    private void fetchLastLocation(PluginCall call) {\n        try {\n            LocationServices.getFusedLocationProviderClient(\n                    getContext()\n            ).getLastLocation().addOnSuccessListener(\n                    getActivity(),\n                    new OnSuccessListener<Location>() {\n                        @Override\n                        public void onSuccess(Location location) {\n                            if (location != null) {\n                                call.resolve(formatLocation(location));\n                            }\n                        }\n                    }\n            );\n        } catch (SecurityException ignore) {}\n    }\n\n    @PluginMethod(returnType = PluginMethod.RETURN_CALLBACK)\n    public void addWatcher(final PluginCall call) {\n        if (service == null) {\n            call.reject(\"Service not running.\");\n            return;\n        }\n        call.setKeepAlive(true);\n\n        if (getPermissionState(\"location\") != PermissionState.GRANTED) {\n            if (call.getBoolean(\"requestPermissions\", true)) {\n                requestPermissionForAlias(\"location\", call, \"locationPermissionsCallback\");\n            } else {\n                call.reject(\"Permission denied.\", \"NOT_AUTHORIZED\");\n            }\n        } else if (!isLocationEnabled(getContext())) {\n            call.reject(\"Location services disabled.\", \"NOT_AUTHORIZED\");\n        }\n        if (call.getBoolean(\"stale\", false)) {\n            fetchLastLocation(call);\n        }\n        Notification backgroundNotification = null;\n        String backgroundMessage = call.getString(\"backgroundMessage\");\n\n        if (backgroundMessage != null) {\n            Notification.Builder builder = new Notification.Builder(getContext())\n                    .setContentTitle(\n                            call.getString(\n                                \"backgroundTitle\",\n                                \"Using your location\"\n                            )\n                    )\n                    .setContentText(backgroundMessage)\n                    .setOngoing(true)\n                    .setPriority(Notification.PRIORITY_HIGH)\n                    .setWhen(System.currentTimeMillis());\n\n            try {\n                String name = getAppString(\n                        \"capacitor_background_geolocation_notification_icon\",\n                        \"mipmap/ic_launcher\"\n                );\n                String[] parts = name.split(\"/\");\n                // It is actually necessary to set a valid icon for the notification to behave\n                // correctly when tapped. If there is no icon specified, tapping it will open the\n                // app's settings, rather than bringing the application to the foreground.\n                builder.setSmallIcon(\n                        getAppResourceIdentifier(parts[1], parts[0])\n                );\n            } catch (Exception e) {\n                Logger.error(\"Could not set notification icon\", e);\n            }\n\n            try {\n                String color = getAppString(\n                        \"capacitor_background_geolocation_notification_color\",\n                        null\n                );\n                if (color != null) {\n                    builder.setColor(Color.parseColor(color));\n                }\n            } catch (Exception e) {\n                Logger.error(\"Could not set notification color\", e);\n            }\n\n            Intent launchIntent = getContext().getPackageManager().getLaunchIntentForPackage(\n                    getContext().getPackageName()\n            );\n            if (launchIntent != null) {\n                launchIntent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\n                builder.setContentIntent(\n                        PendingIntent.getActivity(\n                                getContext(),\n                                0,\n                                launchIntent,\n                                PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE\n                        )\n                );\n            }\n\n            // Set the Channel ID for Android O.\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n                builder.setChannelId(BackgroundGeolocationService.class.getPackage().getName());\n            }\n\n            backgroundNotification = builder.build();\n        }\n        service.addWatcher(\n                call.getCallbackId(),\n                backgroundNotification,\n                call.getFloat(\"distanceFilter\", 0f)\n        );\n    }\n\n    @PermissionCallback\n    private void locationPermissionsCallback(PluginCall call) {\n\n        if (getPermissionState(\"location\") != PermissionState.GRANTED) {\n            call.reject(\"User denied location permission\", \"NOT_AUTHORIZED\");\n            return;\n        }\n        if (call.getBoolean(\"stale\", false)) {\n            fetchLastLocation(call);\n        }\n        if (service != null) {\n            service.onPermissionsGranted();\n            // The handleOnResume method will now be called, and we don't need it to call\n            // service.onPermissionsGranted again so we reset this flag.\n            stoppedWithoutPermissions = false;\n        }\n    }\n\n    @PluginMethod()\n    public void removeWatcher(PluginCall call) {\n        String callbackId = call.getString(\"id\");\n        if (callbackId == null) {\n            call.reject(\"Missing id.\");\n            return;\n        }\n        service.removeWatcher(callbackId);\n        PluginCall savedCall = getBridge().getSavedCall(callbackId);\n        if (savedCall != null) {\n            savedCall.release(getBridge());\n        }\n        call.resolve();\n    }\n\n    @PluginMethod()\n    public void openSettings(PluginCall call) {\n        Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n        Uri uri = Uri.fromParts(\"package\", getContext().getPackageName(), null);\n        intent.setData(uri);\n        getContext().startActivity(intent);\n        call.resolve();\n    }\n\n    // Checks if device-wide location services are disabled\n    private static Boolean isLocationEnabled(Context context) {\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {\n            LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);\n            return lm != null && lm.isLocationEnabled();\n        } else {\n            return (\n                    Settings.Secure.getInt(\n                            context.getContentResolver(),\n                            Settings.Secure.LOCATION_MODE,\n                            Settings.Secure.LOCATION_MODE_OFF\n                    ) != Settings.Secure.LOCATION_MODE_OFF\n            );\n        }\n    }\n\n    private static JSObject formatLocation(Location location) {\n        JSObject obj = new JSObject();\n        obj.put(\"latitude\", location.getLatitude());\n        obj.put(\"longitude\", location.getLongitude());\n        // The docs state that all Location objects have an accuracy, but then why is there a\n        // hasAccuracy method? Better safe than sorry.\n        obj.put(\"accuracy\", location.hasAccuracy() ? location.getAccuracy() : JSONObject.NULL);\n        obj.put(\"altitude\", location.hasAltitude() ? location.getAltitude() : JSONObject.NULL);\n        if (Build.VERSION.SDK_INT >= 26 && location.hasVerticalAccuracy()) {\n            obj.put(\"altitudeAccuracy\", location.getVerticalAccuracyMeters());\n        } else {\n            obj.put(\"altitudeAccuracy\", JSONObject.NULL);\n        }\n        // In addition to mocking locations in development, Android allows the\n        // installation of apps which have the power to simulate location\n        // readings in other apps.\n        obj.put(\"simulated\", location.isFromMockProvider());\n        obj.put(\"speed\", location.hasSpeed() ? location.getSpeed() : JSONObject.NULL);\n        obj.put(\"bearing\", location.hasBearing() ? location.getBearing() : JSONObject.NULL);\n        obj.put(\"time\", location.getTime());\n        return obj;\n    }\n\n    // Receives messages from the service.\n    private class ServiceReceiver extends BroadcastReceiver {\n        @Override\n        public void onReceive(Context context, Intent intent) {\n            String id = intent.getStringExtra(\"id\");\n            PluginCall call = getBridge().getSavedCall(id);\n            if (call == null) {\n                return;\n            }\n            Location location = intent.getParcelableExtra(\"location\");\n            if (location != null) {\n                call.resolve(formatLocation(location));\n            } else {\n                Logger.debug(\"No locations received\");\n            }\n        }\n    }\n\n    // Gets the identifier of the app's resource by name, returning 0 if not found.\n    private int getAppResourceIdentifier(String name, String defType) {\n        return getContext().getResources().getIdentifier(\n                name,\n                defType,\n                getContext().getPackageName()\n        );\n    }\n\n    // Gets a string from the app's strings.xml file, resorting to a fallback if it is not defined.\n    private String getAppString(String name, String fallback) {\n        int id = getAppResourceIdentifier(name, \"string\");\n        return id == 0 ? fallback : getContext().getString(id);\n    }\n\n    @Override\n    public void load() {\n        super.load();\n\n        // Android O requires a Notification Channel.\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n            NotificationManager manager = (NotificationManager) getContext().getSystemService(\n                    Context.NOTIFICATION_SERVICE\n            );\n            NotificationChannel channel = new NotificationChannel(\n                    BackgroundGeolocationService.class.getPackage().getName(),\n                    getAppString(\n                            \"capacitor_background_geolocation_notification_channel_name\",\n                            \"Background Tracking\"\n                    ),\n                    NotificationManager.IMPORTANCE_DEFAULT\n            );\n            channel.enableLights(false);\n            channel.enableVibration(false);\n            channel.setSound(null, null);\n            manager.createNotificationChannel(channel);\n        }\n\n        this.getContext().bindService(\n                new Intent(this.getContext(), BackgroundGeolocationService.class),\n                new ServiceConnection() {\n                    @Override\n                    public void onServiceConnected(ComponentName name, IBinder binder) {\n                        BackgroundGeolocation.this.service = (BackgroundGeolocationService.LocalBinder) binder;\n                    }\n\n                    @Override\n                    public void onServiceDisconnected(ComponentName name) {\n                    }\n                },\n                Context.BIND_AUTO_CREATE\n        );\n\n        LocalBroadcastManager.getInstance(this.getContext()).registerReceiver(\n                new ServiceReceiver(),\n                new IntentFilter(BackgroundGeolocationService.ACTION_BROADCAST)\n        );\n    }\n\n    @Override\n    protected void handleOnResume() {\n        if (service != null) {\n            if (stoppedWithoutPermissions && getPermissionState(\"location\") == PermissionState.GRANTED) {\n                service.onPermissionsGranted();\n            }\n        }\n        super.handleOnResume();\n    }\n\n    @Override\n    protected void handleOnPause() {\n        stoppedWithoutPermissions = getPermissionState(\"location\") != PermissionState.GRANTED;\n        super.handleOnPause();\n    }\n\n    @Override\n    protected void handleOnDestroy() {\n        if (service != null) {\n            service.stopService();\n        }\n        super.handleOnDestroy();\n    }\n}\n"
  },
  {
    "path": "android/src/main/java/com/equimaps/capacitor_background_geolocation/BackgroundGeolocationService.java",
    "content": "package com.equimaps.capacitor_background_geolocation;\n\nimport android.app.Notification;\nimport android.app.Service;\nimport android.content.Intent;\nimport android.content.pm.ServiceInfo;\nimport android.location.Location;\nimport android.os.Binder;\nimport android.os.Build;\nimport android.os.IBinder;\n\nimport com.getcapacitor.Logger;\nimport com.google.android.gms.location.FusedLocationProviderClient;\nimport com.google.android.gms.location.LocationAvailability;\nimport com.google.android.gms.location.LocationCallback;\nimport com.google.android.gms.location.LocationRequest;\nimport com.google.android.gms.location.LocationResult;\nimport com.google.android.gms.location.LocationServices;\n\nimport java.util.HashSet;\n\nimport androidx.localbroadcastmanager.content.LocalBroadcastManager;\n\n// A bound and started service that is promoted to a foreground service\n// (showing a persistent notification) when the first background watcher is\n// added, and demoted when the last background watcher is removed.\npublic class BackgroundGeolocationService extends Service {\n    static final String ACTION_BROADCAST = (\n            BackgroundGeolocationService.class.getPackage().getName() + \".broadcast\"\n    );\n    private final IBinder binder = new LocalBinder();\n\n    // Must be unique for this application.\n    private static final int NOTIFICATION_ID = 28351;\n\n    private class Watcher {\n        public String id;\n        public FusedLocationProviderClient client;\n        public LocationRequest locationRequest;\n        public LocationCallback locationCallback;\n        public Notification backgroundNotification;\n    }\n    private HashSet<Watcher> watchers = new HashSet<Watcher>();\n\n    @Override\n    public IBinder onBind(Intent intent) {\n        return binder;\n    }\n\n    // Some devices allow a foreground service to outlive the application's main\n    // activity, leading to nasty crashes as reported in issue #59. If we learn\n    // that the application has been killed, all watchers are stopped and the\n    // service is terminated immediately.\n    @Override\n    public boolean onUnbind(Intent intent) {\n        for (Watcher watcher : watchers) {\n            watcher.client.removeLocationUpdates(watcher.locationCallback);\n        }\n        watchers = new HashSet<Watcher>();\n        stopSelf();\n        return false;\n    }\n\n    Notification getNotification() {\n        for (Watcher watcher : watchers) {\n            if (watcher.backgroundNotification != null) {\n                return watcher.backgroundNotification;\n            }\n        }\n        return null;\n    }\n\n    // Handles requests from the activity.\n    public class LocalBinder extends Binder {\n        void addWatcher(\n                final String id,\n                Notification backgroundNotification,\n                float distanceFilter\n        ) {\n            FusedLocationProviderClient client = LocationServices.getFusedLocationProviderClient(\n                    BackgroundGeolocationService.this\n            );\n            LocationRequest locationRequest = new LocationRequest();\n            locationRequest.setMaxWaitTime(1000);\n            locationRequest.setInterval(1000);\n            locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n            locationRequest.setSmallestDisplacement(distanceFilter);\n\n            LocationCallback callback = new LocationCallback(){\n                @Override\n                public void onLocationResult(LocationResult locationResult) {\n                    Location location = locationResult.getLastLocation();\n                    Intent intent = new Intent(ACTION_BROADCAST);\n                    intent.putExtra(\"location\", location);\n                    intent.putExtra(\"id\", id);\n                    LocalBroadcastManager.getInstance(\n                            getApplicationContext()\n                    ).sendBroadcast(intent);\n                }\n                @Override\n                public void onLocationAvailability(LocationAvailability availability) {\n                    if (!availability.isLocationAvailable()) {\n                        Logger.debug(\"Location not available\");\n                    }\n                }\n            };\n\n            Watcher watcher = new Watcher();\n            watcher.id = id;\n            watcher.client = client;\n            watcher.locationRequest = locationRequest;\n            watcher.locationCallback = callback;\n            watcher.backgroundNotification = backgroundNotification;\n            watchers.add(watcher);\n\n            // According to Android Studio, this method can throw a Security Exception if\n            // permissions are not yet granted. Rather than check the permissions, which is fiddly,\n            // we simply ignore the exception.\n            try {\n                watcher.client.requestLocationUpdates(\n                        watcher.locationRequest,\n                        watcher.locationCallback,\n                        null\n                );\n            } catch (SecurityException ignore) {}\n\n            // Promote the service to the foreground if necessary.\n            // Ideally we would only call 'startForeground' if the service is not already\n            // foregrounded. Unfortunately, 'getForegroundServiceType' was only introduced\n            // in API level 29 and seems to behave weirdly, as reported in #120. However,\n            // it appears that 'startForeground' is idempotent, so we just call it repeatedly\n            // each time a background watcher is added.\n            if (backgroundNotification != null) {\n                try {\n                    // This method has been known to fail due to weird\n                    // permission bugs, so we prevent any exceptions from\n                    // crashing the app. See issue #86.\n                    startForeground(NOTIFICATION_ID, backgroundNotification);\n                } catch (Exception exception) {\n                    Logger.error(\"Failed to foreground service\", exception);\n                }\n            }\n        }\n\n        void removeWatcher(String id) {\n            for (Watcher watcher : watchers) {\n                if (watcher.id.equals(id)) {\n                    watcher.client.removeLocationUpdates(watcher.locationCallback);\n                    watchers.remove(watcher);\n                    if (getNotification() == null) {\n                        stopForeground(true);\n                    }\n                    return;\n                }\n            }\n        }\n\n        void onPermissionsGranted() {\n            // If permissions were granted while the app was in the background, for example in\n            // the Settings app, the watchers need restarting.\n            for (Watcher watcher : watchers) {\n                watcher.client.removeLocationUpdates(watcher.locationCallback);\n                watcher.client.requestLocationUpdates(\n                        watcher.locationRequest,\n                        watcher.locationCallback,\n                        null\n                );\n            }\n        }\n\n        void stopService() {\n            BackgroundGeolocationService.this.stopSelf();\n        }\n    }\n}\n"
  },
  {
    "path": "definitions.d.ts",
    "content": "/**\n * The options for configuring a watcher that listens for location updates.\n */\nexport interface WatcherOptions {\n    /**\n     * If the \"backgroundMessage\" option is defined, the watcher will\n     * provide location updates whether the app is in the background or the\n     * foreground. If it is not defined, location updates are only\n     * guaranteed in the foreground. This is true on both platforms.\n     * \n     * On Android, a notification must be shown to continue receiving\n     * location updates in the background. This option specifies the text of\n     * that notification.\n     */\n    backgroundMessage?: string;\n    /**\n     * The title of the notification mentioned above.\n     * @default \"Using your location\"\n     */\n    backgroundTitle?: string;\n    /**\n     * Whether permissions should be requested from the user automatically,\n     * if they are not already granted.\n     * @default true\n     */\n    requestPermissions?: boolean;\n    /**\n     * If \"true\", stale locations may be delivered while the device\n     * obtains a GPS fix. You are responsible for checking the \"time\"\n     * property. If \"false\", locations are guaranteed to be up to date.\n     * @default false\n     */\n    stale?: boolean;\n    /**\n     * The distance in meters that the device must move before a new location update is triggered.\n     * This is used to filter out small movements and reduce the number of updates.\n     * @default 0\n     */\n    distanceFilter?: number;\n}\n\n/**\n * Represents a geographical location with various attributes.\n */\nexport interface Location {\n    /**\n     * Longitude in degrees.\n     */\n    latitude: number;\n    /**\n     * Latitude in degrees.\n     */\n    longitude: number;\n    /**\n     * Radius of horizontal uncertainty in metres, with 68% confidence.\n     */\n    accuracy: number;\n    /**\n     * Metres above sea level (or null).\n     */\n    altitude: number | null;\n    /**\n     * Vertical uncertainty in metres, with 68% confidence (or null).\n     */\n    altitudeAccuracy: number | null;\n    /**\n     * `true` if the location was simulated by software, rather than GPS.\n     */\n    simulated: boolean;\n    /**\n     * Deviation from true north in degrees (or null).\n     */\n    bearing: number | null;\n    /**\n     * Speed in metres per second (or null).\n     */\n    speed: number | null;\n    /**\n     * Time the location was produced, in milliseconds since the unix epoch.\n     */\n    time: number | null;\n}\n\nexport interface CallbackError extends Error {\n    code?: string;\n}\n\nexport interface BackgroundGeolocationPlugin {\n    /**\n     * Adds a watcher for location updates.\n     * The watcher will be invoked with the latest location whenever it is available.\n     * If an error occurs, the callback will be invoked with the error.\n     * \n     * @param options the watcher options\n     * @param callback the callback to be invoked when a new location is available or an error occurs\n     * @returns a promise that resolves to a unique identifier for the watcher ID\n     */\n    addWatcher(\n        options: WatcherOptions,\n        callback: (\n            position?: Location,\n            error?: CallbackError\n        ) => void\n    ): Promise<string>;\n    /**\n     * Removes a watcher by its unique identifier.\n     * @param options the options for removing the watcher\n     * @returns a promise that resolves when the watcher is successfully removed\n     */\n    removeWatcher(options: {\n        id: string\n    }): Promise<void>;\n    /**\n     * Opens the settings page of the app.\n     */\n    openSettings(): Promise<void>;\n}\n"
  },
  {
    "path": "example/.gitignore",
    "content": "www/capacitor.js*\nwww/plugin.js*\nandroid/app/src/main/assets\nios/App/App/capacitor.config.json\n"
  },
  {
    "path": "example/README.md",
    "content": "A Capacitor app demonstrating the background geolocation plugin.\n\n    npm i && npx cap sync\n    npx cap open android\n    npx cap open ios\n"
  },
  {
    "path": "example/android/.gitignore",
    "content": "# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore\n\n# Built application files\n*.apk\n*.aar\n*.ap_\n*.aab\n\n# Files for the ART/Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbin/\ngen/\nout/\nrelease/\n\n# Gradle files\n.gradle/\nbuild/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Proguard folder generated by Eclipse\nproguard/\n\n# Log Files\n*.log\n\n# Android Studio Navigation editor temp files\n.navigation/\n\n# Android Studio captures folder\ncaptures/\n\n# IntelliJ\n*.iml\n.idea/workspace.xml\n.idea/tasks.xml\n.idea/gradle.xml\n.idea/assetWizardSettings.xml\n.idea/dictionaries\n.idea/libraries\n# Android Studio 3 in .gitignore file.\n.idea/caches\n.idea/modules.xml\n# Comment next line if keeping position of elements in Navigation Editor is relevant for you\n.idea/navEditor.xml\n\n# Keystore files\n# Uncomment the following lines if you do not want to check your keystore files in.\n#*.jks\n#*.keystore\n\n# External native build folder generated in Android Studio 2.2 and later\n.externalNativeBuild\n.cxx/\n\n# Google Services (e.g. APIs or Firebase)\n# google-services.json\n\n# Freeline\nfreeline.py\nfreeline/\nfreeline_project_description.json\n\n# fastlane\nfastlane/report.xml\nfastlane/Preview.html\nfastlane/screenshots\nfastlane/test_output\nfastlane/readme.md\n\n# Version control\nvcs.xml\n\n# lint\nlint/intermediates/\nlint/generated/\nlint/outputs/\nlint/tmp/\n# lint/reports/\n\n# Android Profiling\n*.hprof\n\n# Cordova plugins for Capacitor\ncapacitor-cordova-android-plugins\n\n# Copied web assets\napp/src/main/assets/public\n\n# Generated Config files\napp/src/main/assets/capacitor.config.json\napp/src/main/assets/capacitor.plugins.json\napp/src/main/res/xml/config.xml\n"
  },
  {
    "path": "example/android/app/.gitignore",
    "content": "/build/*\n!/build/.npmkeep\n"
  },
  {
    "path": "example/android/app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nandroid {\n    namespace \"com.equimaps.capacitor_background_geolocation_example\"\n    compileSdk rootProject.ext.compileSdkVersion\n    defaultConfig {\n        applicationId \"com.equimaps.capacitor_background_geolocation_example\"\n        minSdkVersion rootProject.ext.minSdkVersion\n        targetSdkVersion rootProject.ext.targetSdkVersion\n        versionCode 1\n        versionName \"1.0\"\n        aaptOptions {\n             // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.\n             // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61\n            ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'\n        }\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\nrepositories {\n    flatDir{\n        dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'\n    }\n}\n\ndependencies {\n    implementation fileTree(include: ['*.jar'], dir: 'libs')\n    implementation \"androidx.appcompat:appcompat:$androidxAppCompatVersion\"\n    implementation \"androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion\"\n    implementation \"androidx.core:core-splashscreen:$coreSplashScreenVersion\"\n    implementation project(':capacitor-android')\n    testImplementation \"junit:junit:$junitVersion\"\n    androidTestImplementation \"androidx.test.ext:junit:$androidxJunitVersion\"\n    androidTestImplementation \"androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion\"\n    implementation project(':capacitor-cordova-android-plugins')\n}\n\napply from: 'capacitor.build.gradle'\n\ntry {\n    def servicesJSON = file('google-services.json')\n    if (servicesJSON.text) {\n        apply plugin: 'com.google.gms.google-services'\n    }\n} catch(Exception e) {\n    logger.info(\"google-services.json not found, google-services plugin not applied. Push Notifications won't work\")\n}\n"
  },
  {
    "path": "example/android/app/capacitor.build.gradle",
    "content": "// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME \"capacitor update\" IS RUN\n\nandroid {\n  compileOptions {\n      sourceCompatibility JavaVersion.VERSION_21\n      targetCompatibility JavaVersion.VERSION_21\n  }\n}\n\napply from: \"../capacitor-cordova-android-plugins/cordova.variables.gradle\"\ndependencies {\n    implementation project(':capacitor-community-background-geolocation')\n    implementation project(':capacitor-local-notifications')\n\n}\n\n\nif (hasProperty('postBuildExtras')) {\n  postBuildExtras()\n}\n"
  },
  {
    "path": "example/android/app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "example/android/app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:roundIcon=\"@mipmap/ic_launcher_round\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/AppTheme\">\n\n        <activity\n            android:configChanges=\"orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|navigation\"\n            android:name=\".MainActivity\"\n            android:label=\"@string/title_activity_main\"\n            android:theme=\"@style/AppTheme.NoActionBarLaunch\"\n            android:launchMode=\"singleTask\"\n            android:exported=\"true\">\n\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n\n        </activity>\n    </application>\n\n    <!-- Permissions -->\n\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n</manifest>\n"
  },
  {
    "path": "example/android/app/src/main/java/com/equimaps/capacitor_background_geolocation_example/MainActivity.java",
    "content": "package com.equimaps.capacitor_background_geolocation_example;\n\nimport com.getcapacitor.BridgeActivity;\n\npublic class MainActivity extends BridgeActivity {}\n"
  },
  {
    "path": "example/android/app/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportHeight=\"108\"\n    android:viewportWidth=\"108\">\n    <path\n        android:fillColor=\"#26A69A\"\n        android:pathData=\"M0,0h108v108h-108z\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M9,0L9,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,0L19,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,0L29,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,0L39,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,0L49,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,0L59,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,0L69,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,0L79,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M89,0L89,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M99,0L99,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,9L108,9\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,19L108,19\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,29L108,29\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,39L108,39\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,49L108,49\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,59L108,59\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,69L108,69\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,79L108,79\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,89L108,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,99L108,99\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,29L89,29\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,39L89,39\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,49L89,49\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,59L89,59\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,69L89,69\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,79L89,79\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,19L29,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,19L39,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,19L49,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,19L59,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,19L69,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,19L79,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n</vector>\n"
  },
  {
    "path": "example/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportHeight=\"108\"\n    android:viewportWidth=\"108\">\n    <path\n        android:fillType=\"evenOdd\"\n        android:pathData=\"M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z\"\n        android:strokeColor=\"#00000000\"\n        android:strokeWidth=\"1\">\n        <aapt:attr name=\"android:fillColor\">\n            <gradient\n                android:endX=\"78.5885\"\n                android:endY=\"90.9159\"\n                android:startX=\"48.7653\"\n                android:startY=\"61.0927\"\n                android:type=\"linear\">\n                <item\n                    android:color=\"#44000000\"\n                    android:offset=\"0.0\" />\n                <item\n                    android:color=\"#00000000\"\n                    android:offset=\"1.0\" />\n            </gradient>\n        </aapt:attr>\n    </path>\n    <path\n        android:fillColor=\"#FFFFFF\"\n        android:fillType=\"nonZero\"\n        android:pathData=\"M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z\"\n        android:strokeColor=\"#00000000\"\n        android:strokeWidth=\"1\" />\n</vector>\n"
  },
  {
    "path": "example/android/app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\".MainActivity\">\n\n    <WebView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\" />\n</androidx.coordinatorlayout.widget.CoordinatorLayout>\n"
  },
  {
    "path": "example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/ic_launcher_background\"/>\n    <foreground android:drawable=\"@mipmap/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/ic_launcher_background\"/>\n    <foreground android:drawable=\"@mipmap/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "example/android/app/src/main/res/values/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"ic_launcher_background\">#FFFFFF</color>\n</resources>"
  },
  {
    "path": "example/android/app/src/main/res/values/strings.xml",
    "content": "<?xml version='1.0' encoding='utf-8'?>\n<resources>\n    <string name=\"app_name\">background-geolocation-demo</string>\n    <string name=\"title_activity_main\">background-geolocation-demo</string>\n    <string name=\"package_name\">com.equimaps.capacitor_background_geolocation_example</string>\n    <string name=\"custom_url_scheme\">com.equimaps.capacitor_background_geolocation_example</string>\n    <string name=\"capacitor_background_geolocation_notification_channel_name\">GPS</string>\n    <string name=\"capacitor_background_geolocation_notification_icon\">drawable/ic_json</string>\n    <string name=\"capacitor_background_geolocation_notification_color\">fuchsia</string>\n</resources>\n"
  },
  {
    "path": "example/android/app/src/main/res/values/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n\n    <style name=\"AppTheme.NoActionBar\" parent=\"Theme.AppCompat.DayNight.NoActionBar\">\n        <item name=\"windowActionBar\">false</item>\n        <item name=\"windowNoTitle\">true</item>\n        <item name=\"android:background\">@null</item>\n    </style>\n\n\n    <style name=\"AppTheme.NoActionBarLaunch\" parent=\"Theme.SplashScreen\">\n        <item name=\"android:background\">@drawable/splash</item>\n    </style>\n</resources>"
  },
  {
    "path": "example/android/app/src/main/res/xml/config.xml",
    "content": "<?xml version='1.0' encoding='utf-8'?>\n<widget version=\"1.0.0\" xmlns=\"http://www.w3.org/ns/widgets\" xmlns:cdv=\"http://cordova.apache.org/ns/1.0\">\n  <access origin=\"*\" />\n  \n  \n</widget>"
  },
  {
    "path": "example/android/build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    repositories {\n        google()\n        mavenCentral()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:8.7.2'\n        classpath 'com.google.gms:google-services:4.4.2'\n\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\napply from: \"variables.gradle\"\n\nallprojects {\n    repositories {\n        google()\n        mavenCentral()\n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "example/android/capacitor.settings.gradle",
    "content": "// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME \"capacitor update\" IS RUN\ninclude ':capacitor-android'\nproject(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')\n\ninclude ':capacitor-community-background-geolocation'\nproject(':capacitor-community-background-geolocation').projectDir = new File('../../android')\n\ninclude ':capacitor-local-notifications'\nproject(':capacitor-local-notifications').projectDir = new File('../node_modules/@capacitor/local-notifications/android')\n"
  },
  {
    "path": "example/android/gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.11.1-all.zip\nnetworkTimeout=10000\nvalidateDistributionUrl=true\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "example/android/gradle.properties",
    "content": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx1536m\n\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n\n# AndroidX package structure to make it clearer which packages are bundled with the\n# Android operating system, and which are packaged with your app's APK\n# https://developer.android.com/topic/libraries/support-library/androidx-rn\nandroid.useAndroidX=true\n"
  },
  {
    "path": "example/android/gradlew",
    "content": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n#\n\n##############################################################################\n#\n#   Gradle start up script for POSIX generated by Gradle.\n#\n#   Important for running:\n#\n#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is\n#       noncompliant, but you have some other compliant shell such as ksh or\n#       bash, then to run this script, type that shell name before the whole\n#       command line, like:\n#\n#           ksh Gradle\n#\n#       Busybox and similar reduced shells will NOT work, because this script\n#       requires all of these POSIX shell features:\n#         * functions;\n#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,\n#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;\n#         * compound commands having a testable exit status, especially «case»;\n#         * various built-in commands including «command», «set», and «ulimit».\n#\n#   Important for patching:\n#\n#   (2) This script targets any POSIX shell, so it avoids extensions provided\n#       by Bash, Ksh, etc; in particular arrays are avoided.\n#\n#       The \"traditional\" practice of packing multiple parameters into a\n#       space-separated string is a well documented source of bugs and security\n#       problems, so this is (mostly) avoided, by progressively accumulating\n#       options in \"$@\", and eventually passing that to Java.\n#\n#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,\n#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;\n#       see the in-line comments for details.\n#\n#       There are tweaks for specific operating systems such as AIX, CygWin,\n#       Darwin, MinGW, and NonStop.\n#\n#   (3) This script is generated from the Groovy template\n#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt\n#       within the Gradle project.\n#\n#       You can find Gradle at https://github.com/gradle/gradle/.\n#\n##############################################################################\n\n# Attempt to set APP_HOME\n\n# Resolve links: $0 may be a link\napp_path=$0\n\n# Need this for daisy-chained symlinks.\nwhile\n    APP_HOME=${app_path%\"${app_path##*/}\"}  # leaves a trailing /; empty if no leading path\n    [ -h \"$app_path\" ]\ndo\n    ls=$( ls -ld \"$app_path\" )\n    link=${ls#*' -> '}\n    case $link in             #(\n      /*)   app_path=$link ;; #(\n      *)    app_path=$APP_HOME$link ;;\n    esac\ndone\n\n# This is normally unused\n# shellcheck disable=SC2034\nAPP_BASE_NAME=${0##*/}\n# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)\nAPP_HOME=$( cd -P \"${APP_HOME:-./}\" > /dev/null && printf '%s\n' \"$PWD\" ) || exit\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=maximum\n\nwarn () {\n    echo \"$*\"\n} >&2\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n} >&2\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"$( uname )\" in                #(\n  CYGWIN* )         cygwin=true  ;; #(\n  Darwin* )         darwin=true  ;; #(\n  MSYS* | MINGW* )  msys=true    ;; #(\n  NONSTOP* )        nonstop=true ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\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    if ! command -v java >/dev/null 2>&1\n    then\n        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.\"\n    fi\nfi\n\n# Increase the maximum file descriptors if we can.\nif ! \"$cygwin\" && ! \"$darwin\" && ! \"$nonstop\" ; then\n    case $MAX_FD in #(\n      max*)\n        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        MAX_FD=$( ulimit -H -n ) ||\n            warn \"Could not query maximum file descriptor limit\"\n    esac\n    case $MAX_FD in  #(\n      '' | soft) :;; #(\n      *)\n        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        ulimit -n \"$MAX_FD\" ||\n            warn \"Could not set maximum file descriptor limit to $MAX_FD\"\n    esac\nfi\n\n# Collect all arguments for the java command, stacking in reverse order:\n#   * args from the command line\n#   * the main class name\n#   * -classpath\n#   * -D...appname settings\n#   * --module-path (only if needed)\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif \"$cygwin\" || \"$msys\" ; then\n    APP_HOME=$( cygpath --path --mixed \"$APP_HOME\" )\n    CLASSPATH=$( cygpath --path --mixed \"$CLASSPATH\" )\n\n    JAVACMD=$( cygpath --unix \"$JAVACMD\" )\n\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    for arg do\n        if\n            case $arg in                                #(\n              -*)   false ;;                            # don't mess with options #(\n              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath\n                    [ -e \"$t\" ] ;;                      #(\n              *)    false ;;\n            esac\n        then\n            arg=$( cygpath --path --ignore --mixed \"$arg\" )\n        fi\n        # Roll the args list around exactly as many times as the number of\n        # args, so each arg winds up back in the position where it started, but\n        # possibly modified.\n        #\n        # NB: a `for` loop captures its iteration list before it begins, so\n        # changing the positional parameters here affects neither the number of\n        # iterations, nor the values presented in `arg`.\n        shift                   # remove old arg\n        set -- \"$@\" \"$arg\"      # push replacement arg\n    done\nfi\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='\"-Xmx64m\" \"-Xms64m\"'\n\n# Collect all arguments for the java command:\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,\n#     and any embedded shellness will be escaped.\n#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be\n#     treated as '${Hostname}' itself on the command line.\n\nset -- \\\n        \"-Dorg.gradle.appname=$APP_BASE_NAME\" \\\n        -classpath \"$CLASSPATH\" \\\n        org.gradle.wrapper.GradleWrapperMain \\\n        \"$@\"\n\n# Stop when \"xargs\" is not available.\nif ! command -v xargs >/dev/null 2>&1\nthen\n    die \"xargs is not available\"\nfi\n\n# Use \"xargs\" to parse quoted args.\n#\n# With -n1 it outputs one arg per line, with the quotes and backslashes removed.\n#\n# In Bash we could simply go:\n#\n#   readarray ARGS < <( xargs -n1 <<<\"$var\" ) &&\n#   set -- \"${ARGS[@]}\" \"$@\"\n#\n# but POSIX shell has neither arrays nor command substitution, so instead we\n# post-process each arg (as a line of input to sed) to backslash-escape any\n# character that might be a shell metacharacter, then use eval to reverse\n# that process (while maintaining the separation between arguments), and wrap\n# the whole thing up as a single \"set\" statement.\n#\n# This will of course break if any of these variables contains a newline or\n# an unmatched quote.\n#\n\neval \"set -- $(\n        printf '%s\\n' \"$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\" |\n        xargs -n1 |\n        sed ' s~[^-[:alnum:]+,./:=@_]~\\\\&~g; ' |\n        tr '\\n' ' '\n    )\" '\"$@\"'\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "example/android/gradlew.bat",
    "content": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\r\n@rem you may not use this file except in compliance with the License.\r\n@rem You may obtain a copy of the License at\r\n@rem\r\n@rem      https://www.apache.org/licenses/LICENSE-2.0\r\n@rem\r\n@rem Unless required by applicable law or agreed to in writing, software\r\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\r\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n@rem See the License for the specific language governing permissions and\r\n@rem limitations under the License.\r\n@rem\r\n@rem SPDX-License-Identifier: Apache-2.0\r\n@rem\r\n\r\n@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\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\"==\"\" set DIRNAME=.\r\n@rem This is normally unused\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\r\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\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=\"-Xmx64m\" \"-Xms64m\"\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% equ 0 goto execute\r\n\r\necho. 1>&2\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2\r\necho. 1>&2\r\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\r\necho location of your Java installation. 1>&2\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 execute\r\n\r\necho. 1>&2\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2\r\necho. 1>&2\r\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\r\necho location of your Java installation. 1>&2\r\n\r\ngoto fail\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\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 %*\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif %ERRORLEVEL% equ 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\nset EXIT_CODE=%ERRORLEVEL%\r\nif %EXIT_CODE% equ 0 set EXIT_CODE=1\r\nif not \"\"==\"%GRADLE_EXIT_CONSOLE%\" exit %EXIT_CODE%\r\nexit /b %EXIT_CODE%\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "example/android/settings.gradle",
    "content": "include ':app'\ninclude ':capacitor-cordova-android-plugins'\nproject(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/')\n\napply from: 'capacitor.settings.gradle'"
  },
  {
    "path": "example/android/variables.gradle",
    "content": "ext {\n    minSdkVersion = 23\n    compileSdkVersion = 35\n    targetSdkVersion = 35\n    androidxActivityVersion = '1.9.2'\n    androidxAppCompatVersion = '1.7.0'\n    androidxCoordinatorLayoutVersion = '1.2.0'\n    androidxCoreVersion = '1.15.0'\n    androidxFragmentVersion = '1.8.4'\n    coreSplashScreenVersion = '1.0.1'\n    androidxWebkitVersion = '1.12.1'\n    junitVersion = '4.13.2'\n    androidxJunitVersion = '1.2.1'\n    androidxEspressoCoreVersion = '3.6.1'\n    cordovaAndroidVersion = '10.1.1'\n}"
  },
  {
    "path": "example/capacitor.config.json",
    "content": "{\n  \"appId\": \"com.equimaps.capacitor_background_geolocation_example\",\n  \"appName\": \"background-geolocation-example\",\n  \"android\": {\"useLegacyBridge\": true},\n  \"npmClient\": \"npm\",\n  \"webDir\": \"www\"\n}\n"
  },
  {
    "path": "example/ios/.gitignore",
    "content": "App/build\nApp/Pods\nApp/output\nApp/App/public\nDerivedData\nxcuserdata\n\n# Cordova plugins for Capacitor\ncapacitor-cordova-ios-plugins\n\n# Generated Config files\nApp/App/capacitor.config.json\nApp/App/config.xml\n"
  },
  {
    "path": "example/ios/App/App/AppDelegate.swift",
    "content": "import UIKit\nimport Capacitor\n\n@UIApplicationMain\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n    var window: UIWindow?\n\n    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\n        // Override point for customization after application launch.\n        return true\n    }\n\n    func applicationWillResignActive(_ application: UIApplication) {\n        // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.\n        // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.\n    }\n\n    func applicationDidEnterBackground(_ application: UIApplication) {\n        // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.\n        // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.\n    }\n\n    func applicationWillEnterForeground(_ application: UIApplication) {\n        // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.\n    }\n\n    func applicationDidBecomeActive(_ application: UIApplication) {\n        // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.\n    }\n\n    func applicationWillTerminate(_ application: UIApplication) {\n        // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.\n    }\n\n    func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {\n        // Called when the app was launched with a url. Feel free to add additional processing here,\n        // but if you want the App API to support tracking app url opens, make sure to keep this call\n        return ApplicationDelegateProxy.shared.application(app, open: url, options: options)\n    }\n\n    func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {\n        // Called when the app was launched with an activity, including Universal Links.\n        // Feel free to add additional processing here, but if you want the App API to support\n        // tracking app url opens, make sure to keep this call\n        return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler)\n    }\n\n}\n"
  },
  {
    "path": "example/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"filename\" : \"AppIcon-512@2x.png\",\n      \"idiom\" : \"universal\",\n      \"platform\" : \"ios\",\n      \"size\" : \"1024x1024\"\n    }\n  ],\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "example/ios/App/App/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "example/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"splash-2732x2732-2.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"splash-2732x2732-1.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"splash-2732x2732.png\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "example/ios/App/App/Base.lproj/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"17132\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <device id=\"retina4_7\" orientation=\"portrait\" appearance=\"light\"/>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"17105\"/>\n        <capability name=\"System colors in document resources\" minToolsVersion=\"11.0\"/>\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                    <imageView key=\"view\" userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" image=\"Splash\" id=\"snD-IY-ifK\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                        <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                    </imageView>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"53\" y=\"375\"/>\n        </scene>\n    </scenes>\n    <resources>\n        <image name=\"Splash\" width=\"1366\" height=\"1366\"/>\n        <systemColor name=\"systemBackgroundColor\">\n            <color white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n        </systemColor>\n    </resources>\n</document>\n"
  },
  {
    "path": "example/ios/App/App/Base.lproj/Main.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"14111\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" colorMatched=\"YES\" initialViewController=\"BYZ-38-t0r\">\n    <device id=\"retina4_7\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"14088\"/>\n    </dependencies>\n    <scenes>\n        <!--Bridge View Controller-->\n        <scene sceneID=\"tne-QT-ifu\">\n            <objects>\n                <viewController id=\"BYZ-38-t0r\" customClass=\"CAPBridgeViewController\" customModule=\"Capacitor\" sceneMemberID=\"viewController\"/>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"dkx-z0-nzr\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "example/ios/App/App/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    <key>CAPACITOR_DEBUG</key>\n\t<string>$(CAPACITOR_DEBUG)</string>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleDisplayName</key>\n        <string>background-geolocation-demo</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>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>$(MARKETING_VERSION)</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(CURRENT_PROJECT_VERSION)</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>\n\t<string>Allow geolocation?</string>\n\t<key>NSLocationWhenInUseUsageDescription</key>\n\t<string>Allow Geolocation?</string>\n\t<key>UIBackgroundModes</key>\n\t<array>\n\t\t<string>location</string>\n\t</array>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIMainStoryboardFile</key>\n\t<string>Main</string>\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\t<key>UIViewControllerBasedStatusBarAppearance</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example/ios/App/App/config.xml",
    "content": "<?xml version='1.0' encoding='utf-8'?>\n<widget version=\"1.0.0\" xmlns=\"http://www.w3.org/ns/widgets\" xmlns:cdv=\"http://cordova.apache.org/ns/1.0\">\n  <access origin=\"*\" />\n  \n  \n</widget>"
  },
  {
    "path": "example/ios/App/App.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 60;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t2FAD9763203C412B000D30F8 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD9762203C412B000D30F8 /* config.xml */; };\n\t\t50379B232058CBB4000EE86E /* capacitor.config.json in Resources */ = {isa = PBXBuildFile; fileRef = 50379B222058CBB4000EE86E /* capacitor.config.json */; };\n\t\t504EC3081FED79650016851F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504EC3071FED79650016851F /* AppDelegate.swift */; };\n\t\t504EC30D1FED79650016851F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30B1FED79650016851F /* Main.storyboard */; };\n\t\t504EC30F1FED79650016851F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30E1FED79650016851F /* Assets.xcassets */; };\n\t\t504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; };\n\t\t50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; };\n\t\t8CA225782E6071C7007DCEEE /* CapApp-SPM in Frameworks */ = {isa = PBXBuildFile; productRef = 8CA225772E6071C7007DCEEE /* CapApp-SPM */; };\n\t\t8CA2257B2E6072F0007DCEEE /* CapApp-SPM in Frameworks */ = {isa = PBXBuildFile; productRef = 8CA2257A2E6072F0007DCEEE /* CapApp-SPM */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t2FAD9762203C412B000D30F8 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = config.xml; sourceTree = \"<group>\"; };\n\t\t50379B222058CBB4000EE86E /* capacitor.config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = capacitor.config.json; sourceTree = \"<group>\"; };\n\t\t504EC3041FED79650016851F /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t504EC3071FED79650016851F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t504EC30C1FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = \"<group>\"; };\n\t\t504EC30E1FED79650016851F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = \"<group>\"; };\n\t\t504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = \"<group>\"; };\n\t\t958DCC722DB07C7200EA8C5F /* debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = debug.xcconfig; path = ../debug.xcconfig; sourceTree = SOURCE_ROOT; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t504EC3011FED79650016851F /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t8CA2257B2E6072F0007DCEEE /* CapApp-SPM in Frameworks */,\n\t\t\t\t8CA225782E6071C7007DCEEE /* CapApp-SPM 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\t504EC2FB1FED79650016851F = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t958DCC722DB07C7200EA8C5F /* debug.xcconfig */,\n\t\t\t\t504EC3061FED79650016851F /* App */,\n\t\t\t\t504EC3051FED79650016851F /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t504EC3051FED79650016851F /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t504EC3041FED79650016851F /* App.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t504EC3061FED79650016851F /* App */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t50379B222058CBB4000EE86E /* capacitor.config.json */,\n\t\t\t\t504EC3071FED79650016851F /* AppDelegate.swift */,\n\t\t\t\t504EC30B1FED79650016851F /* Main.storyboard */,\n\t\t\t\t504EC30E1FED79650016851F /* Assets.xcassets */,\n\t\t\t\t504EC3101FED79650016851F /* LaunchScreen.storyboard */,\n\t\t\t\t504EC3131FED79650016851F /* Info.plist */,\n\t\t\t\t2FAD9762203C412B000D30F8 /* config.xml */,\n\t\t\t\t50B271D01FEDC1A000F3C39B /* public */,\n\t\t\t);\n\t\t\tpath = App;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t504EC3031FED79650016851F /* App */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget \"App\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t504EC3001FED79650016851F /* Sources */,\n\t\t\t\t504EC3011FED79650016851F /* Frameworks */,\n\t\t\t\t504EC3021FED79650016851F /* 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 = App;\n\t\t\tpackageProductDependencies = (\n\t\t\t\t8CA225772E6071C7007DCEEE /* CapApp-SPM */,\n\t\t\t\t8CA2257A2E6072F0007DCEEE /* CapApp-SPM */,\n\t\t\t);\n\t\t\tproductName = App;\n\t\t\tproductReference = 504EC3041FED79650016851F /* App.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t504EC2FC1FED79650016851F /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftUpdateCheck = 0920;\n\t\t\t\tLastUpgradeCheck = 0920;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t504EC3031FED79650016851F = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.2;\n\t\t\t\t\t\tLastSwiftMigration = 1100;\n\t\t\t\t\t\tProvisioningStyle = Automatic;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 504EC2FF1FED79650016851F /* Build configuration list for PBXProject \"App\" */;\n\t\t\tcompatibilityVersion = \"Xcode 8.0\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 504EC2FB1FED79650016851F;\n\t\t\tpackageReferences = (\n\t\t\t\t8CA225792E6072F0007DCEEE /* XCLocalSwiftPackageReference \"CapApp-SPM\" */,\n\t\t\t);\n\t\t\tproductRefGroup = 504EC3051FED79650016851F /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t504EC3031FED79650016851F /* App */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t504EC3021FED79650016851F /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */,\n\t\t\t\t50B271D11FEDC1A000F3C39B /* public in Resources */,\n\t\t\t\t504EC30F1FED79650016851F /* Assets.xcassets in Resources */,\n\t\t\t\t50379B232058CBB4000EE86E /* capacitor.config.json in Resources */,\n\t\t\t\t504EC30D1FED79650016851F /* Main.storyboard in Resources */,\n\t\t\t\t2FAD9763203C412B000D30F8 /* config.xml in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t504EC3001FED79650016851F /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t504EC3081FED79650016851F /* AppDelegate.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\t504EC30B1FED79650016851F /* Main.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t504EC30C1FED79650016851F /* Base */,\n\t\t\t);\n\t\t\tname = Main.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t504EC3101FED79650016851F /* LaunchScreen.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t504EC3111FED79650016851F /* Base */,\n\t\t\t);\n\t\t\tname = LaunchScreen.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t504EC3141FED79650016851F /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 958DCC722DB07C7200EA8C5F /* debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\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_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = 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_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\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_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 = 14.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\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t504EC3151FED79650016851F /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\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_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = 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_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\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 = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\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 = 14.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t504EC3171FED79650016851F /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 958DCC722DB07C7200EA8C5F /* debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEVELOPMENT_TEAM = NF4B9ND56C;\n\t\t\t\tINFOPLIST_FILE = App/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 14.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tOTHER_SWIFT_FLAGS = \"$(inherited) \\\"-D\\\" \\\"COCOAPODS\\\" \\\"-DDEBUG\\\"\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.equimaps.capacitor_background_geolocation_example;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t504EC3181FED79650016851F /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEVELOPMENT_TEAM = NF4B9ND56C;\n\t\t\t\tINFOPLIST_FILE = App/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 14.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.equimaps.capacitor_background_geolocation_example;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t504EC2FF1FED79650016851F /* Build configuration list for PBXProject \"App\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t504EC3141FED79650016851F /* Debug */,\n\t\t\t\t504EC3151FED79650016851F /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget \"App\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t504EC3171FED79650016851F /* Debug */,\n\t\t\t\t504EC3181FED79650016851F /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\n/* Begin XCLocalSwiftPackageReference section */\n\t\t8CA225792E6072F0007DCEEE /* XCLocalSwiftPackageReference \"CapApp-SPM\" */ = {\n\t\t\tisa = XCLocalSwiftPackageReference;\n\t\t\trelativePath = \"CapApp-SPM\";\n\t\t};\n/* End XCLocalSwiftPackageReference section */\n\n/* Begin XCSwiftPackageProductDependency section */\n\t\t8CA225772E6071C7007DCEEE /* CapApp-SPM */ = {\n\t\t\tisa = XCSwiftPackageProductDependency;\n\t\t\tproductName = \"CapApp-SPM\";\n\t\t};\n\t\t8CA2257A2E6072F0007DCEEE /* CapApp-SPM */ = {\n\t\t\tisa = XCSwiftPackageProductDependency;\n\t\t\tproductName = \"CapApp-SPM\";\n\t\t};\n/* End XCSwiftPackageProductDependency section */\n\t};\n\trootObject = 504EC2FC1FED79650016851F /* Project object */;\n}\n"
  },
  {
    "path": "example/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "example/ios/App/CapApp-SPM/.gitignore",
    "content": ".DS_Store\n/.build\n/Packages\n/*.xcodeproj\nxcuserdata/\nDerivedData/\n.swiftpm/config/registries.json\n.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata\n.netrc\n"
  },
  {
    "path": "example/ios/App/CapApp-SPM/Package.swift",
    "content": "// swift-tools-version: 5.9\nimport PackageDescription\n\n// DO NOT MODIFY THIS FILE - managed by Capacitor CLI commands\nlet package = Package(\n    name: \"CapApp-SPM\",\n    platforms: [.iOS(.v14)],\n    products: [\n        .library(\n            name: \"CapApp-SPM\",\n            targets: [\"CapApp-SPM\"])\n    ],\n    dependencies: [\n        .package(url: \"https://github.com/ionic-team/capacitor-swift-pm.git\", exact: \"7.4.3\"),\n        .package(name: \"CapacitorCommunityBackgroundGeolocation\", path: \"../../../..\"),\n        .package(name: \"CapacitorLocalNotifications\", path: \"../../../node_modules/@capacitor/local-notifications\")\n    ],\n    targets: [\n        .target(\n            name: \"CapApp-SPM\",\n            dependencies: [\n                .product(name: \"Capacitor\", package: \"capacitor-swift-pm\"),\n                .product(name: \"Cordova\", package: \"capacitor-swift-pm\"),\n                .product(name: \"CapacitorCommunityBackgroundGeolocation\", package: \"CapacitorCommunityBackgroundGeolocation\"),\n                .product(name: \"CapacitorLocalNotifications\", package: \"CapacitorLocalNotifications\")\n            ]\n        )\n    ]\n)\n"
  },
  {
    "path": "example/ios/App/CapApp-SPM/README.md",
    "content": "# CapApp-SPM\n\nThis SPM is used to host SPM dependencies for you Capacitor project\n\nDo not modify the contents of it or there may be unintended consequences.\n"
  },
  {
    "path": "example/ios/App/CapApp-SPM/Sources/CapApp-SPM/CapApp-SPM.swift",
    "content": "public let isCapacitorApp = true\n"
  },
  {
    "path": "example/ios/debug.xcconfig",
    "content": "CAPACITOR_DEBUG = true\n"
  },
  {
    "path": "example/package.json",
    "content": "{\n    \"private\": true,\n    \"name\": \"background-geolocation-example\",\n    \"version\": \"1.0.0\",\n    \"scripts\": {\n        \"prepare\": \"cp node_modules/@capacitor/core/dist/capacitor.js* node_modules/@capacitor/local-notifications/dist/plugin.js* www/\"\n    },\n    \"dependencies\": {\n        \"@capacitor-community/background-geolocation\": \"../\",\n        \"@capacitor/android\": \"^7.0.0\",\n        \"@capacitor/cli\": \"^7.0.0\",\n        \"@capacitor/core\": \"^7.0.0\",\n        \"@capacitor/ios\": \"^7.0.0\",\n        \"@capacitor/local-notifications\": \"^7.0.0\"\n    }\n}\n"
  },
  {
    "path": "example/www/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n  <title>BackgroundGeolocation Example</title>\n  <meta name=\"viewport\" content=\"viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\">\n  <style>\n    body {\n      margin-top: 4em; /* notch */\n    }\n    ul {\n      padding: 0;\n      margin: 0;\n      list-style-type: none;\n    }\n  </style>\n</head>\n<body>\n  <ul id=\"watchers\"></ul>\n\n  <button onclick=\"add_watcher(false)\">+FG</button>\n  <button onclick=\"add_watcher(true)\">+BG</button>\n  <br>Notification permissions: <button onclick=\"request_permissions()\">Request</button>\n  <br>Guess:\n  <button onclick=\"guess(50)\">50ms</button>\n  <button onclick=\"guess(100)\">100ms</button>\n  <button onclick=\"guess(250)\">250ms</button>\n  <button onclick=\"guess(1000)\">1000ms</button>\n\n  <ul id=\"log\">\n    <li>Init</li>\n  </ul>\n\n  <script src=\"capacitor.js\"></script>\n  <script src=\"plugin.js\"></script> <!-- local-notifications -->\n  <script src=\"main.js\"></script>\n</body>\n</html>\n\n"
  },
  {
    "path": "example/www/main.js",
    "content": "/*jslint browser, null, devel */\n/*global capacitorExports, capacitorLocalNotifications */\nconst {registerPlugin} = capacitorExports;\nconst BackgroundGeolocation = registerPlugin(\"BackgroundGeolocation\");\n\nconst started = Date.now();\nconst watcher_colours = {};\nconst colours = [\n    \"red\",\n    \"green\",\n    \"blue\",\n    \"yellow\",\n    \"pink\",\n    \"orange\",\n    \"purple\",\n    \"cyan\"\n];\n\nfunction timestamp(time) {\n    return String(Math.floor((time - started) / 1000));\n}\n\nfunction log_for_watcher(text, time = Date.now(), colour = \"gray\") {\n    const li = document.createElement(\"li\");\n    li.style.color = colour;\n    li.innerText = (\n        \"L\" + timestamp(time) + \":W\" + timestamp(Date.now()) + \":\" + text\n    );\n    const container = document.getElementById(\"log\");\n    return container.insertBefore(li, container.firstChild);\n}\n\nfunction log_error(error, colour = \"gray\") {\n    console.error(error);\n    return log_for_watcher(\n        error.name + \": \" + error.message,\n        Date.now(),\n        colour\n    );\n}\n\nfunction log_location(location, watcher_ID) {\n    return log_for_watcher(\n        location.latitude + \":\" + location.longitude,\n        location.time,\n        watcher_colours[watcher_ID]\n    );\n}\n\nfunction add_watcher(background) {\n    let id;\n    BackgroundGeolocation.addWatcher(\n        Object.assign({\n            stale: true\n        }, (\n            background\n            ? {\n                backgroundTitle: \"Tracking your location, senõr.\",\n                backgroundMessage: \"Cancel to prevent battery drain.\"\n            }\n            : {\n                // distanceFilter: 10\n            }\n        )),\n        function callback(location, error) {\n            if (error) {\n                if (\n                    error.code === \"NOT_AUTHORIZED\" &&\n                    window.confirm(\n                        \"This app needs your location, \" +\n                        \"but does not have permission.\\n\\n\" +\n                        \"Open settings now?\"\n                    )\n                ) {\n                    BackgroundGeolocation.openSettings();\n                }\n                return log_error(error, watcher_colours[id]);\n            }\n            return log_location(location, id);\n        }\n    ).then(function retain_the_watcher_id(the_id) {\n        id = the_id;\n\n        const watcher_nr = Object.keys(watcher_colours).length;\n        watcher_colours[id] = colours[watcher_nr];\n\n        const container = document.getElementById(\"watchers\");\n        const li = document.createElement(\"li\");\n        li.style.backgroundColor = watcher_colours[id];\n        li.innerText = (\n            background\n            ? \"BG\"\n            : \"FG\"\n        );\n\n        const remove_btn = document.createElement(\"button\");\n        remove_btn.innerText = \"Remove\";\n        remove_btn.onclick = function () {\n            return BackgroundGeolocation.removeWatcher({id}).then(\n                function () {\n                    container.removeChild(\n                        container.children.item(\n                            Object.keys(watcher_colours).indexOf(id)\n                        )\n                    );\n                    delete watcher_colours[id];\n                }\n            ).catch(\n                (error) => log_error(error, watcher_colours[id])\n            );\n        };\n\n        li.appendChild(remove_btn);\n\n        return container.appendChild(li);\n    });\n}\n\n// Produces the most accurate location possible within the specified time limit.\nfunction make_guess(timeout) {\n    return new Promise(function (resolve) {\n        let last_location = null;\n        let id;\n        BackgroundGeolocation.addWatcher(\n            {\n                requestPermissions: false,\n                stale: true\n            },\n            function callback(location) {\n                last_location = location;\n            }\n        ).then(function retain_callback_id(the_id) {\n            id = the_id;\n        });\n\n        setTimeout(function () {\n            resolve(last_location);\n            BackgroundGeolocation.removeWatcher({id});\n        }, timeout);\n    });\n}\n\nfunction guess(timeout) {\n    return make_guess(timeout).then(function (location) {\n        return (\n            location === null\n            ? log_for_watcher(\"null\", Date.now())\n            : log_for_watcher(\n                [\n                    location.latitude,\n                    location.longitude\n                ].map(String).join(\":\"),\n                location.time\n            )\n        );\n    });\n}\n\nfunction request_permissions() {\n    capacitorLocalNotifications.LocalNotifications.requestPermissions().then(\n        function (status) {\n            log_for_watcher(\"Notification permissions \" + status.display);\n        }\n    );\n}\n"
  },
  {
    "path": "ios/Plugin/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>$(DEVELOPMENT_LANGUAGE)</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>CFBundleVersion</key>\n\t<string>$(CURRENT_PROJECT_VERSION)</string>\n\t<key>NSPrincipalClass</key>\n\t<string></string>\n</dict>\n</plist>\n"
  },
  {
    "path": "ios/Plugin/Plugin.h",
    "content": "#import <UIKit/UIKit.h>\n\n//! Project version number for Plugin.\nFOUNDATION_EXPORT double PluginVersionNumber;\n\n//! Project version string for Plugin.\nFOUNDATION_EXPORT const unsigned char PluginVersionString[];\n\n// In this header, you should import all the public headers of your framework using statements like #import <Plugin/PublicHeader.h>\n\n"
  },
  {
    "path": "ios/Plugin/Plugin.m",
    "content": "#import <Foundation/Foundation.h>\n#import <Capacitor/Capacitor.h>\n\nCAP_PLUGIN(BackgroundGeolocation, \"BackgroundGeolocation\",\n    CAP_PLUGIN_METHOD(addWatcher, CAPPluginReturnCallback);\n    CAP_PLUGIN_METHOD(removeWatcher, CAPPluginReturnPromise);\n    CAP_PLUGIN_METHOD(openSettings, CAPPluginReturnPromise);\n)\n"
  },
  {
    "path": "ios/Plugin/Swift/Plugin.swift",
    "content": "import Capacitor\nimport Foundation\nimport UIKit\nimport CoreLocation\n\n// Avoids a bewildering type warning.\nlet null = Optional<Double>.none as Any\n\nfunc formatLocation(_ location: CLLocation) -> PluginCallResultData {\n    var simulated = false;\n    if #available(iOS 15, *) {\n        // Prior to iOS 15, it was not possible to detect simulated locations.\n        // But in general, it is very difficult to simulate locations on iOS in\n        // production.\n        if location.sourceInformation != nil {\n            simulated = location.sourceInformation!.isSimulatedBySoftware;\n        }\n    }\n    return [\n        \"latitude\": location.coordinate.latitude,\n        \"longitude\": location.coordinate.longitude,\n        \"accuracy\": location.horizontalAccuracy,\n        \"altitude\": location.altitude,\n        \"altitudeAccuracy\": location.verticalAccuracy,\n        \"simulated\": simulated,\n        \"speed\": location.speed < 0 ? null : location.speed,\n        \"bearing\": location.course < 0 ? null : location.course,\n        \"time\": NSNumber(\n            value: Int(\n                location.timestamp.timeIntervalSince1970 * 1000\n            )\n        ),\n    ]\n}\n\nclass Watcher {\n    let callbackId: String\n    let locationManager: CLLocationManager = CLLocationManager()\n    private let created = Date()\n    private let allowStale: Bool\n    private var isUpdatingLocation: Bool = false\n    init(_ id: String, stale: Bool) {\n        callbackId = id\n        allowStale = stale\n    }\n    func start() {\n        // Avoid unnecessary calls to startUpdatingLocation, which can\n        // result in extraneous invocations of didFailWithError.\n        if !isUpdatingLocation {\n            locationManager.startUpdatingLocation()\n            isUpdatingLocation = true\n        }\n    }\n    func stop() {\n        if isUpdatingLocation {\n            locationManager.stopUpdatingLocation()\n            isUpdatingLocation = false\n        }\n    }\n    func isLocationValid(_ location: CLLocation) -> Bool {\n        return (\n            allowStale ||\n            location.timestamp >= created\n        )\n    }\n}\n\n@objc(BackgroundGeolocation)\npublic class BackgroundGeolocation: CAPPlugin,\n                                    CAPBridgedPlugin,\n                                    CLLocationManagerDelegate {\n    private var watchers = [Watcher]()\n    public let identifier = \"BackgroundGeolocation\"\n    public let jsName = \"BackgroundGeolocation\"\n    public let pluginMethods: [CAPPluginMethod] = [\n        CAPPluginMethod(name: \"addWatcher\", returnType: CAPPluginReturnCallback),\n        CAPPluginMethod(name: \"removeWatcher\", returnType: CAPPluginReturnPromise),\n        CAPPluginMethod(name: \"openSettings\", returnType: CAPPluginReturnPromise)\n    ]\n\n    @objc public override func load() {\n        UIDevice.current.isBatteryMonitoringEnabled = true\n    }\n\n    @objc func addWatcher(_ call: CAPPluginCall) {\n        call.keepAlive = true\n\n        // CLLocationManager requires main thread\n        DispatchQueue.main.async {\n            let background = call.getString(\"backgroundMessage\") != nil\n            let watcher = Watcher(\n                call.callbackId,\n                stale: call.getBool(\"stale\") ?? false\n            )\n            let manager = watcher.locationManager\n            manager.delegate = self\n            let externalPower = [\n                .full,\n                .charging\n            ].contains(UIDevice.current.batteryState)\n            manager.desiredAccuracy = (\n                externalPower\n                ? kCLLocationAccuracyBestForNavigation\n                : kCLLocationAccuracyBest\n            )\n            var distanceFilter = call.getDouble(\"distanceFilter\")\n            // It appears that setting manager.distanceFilter to 0 can prevent\n            // subsequent location updates. See issue #88.\n            if distanceFilter == nil || distanceFilter == 0 {\n                distanceFilter = kCLDistanceFilterNone\n            }\n            manager.distanceFilter = distanceFilter!\n            manager.allowsBackgroundLocationUpdates = background\n            manager.showsBackgroundLocationIndicator = background\n            manager.pausesLocationUpdatesAutomatically = false\n            self.watchers.append(watcher)\n            if call.getBool(\"requestPermissions\") != false {\n                let status = CLLocationManager.authorizationStatus()\n                if [\n                    .notDetermined,\n                    .denied,\n                    .restricted,\n                ].contains(status) {\n                    return (\n                        background\n                        ? manager.requestAlwaysAuthorization()\n                        : manager.requestWhenInUseAuthorization()\n                    )\n                }\n                if (\n                    background && status == .authorizedWhenInUse\n                ) {\n                    // Attempt to escalate.\n                    manager.requestAlwaysAuthorization()\n                }\n            }\n            return watcher.start()\n        }\n    }\n\n    @objc func removeWatcher(_ call: CAPPluginCall) {\n        // CLLocationManager requires main thread\n        DispatchQueue.main.async {\n            if let callbackId = call.getString(\"id\") {\n                if let index = self.watchers.firstIndex(\n                    where: { $0.callbackId == callbackId }\n                ) {\n                    self.watchers[index].locationManager.stopUpdatingLocation()\n                    self.watchers.remove(at: index)\n                }\n                if let savedCall = self.bridge?.savedCall(withID: callbackId) {\n                    self.bridge?.releaseCall(savedCall)\n                }\n                return call.resolve()\n            }\n            return call.reject(\"No callback ID\")\n        }\n    }\n\n    @objc func openSettings(_ call: CAPPluginCall) {\n        DispatchQueue.main.async {\n            guard let settingsUrl = URL(\n                string: UIApplication.openSettingsURLString\n            ) else {\n                return call.reject(\"No link to settings available\")\n            }\n\n            if UIApplication.shared.canOpenURL(settingsUrl) {\n                UIApplication.shared.open(settingsUrl, completionHandler: {\n                    (success) in\n                    if (success) {\n                        return call.resolve()\n                    } else {\n                        return call.reject(\"Failed to open settings\")\n                    }\n                })\n            } else {\n                return call.reject(\"Cannot open settings\")\n            }\n        }\n    }\n\n    public func locationManager(\n        _ manager: CLLocationManager,\n        didFailWithError error: Error\n    ) {\n        if let watcher = self.watchers.first(\n            where: { $0.locationManager == manager }\n        ) {\n            if let call = self.bridge?.savedCall(withID: watcher.callbackId) {\n                if let clErr = error as? CLError {\n                    if clErr.code == .locationUnknown {\n                        // This error is sometimes sent by the manager if\n                        // it cannot get a fix immediately.\n                        return\n                    } else if (clErr.code == .denied) {\n                        watcher.stop()\n                        return call.reject(\n                            \"Permission denied.\",\n                            \"NOT_AUTHORIZED\"\n                        )\n                    }\n                }\n                return call.reject(error.localizedDescription, nil, error)\n            }\n        }\n    }\n\n    public func locationManager(\n        _ manager: CLLocationManager,\n        didUpdateLocations locations: [CLLocation]\n    ) {\n        if let location = locations.last {\n            if let watcher = self.watchers.first(\n                where: { $0.locationManager == manager }\n            ) {\n                if watcher.isLocationValid(location) {\n                    if let call = self.bridge?.savedCall(withID: watcher.callbackId) {\n                        return call.resolve(formatLocation(location))\n                    }\n                }\n            }\n        }\n    }\n\n    public func locationManager(\n        _ manager: CLLocationManager,\n        didChangeAuthorization status: CLAuthorizationStatus\n    ) {\n        // If this method is called before the user decides on a permission, as\n        // it is on iOS 14 when the permissions dialog is presented, we ignore\n        // it.\n        if status != .notDetermined {\n            if let watcher = self.watchers.first(\n                where: { $0.locationManager == manager }\n            ) {\n                return watcher.start()\n            }\n        }\n    }\n}\n\n"
  },
  {
    "path": "ios/Plugin.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 48;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t03FC29A292ACC40490383A1F /* Pods_Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */; };\n\t\t20C0B05DCFC8E3958A738AF2 /* Pods_PluginTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */; };\n\t\t50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFF88201F53D600D50D53 /* Plugin.framework */; };\n\t\t50ADFF97201F53D600D50D53 /* PluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* PluginTests.swift */; };\n\t\t50ADFF99201F53D600D50D53 /* Plugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* Plugin.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; };\n\t\t50ADFFA82020EE4F00D50D53 /* Plugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* Plugin.m */; };\n\t\t50E1A94820377CB70090CE1A /* Plugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* Plugin.swift */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\t50ADFF93201F53D600D50D53 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 50ADFF7F201F53D600D50D53 /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 50ADFF87201F53D600D50D53;\n\t\t\tremoteInfo = Plugin;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXFileReference section */\n\t\t3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t50ADFF88201F53D600D50D53 /* Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t50ADFF8B201F53D600D50D53 /* Plugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Plugin.h; sourceTree = \"<group>\"; };\n\t\t50ADFF8C201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t50ADFF91201F53D600D50D53 /* PluginTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PluginTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t50ADFF96201F53D600D50D53 /* PluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PluginTests.swift; sourceTree = \"<group>\"; };\n\t\t50ADFF98201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t50ADFFA52020D75100D50D53 /* Capacitor.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Capacitor.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t50ADFFA72020EE4F00D50D53 /* Plugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Plugin.m; sourceTree = \"<group>\"; };\n\t\t50E1A94720377CB70090CE1A /* Plugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Plugin.swift; sourceTree = \"<group>\"; };\n\t\t5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-Plugin.debug.xcconfig\"; path = \"Pods/Target Support Files/Pods-Plugin/Pods-Plugin.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-Plugin.release.xcconfig\"; path = \"Pods/Target Support Files/Pods-Plugin/Pods-Plugin.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-PluginTests.debug.xcconfig\"; path = \"Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\tF65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-PluginTests.release.xcconfig\"; path = \"Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\tF6753A823D3815DB436415E3 /* Pods_PluginTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PluginTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t50ADFF84201F53D600D50D53 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */,\n\t\t\t\t03FC29A292ACC40490383A1F /* Pods_Plugin.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t50ADFF8E201F53D600D50D53 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */,\n\t\t\t\t20C0B05DCFC8E3958A738AF2 /* Pods_PluginTests.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\t50ADFF7E201F53D600D50D53 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t50ADFF8A201F53D600D50D53 /* Plugin */,\n\t\t\t\t50ADFF95201F53D600D50D53 /* PluginTests */,\n\t\t\t\t50ADFF89201F53D600D50D53 /* Products */,\n\t\t\t\t8C8E7744173064A9F6D438E3 /* Pods */,\n\t\t\t\tA797B9EFA3DCEFEA1FBB66A9 /* Frameworks */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t50ADFF89201F53D600D50D53 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t50ADFF88201F53D600D50D53 /* Plugin.framework */,\n\t\t\t\t50ADFF91201F53D600D50D53 /* PluginTests.xctest */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t50ADFF8A201F53D600D50D53 /* Plugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t50E1A94720377CB70090CE1A /* Plugin.swift */,\n\t\t\t\t50ADFF8B201F53D600D50D53 /* Plugin.h */,\n\t\t\t\t50ADFFA72020EE4F00D50D53 /* Plugin.m */,\n\t\t\t\t50ADFF8C201F53D600D50D53 /* Info.plist */,\n\t\t\t);\n\t\t\tpath = Plugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t50ADFF95201F53D600D50D53 /* PluginTests */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t50ADFF96201F53D600D50D53 /* PluginTests.swift */,\n\t\t\t\t50ADFF98201F53D600D50D53 /* Info.plist */,\n\t\t\t);\n\t\t\tpath = PluginTests;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t8C8E7744173064A9F6D438E3 /* Pods */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */,\n\t\t\t\t91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */,\n\t\t\t\t96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */,\n\t\t\t\tF65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */,\n\t\t\t);\n\t\t\tname = Pods;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA797B9EFA3DCEFEA1FBB66A9 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t50ADFFA52020D75100D50D53 /* Capacitor.framework */,\n\t\t\t\t3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */,\n\t\t\t\tF6753A823D3815DB436415E3 /* Pods_PluginTests.framework */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXHeadersBuildPhase section */\n\t\t50ADFF85201F53D600D50D53 /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t50ADFF99201F53D600D50D53 /* Plugin.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\t50ADFF87201F53D600D50D53 /* Plugin */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 50ADFF9C201F53D600D50D53 /* Build configuration list for PBXNativeTarget \"Plugin\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tAB5B3E54B4E897F32C2279DA /* [CP] Check Pods Manifest.lock */,\n\t\t\t\t50ADFF83201F53D600D50D53 /* Sources */,\n\t\t\t\t50ADFF84201F53D600D50D53 /* Frameworks */,\n\t\t\t\t50ADFF85201F53D600D50D53 /* Headers */,\n\t\t\t\t50ADFF86201F53D600D50D53 /* 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 = Plugin;\n\t\t\tproductName = Plugin;\n\t\t\tproductReference = 50ADFF88201F53D600D50D53 /* Plugin.framework */;\n\t\t\tproductType = \"com.apple.product-type.framework\";\n\t\t};\n\t\t50ADFF90201F53D600D50D53 /* PluginTests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 50ADFF9F201F53D600D50D53 /* Build configuration list for PBXNativeTarget \"PluginTests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t0596884F929ED6F1DE134961 /* [CP] Check Pods Manifest.lock */,\n\t\t\t\t50ADFF8D201F53D600D50D53 /* Sources */,\n\t\t\t\t50ADFF8E201F53D600D50D53 /* Frameworks */,\n\t\t\t\t50ADFF8F201F53D600D50D53 /* Resources */,\n\t\t\t\tCCA81D3B7E26D0D727D24C84 /* [CP] Embed Pods Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t50ADFF94201F53D600D50D53 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = PluginTests;\n\t\t\tproductName = PluginTests;\n\t\t\tproductReference = 50ADFF91201F53D600D50D53 /* PluginTests.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\t50ADFF7F201F53D600D50D53 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftUpdateCheck = 0920;\n\t\t\t\tLastUpgradeCheck = 0920;\n\t\t\t\tORGANIZATIONNAME = \"Max Lynch\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t50ADFF87201F53D600D50D53 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.2;\n\t\t\t\t\t\tLastSwiftMigration = 1100;\n\t\t\t\t\t\tProvisioningStyle = Automatic;\n\t\t\t\t\t};\n\t\t\t\t\t50ADFF90201F53D600D50D53 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.2;\n\t\t\t\t\t\tLastSwiftMigration = 1100;\n\t\t\t\t\t\tProvisioningStyle = Automatic;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 50ADFF82201F53D600D50D53 /* Build configuration list for PBXProject \"Plugin\" */;\n\t\t\tcompatibilityVersion = \"Xcode 8.0\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t);\n\t\t\tmainGroup = 50ADFF7E201F53D600D50D53;\n\t\t\tproductRefGroup = 50ADFF89201F53D600D50D53 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t50ADFF87201F53D600D50D53 /* Plugin */,\n\t\t\t\t50ADFF90201F53D600D50D53 /* PluginTests */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t50ADFF86201F53D600D50D53 /* 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\t50ADFF8F201F53D600D50D53 /* 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\t0596884F929ED6F1DE134961 /* [CP] Check Pods Manifest.lock */ = {\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\t\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\",\n\t\t\t\t\"${PODS_ROOT}/Manifest.lock\",\n\t\t\t);\n\t\t\tname = \"[CP] Check Pods Manifest.lock\";\n\t\t\toutputPaths = (\n\t\t\t\t\"$(DERIVED_FILE_DIR)/Pods-PluginTests-checkManifestLockResult.txt\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"diff \\\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\\\" \\\"${PODS_ROOT}/Manifest.lock\\\" > /dev/null\\nif [ $? != 0 ] ; then\\n    # print error to STDERR\\n    echo \\\"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\\\" >&2\\n    exit 1\\nfi\\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\\necho \\\"SUCCESS\\\" > \\\"${SCRIPT_OUTPUT_FILE_0}\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\tAB5B3E54B4E897F32C2279DA /* [CP] Check Pods Manifest.lock */ = {\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\t\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\",\n\t\t\t\t\"${PODS_ROOT}/Manifest.lock\",\n\t\t\t);\n\t\t\tname = \"[CP] Check Pods Manifest.lock\";\n\t\t\toutputPaths = (\n\t\t\t\t\"$(DERIVED_FILE_DIR)/Pods-Plugin-checkManifestLockResult.txt\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"diff \\\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\\\" \\\"${PODS_ROOT}/Manifest.lock\\\" > /dev/null\\nif [ $? != 0 ] ; then\\n    # print error to STDERR\\n    echo \\\"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\\\" >&2\\n    exit 1\\nfi\\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\\necho \\\"SUCCESS\\\" > \\\"${SCRIPT_OUTPUT_FILE_0}\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\tCCA81D3B7E26D0D727D24C84 /* [CP] Embed Pods Frameworks */ = {\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\t\"${PODS_ROOT}/Target Support Files/Pods-PluginTests/Pods-PluginTests-frameworks.sh\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/Capacitor/Capacitor.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/CapacitorCordova/Cordova.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/GCDWebServer/GCDWebServer.framework\",\n\t\t\t);\n\t\t\tname = \"[CP] Embed Pods Frameworks\";\n\t\t\toutputPaths = (\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Capacitor.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cordova.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GCDWebServer.framework\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${PODS_ROOT}/Target Support Files/Pods-PluginTests/Pods-PluginTests-frameworks.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t50ADFF83201F53D600D50D53 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t50E1A94820377CB70090CE1A /* Plugin.swift in Sources */,\n\t\t\t\t50ADFFA82020EE4F00D50D53 /* Plugin.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t50ADFF8D201F53D600D50D53 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t50ADFF97201F53D600D50D53 /* PluginTests.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXTargetDependency section */\n\t\t50ADFF94201F53D600D50D53 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 50ADFF87201F53D600D50D53 /* Plugin */;\n\t\t\ttargetProxy = 50ADFF93201F53D600D50D53 /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin XCBuildConfiguration section */\n\t\t50ADFF9A201F53D600D50D53 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\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_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = 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_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\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_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 = 13.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\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\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\t50ADFF9B201F53D600D50D53 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\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_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = 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_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\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 = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\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 = 13.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Owholemodule\";\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\t50ADFF9D201F53D600D50D53 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\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 = Plugin/Info.plist;\n\t\t\t\tINSTALL_PATH = \"$(LOCAL_LIBRARY_DIR)/Frameworks\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 13.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)\\n$(FRAMEWORK_SEARCH_PATHS)\\n$(FRAMEWORK_SEARCH_PATHS)\";\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME:c99extidentifier)\";\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t50ADFF9E201F53D600D50D53 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\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 = Plugin/Info.plist;\n\t\t\t\tINSTALL_PATH = \"$(LOCAL_LIBRARY_DIR)/Frameworks\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 13.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)\";\n\t\t\t\tONLY_ACTIVE_ARCH = NO;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME:c99extidentifier)\";\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t50ADFFA0201F53D600D50D53 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tINFOPLIST_FILE = PluginTests/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.getcapacitor.PluginTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t50ADFFA1201F53D600D50D53 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tINFOPLIST_FILE = PluginTests/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.getcapacitor.PluginTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t50ADFF82201F53D600D50D53 /* Build configuration list for PBXProject \"Plugin\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t50ADFF9A201F53D600D50D53 /* Debug */,\n\t\t\t\t50ADFF9B201F53D600D50D53 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t50ADFF9C201F53D600D50D53 /* Build configuration list for PBXNativeTarget \"Plugin\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t50ADFF9D201F53D600D50D53 /* Debug */,\n\t\t\t\t50ADFF9E201F53D600D50D53 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t50ADFF9F201F53D600D50D53 /* Build configuration list for PBXNativeTarget \"PluginTests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t50ADFFA0201F53D600D50D53 /* Debug */,\n\t\t\t\t50ADFFA1201F53D600D50D53 /* 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 = 50ADFF7F201F53D600D50D53 /* Project object */;\n}\n"
  },
  {
    "path": "ios/Plugin.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:Plugin.xcodeproj\">\n   </FileRef>\n   <FileRef\n      location = \"group:Pods/Pods.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "ios/Podfile",
    "content": "platform :ios, '12.0'\n\ndef capacitor_pods\n  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks\n  use_frameworks!\n  pod 'Capacitor', :path => '../node_modules/@capacitor/ios'\n  pod 'CapacitorCordova', :path => '../node_modules/@capacitor/ios'\nend\n\ntarget 'Plugin' do\n  capacitor_pods\nend\n\ntarget 'PluginTests' do\n  capacitor_pods\nend\n"
  },
  {
    "path": "package.json",
    "content": "{\n    \"name\": \"@capacitor-community/background-geolocation\",\n    \"version\": \"1.2.26\",\n    \"description\": \"Receive geolocation updates even while the app is in the background.\",\n    \"repository\": {\n        \"type\": \"git\",\n        \"url\": \"https://github.com/capacitor-community/background-geolocation\"\n    },\n    \"license\": \"MIT\",\n    \"author\": \"James Diacono\",\n    \"types\": \"definitions.d.ts\",\n    \"files\": [\n        \"CapacitorCommunityBackgroundGeolocation.podspec\",\n        \"Package.swift\",\n        \"android/build.gradle\",\n        \"android/gradle.properties\",\n        \"android/gradle/wrapper/gradle-wrapper.properties\",\n        \"android/proguard-rules.pro\",\n        \"android/settings.gradle\",\n        \"android/src/main/\",\n        \"definitions.d.ts\",\n        \"ios/Plugin/Info.plist\",\n        \"ios/Plugin/Plugin.*\",\n        \"ios/Plugin/Swift/Plugin.swift\",\n        \"ios/Podfile*\"\n    ],\n    \"devDependencies\": {\n        \"@capacitor/android\": \"^7.0.0\",\n        \"@capacitor/core\": \"^7.0.0\",\n        \"@capacitor/ios\": \"^7.0.0\"\n    },\n    \"peerDependencies\": {\n        \"@capacitor/core\": \">=3.0.0\"\n    },\n    \"capacitor\": {\n        \"ios\": {\n            \"src\": \"ios\"\n        },\n        \"android\": {\n            \"src\": \"android\"\n        }\n    }\n}\n"
  }
]