@getquip/expo-nordic-dfu 0.2.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  # These owners will be the default owners for everything in
2
2
  # the repo. Unless a later match takes precedence,
3
- * @getquip/ecomm
3
+ * @getquip/mobile
package/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # Expo Nordic DFU
2
2
 
3
- *Note*: First release is not out yet!
4
-
5
3
  This project was highly inspired by the original React Native project at [Pilloxa/react-native-nordic-dfu](https://github.com/Pilloxa/react-native-nordic-dfu). We continued the work so it functions with modern [Expo](http://expo.dev/) projects that use [Expo Modules](https://docs.expo.dev/modules/overview/).
6
4
 
7
5
  This module allows you to perform a Secure Device Firmware Update (DFU) for Nordic Semiconductors on Expo React Native bridgeless projects. It wraps the official libraries at [NordicSemiconductor/Android-DFU-Library](https://github.com/NordicSemiconductor/Android-DFU-Library) and [NordicSemiconductor/IOS-DFU-Library](https://github.com/NordicSemiconductor/IOS-DFU-Library). This will not support Legacy DFU out of the box!
@@ -49,8 +49,10 @@ public class ExpoNordicDfuModule: Module, DFUProgressDelegate, DFUServiceDelegat
49
49
 
50
50
  Self.logger.info("Starting DFU on device \(uuid)")
51
51
 
52
- let path = fileUri.replacingOccurrences(of: "file://", with: "")
53
- let url = URL(fileURLWithPath: path)
52
+ let filePath = fileUri.replacingOccurrences(of: "file://", with: "")
53
+ // If the file path contains percent encoding, URL will fail to parse it correctly.
54
+ let decodedPath = filePath.removingPercentEncoding ?? filePath
55
+ let url = URL(fileURLWithPath: decodedPath)
54
56
  let firmware = try DFUFirmware(urlToZipFile: url)
55
57
  let initiator = DFUServiceInitiator().with(firmware: firmware)
56
58
  initiator.logger = self
package/package.json CHANGED
@@ -68,5 +68,5 @@
68
68
  },
69
69
  "types": "build/index.d.ts",
70
70
  "url": "https://github.com/getquip/expo-nordic-dfu",
71
- "version": "0.2.0"
71
+ "version": "1.0.0"
72
72
  }