[
  {
    "path": ".gitattributes",
    "content": "*.pbxproj -text"
  },
  {
    "path": ".gitignore",
    "content": "\n# OSX\n#\n.DS_Store\n\n# node.js\n#\nnode_modules/\nnpm-debug.log\nyarn-error.log\n\n\n# Xcode\n#\nbuild/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata\n*.xccheckout\n*.moved-aside\nDerivedData\n*.hmap\n*.ipa\n*.xcuserstate\nproject.xcworkspace\n\n\n# Android/IntelliJ\n#\nbuild/\n.idea\n.gradle\nlocal.properties\n*.iml\n\n# BUCK\nbuck-out/\n\\.buckd/\n*.keystore\n\n# CocoaPods\nPods/"
  },
  {
    "path": ".npmignore",
    "content": "\n# OSX\n#\n.DS_Store\n\n# node.js\n#\nnode_modules/\nnpm-debug.log\nyarn-error.log\n\n\n# Xcode\n#\nbuild/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata\n*.xccheckout\n*.moved-aside\nDerivedData\n*.hmap\n*.ipa\n*.xcuserstate\nproject.xcworkspace\n\n\n# Android/IntelliJ\n#\nbuild/\n.idea\n.gradle\nlocal.properties\n*.iml\n\n# BUCK\nbuck-out/\n\\.buckd/\n*.keystore\n\n\n# Example dir\nexample\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2017 Pilloxa\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# react-native-nordic-dfu [![npm version](https://badge.fury.io/js/react-native-nordic-dfu.svg)](https://badge.fury.io/js/react-native-nordic-dfu) [![CircleCI](https://circleci.com/gh/Pilloxa/react-native-nordic-dfu.svg?style=svg)](https://circleci.com/gh/Pilloxa/react-native-nordic-dfu) [![Known Vulnerabilities](https://snyk.io/test/github/pilloxa/react-native-nordic-dfu/badge.svg)](https://snyk.io/test/github/pilloxa/react-native-nordic-dfu)\n\n> ⚠️ Warning! This library is no longer actively maintained. For a more up to date version check out: [Salt-PepperEngineering/react-native-nordic-dfu](https://github.com/Salt-PepperEngineering/react-native-nordic-dfu)\n\nThis library allows you to do a Device Firmware Update (DFU) of your nrf51 or\nnrf52 chip from Nordic Semiconductor. It works for both iOS and Android.\n\nFor more info about the DFU process, see: [Resources](#resources)\n\n## Installation\n\nInstall and link the NPM package per usual with\n\n```bash\nnpm install --save react-native-nordic-dfu\n```\n\nor\n\n```bash\nyarn add react-native-nordic-dfu\n```\n\nFor React Native below 60.0 version\n\n```bash\nreact-native link react-native-nordic-dfu\n```\n\n### Minimum requirements\n\nThis project has been verified to work with the following dependencies, though other versions may work as well.\n\n| Dependency   | Version |\n| ------------ | ------- |\n| React Native | 0.59.4  |\n| XCode        | 10.2    |\n| Swift        | 5.0     |\n| CocoaPods    | 1.6.1   |\n| Gradle       | 5.3.1   |\n\n### iOS\n\nThe iOS version of this library has native dependencies that need to be installed via `CocoaPods`, which is currently the only supported method for installing this library. (PR's for alternative installation methods are welcome!)\n\nPrevious versions supported manual linking, but this was prone to errors every time a new version of XCode and/or Swift was released, which is why this support was dropped. If you've previously installed this library manually, you'll want to remove the old installation and replace it with CocoaPods.\n\n#### CocoaPods\n\nOn your project directory;\n\n```bash\ncd ios && pod install\n```\n\nIf your React Native version below 0.60 or any problem occures on pod command, you can try these steps;\n\nAdd the following to your `Podfile`\n\n```ruby\ntarget \"YourApp\" do\n\n  ...\n  pod \"react-native-nordic-dfu\", path: \"../node_modules/react-native-nordic-dfu\"\n  ...\n\nend\n```\n\nand in the same folder as the Podfile run\n\n```bash\npod install\n```\n\nSince there's native Swift dependencies you need to set which Swift version your project complies with. If you haven't already done this, open up your project with XCode and add a User-Defined setting under Build Settings: `SWIFT_VERSION = <your-swift-version>`.\n\nIf your React Native version is higher than 0.60, probably it's already there.\n\n#### Bluetooth integration\n\nThis library needs access to an instance of `CBCentralManager`, which you most likely will have instantiated already if you're using Bluetooth for other purposes than DFU in your project.\n\nTo integrate with your existing Bluetooth setup, call `[RNNordicDfu setCentralManagerGetter:<...>]` with a block argument that returns your `CBCentralManager` instance.\n\nIf you want control over the `CBCentralManager` instance after the DFU process is done you might need to provide the `onDFUComplete` and `onDFUError` callbacks to transfer back delegate control.\n\nExample code;\n\n```swift\n...\n...\n#import \"RNNordicDfu.h\"\n#import \"BleManager.h\"\n\n@implementation AppDelegate\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{\n  ...\n  ...\n\n    [RNNordicDfu setCentralManagerGetter:^() {\n    return [BleManager getCentralManager];\n  }];\n\n  // Reset manager delegate since the Nordic DFU lib \"steals\" control over it\n  [RNNordicDfu setOnDFUComplete:^() {\n    NSLog(@\"onDFUComplete\");\n    CBCentralManager * manager = [BleManager getCentralManager];\n    manager.delegate = [BleManager getInstance];\n  }];\n\n  [RNNordicDfu setOnDFUError:^() {\n    NSLog(@\"onDFUError\");\n    CBCentralManager * manager = [BleManager getCentralManager];\n    manager.delegate = [BleManager getInstance];\n  }];\n\n  return YES;\n}\n\n```\n\nYou can find them aslo in example project.\n\nOn iOS side this library requires to BleManager module which that [react-native-ble-manager](https://github.com/innoveit/react-native-ble-manager) provides.\n\nIt required because;\n\n- You need `BleManager.h` module on AppDelegate file for integration.\n- You should call `BleManager.start()` (for once) before the trigger a DFU process on iOS or you will get error like [this issue](https://github.com/Pilloxa/react-native-nordic-dfu/issues/82).\n\n### Android\n\nAndroid requires that you have `FOREGROUND_SERVICE` permissions.\nYou will need the following in your AndroidManifest.xml\n\n```\n<uses-permission android:name=\"android.permission.FOREGROUND_SERVICE\" />\n```\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### startDFU\n\nStarts the DFU process\n\nObserve: The peripheral must have been discovered by the native BLE side so that the\nbluetooth stack knows about it. This library will not do a scan but only\nthe actual connect and then the transfer. See the example project to see how it can be\ndone in React Native.\n\n**Parameters**\n\n- `obj` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**\n  - `obj.deviceAddress` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The `identifier`\\* of the device that should be updated\n  - `obj.deviceName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The name of the device in the update notification (optional, default `null`)\n  - `obj.filePath` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The file system path to the zip-file used for updating\n  - `obj.alternativeAdvertisingNameEnabled` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Send unique name to device before it is switched into bootloader mode (iOS only) - defaults to `true`\n\n\\* `identifier` — MAC address (Android) / UUID (iOS)\n\n**Examples**\n\n```javascript\nimport { NordicDFU, DFUEmitter } from \"react-native-nordic-dfu\";\n\nNordicDFU.startDFU({\n  deviceAddress: \"C3:53:C0:39:2F:99\",\n  deviceName: \"Pilloxa Pillbox\",\n  filePath: \"/data/user/0/com.nordicdfuexample/files/RNFetchBlobTmp4of.zip\",\n})\n  .then((res) => console.log(\"Transfer done:\", res))\n  .catch(console.log);\n```\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** A promise that resolves or rejects with the `deviceAddress` in the return value\n\n### DFUEmitter\n\nEvent emitter for DFU state and progress events\n\n**Examples**\n\n```javascript\nimport { NordicDFU, DFUEmitter } from \"react-native-nordic-dfu\";\n\nDFUEmitter.addListener(\n  \"DFUProgress\",\n  ({ percent, currentPart, partsTotal, avgSpeed, speed }) => {\n    console.log(\"DFU progress: \" + percent + \"%\");\n  }\n);\n\nDFUEmitter.addListener(\"DFUStateChanged\", ({ state }) => {\n  console.log(\"DFU State:\", state);\n});\n```\n\n## Selecting firmware file from local storage\n\nIf your user will select the firmware file from local storage you should keep on mind some issues;\n\nYou can use [react-native-document-picker](https://github.com/Elyx0/react-native-document-picker) library for file selecting process.\n\n### On iOS\n\nYou should select file type as `public.archive` or you will get null type error as like [this issue](https://github.com/Pilloxa/react-native-nordic-dfu/issues/100)\n\n```js\nDocumentPicker.pick({ type: \"public.archive\" });\n```\n\nIf your device getting disconnect after enable DFU, you should set `false` value to `alternativeAdvertisingNameEnabled` prop while starting DFU.\n\n```js\nNordicDFU.startDFU({\n  deviceAddress: \"XXXXXXXX-XXXX-XXXX-XXXX-XX\",\n  filePath: firmwareFile.uri,\n  alternativeAdvertisingNameEnabled: false,\n});\n```\n\n### On Android\n\nSome Android versions directly selecting file may can cause errors. If you get any file error you should copy it to your local storage. Like cache directory.\n\nYou can use [react-native-fs](https://github.com/itinance/react-native-fs) for copying file.\n\n```js\nconst firmwareFile = await DocumentPicker.pick({ type: DocumentPicker.types.zip })\nconst destination = RNFS.CachesDirectoryPath + \"/firmwareFile.zip\");\n\nawait RNFS.copyFile(formatFile.uri, destination);\n\nNordicDFU.startDFU({ deviceAddress: \"XX:XX:XX:XX:XX:XX\", filePath: destination })\n```\n\nIf you getting disconnect error sometimes while starting DFU process, you should connect the device before start it.\n\n## Example project\n\nNavigate to `example/` and run\n\n```bash\nnpm install\n```\n\nRun the iOS project with\n\n```bash\nreact-native run-ios\n```\n\nand the Android project with\n\n```bash\nreact-native run-android\n```\n\n## Development\n\nPR's are always welcome!\n\n## Resources\n\n- [DFU Introduction](http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/examples_ble_dfu.html?cp=6_0_0_4_3_1 \"BLE Bootloader/DFU\")\n- [Secure DFU Introduction](http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/ble_sdk_app_dfu_bootloader.html?cp=4_0_0_4_3_1 \"BLE Secure DFU Bootloader\")\n- [How to create init packet](https://github.com/NordicSemiconductor/Android-nRF-Connect/tree/master/init%20packet%20handling \"Init packet handling\")\n- [nRF51 Development Kit (DK)](http://www.nordicsemi.com/eng/Products/nRF51-DK \"nRF51 DK\") (compatible with Arduino Uno Revision 3)\n- [nRF52 Development Kit (DK)](http://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF52-DK \"nRF52 DK\") (compatible with Arduino Uno Revision 3)\n\n## Sponsored by\n\n[![pilloxa](https://pilloxa.com/images/pilloxa-round-logo.svg)](https://pilloxa.com)\n"
  },
  {
    "path": "android/build.gradle",
    "content": "\nbuildscript {\n    repositories {\n        jcenter()\n        google()\n    }\n\n    dependencies {\n        classpath 'com.android.tools.build:gradle:3.1.4'\n    }\n}\n\napply plugin: 'com.android.library'\n\ndef DEFAULT_COMPILE_SDK_VERSION = 28\ndef DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'\ndef DEFAULT_TARGET_SDK_VERSION = 26\n\nandroid {\n    compileSdkVersion project.hasProperty('compileSdkVersion') ? project.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION\n    buildToolsVersion project.hasProperty('buildToolsVersion') ? project.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION\n\n    defaultConfig {\n        minSdkVersion 18\n        targetSdkVersion project.hasProperty('targetSdkVersion') ? project.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION\n        versionCode 1\n        versionName \"1.0\"\n    }\n    lintOptions {\n        abortOnError false\n    }\n}\n\nrepositories {\n    mavenCentral()\n    google()\n}\n\ndependencies {\n    implementation 'com.facebook.react:react-native:+'\n    implementation 'no.nordicsemi.android:dfu:1.8.0'\n}\n  \n"
  },
  {
    "path": "android/gradle/wrapper/gradle-wrapper.properties",
    "content": "#Wed Nov 28 15:32:55 CET 2018\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-4.4-all.zip\n\n"
  },
  {
    "path": "android/src/main/AndroidManifest.xml",
    "content": "\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n          package=\"com.pilloxa.dfu\">\n    <application>\n        <service android:name=\".DfuService\"/>\n    </application>\n\n</manifest>\n  \n"
  },
  {
    "path": "android/src/main/java/com/pilloxa/dfu/DfuService.java",
    "content": "package com.pilloxa.dfu;\n\nimport no.nordicsemi.android.dfu.DfuBaseService;\nimport android.app.Activity;\n\npublic class DfuService extends DfuBaseService {\n\n    @Override\n    protected Class<? extends Activity> getNotificationTarget() {\n        /*\n         * As a target activity the NotificationActivity is returned, not the MainActivity. This is because\n         * the notification must create a new task:\n         *\n         * intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n         *\n         * when you press it. You can use NotificationActivity to check whether the new activity\n         * is a root activity (that means no other activity was open earlier) or that some\n         * other activity is already open. In the latter case the NotificationActivity will just be\n         * closed. The system will restore the previous activity. However, if the application has been\n         * closed during upload and you click the notification, a NotificationActivity will\n         * be launched as a root activity. It will create and start the main activity and\n         * terminate itself.\n         *\n         * This method may be used to restore the target activity in case the application\n         * was closed or is open. It may also be used to recreate an activity history using\n         * startActivities(...).\n         */\n        return NotificationActivity.class;\n    }\n\n    @Override\n    protected boolean isDebug() {\n        // Here return true if you want the service to print more logs in LogCat.\n        // Library's BuildConfig in current version of Android Studio is always set to DEBUG=false, so\n        // make sure you return true or your.app.BuildConfig.DEBUG here.\n        return true;\n    }\n}\n\n"
  },
  {
    "path": "android/src/main/java/com/pilloxa/dfu/NotificationActivity.java",
    "content": "package com.pilloxa.dfu;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.os.Bundle;\nimport androidx.annotation.Nullable;\nimport com.facebook.react.ReactApplication;\nimport com.facebook.react.ReactInstanceManager;\nimport com.facebook.react.bridge.ReactContext;\n\n/**\n * Created by viktor on 2017-06-26.\n */\n\npublic class NotificationActivity extends Activity {\n\n    private ReactInstanceManager reactInstanceManager;\n\n    private ReactContext getReactContext() {\n        reactInstanceManager = ((ReactApplication) getApplication())\n                .getReactNativeHost()\n                .getReactInstanceManager();\n        return reactInstanceManager.getCurrentReactContext();\n    }\n\n    public Class getMainActivityClass(ReactContext reactContext) {\n        String packageName = reactContext.getPackageName();\n        Intent launchIntent = reactContext.getPackageManager().getLaunchIntentForPackage(packageName);\n        String className = launchIntent.getComponent().getClassName();\n        try {\n            return Class.forName(className);\n        } catch (ClassNotFoundException e) {\n            e.printStackTrace();\n            return null;\n        }\n    }\n\n    @Override\n    protected void onCreate(@Nullable Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        // If this activity is the root activity of the task, the app is not running\n        if (isTaskRoot()) {\n            ReactContext reactContext = getReactContext();\n            Class HostActivity = getMainActivityClass(reactContext);\n            // Start the app before finishing\n            final Intent intent = new Intent(this, HostActivity);\n            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n            intent.putExtras(getIntent().getExtras()); // copy all extras\n            startActivity(intent);\n        }\n\n        // Now finish, which will drop you to the activity at which you were at the top of the task stack\n        finish();\n    }\n}\n"
  },
  {
    "path": "android/src/main/java/com/pilloxa/dfu/RNNordicDfuModule.java",
    "content": "\npackage com.pilloxa.dfu;\n\nimport android.app.NotificationManager;\nimport android.content.Context;\nimport android.os.Build;\nimport android.os.Handler;\nimport androidx.annotation.Nullable;\nimport android.util.Log;\nimport com.facebook.react.bridge.*;\nimport com.facebook.react.modules.core.RCTNativeAppEventEmitter;\nimport no.nordicsemi.android.dfu.*;\n\npublic class RNNordicDfuModule extends ReactContextBaseJavaModule implements LifecycleEventListener {\n\n    private final String dfuStateEvent = \"DFUStateChanged\";\n    private final String progressEvent = \"DFUProgress\";\n    private static final String name = \"RNNordicDfu\";\n    public static final String LOG_TAG = name;\n    private final ReactApplicationContext reactContext;\n    private Promise mPromise = null;\n\n    public RNNordicDfuModule(ReactApplicationContext reactContext) {\n        super(reactContext);\n        reactContext.addLifecycleEventListener(this);\n        this.reactContext = reactContext;\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n            DfuServiceInitiator.createDfuNotificationChannel(reactContext);\n        }\n    }\n\n    @ReactMethod\n    public void startDFU(String address, String name, String filePath, Promise promise) {\n        mPromise = promise;\n        final DfuServiceInitiator starter = new DfuServiceInitiator(address)\n                .setKeepBond(false);\n        if (name != null) {\n            starter.setDeviceName(name);\n        }\n        starter.setUnsafeExperimentalButtonlessServiceInSecureDfuEnabled(true);\n        starter.setZip(filePath);\n        final DfuServiceController controller = starter.start(this.reactContext, DfuService.class);\n    }\n\n    @Override\n    public String getName() {\n        return name;\n    }\n\n\n    private void sendEvent(String eventName, @Nullable WritableMap params) {\n        getReactApplicationContext()\n                .getJSModule(RCTNativeAppEventEmitter.class)\n                .emit(eventName, params);\n    }\n\n    private void sendStateUpdate(String state, String deviceAddress) {\n        WritableMap map = new WritableNativeMap();\n        Log.d(LOG_TAG, \"State: \" + state);\n        map.putString(\"state\", state);\n        map.putString(\"deviceAddress\", deviceAddress);\n        sendEvent(dfuStateEvent, map);\n    }\n\n\n    @Override\n    public void onHostResume() {\n        DfuServiceListenerHelper.registerProgressListener(this.reactContext, mDfuProgressListener);\n\n    }\n\n    @Override\n    public void onHostPause() {\n    }\n\n    @Override\n    public void onHostDestroy() {\n        DfuServiceListenerHelper.unregisterProgressListener(this.reactContext, mDfuProgressListener);\n\n    }\n\n\n    /**\n     * The progress listener receives events from the DFU Service.\n     * If is registered in onCreate() and unregistered in onDestroy() so methods here may also be called\n     * when the screen is locked or the app went to the background. This is because the UI needs to have the\n     * correct information after user comes back to the activity and this information can't be read from the service\n     * as it might have been killed already (DFU completed or finished with error).\n     */\n    private final DfuProgressListener mDfuProgressListener = new DfuProgressListenerAdapter() {\n        @Override\n        public void onDeviceConnecting(final String deviceAddress) {\n            sendStateUpdate(\"CONNECTING\", deviceAddress);\n        }\n\n        @Override\n        public void onDfuProcessStarting(final String deviceAddress) {\n            sendStateUpdate(\"DFU_PROCESS_STARTING\", deviceAddress);\n        }\n\n        @Override\n        public void onEnablingDfuMode(final String deviceAddress) {\n            sendStateUpdate(\"ENABLING_DFU_MODE\", deviceAddress);\n        }\n\n        @Override\n        public void onFirmwareValidating(final String deviceAddress) {\n            sendStateUpdate(\"FIRMWARE_VALIDATING\", deviceAddress);\n        }\n\n        @Override\n        public void onDeviceDisconnecting(final String deviceAddress) {\n            sendStateUpdate(\"DEVICE_DISCONNECTING\", deviceAddress);\n        }\n\n        @Override\n        public void onDfuCompleted(final String deviceAddress) {\n            if (mPromise != null) {\n                WritableMap map = new WritableNativeMap();\n                map.putString(\"deviceAddress\", deviceAddress);\n                mPromise.resolve(map);\n                mPromise = null;\n            }\n            sendStateUpdate(\"DFU_COMPLETED\", deviceAddress);\n\n\n            new Handler().postDelayed(new Runnable() {\n                @Override\n                public void run() {\n\n                    // if this activity is still open and upload process was completed, cancel the notification\n                    final NotificationManager manager = (NotificationManager) reactContext.getSystemService(Context.NOTIFICATION_SERVICE);\n                    manager.cancel(DfuService.NOTIFICATION_ID);\n                }\n            }, 200);\n\n        }\n\n        @Override\n        public void onDfuAborted(final String deviceAddress) {\n            sendStateUpdate(\"DFU_ABORTED\", deviceAddress);\n            if (mPromise != null) {\n                mPromise.reject(\"2\", \"DFU ABORTED\");\n                mPromise = null;\n            }\n\n        }\n\n        @Override\n        public void onProgressChanged(final String deviceAddress, final int percent, final float speed, final float avgSpeed, final int currentPart, final int partsTotal) {\n            WritableMap map = new WritableNativeMap();\n            map.putString(\"deviceAddress\", deviceAddress);\n            map.putInt(\"percent\", percent);\n            map.putDouble(\"speed\", speed);\n            map.putDouble(\"avgSpeed\", avgSpeed);\n            map.putInt(\"currentPart\", currentPart);\n            map.putInt(\"partsTotal\", partsTotal);\n            sendEvent(progressEvent, map);\n\n        }\n\n        @Override\n        public void onError(final String deviceAddress, final int error, final int errorType, final String message) {\n            sendStateUpdate(\"DFU_FAILED\", deviceAddress);\n            if (mPromise != null) {\n                mPromise.reject(Integer.toString(error), message);\n                mPromise = null;\n            }\n        }\n    };\n}"
  },
  {
    "path": "android/src/main/java/com/pilloxa/dfu/RNNordicDfuPackage.java",
    "content": "\npackage com.pilloxa.dfu;\n\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.List;\n\nimport com.facebook.react.ReactPackage;\nimport com.facebook.react.bridge.NativeModule;\nimport com.facebook.react.bridge.ReactApplicationContext;\nimport com.facebook.react.uimanager.ViewManager;\nimport com.facebook.react.bridge.JavaScriptModule;\npublic class RNNordicDfuPackage implements ReactPackage {\n    @Override\n    public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {\n      return Arrays.<NativeModule>asList(new RNNordicDfuModule(reactContext));\n    }\n\n    public List<Class<? extends JavaScriptModule>> createJSModules() {\n      return Collections.emptyList();\n    }\n\n    @Override\n    public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {\n      return Collections.emptyList();\n    }\n}\n"
  },
  {
    "path": "circle.yml",
    "content": "machine:\n  node:\n    version: 7\n  environment:\n    PATH: \"${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/example/node_modules/.bin\"\n    JAVA_OPTS: \"-Xms518m -Xmx2048m\"\n    GRADLE_OPTS: '-Dorg.gradle.jvmargs=\"-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError\"'\n\ndependencies:\n  pre:\n    - echo y | android update sdk --no-ui --all --filter \"android-23\"\n    - echo y | android update sdk --no-ui --all --filter \"build-tools-23.0.1\"\n  override:\n    - cd example && yarn\n    - cd example/android && ./gradlew --stacktrace app:dependencies\n  cache_directories:\n    - ~/.android\n    - ~/.gradle\n\ntest:\n  override:\n    # start the emulator\n    - emulator -avd circleci-android22 -no-window:\n        background: true\n        parallel: true\n    # wait for it to have booted\n    - circle-android wait-for-boot\n    - adb shell pm grant com.backtest android.permission.SYSTEM_ALERT_WINDOW\n    # make sure that the project can be built\n    - cd example/android && ./gradlew installDebug\n"
  },
  {
    "path": "example/.babelrc",
    "content": "{\n  \"presets\": [\"module:metro-react-native-babel-preset\"]\n}\n"
  },
  {
    "path": "example/.buckconfig",
    "content": "\n[android]\n  target = Google Inc.:Google APIs:23\n\n[maven_repositories]\n  central = https://repo1.maven.org/maven2\n"
  },
  {
    "path": "example/.flowconfig",
    "content": "[ignore]\n; We fork some components by platform\n.*/*[.]android.js\n\n; Ignore \"BUCK\" generated dirs\n<PROJECT_ROOT>/\\.buckd/\n\n; Ignore unexpected extra \"@providesModule\"\n.*/node_modules/.*/node_modules/fbjs/.*\n\n; Ignore duplicate module providers\n; For RN Apps installed via npm, \"Libraries\" folder is inside\n; \"node_modules/react-native\" but in the source repo it is in the root\n.*/Libraries/react-native/React.js\n.*/Libraries/react-native/ReactNative.js\n\n[include]\n\n[libs]\nnode_modules/react-native/Libraries/react-native/react-native-interface.js\nnode_modules/react-native/flow\nflow/\n\n[options]\nemoji=true\n\nmodule.system=haste\n\nexperimental.strict_type_args=true\n\nmunge_underscores=true\n\nmodule.name_mapper='^[./a-zA-Z0-9$_-]+\\.\\(bmp\\|gif\\|jpg\\|jpeg\\|png\\|psd\\|svg\\|webp\\|m4v\\|mov\\|mp4\\|mpeg\\|mpg\\|webm\\|aac\\|aiff\\|caf\\|m4a\\|mp3\\|wav\\|html\\|pdf\\)$' -> 'RelativeImageStub'\n\nsuppress_type=$FlowIssue\nsuppress_type=$FlowFixMe\nsuppress_type=$FixMe\n\nsuppress_comment=\\\\(.\\\\|\\n\\\\)*\\\\$FlowFixMe\\\\($\\\\|[^(]\\\\|(\\\\(>=0\\\\.\\\\(4[0-5]\\\\|[1-3][0-9]\\\\|[0-9]\\\\).[0-9]\\\\)? *\\\\(site=[a-z,_]*react_native[a-z,_]*\\\\)?)\\\\)\nsuppress_comment=\\\\(.\\\\|\\n\\\\)*\\\\$FlowIssue\\\\((\\\\(>=0\\\\.\\\\(4[0-5]\\\\|[1-3][0-9]\\\\|[0-9]\\\\).[0-9]\\\\)? *\\\\(site=[a-z,_]*react_native[a-z,_]*\\\\)?)\\\\)?:? #[0-9]+\nsuppress_comment=\\\\(.\\\\|\\n\\\\)*\\\\$FlowFixedInNextDeploy\nsuppress_comment=\\\\(.\\\\|\\n\\\\)*\\\\$FlowExpectedError\n\nunsafe.enable_getters_and_setters=true\n\n[version]\n^0.45.0\n"
  },
  {
    "path": "example/.gitattributes",
    "content": "*.pbxproj -text\n"
  },
  {
    "path": "example/.gitignore",
    "content": "# OSX\n#\n.DS_Store\n\n# Xcode\n#\nbuild/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata\n*.xccheckout\n*.moved-aside\nDerivedData\n*.hmap\n*.ipa\n*.xcuserstate\nproject.xcworkspace\n\n# Android/IntelliJ\n#\nbuild/\n.idea\n.gradle\nlocal.properties\n*.iml\n\n# node.js\n#\nnode_modules/\nnpm-debug.log\nyarn-error.log\n\n# BUCK\nbuck-out/\n\\.buckd/\n*.keystore\n\n# fastlane\n#\n# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the\n# screenshots whenever they are needed.\n# For more information about the recommended setup visit:\n# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md\n\nfastlane/report.xml\nfastlane/Preview.html\nfastlane/screenshots\njsconfig.json\n"
  },
  {
    "path": "example/.watchmanconfig",
    "content": "{}"
  },
  {
    "path": "example/__tests__/index.android.js",
    "content": "import 'react-native';\nimport React from 'react';\nimport Index from '../index.android.js';\n\n// Note: test renderer must be required after react-native.\nimport renderer from 'react-test-renderer';\n\nit('renders correctly', () => {\n  const tree = renderer.create(\n    <Index />\n  );\n});\n"
  },
  {
    "path": "example/__tests__/index.ios.js",
    "content": "import 'react-native';\nimport React from 'react';\nimport Index from '../index.ios.js';\n\n// Note: test renderer must be required after react-native.\nimport renderer from 'react-test-renderer';\n\nit('renders correctly', () => {\n  const tree = renderer.create(\n    <Index />\n  );\n});\n"
  },
  {
    "path": "example/android/app/BUCK",
    "content": "# To learn about Buck see [Docs](https://buckbuild.com/).\n# To run your application with Buck:\n# - install Buck\n# - `npm start` - to start the packager\n# - `cd android`\n# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname \"CN=Android Debug,O=Android,C=US\"`\n# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck\n# - `buck install -r android/app` - compile, install and run application\n#\n\nlib_deps = []\n\nfor jarfile in glob(['libs/*.jar']):\n  name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]\n  lib_deps.append(':' + name)\n  prebuilt_jar(\n    name = name,\n    binary_jar = jarfile,\n  )\n\nfor aarfile in glob(['libs/*.aar']):\n  name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]\n  lib_deps.append(':' + name)\n  android_prebuilt_aar(\n    name = name,\n    aar = aarfile,\n  )\n\nandroid_library(\n    name = \"all-libs\",\n    exported_deps = lib_deps,\n)\n\nandroid_library(\n    name = \"app-code\",\n    srcs = glob([\n        \"src/main/java/**/*.java\",\n    ]),\n    deps = [\n        \":all-libs\",\n        \":build_config\",\n        \":res\",\n    ],\n)\n\nandroid_build_config(\n    name = \"build_config\",\n    package = \"com.nordicdfuexample\",\n)\n\nandroid_resource(\n    name = \"res\",\n    package = \"com.nordicdfuexample\",\n    res = \"src/main/res\",\n)\n\nandroid_binary(\n    name = \"app\",\n    keystore = \"//android/keystores:debug\",\n    manifest = \"src/main/AndroidManifest.xml\",\n    package_type = \"debug\",\n    deps = [\n        \":app-code\",\n    ],\n)\n"
  },
  {
    "path": "example/android/app/build.gradle",
    "content": "apply plugin: \"com.android.application\"\n\nimport com.android.build.OutputFile\n\n/**\n * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets\n * and bundleReleaseJsAndAssets).\n * These basically call `react-native bundle` with the correct arguments during the Android build\n * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the\n * bundle directly from the development server. Below you can see all the possible configurations\n * and their defaults. If you decide to add a configuration block, make sure to add it before the\n * `apply from: \"../../node_modules/react-native/react.gradle\"` line.\n *\n * project.ext.react = [\n *   // the name of the generated asset file containing your JS bundle\n *   bundleAssetName: \"index.android.bundle\",\n *\n *   // the entry file for bundle generation\n *   entryFile: \"index.android.js\",\n *\n *   // whether to bundle JS and assets in debug mode\n *   bundleInDebug: false,\n *\n *   // whether to bundle JS and assets in release mode\n *   bundleInRelease: true,\n *\n *   // whether to bundle JS and assets in another build variant (if configured).\n *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants\n *   // The configuration property can be in the following formats\n *   //         'bundleIn${productFlavor}${buildType}'\n *   //         'bundleIn${buildType}'\n *   // bundleInFreeDebug: true,\n *   // bundleInPaidRelease: true,\n *   // bundleInBeta: true,\n *\n *   // whether to disable dev mode in custom build variants (by default only disabled in release)\n *   // for example: to disable dev mode in the staging build type (if configured)\n *   devDisabledInStaging: true,\n *   // The configuration property can be in the following formats\n *   //         'devDisabledIn${productFlavor}${buildType}'\n *   //         'devDisabledIn${buildType}'\n *\n *   // the root of your project, i.e. where \"package.json\" lives\n *   root: \"../../\",\n *\n *   // where to put the JS bundle asset in debug mode\n *   jsBundleDirDebug: \"$buildDir/intermediates/assets/debug\",\n *\n *   // where to put the JS bundle asset in release mode\n *   jsBundleDirRelease: \"$buildDir/intermediates/assets/release\",\n *\n *   // where to put drawable resources / React Native assets, e.g. the ones you use via\n *   // require('./image.png')), in debug mode\n *   resourcesDirDebug: \"$buildDir/intermediates/res/merged/debug\",\n *\n *   // where to put drawable resources / React Native assets, e.g. the ones you use via\n *   // require('./image.png')), in release mode\n *   resourcesDirRelease: \"$buildDir/intermediates/res/merged/release\",\n *\n *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means\n *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to\n *   // date; if you have any other folders that you want to ignore for performance reasons (gradle\n *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/\n *   // for example, you might want to remove it from here.\n *   inputExcludes: [\"android/**\", \"ios/**\"],\n *\n *   // override which node gets called and with what additional arguments\n *   nodeExecutableAndArgs: [\"node\"],\n *\n *   // supply additional arguments to the packager\n *   extraPackagerArgs: []\n * ]\n */\n\napply from: \"../../node_modules/react-native/react.gradle\"\n\n/**\n * Set this to true to create two separate APKs instead of one:\n *   - An APK that only works on ARM devices\n *   - An APK that only works on x86 devices\n * The advantage is the size of the APK is reduced by about 4MB.\n * Upload all the APKs to the Play Store and people will download\n * the correct one based on the CPU architecture of their device.\n */\ndef enableSeparateBuildPerCPUArchitecture = false\n\n/**\n * Run Proguard to shrink the Java bytecode in release builds.\n */\ndef enableProguardInReleaseBuilds = false\n\nandroid {\n    compileSdkVersion 23\n    buildToolsVersion '23.0.1'\n\n    defaultConfig {\n        applicationId \"com.nordicdfuexample\"\n        minSdkVersion 18\n        targetSdkVersion 22\n        versionCode 1\n        versionName \"1.0\"\n        ndk {\n            abiFilters \"armeabi-v7a\", \"x86\"\n        }\n    }\n    splits {\n        abi {\n            reset()\n            enable enableSeparateBuildPerCPUArchitecture\n            universalApk false  // If true, also generate a universal APK\n            include \"armeabi-v7a\", \"x86\"\n        }\n    }\n    buildTypes {\n        release {\n            minifyEnabled enableProguardInReleaseBuilds\n            proguardFiles getDefaultProguardFile(\"proguard-android.txt\"), \"proguard-rules.pro\"\n        }\n    }\n    // applicationVariants are e.g. debug, release\n    applicationVariants.all { variant ->\n        variant.outputs.each { output ->\n            // For each separate APK per architecture, set a unique version code as described here:\n            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits\n            def versionCodes = [\"armeabi-v7a\":1, \"x86\":2]\n            def abi = output.getFilter(OutputFile.ABI)\n            if (abi != null) {  // null for the universal-debug, universal-release variants\n                output.versionCodeOverride =\n                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode\n            }\n        }\n    }\n}\n\ndependencies {\n    compile project(':react-native-fetch-blob')\n    compile project(':react-native-nordic-dfu')\n    compile project(':react-native-ble-manager')\n    compile fileTree(dir: \"libs\", include: [\"*.jar\"])\n    compile \"com.android.support:appcompat-v7:23.0.1\"\n    compile \"com.facebook.react:react-native:+\"  // From node_modules\n}\n\n// Run this once to be able to run the application with BUCK\n// puts all compile dependencies into folder libs for BUCK to use\ntask copyDownloadableDepsToLibs(type: Copy) {\n    from configurations.compile\n    into 'libs'\n}\n"
  },
  {
    "path": "example/android/app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\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# Disabling obfuscation is useful if you collect stack traces from production crashes\n# (unless you are using a system that supports de-obfuscate the stack traces).\n-dontobfuscate\n\n# React Native\n\n# Keep our interfaces so they can be used by other ProGuard rules.\n# See http://sourceforge.net/p/proguard/bugs/466/\n-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip\n-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters\n-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip\n\n# Do not strip any method/class that is annotated with @DoNotStrip\n-keep @com.facebook.proguard.annotations.DoNotStrip class *\n-keep @com.facebook.common.internal.DoNotStrip class *\n-keepclassmembers class * {\n    @com.facebook.proguard.annotations.DoNotStrip *;\n    @com.facebook.common.internal.DoNotStrip *;\n}\n\n-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {\n  void set*(***);\n  *** get*();\n}\n\n-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }\n-keep class * extends com.facebook.react.bridge.NativeModule { *; }\n-keepclassmembers,includedescriptorclasses class * { native <methods>; }\n-keepclassmembers class *  { @com.facebook.react.uimanager.UIProp <fields>; }\n-keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }\n-keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }\n\n-dontwarn com.facebook.react.**\n\n# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.\n# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.\n-dontwarn android.text.StaticLayout\n\n# okhttp\n\n-keepattributes Signature\n-keepattributes *Annotation*\n-keep class okhttp3.** { *; }\n-keep interface okhttp3.** { *; }\n-dontwarn okhttp3.**\n\n# okio\n\n-keep class sun.misc.Unsafe { *; }\n-dontwarn java.nio.file.*\n-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement\n-dontwarn okio.**\n"
  },
  {
    "path": "example/android/app/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.nordicdfuexample\"\n    android:versionCode=\"1\"\n    android:versionName=\"1.0\">\n\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" /> \n    <uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" /> \n    <uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>\n\n    <uses-sdk\n        android:minSdkVersion=\"18\"\n        android:targetSdkVersion=\"22\" />\n\n    <application\n      android:name=\".MainApplication\"\n      android:allowBackup=\"true\"\n      android:label=\"@string/app_name\"\n      android:icon=\"@mipmap/ic_launcher\"\n      android:theme=\"@style/AppTheme\">\n      <activity\n        android:name=\".MainActivity\"\n        android:label=\"@string/app_name\"\n        android:configChanges=\"keyboard|keyboardHidden|orientation|screenSize\"\n        android:windowSoftInputMode=\"adjustResize\">\n        <intent-filter>\n            <action android:name=\"android.intent.action.MAIN\" />\n            <category android:name=\"android.intent.category.LAUNCHER\" />\n     <action android:name=\"android.intent.action.DOWNLOAD_COMPLETE\"/>\n        </intent-filter>\n      </activity>\n      <activity android:name=\"com.facebook.react.devsupport.DevSettingsActivity\" />\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "example/android/app/src/main/java/com/nordicdfuexample/MainActivity.java",
    "content": "package com.nordicdfuexample;\n\nimport com.facebook.react.ReactActivity;\n\npublic class MainActivity extends ReactActivity {\n\n    /**\n     * Returns the name of the main component registered from JavaScript.\n     * This is used to schedule rendering of the component.\n     */\n    @Override\n    protected String getMainComponentName() {\n        return \"NordicDFUExample\";\n    }\n}\n"
  },
  {
    "path": "example/android/app/src/main/java/com/nordicdfuexample/MainApplication.java",
    "content": "package com.nordicdfuexample;\n\nimport android.app.Application;\n\nimport com.facebook.react.ReactApplication;\nimport com.RNFetchBlob.RNFetchBlobPackage;\nimport com.pilloxa.dfu.RNNordicDfuPackage;\nimport it.innove.BleManagerPackage;\nimport com.facebook.react.ReactNativeHost;\nimport com.facebook.react.ReactPackage;\nimport com.facebook.react.shell.MainReactPackage;\nimport com.facebook.soloader.SoLoader;\n\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class MainApplication extends Application implements ReactApplication {\n\n  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {\n    @Override\n    public boolean getUseDeveloperSupport() {\n      return BuildConfig.DEBUG;\n    }\n\n    @Override\n    protected List<ReactPackage> getPackages() {\n      return Arrays.<ReactPackage>asList(\n          new MainReactPackage(),\n            new RNFetchBlobPackage(),\n            new RNNordicDfuPackage(),\n            new BleManagerPackage()\n      );\n    }\n  };\n\n  @Override\n  public ReactNativeHost getReactNativeHost() {\n    return mReactNativeHost;\n  }\n\n  @Override\n  public void onCreate() {\n    super.onCreate();\n    SoLoader.init(this, /* native exopackage */ false);\n  }\n}\n"
  },
  {
    "path": "example/android/app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">NordicDFUExample</string>\n</resources>\n"
  },
  {
    "path": "example/android/app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n        <!-- Customize your theme here. -->\n    </style>\n\n</resources>\n"
  },
  {
    "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        jcenter()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:2.2.3'\n\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        mavenLocal()\n        jcenter()\n        maven {\n            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm\n            url \"$rootDir/../node_modules/react-native/android\"\n        }\n    }\n}\n"
  },
  {
    "path": "example/android/gradle/wrapper/gradle-wrapper.properties",
    "content": "#Mon Jun 26 16:03:16 CEST 2017\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-3.3-all.zip\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.\n# Default value: -Xmx10248m -XX:MaxPermSize=256m\n# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8\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\nandroid.useDeprecatedNdk=true\n"
  },
  {
    "path": "example/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# For Cygwin, ensure paths are in UNIX format before anything is touched.\nif $cygwin ; then\n    [ -n \"$JAVA_HOME\" ] && JAVA_HOME=`cygpath --unix \"$JAVA_HOME\"`\nfi\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\\\"`/\" >&-\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >&-\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\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": "example/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": "example/android/keystores/BUCK",
    "content": "keystore(\n    name = \"debug\",\n    properties = \"debug.keystore.properties\",\n    store = \"debug.keystore\",\n    visibility = [\n        \"PUBLIC\",\n    ],\n)\n"
  },
  {
    "path": "example/android/keystores/debug.keystore.properties",
    "content": "key.store=debug.keystore\nkey.alias=androiddebugkey\nkey.store.password=android\nkey.alias.password=android\n"
  },
  {
    "path": "example/android/settings.gradle",
    "content": "rootProject.name = 'NordicDFUExample'\ninclude ':react-native-fetch-blob'\nproject(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fetch-blob/android')\ninclude ':react-native-nordic-dfu'\nproject(':react-native-nordic-dfu').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-nordic-dfu/android')\ninclude ':react-native-ble-manager'\nproject(':react-native-ble-manager').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-ble-manager/android')\n\ninclude ':app'\n"
  },
  {
    "path": "example/app.js",
    "content": "/**\n * An example project that downloads a zip file, connects to a device and then flashes\n * it.\n */\n\nimport React, { Component } from \"react\";\nimport {\n  AppRegistry,\n  TouchableHighlight,\n  NativeModules,\n  NativeEventEmitter,\n  Platform,\n  StyleSheet,\n  Text,\n  View,\n  Image\n} from \"react-native\";\nimport { NordicDFU, DFUEmitter } from \"react-native-nordic-dfu\";\nimport RNFetchBlob from \"rn-fetch-blob\";\nimport BleManager from \"react-native-ble-manager\";\n\nconst BleManagerModule = NativeModules.BleManager;\nconst bleManagerEmitter = new NativeEventEmitter(BleManagerModule);\nconst DEVICE_ID = \"C3:53:A0:31:2F:14\";\n\nconst FB = RNFetchBlob.config({\n  fileCache: true,\n  appendExt: \"zip\"\n});\n\nexport default class NordicDFUExample extends Component {\n  constructor(props) {\n    super(props);\n    this.handleDeviceDiscovered = this.handleDeviceDiscovered.bind(this);\n    this.startScan = this.startScan.bind(this);\n    this.handleStopScan = this.handleStopScan.bind(this);\n    this.state = {\n      imagefile: false,\n      scanning: false,\n      deviceFound: false,\n      dfuState: \"Not started\",\n      progress: 0\n    };\n  }\n\n  componentDidMount() {\n    DFUEmitter.addListener(\"DFUProgress\", ({ percent }) => {\n      console.log(\"DFU progress:\", percent);\n      this.setState({ progress: percent });\n    });\n    DFUEmitter.addListener(\"DFUStateChanged\", ({ state }) => {\n      console.log(\"DFU state:\", state);\n      this.setState({ dfuState: state });\n    });\n\n    FB.fetch(\"GET\", \"http://localhost:1234/app.zip\").then(res => {\n      console.log(\"file saved to\", res.path());\n      this.setState({ imagefile: res.path() });\n    });\n\n    BleManager.start({ showAlert: false, allowDuplicates: false });\n    bleManagerEmitter.addListener(\"BleManagerStopScan\", this.handleStopScan);\n    bleManagerEmitter.addListener(\n      \"BleManagerDiscoverPeripheral\",\n      this.handleDeviceDiscovered\n    );\n    this.startScan();\n  }\n\n  // #### DFU #######################################################\n\n  startDFU() {\n    console.log(\"Starting DFU\");\n    NordicDFU.startDFU({\n      deviceAddress: DEVICE_ID,\n      name: \"Pilloxa Board\",\n      filePath: this.state.imagefile\n    })\n      .then(res => console.log(\"Transfer done: \", res))\n      .catch(console.log);\n  }\n\n  // #### BLUETOOTH #################################################\n\n  handleDeviceDiscovered({ id }) {\n    if (id == DEVICE_ID) {\n      this.setState({\n        deviceFound: true,\n        scanning: false\n      });\n    }\n  }\n\n  handleStopScan() {\n    console.log(\"Scan is stopped\");\n    if (this.state.scanning) {\n      this.startScan();\n    }\n  }\n\n  startScan() {\n    BleManager.scan([], 3, true).then(results => {\n      console.log(\"Scanning...\");\n      this.setState({ scanning: true });\n    });\n  }\n\n  // #### RENDER #########################################################\n\n  render() {\n    return (\n      <View style={styles.container}>\n        <Text style={styles.welcome}>\n          {this.state.dfuState}\n        </Text>\n        <Text style={styles.welcome}>\n          {\"DFU progress: \" + this.state.progress + \" %\"}\n        </Text>\n        <Text>\n          {this.state.scanning ? \"Scanning for: \" + DEVICE_ID : \"Not scanning\"}\n        </Text>\n        <Text>\n          {this.state.deviceFound\n            ? \"Found device: \" + DEVICE_ID\n            : \"Device not found\"}\n        </Text>\n        <Text />\n        {this.state.deviceFound\n          ? <TouchableHighlight\n              style={{ padding: 10, backgroundColor: \"grey\" }}\n              onPress={this.startDFU.bind(this)}\n            >\n              <Text style={{ color: \"white\" }}>Start DFU</Text>\n            </TouchableHighlight>\n          : null}\n      </View>\n    );\n  }\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: \"center\",\n    alignItems: \"center\",\n    backgroundColor: \"#F5FCFF\"\n  },\n  welcome: {\n    fontSize: 20,\n    textAlign: \"center\",\n    margin: 10\n  },\n  instructions: {\n    textAlign: \"center\",\n    color: \"#333333\",\n    marginBottom: 5\n  }\n});\n\nAppRegistry.registerComponent(\"NordicDFUExample\", () => NordicDFUExample);\n"
  },
  {
    "path": "example/app.json",
    "content": "{\n  \"name\": \"NordicDFUExample\",\n  \"displayName\": \"NordicDFUExample\"\n}"
  },
  {
    "path": "example/index.android.js",
    "content": "/**\n * Sample React Native App\n * https://github.com/facebook/react-native\n * @flow\n */\n\nimport React, { Component } from \"react\";\nimport { AppRegistry } from \"react-native\";\n\nimport NordicDFUExample from \"./app\";\n\nAppRegistry.registerComponent(\"NordicDFUExample\", () => NordicDFUExample);\n"
  },
  {
    "path": "example/index.ios.js",
    "content": "/**\n * Sample React Native App\n * https://github.com/facebook/react-native\n * @flow\n */\n\nimport React, { Component } from \"react\";\nimport { AppRegistry } from \"react-native\";\n\nimport NordicDFUExample from \"./app\";\n\nAppRegistry.registerComponent(\"NordicDFUExample\", () => NordicDFUExample);\n"
  },
  {
    "path": "example/ios/NordicDFUExample/AppDelegate.h",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n#import <UIKit/UIKit.h>\n\n@interface AppDelegate : UIResponder <UIApplicationDelegate>\n\n@property (nonatomic, strong) UIWindow *window;\n\n@end\n"
  },
  {
    "path": "example/ios/NordicDFUExample/AppDelegate.m",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n#import \"AppDelegate.h\"\n\n#import <React/RCTBundleURLProvider.h>\n#import <React/RCTRootView.h>\n#import \"RNNordicDfu.h\"\n#import \"BleManager.h\"\n\n@implementation AppDelegate\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n  NSURL *jsCodeLocation;\n\n  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@\"index.ios\" fallbackResource:nil];\n\n  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation\n                                                      moduleName:@\"NordicDFUExample\"\n                                               initialProperties:nil\n                                                   launchOptions:launchOptions];\n  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];\n\n  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];\n  UIViewController *rootViewController = [UIViewController new];\n  rootViewController.view = rootView;\n  self.window.rootViewController = rootViewController;\n  [self.window makeKeyAndVisible];\n\n  [RNNordicDfu setCentralManagerGetter:^() {\n    return [BleManager getCentralManager];\n  }];\n\n  // Reset manager delegate since the Nordic DFU lib \"steals\" control over it\n  [RNNordicDfu setOnDFUComplete:^() {\n    NSLog(@\"onDFUComplete\");\n    CBCentralManager * manager = [BleManager getCentralManager];\n    manager.delegate = [BleManager getInstance];\n  }];\n  [RNNordicDfu setOnDFUError:^() {\n    NSLog(@\"onDFUError\");\n    CBCentralManager * manager = [BleManager getCentralManager];\n    manager.delegate = [BleManager getInstance];\n  }];\n\n  return YES;\n}\n\n@end\n"
  },
  {
    "path": "example/ios/NordicDFUExample/Base.lproj/LaunchScreen.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"7702\" systemVersion=\"14D136\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\">\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"7701\"/>\n        <capability name=\"Constraints with non-1.0 multipliers\" minToolsVersion=\"5.1\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\"/>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <view contentMode=\"scaleToFill\" id=\"iN0-l3-epB\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"480\"/>\n            <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n            <subviews>\n                <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Powered by React Native\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"8ie-xW-0ye\">\n                    <rect key=\"frame\" x=\"20\" y=\"439\" width=\"441\" height=\"21\"/>\n                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                    <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                    <nil key=\"highlightedColor\"/>\n                </label>\n                <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"NordicDFUExample\" textAlignment=\"center\" lineBreakMode=\"middleTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"18\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"kId-c2-rCX\">\n                    <rect key=\"frame\" x=\"20\" y=\"140\" width=\"441\" height=\"43\"/>\n                    <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"36\"/>\n                    <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                    <nil key=\"highlightedColor\"/>\n                </label>\n            </subviews>\n            <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>\n            <constraints>\n                <constraint firstItem=\"kId-c2-rCX\" firstAttribute=\"centerY\" secondItem=\"iN0-l3-epB\" secondAttribute=\"bottom\" multiplier=\"1/3\" constant=\"1\" id=\"5cJ-9S-tgC\"/>\n                <constraint firstAttribute=\"centerX\" secondItem=\"kId-c2-rCX\" secondAttribute=\"centerX\" id=\"Koa-jz-hwk\"/>\n                <constraint firstAttribute=\"bottom\" secondItem=\"8ie-xW-0ye\" secondAttribute=\"bottom\" constant=\"20\" id=\"Kzo-t9-V3l\"/>\n                <constraint firstItem=\"8ie-xW-0ye\" firstAttribute=\"leading\" secondItem=\"iN0-l3-epB\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"MfP-vx-nX0\"/>\n                <constraint firstAttribute=\"centerX\" secondItem=\"8ie-xW-0ye\" secondAttribute=\"centerX\" id=\"ZEH-qu-HZ9\"/>\n                <constraint firstItem=\"kId-c2-rCX\" firstAttribute=\"leading\" secondItem=\"iN0-l3-epB\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"fvb-Df-36g\"/>\n            </constraints>\n            <nil key=\"simulatedStatusBarMetrics\"/>\n            <freeformSimulatedSizeMetrics key=\"simulatedDestinationMetrics\"/>\n            <point key=\"canvasLocation\" x=\"548\" y=\"455\"/>\n        </view>\n    </objects>\n</document>\n"
  },
  {
    "path": "example/ios/NordicDFUExample/Images.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "example/ios/NordicDFUExample/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>NordicDFUExample</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>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>NSAppTransportSecurity</key>\n\t<dict>\n\t\t<key>NSExceptionDomains</key>\n\t\t<dict>\n\t\t\t<key>localhost</key>\n\t\t\t<dict>\n\t\t\t\t<key>NSExceptionAllowsInsecureHTTPLoads</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t</dict>\n\t</dict>\n\t<key>NSLocationWhenInUseUsageDescription</key>\n\t<string></string>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</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>UIViewControllerBasedStatusBarAppearance</key>\n\t<false/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example/ios/NordicDFUExample/main.m",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n#import <UIKit/UIKit.h>\n\n#import \"AppDelegate.h\"\n\nint main(int argc, char * argv[]) {\n  @autoreleasepool {\n    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));\n  }\n}\n"
  },
  {
    "path": "example/ios/NordicDFUExample.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };\n\t\t13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };\n\t\t13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };\n\t\t13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };\n\t\tAFBD98CE42EE4D292DE30278 /* Pods_NordicDFUExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6478854F2D98962939006428 /* Pods_NordicDFUExample.framework */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXCopyFilesBuildPhase section */\n\t\tA53E61CC1F45E7370001EB4F /* Embed Frameworks */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = \"\";\n\t\t\tdstSubfolderSpec = 10;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tname = \"Embed Frameworks\";\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXCopyFilesBuildPhase section */\n\n/* Begin PBXFileReference section */\n\t\t008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = \"<group>\"; };\n\t\t13B07F961A680F5B00A75B9A /* NordicDFUExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NordicDFUExample.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = NordicDFUExample/AppDelegate.h; sourceTree = \"<group>\"; };\n\t\t13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = NordicDFUExample/AppDelegate.m; sourceTree = \"<group>\"; };\n\t\t13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = \"<group>\"; };\n\t\t13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = NordicDFUExample/Images.xcassets; sourceTree = \"<group>\"; };\n\t\t13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = NordicDFUExample/Info.plist; sourceTree = \"<group>\"; };\n\t\t13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = NordicDFUExample/main.m; sourceTree = \"<group>\"; };\n\t\t23DB7F518D38EFB05D9954C8 /* Pods-NordicDFUExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-NordicDFUExample.release.xcconfig\"; path = \"Target Support Files/Pods-NordicDFUExample/Pods-NordicDFUExample.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t6478854F2D98962939006428 /* Pods_NordicDFUExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NordicDFUExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tFA2EA6D15548AF2E9141F82E /* Pods-NordicDFUExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-NordicDFUExample.debug.xcconfig\"; path = \"Target Support Files/Pods-NordicDFUExample/Pods-NordicDFUExample.debug.xcconfig\"; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t13B07F8C1A680F5B00A75B9A /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tAFBD98CE42EE4D292DE30278 /* Pods_NordicDFUExample.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\t13B07FAE1A68108700A75B9A /* NordicDFUExample */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t008F07F21AC5B25A0029DE68 /* main.jsbundle */,\n\t\t\t\t13B07FAF1A68108700A75B9A /* AppDelegate.h */,\n\t\t\t\t13B07FB01A68108700A75B9A /* AppDelegate.m */,\n\t\t\t\t13B07FB51A68108700A75B9A /* Images.xcassets */,\n\t\t\t\t13B07FB61A68108700A75B9A /* Info.plist */,\n\t\t\t\t13B07FB11A68108700A75B9A /* LaunchScreen.xib */,\n\t\t\t\t13B07FB71A68108700A75B9A /* main.m */,\n\t\t\t);\n\t\t\tname = NordicDFUExample;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t3A4D31ACCE1F1F6885CF77A1 /* Pods */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tFA2EA6D15548AF2E9141F82E /* Pods-NordicDFUExample.debug.xcconfig */,\n\t\t\t\t23DB7F518D38EFB05D9954C8 /* Pods-NordicDFUExample.release.xcconfig */,\n\t\t\t);\n\t\t\tpath = Pods;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t83CBB9F61A601CBA00E9B192 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t13B07FAE1A68108700A75B9A /* NordicDFUExample */,\n\t\t\t\t83CBBA001A601CBA00E9B192 /* Products */,\n\t\t\t\t3A4D31ACCE1F1F6885CF77A1 /* Pods */,\n\t\t\t\tCD8C38820690DE8FB4BF3E99 /* Frameworks */,\n\t\t\t);\n\t\t\tindentWidth = 2;\n\t\t\tsourceTree = \"<group>\";\n\t\t\ttabWidth = 2;\n\t\t};\n\t\t83CBBA001A601CBA00E9B192 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t13B07F961A680F5B00A75B9A /* NordicDFUExample.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tCD8C38820690DE8FB4BF3E99 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t6478854F2D98962939006428 /* Pods_NordicDFUExample.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 PBXNativeTarget section */\n\t\t13B07F861A680F5B00A75B9A /* NordicDFUExample */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget \"NordicDFUExample\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t554227AE062BEDCA14FCD59E /* [CP] Check Pods Manifest.lock */,\n\t\t\t\t13B07F871A680F5B00A75B9A /* Sources */,\n\t\t\t\t13B07F8C1A680F5B00A75B9A /* Frameworks */,\n\t\t\t\t13B07F8E1A680F5B00A75B9A /* Resources */,\n\t\t\t\t00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,\n\t\t\t\tA53E61CC1F45E7370001EB4F /* Embed Frameworks */,\n\t\t\t\t4B0AD483234F0DC3E0F75BEF /* [CP] Embed Pods Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = NordicDFUExample;\n\t\t\tproductName = \"Hello World\";\n\t\t\tproductReference = 13B07F961A680F5B00A75B9A /* NordicDFUExample.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t83CBB9F71A601CBA00E9B192 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 0830;\n\t\t\t\tORGANIZATIONNAME = Facebook;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t13B07F861A680F5B00A75B9A = {\n\t\t\t\t\t\tDevelopmentTeam = X8M4Z7CAY5;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject \"NordicDFUExample\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\tEnglish,\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 83CBB9F61A601CBA00E9B192;\n\t\t\tproductRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t13B07F861A680F5B00A75B9A /* NordicDFUExample */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t13B07F8E1A680F5B00A75B9A /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,\n\t\t\t\t13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"Bundle React Native code and images\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"export NODE_BINARY=node\\n../node_modules/react-native/scripts/react-native-xcode.sh\\n\";\n\t\t};\n\t\t4B0AD483234F0DC3E0F75BEF /* [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\tinputFileListPaths = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${PODS_ROOT}/Target Support Files/Pods-NordicDFUExample/Pods-NordicDFUExample-frameworks.sh\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/DoubleConversion/DoubleConversion.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/Folly/folly.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/React/React.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/ZIPFoundation/ZIPFoundation.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/glog/glog.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/iOSDFULibrary/iOSDFULibrary.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/react-native-ble-manager/react_native_ble_manager.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/react-native-nordic-dfu/react_native_nordic_dfu.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/rn-fetch-blob/rn_fetch_blob.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/yoga/yoga.framework\",\n\t\t\t);\n\t\t\tname = \"[CP] Embed Pods Frameworks\";\n\t\t\toutputFileListPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DoubleConversion.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/folly.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZIPFoundation.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/iOSDFULibrary.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_ble_manager.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_nordic_dfu.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/rn_fetch_blob.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/yoga.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-NordicDFUExample/Pods-NordicDFUExample-frameworks.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\t554227AE062BEDCA14FCD59E /* [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\tinputFileListPaths = (\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\toutputFileListPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t\t\"$(DERIVED_FILE_DIR)/Pods-NordicDFUExample-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/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t13B07F871A680F5B00A75B9A /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,\n\t\t\t\t13B07FC11A68108700A75B9A /* main.m 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\t13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t13B07FB21A68108700A75B9A /* Base */,\n\t\t\t);\n\t\t\tname = LaunchScreen.xib;\n\t\t\tpath = NordicDFUExample;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t13B07F941A680F5B00A75B9A /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = FA2EA6D15548AF2E9141F82E /* Pods-NordicDFUExample.debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = \"$(inherited)\";\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEAD_CODE_STRIPPING = NO;\n\t\t\t\tDEVELOPMENT_TEAM = X8M4Z7CAY5;\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tINFOPLIST_FILE = NordicDFUExample/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"-ObjC\",\n\t\t\t\t\t\"-lc++\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)\";\n\t\t\t\tPRODUCT_NAME = NordicDFUExample;\n\t\t\t\tVALID_ARCHS = \"arm64 armv7 armv7s\";\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t13B07F951A680F5B00A75B9A /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 23DB7F518D38EFB05D9954C8 /* Pods-NordicDFUExample.release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = \"$(inherited)\";\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEVELOPMENT_TEAM = X8M4Z7CAY5;\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tINFOPLIST_FILE = NordicDFUExample/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tONLY_ACTIVE_ARCH = NO;\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"-ObjC\",\n\t\t\t\t\t\"-lc++\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)\";\n\t\t\t\tPRODUCT_NAME = NordicDFUExample;\n\t\t\t\tVALID_ARCHS = \"arm64 armv7 armv7s\";\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t83CBBA201A601CBA00E9B192 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = \"$(inherited)\";\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_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_SYMBOLS_PRIVATE_EXTERN = NO;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_VERSION = 5;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t83CBBA211A601CBA00E9B192 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = \"$(inherited)\";\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_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 = 8.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_VERSION = 5;\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget \"NordicDFUExample\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t13B07F941A680F5B00A75B9A /* Debug */,\n\t\t\t\t13B07F951A680F5B00A75B9A /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject \"NordicDFUExample\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t83CBBA201A601CBA00E9B192 /* Debug */,\n\t\t\t\t83CBBA211A601CBA00E9B192 /* 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 = 83CBB9F71A601CBA00E9B192 /* Project object */;\n}\n"
  },
  {
    "path": "example/ios/NordicDFUExample.xcodeproj/xcshareddata/xcschemes/NordicDFUExample.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"0830\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"NO\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"83CBBA2D1A601D0E00E9B192\"\n               BuildableName = \"libReact.a\"\n               BlueprintName = \"React\"\n               ReferencedContainer = \"container:../node_modules/react-native/React/React.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"58B511DA1A9E6C8500147676\"\n               BuildableName = \"libRNNordicDfu.a\"\n               BlueprintName = \"RNNordicDfu\"\n               ReferencedContainer = \"container:../node_modules/react-native-nordic-dfu/ios/RNNordicDfu.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"13B07F861A680F5B00A75B9A\"\n               BuildableName = \"NordicDFUExample.app\"\n               BlueprintName = \"NordicDFUExample\"\n               ReferencedContainer = \"container:NordicDFUExample.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"NO\"\n            buildForArchiving = \"NO\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"00E356ED1AD99517003FC87E\"\n               BuildableName = \"NordicDFUExampleTests.xctest\"\n               BlueprintName = \"NordicDFUExampleTests\"\n               ReferencedContainer = \"container:NordicDFUExample.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\">\n      <Testables>\n         <TestableReference\n            skipped = \"NO\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"00E356ED1AD99517003FC87E\"\n               BuildableName = \"NordicDFUExampleTests.xctest\"\n               BlueprintName = \"NordicDFUExampleTests\"\n               ReferencedContainer = \"container:NordicDFUExample.xcodeproj\">\n            </BuildableReference>\n         </TestableReference>\n      </Testables>\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"13B07F861A680F5B00A75B9A\"\n            BuildableName = \"NordicDFUExample.app\"\n            BlueprintName = \"NordicDFUExample\"\n            ReferencedContainer = \"container:NordicDFUExample.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      allowLocationSimulation = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"13B07F861A680F5B00A75B9A\"\n            BuildableName = \"NordicDFUExample.app\"\n            BlueprintName = \"NordicDFUExample\"\n            ReferencedContainer = \"container:NordicDFUExample.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Release\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"13B07F861A680F5B00A75B9A\"\n            BuildableName = \"NordicDFUExample.app\"\n            BlueprintName = \"NordicDFUExample\"\n            ReferencedContainer = \"container:NordicDFUExample.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "example/ios/NordicDFUExample.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:NordicDFUExample.xcodeproj\">\n   </FileRef>\n   <FileRef\n      location = \"group:Pods/Pods.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "example/ios/NordicDFUExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.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>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example/ios/NordicDFUExample.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings",
    "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</plist>\n"
  },
  {
    "path": "example/ios/Podfile",
    "content": "platform :ios, \"9.0\"\n\n# External dependencies contain Swift, important to add this line\nuse_frameworks!\n\ntarget \"NordicDFUExample\" do\n  # Standard React Native dependencies when using CocoaPods\n  pod \"yoga\", path: \"../node_modules/react-native/ReactCommon/yoga\"\n  pod \"DoubleConversion\", podspec: \"../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec\"\n  pod \"glog\", podspec: \"../node_modules/react-native/third-party-podspecs/glog.podspec\"\n  pod \"Folly\", podspec: \"../node_modules/react-native/third-party-podspecs/Folly.podspec\"\n  pod \"React\", path: \"../node_modules/react-native\", subspecs: [\n        \"Core\",\n        \"CxxBridge\",\n        \"DevSupport\",\n        \"RCTBlob\",\n        \"RCTImage\",\n        \"RCTLinkingIOS\",\n        \"RCTText\",\n      ]\n\n  pod \"react-native-ble-manager\", path: \"../node_modules/react-native-ble-manager\"\n  pod \"rn-fetch-blob\", path: \"../node_modules/rn-fetch-blob\"\n\n  # replace this path with \"../node_modules/react-native-nordic-dfu\" or wherever\n  # it's installed in your project\n  pod \"react-native-nordic-dfu\", path: \"../../\"\nend\n"
  },
  {
    "path": "example/package.json",
    "content": "{\n    \"name\": \"NordicDFUExample\",\n    \"version\": \"0.0.1\",\n    \"private\": true,\n    \"scripts\": {\n        \"postinstall\": \"(cd ios && pod install)\",\n        \"start\": \"node node_modules/react-native/local-cli/cli.js start\",\n        \"test\": \"jest\"\n    },\n    \"dependencies\": {\n        \"react\": \"16.8.3\",\n        \"react-native\": \"0.59.4\",\n        \"react-native-ble-manager\": \"6.6.2\",\n        \"react-native-nordic-dfu\": \"file:../\",\n        \"rn-fetch-blob\": \"^0.10.12\"\n    }\n}\n"
  },
  {
    "path": "index.d.ts",
    "content": "declare module 'react-native-nordic-dfu' {\n  export class NordicDFU {\n    static startDFU({\n      deviceAddress,\n      deviceName,\n      filePath,\n      alternativeAdvertisingNameEnabled\n    }: {\n      deviceAddress: string;\n      deviceName?: string;\n      filePath: string | null;\n      alternativeAdvertisingNameEnabled?: boolean;\n    }): Promise<string>;\n  }\n\n  export interface IDfuUpdate {\n    percent?: number;\n    currentPart?: number;\n    partsTotal?: number;\n    avgSpeed?: number;\n    speed?: number;\n    state?: string;\n  }\n\n  export class DFUEmitter {\n    static addListener(\n      name: 'DFUProgress' | 'DFUStateChanged',\n      handler: (update: IDfuUpdate) => void\n    ): void;\n\n    static removeAllListeners(name: 'DFUProgress' | 'DFUStateChanged'): void;\n  }\n}\n"
  },
  {
    "path": "index.js",
    "content": "import { NativeModules, NativeEventEmitter, Platform } from \"react-native\";\nconst { RNNordicDfu } = NativeModules;\nconst NordicDFU = { startDFU };\n\nfunction rejectPromise(message) {\n  return new Promise((resolve, reject) => {\n    reject(new Error(\"NordicDFU.startDFU: \" + message));\n  });\n}\n\n/**\n *\n * Starts the DFU process\n *\n * Observe: The peripheral must have been discovered by the native BLE side so that the\n * bluetooth stack knows about it. This library will not do a scan but only\n * the actual connect and then the transfer. See the example project to see how it can be\n * done in React Native.\n *\n * For `alternativeAdvertisingNameEnabled` option below, see:\n * https://github.com/NordicSemiconductor/IOS-Pods-DFU-Library/blob/master/iOSDFULibrary/Classes/Implementation/DFUServiceInitiator.swift#L191\n *\n * @param {Object} obj\n * @param {string} obj.deviceAddress The MAC address for the device that should be updated\n * @param {string} [obj.deviceName = null] The name of the device in the update notification\n * @param {string} obj.filePath The file system path to the zip-file used for updating\n * @param {Boolean} obj.alternativeAdvertisingNameEnabled Send unique name to device before it is switched into bootloader mode (iOS only)\n * @returns {Promise} A promise that resolves or rejects with the `deviceAddress` in the return value\n *\n * @example\n * import { NordicDFU, DFUEmitter } from \"react-native-nordic-dfu\";\n *\n * NordicDFU.startDFU({\n *   deviceAddress: \"C3:53:C0:39:2F:99\",\n *   deviceName: \"Pilloxa Pillbox\",\n *   filePath: \"/data/user/0/com.nordicdfuexample/files/RNFetchBlobTmp4of.zip\"\n * })\n *   .then(res => console.log(\"Transfer done:\", res))\n *   .catch(console.log);\n */\nfunction startDFU({\n  deviceAddress,\n  deviceName = null,\n  filePath,\n  alternativeAdvertisingNameEnabled = true\n}) {\n  if (deviceAddress == undefined) {\n    return rejectPromise(\"No deviceAddress defined\");\n  }\n  if (filePath == undefined) {\n    return rejectPromise(\"No filePath defined\");\n  }\n  const upperDeviceAddress = deviceAddress.toUpperCase();\n  if (Platform.OS === 'ios') {\n    return RNNordicDfu.startDFU(upperDeviceAddress, deviceName, filePath, alternativeAdvertisingNameEnabled);\n  }\n  return RNNordicDfu.startDFU(upperDeviceAddress, deviceName, filePath);\n}\n\n/**\n * Event emitter for DFU state and progress events\n *\n * @const DFUEmitter\n *\n * @example\n * import { NordicDFU, DFUEmitter } from \"react-native-nordic-dfu\";\n *\n * DFUEmitter.addlistener(\"DFUProgress\",({percent, currentPart, partsTotal, avgSpeed, speed}) => {\n *   console.log(\"DFU progress: \" + percent +\"%\");\n * });\n *\n * DFUEmitter.addListener(\"DFUStateChanged\", ({state}) => {\n *   console.log(\"DFU State:\", state);\n * })\n */\nconst DFUEmitter = new NativeEventEmitter(RNNordicDfu);\n\nexport { NordicDFU, DFUEmitter };\n"
  },
  {
    "path": "ios/RNNordicDfu.h",
    "content": "#import <CoreBluetooth/CoreBluetooth.h>\n#import <React/RCTBridgeModule.h>\n#import <React/RCTEventEmitter.h>\n@import iOSDFULibrary;\n\n@interface RNNordicDfu : RCTEventEmitter<RCTBridgeModule, DFUServiceDelegate, DFUProgressDelegate, LoggerDelegate>\n\n@property (strong, nonatomic) NSString * deviceAddress;\n@property (strong, nonatomic) RCTPromiseResolveBlock resolve;\n@property (strong, nonatomic) RCTPromiseRejectBlock reject;\n\n+ (void)setCentralManagerGetter:(CBCentralManager * (^)())getter;\n+ (void)setOnDFUComplete:(void (^)())onComplete;\n+ (void)setOnDFUError:(void (^)())onError;\n\n@end\n"
  },
  {
    "path": "ios/RNNordicDfu.m",
    "content": "#import \"RNNordicDfu.h\"\n#import <CoreBluetooth/CoreBluetooth.h>\n@import iOSDFULibrary;\n\nstatic CBCentralManager * (^getCentralManager)();\nstatic void (^onDFUComplete)();\nstatic void (^onDFUError)();\n\n@implementation RNNordicDfu\n\nRCT_EXPORT_MODULE();\n\nNSString * const DFUProgressEvent = @\"DFUProgress\";\nNSString * const DFUStateChangedEvent = @\"DFUStateChanged\";\n\n- (NSArray<NSString *> *)supportedEvents\n{\n  return @[DFUProgressEvent,\n           DFUStateChangedEvent,];\n}\n\n- (NSString *)stateDescription:(enum DFUState)state\n{\n  switch (state)\n  {\n    case DFUStateAborted:\n      return @\"DFU_ABORTED\";\n    case DFUStateStarting:\n      return @\"DFU_PROCESS_STARTING\";\n    case DFUStateCompleted:\n      return @\"DFU_COMPLETED\";\n    case DFUStateUploading:\n      return @\"DFU_STATE_UPLOADING\";\n    case DFUStateConnecting:\n      return @\"CONNECTING\";\n    case DFUStateValidating:\n      return @\"FIRMWARE_VALIDATING\";\n    case DFUStateDisconnecting:\n      return @\"DEVICE_DISCONNECTING\";\n    case DFUStateEnablingDfuMode:\n      return @\"ENABLING_DFU_MODE\";\n    default:\n      return @\"UNKNOWN_STATE\";\n  }\n}\n\n- (NSString *)errorDescription:(enum DFUError)error\n{\n  switch(error)\n  {\n    case DFUErrorCrcError:\n      return @\"DFUErrorCrcError\";\n    case DFUErrorBytesLost:\n      return @\"DFUErrorBytesLost\";\n    case DFUErrorFileInvalid:\n      return @\"DFUErrorFileInvalid\";\n    case DFUErrorFailedToConnect:\n      return @\"DFUErrorFailedToConnect\";\n    case DFUErrorFileNotSpecified:\n      return @\"DFUErrorFileNotSpecified\";\n    case DFUErrorBluetoothDisabled:\n      return @\"DFUErrorBluetoothDisabled\";\n    case DFUErrorDeviceDisconnected:\n      return @\"DFUErrorDeviceDisconnected\";\n    case DFUErrorDeviceNotSupported:\n      return @\"DFUErrorDeviceNotSupported\";\n    case DFUErrorInitPacketRequired:\n      return @\"DFUErrorInitPacketRequired\";\n    case DFUErrorUnsupportedResponse:\n      return @\"DFUErrorUnsupportedResponse\";\n    case DFUErrorReadingVersionFailed:\n      return @\"DFUErrorReadingVersionFailed\";\n    case DFUErrorRemoteLegacyDFUSuccess:\n      return @\"DFUErrorRemoteLegacyDFUSuccess\";\n    case DFUErrorRemoteSecureDFUSuccess:\n      return @\"DFUErrorRemoteSecureDFUSuccess\";\n    case DFUErrorServiceDiscoveryFailed:\n      return @\"DFUErrorServiceDiscoveryFailed\";\n    case DFUErrorRemoteLegacyDFUCrcError:\n      return @\"DFUErrorRemoteLegacyDFUCrcError\";\n    case DFUErrorEnablingControlPointFailed:\n      return @\"DFUErrorEnablingControlPointFailed\";\n    case DFUErrorExtendedInitPacketRequired:\n      return @\"DFUErrorExtendedInitPacketRequired\";\n    case DFUErrorReceivingNotificationFailed:\n      return @\"DFUErrorReceivingNotificationFailed\";\n    case DFUErrorRemoteButtonlessDFUSuccess:\n      return @\"DFUErrorRemoteButtonlessDFUSuccess\";\n    case DFUErrorRemoteLegacyDFUInvalidState:\n      return @\"DFUErrorRemoteLegacyDFUInvalidState\";\n    case DFUErrorRemoteLegacyDFUNotSupported:\n      return @\"DFUErrorRemoteLegacyDFUNotSupported\";\n    case DFUErrorWritingCharacteristicFailed:\n      return @\"DFUErrorWritingCharacteristicFailed\";\n    case DFUErrorRemoteSecureDFUExtendedError:\n      return @\"DFUErrorRemoteSecureDFUExtendedError\";\n    case DFUErrorRemoteSecureDFUInvalidObject:\n      return @\"DFUErrorRemoteSecureDFUInvalidObject\";\n    case DFUErrorRemoteLegacyDFUOperationFailed:\n      return @\"DFUErrorRemoteLegacyDFUOperationFailed\";\n    case DFUErrorRemoteSecureDFUOperationFailed:\n      return @\"DFUErrorRemoteSecureDFUOperationFailed\";\n    case DFUErrorRemoteSecureDFUUnsupportedType:\n      return @\"DFUErrorRemoteSecureDFUUnsupportedType\";\n    case DFUErrorRemoteLegacyDFUDataExceedsLimit:\n      return @\"DFUErrorRemoteLegacyDFUDataExceedsLimit\";\n    case DFUErrorRemoteSecureDFUInvalidParameter:\n      return @\"DFUErrorRemoteSecureDFUInvalidParameter\";\n    case DFUErrorRemoteSecureDFUSignatureMismatch:\n      return @\"DFUErrorRemoteSecureDFUSignatureMismatch\";\n    case DFUErrorRemoteSecureDFUOpCodeNotSupported:\n      return @\"DFUErrorRemoteSecureDFUOpCodeNotSupported\";\n    case DFUErrorRemoteButtonlessDFUOperationFailed:\n      return @\"DFUErrorRemoteButtonlessDFUOperationFailed\";\n    case DFUErrorRemoteSecureDFUInsufficientResources:\n      return @\"DFUErrorRemoteSecureDFUInsufficientResources\";\n    case DFUErrorRemoteSecureDFUOperationNotPermitted:\n      return @\"DFUErrorRemoteSecureDFUOperationNotPermitted\";\n    case DFUErrorRemoteButtonlessDFUOpCodeNotSupported:\n      return @\"DFUErrorRemoteButtonlessDFUOpCodeNotSupported\";\n    case DFUErrorRemoteExperimentalButtonlessDFUSuccess:\n      return @\"DFUErrorRemoteExperimentalButtonlessDFUSuccess\";\n    case DFUErrorRemoteExperimentalButtonlessDFUOperationFailed:\n      return @\"DFUErrorRemoteExperimentalButtonlessDFUOperationFailed\";\n    case DFUErrorRemoteExperimentalButtonlessDFUOpCodeNotSupported:\n      return @\"DFUErrorRemoteExperimentalButtonlessDFUOpCodeNotSupported\";\n    default:\n      return @\"UNKNOWN_ERROR\";\n  }\n}\n\n- (void)dfuStateDidChangeTo:(enum DFUState)state\n{\n  NSDictionary * evtBody = @{@\"deviceAddress\": self.deviceAddress,\n                             @\"state\": [self stateDescription:state],};\n\n  [self sendEventWithName:DFUStateChangedEvent body:evtBody];\n\n  if (state == DFUStateCompleted) {\n    if (onDFUComplete) {\n      onDFUComplete();\n    }\n    NSDictionary * resolveBody = @{@\"deviceAddress\": self.deviceAddress,};\n\n    self.resolve(resolveBody);\n  }\n}\n\n- (void)   dfuError:(enum DFUError)error\ndidOccurWithMessage:(NSString * _Nonnull)message\n{\n  if (onDFUError) {\n    onDFUError();\n  }\n\n  NSDictionary * evtBody = @{@\"deviceAddress\": self.deviceAddress,\n                             @\"state\": @\"DFU_FAILED\",};\n\n  [self sendEventWithName:DFUStateChangedEvent body:evtBody];\n\n  self.reject([self errorDescription:error], message, nil);\n}\n\n- (void)dfuProgressDidChangeFor:(NSInteger)part\n                          outOf:(NSInteger)totalParts\n                             to:(NSInteger)progress\n     currentSpeedBytesPerSecond:(double)currentSpeedBytesPerSecond\n         avgSpeedBytesPerSecond:(double)avgSpeedBytesPerSecond\n{\n  NSDictionary * evtBody = @{@\"deviceAddress\": self.deviceAddress,\n                             @\"currentPart\": [NSNumber numberWithInteger:part],\n                             @\"partsTotal\": [NSNumber numberWithInteger:totalParts],\n                             @\"percent\": [NSNumber numberWithInteger:progress],\n                             @\"speed\": [NSNumber numberWithDouble:currentSpeedBytesPerSecond],\n                             @\"avgSpeed\": [NSNumber numberWithDouble:avgSpeedBytesPerSecond],};\n\n  [self sendEventWithName:DFUProgressEvent body:evtBody];\n}\n\n- (void)logWith:(enum LogLevel)level message:(NSString * _Nonnull)message\n{\n  NSLog(@\"logWith: %ld message: '%@'\", (long)level, message);\n}\n\nRCT_EXPORT_METHOD(startDFU:(NSString *)deviceAddress\n                  deviceName:(NSString *)deviceName\n                  filePath:(NSString *)filePath\n                  alternativeAdvertisingNameEnabled:(BOOL *)alternativeAdvertisingNameEnabled\n                  resolver:(RCTPromiseResolveBlock)resolve\n                  rejecter:(RCTPromiseRejectBlock)reject)\n{\n  self.deviceAddress = deviceAddress;\n  self.resolve = resolve;\n  self.reject = reject;\n\n  if (!getCentralManager) {\n    reject(@\"nil_central_manager_getter\", @\"Attempted to start DFU without central manager getter\", nil);\n  } else {\n    CBCentralManager * centralManager = getCentralManager();\n\n    if (!centralManager) {\n      reject(@\"nil_central_manager\", @\"Call to getCentralManager returned nil\", nil);\n    } else if (!deviceAddress) {\n      reject(@\"nil_device_address\", @\"Attempted to start DFU with nil deviceAddress\", nil);\n    } else if (!filePath) {\n      reject(@\"nil_file_path\", @\"Attempted to start DFU with nil filePath\", nil);\n    } else {\n      NSUUID * uuid = [[NSUUID alloc] initWithUUIDString:deviceAddress];\n\n      NSArray<CBPeripheral *> * peripherals = [centralManager retrievePeripheralsWithIdentifiers:@[uuid]];\n\n      if ([peripherals count] != 1) {\n        reject(@\"unable_to_find_device\", @\"Could not find device with deviceAddress\", nil);\n      } else {\n        CBPeripheral * peripheral = [peripherals objectAtIndex:0];\n\n        NSURL * url = [NSURL URLWithString:filePath];\n\n        DFUFirmware * firmware = [[DFUFirmware alloc] initWithUrlToZipFile:url];\n\n        DFUServiceInitiator * initiator = [[[DFUServiceInitiator alloc]\n                                            initWithCentralManager:centralManager\n                                            target:peripheral]\n                                           withFirmware:firmware];\n\n        initiator.logger = self;\n        initiator.delegate = self;\n        initiator.progressDelegate = self;\n        initiator.alternativeAdvertisingNameEnabled = alternativeAdvertisingNameEnabled;\n\n        DFUServiceController * controller = [initiator start];\n      }\n    }\n  }\n}\n\n+ (void)setCentralManagerGetter:(CBCentralManager * (^)())getter\n{\n  getCentralManager = getter;\n}\n\n+ (void)setOnDFUComplete:(void (^)())onComplete\n{\n  onDFUComplete = onComplete;\n}\n\n+ (void)setOnDFUError:(void (^)())onError\n{\n  onDFUError = onError;\n}\n\n@end\n"
  },
  {
    "path": "ios/RNNordicDfu.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\tB3E7B58A1CC2AC0600A0062D /* RNNordicDfu.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNNordicDfu.m */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXCopyFilesBuildPhase section */\n\t\t58B511D91A9E6C8500147676 /* CopyFiles */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = \"include/$(PRODUCT_NAME)\";\n\t\t\tdstSubfolderSpec = 16;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXCopyFilesBuildPhase section */\n\n/* Begin PBXFileReference section */\n\t\t134814201AA4EA6300B7C361 /* libRNNordicDfu.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNNordicDfu.a; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tB3E7B5881CC2AC0600A0062D /* RNNordicDfu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNordicDfu.h; sourceTree = \"<group>\"; };\n\t\tB3E7B5891CC2AC0600A0062D /* RNNordicDfu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNordicDfu.m; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t58B511D81A9E6C8500147676 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t134814211AA4EA7D00B7C361 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t134814201AA4EA6300B7C361 /* libRNNordicDfu.a */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t58B511D21A9E6C8500147676 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tB3E7B5881CC2AC0600A0062D /* RNNordicDfu.h */,\n\t\t\t\tB3E7B5891CC2AC0600A0062D /* RNNordicDfu.m */,\n\t\t\t\t134814211AA4EA7D00B7C361 /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t58B511DA1A9E6C8500147676 /* RNNordicDfu */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget \"RNNordicDfu\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t58B511D71A9E6C8500147676 /* Sources */,\n\t\t\t\t58B511D81A9E6C8500147676 /* Frameworks */,\n\t\t\t\t58B511D91A9E6C8500147676 /* CopyFiles */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = RNNordicDfu;\n\t\t\tproductName = RCTDataManager;\n\t\t\tproductReference = 134814201AA4EA6300B7C361 /* libRNNordicDfu.a */;\n\t\t\tproductType = \"com.apple.product-type.library.static\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t58B511D31A9E6C8500147676 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 0610;\n\t\t\t\tORGANIZATIONNAME = Facebook;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t58B511DA1A9E6C8500147676 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 6.1.1;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject \"RNNordicDfu\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t);\n\t\t\tmainGroup = 58B511D21A9E6C8500147676;\n\t\t\tproductRefGroup = 58B511D21A9E6C8500147676;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t58B511DA1A9E6C8500147676 /* RNNordicDfu */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t58B511D71A9E6C8500147676 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tB3E7B58A1CC2AC0600A0062D /* RNNordicDfu.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t58B511ED1A9E6C8500147676 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_SYMBOLS_PRIVATE_EXTERN = NO;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 7.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};\n\t\t\tname = Debug;\n\t\t};\n\t\t58B511EE1A9E6C8500147676 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 7.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t58B511F01A9E6C8500147676 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = \"$(PROJECT_DIR)/**\";\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,\n\t\t\t\t\t\"$(SRCROOT)/../../../React/**\",\n\t\t\t\t\t\"$(SRCROOT)/../../react-native/React/**\",\n\t\t\t\t\t\"$(PROJECT_DIR)/iOSDFULibrary.framework/**\",\n\t\t\t\t\t\"$(PROJECT_DIR)/../../../ios/Pods/Headers/Public/**\",\n\t\t\t\t);\n\t\t\t\tLIBRARY_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tOTHER_LDFLAGS = \"-ObjC\";\n\t\t\t\tPRODUCT_NAME = RNNordicDfu;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t58B511F11A9E6C8500147676 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = \"$(PROJECT_DIR)/**\";\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,\n\t\t\t\t\t\"$(SRCROOT)/../../../React/**\",\n\t\t\t\t\t\"$(SRCROOT)/../../react-native/React/**\",\n\t\t\t\t\t\"$(PROJECT_DIR)/iOSDFULibrary.framework/**\",\n\t\t\t\t\t\"$(PROJECT_DIR)/../../../ios/Pods/Headers/Public/**\",\n\t\t\t\t);\n\t\t\t\tLIBRARY_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tOTHER_LDFLAGS = \"-ObjC\";\n\t\t\t\tPRODUCT_NAME = RNNordicDfu;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t58B511D61A9E6C8500147676 /* Build configuration list for PBXProject \"RNNordicDfu\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t58B511ED1A9E6C8500147676 /* Debug */,\n\t\t\t\t58B511EE1A9E6C8500147676 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget \"RNNordicDfu\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t58B511F01A9E6C8500147676 /* Debug */,\n\t\t\t\t58B511F11A9E6C8500147676 /* 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 = 58B511D31A9E6C8500147676 /* Project object */;\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"react-native-nordic-dfu\",\n  \"version\": \"3.2.1\",\n  \"description\": \"Nordic Device Firmware Update for React Native\",\n  \"main\": \"index.js\",\n  \"url\": \"https://github.com/Pilloxa/react-native-nordic-dfu\",\n  \"repository\": \"Pilloxa/react-native-nordic-dfu\",\n  \"scripts\": {\n    \"test\": \"echo \\\"No test specified\\\"\",\n    \"precommit\": \"lint-staged\",\n    \"document\": \"documentation readme --readme-file README.md -s \\\"API\\\" -g\"\n  },\n  \"keywords\": [\n    \"react-native\",\n    \"dfu\",\n    \"nordic\"\n  ],\n  \"author\": \"Pilloxa <recruitment@pilloxa.com>\",\n  \"license\": \"MIT\",\n  \"peerDependencies\": {\n    \"react-native\": \">= 0.45.1\"\n  },\n  \"devDependencies\": {\n    \"documentation\": \"^4.0.0-rc.1\",\n    \"husky\": \"^0.13.3\",\n    \"lint-staged\": \"^3.4.0\",\n    \"prettier\": \"^1.2.2\"\n  },\n  \"lint-staged\": {\n    \"*.js\": [\n      \"prettier --write\",\n      \"git add\"\n    ],\n    \"index.js\": [\n      \"npm run document\",\n      \"git add README.md\"\n    ]\n  },\n  \"types\": \"./index.d.ts\"\n}\n"
  },
  {
    "path": "react-native-nordic-dfu.podspec",
    "content": "require 'json'\n\npackage = JSON.parse(File.read(File.join(__dir__, 'package.json')))\n\nPod::Spec.new do |s|\n  s.name         = \"react-native-nordic-dfu\"\n  s.version      = package['version']\n  s.summary      = package['description']\n\n  s.authors      = { \"Pilloxa\" => \"recruitment@pilloxa.com\" }\n  s.homepage     = \"https://github.com/Pilloxa/react-native-nordic-dfu\"\n  s.license      = \"Apache License 2.0\"\n  s.platform     = :ios, \"8.0\"\n\n  s.source       = { :git => \"https://github.com/Pilloxa/react-native-nordic-dfu.git\" }\n  s.source_files  = \"ios/**/*.{h,m}\"\n\n  s.dependency 'React'\n  s.dependency 'iOSDFULibrary', '~> 4.11.1'\nend\n"
  }
]