@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.
- package/.github/CODEOWNERS +1 -1
- package/README.md +0 -2
- package/ios/ExpoNordicDfuModule.swift +4 -2
- package/package.json +1 -1
package/.github/CODEOWNERS
CHANGED
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
|
|
53
|
-
|
|
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