From 76c359f4ddf45d2c28e53e13101e1040d8436819 Mon Sep 17 00:00:00 2001 From: Knightro <50028636+Knightro63@users.noreply.github.com> Date: Tue, 10 Jan 2023 16:20:52 -0500 Subject: [PATCH 01/15] Create temp --- macos/temp | 1 + 1 file changed, 1 insertion(+) create mode 100644 macos/temp diff --git a/macos/temp b/macos/temp new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/macos/temp @@ -0,0 +1 @@ + From 3490994baa475f41f3bba68bd7aec50db7ac29d0 Mon Sep 17 00:00:00 2001 From: Knightro <50028636+Knightro63@users.noreply.github.com> Date: Tue, 10 Jan 2023 16:21:21 -0500 Subject: [PATCH 02/15] Add files via upload --- macos/Classes/HelloPlugin.swift | 19 +++ macos/Classes/NordicDfuPlugin.h | 4 + macos/Classes/NordicDfuPlugin.m | 15 ++ macos/Classes/SwiftNordicDfuPlugin.swift | 182 +++++++++++++++++++++++ macos/nordic_dfu.podspec | 25 ++++ 5 files changed, 245 insertions(+) create mode 100644 macos/Classes/HelloPlugin.swift create mode 100644 macos/Classes/NordicDfuPlugin.h create mode 100644 macos/Classes/NordicDfuPlugin.m create mode 100644 macos/Classes/SwiftNordicDfuPlugin.swift create mode 100644 macos/nordic_dfu.podspec diff --git a/macos/Classes/HelloPlugin.swift b/macos/Classes/HelloPlugin.swift new file mode 100644 index 0000000..cfcc010 --- /dev/null +++ b/macos/Classes/HelloPlugin.swift @@ -0,0 +1,19 @@ +import Cocoa +import FlutterMacOS + +public class HelloPlugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) { + let channel = FlutterMethodChannel(name: "hello", binaryMessenger: registrar.messenger) + let instance = HelloPlugin() + registrar.addMethodCallDelegate(instance, channel: channel) + } + + public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { + switch call.method { + case "getPlatformVersion": + result("macOS " + ProcessInfo.processInfo.operatingSystemVersionString) + default: + result(FlutterMethodNotImplemented) + } + } +} diff --git a/macos/Classes/NordicDfuPlugin.h b/macos/Classes/NordicDfuPlugin.h new file mode 100644 index 0000000..6958d61 --- /dev/null +++ b/macos/Classes/NordicDfuPlugin.h @@ -0,0 +1,4 @@ +#import + +@interface NordicDfuPlugin : NSObject +@end diff --git a/macos/Classes/NordicDfuPlugin.m b/macos/Classes/NordicDfuPlugin.m new file mode 100644 index 0000000..5bb1172 --- /dev/null +++ b/macos/Classes/NordicDfuPlugin.m @@ -0,0 +1,15 @@ +#import "NordicDfuPlugin.h" +#if __has_include() +#import +#else +// Support project import fallback if the generated compatibility header +// is not copied when this plugin is created as a library. +// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 +#import "nordic_dfu-Swift.h" +#endif + +@implementation NordicDfuPlugin ++ (void)registerWithRegistrar:(NSObject*)registrar { + [SwiftNordicDfuPlugin registerWithRegistrar:registrar]; +} +@end diff --git a/macos/Classes/SwiftNordicDfuPlugin.swift b/macos/Classes/SwiftNordicDfuPlugin.swift new file mode 100644 index 0000000..15beb85 --- /dev/null +++ b/macos/Classes/SwiftNordicDfuPlugin.swift @@ -0,0 +1,182 @@ +import FlutterMacOS +import AppKit +import iOSDFULibrary +import CoreBluetooth + +public class SwiftNordicDfuPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, DFUServiceDelegate, DFUProgressDelegate, LoggerDelegate { + + let registrar: FlutterPluginRegistrar + var sink: FlutterEventSink! + var pendingResult: FlutterResult? + var deviceAddress: String? + private var dfuController : DFUServiceController! + + public static func register(with registrar: FlutterPluginRegistrar) { + let instance = SwiftNordicDfuPlugin(registrar) + + let method = FlutterMethodChannel(name: "dev.steenbakker.nordic_dfu/method", binaryMessenger: registrar.messenger) + + let event = FlutterEventChannel(name: + "dev.steenbakker.nordic_dfu/event", binaryMessenger: registrar.messenger) + + registrar.addMethodCallDelegate(instance, channel: method) + event.setStreamHandler(instance) + } + + init(_ registrar: FlutterPluginRegistrar) { + self.registrar = registrar + super.init() + } + + public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { + switch call.method { + case "startDfu": initializeDfu(call, result) + case "abortDfu" : abortDfu() + default: result(FlutterMethodNotImplemented) + } + } + + public func onListen(withArguments arguments: Any?, eventSink events: @escaping FlutterEventSink) -> FlutterError? { + sink = events + return nil + } + + public func onCancel(withArguments arguments: Any?) -> FlutterError? { + sink = nil + return nil + } + + private func abortDfu() { + _ = dfuController?.abort() + dfuController = nil + } + + private func initializeDfu(_ call: FlutterMethodCall, _ result: @escaping FlutterResult) { + guard let arguments = call.arguments as? Dictionary else { + result(FlutterError(code: "ABNORMAL_PARAMETER", message: "no parameters", details: nil)) + return + } + let name = arguments["name"] as? String + guard let address = arguments["address"] as? String, + var filePath = arguments["filePath"] as? String else { + result(FlutterError(code: "ABNORMAL_PARAMETER", message: "address and filePath are required", details: nil)) + return + } + + let forceDfu = arguments["forceDfu"] as? Bool + + let enableUnsafeExperimentalButtonlessServiceInSecureDfu = arguments["enableUnsafeExperimentalButtonlessServiceInSecureDfu"] as? Bool + + let fileInAsset = (arguments["fileInAsset"] as? Bool) ?? false + + if (fileInAsset) { + //let key = registrar.lookupKey(forAsset: filePath) + guard let pathInAsset = Bundle.main.path(forResource: "key", ofType: nil) else { + result(FlutterError(code: "ABNORMAL_PARAMETER", message: "file in asset not found \(filePath)", details: nil)) + return + } + + filePath = pathInAsset + } + + let alternativeAdvertisingNameEnabled = arguments["alternativeAdvertisingNameEnabled"] as? Bool + + startDfu(address, + name: name, + filePath: filePath, + forceDfu: forceDfu, + enableUnsafeExperimentalButtonlessServiceInSecureDfu: enableUnsafeExperimentalButtonlessServiceInSecureDfu, + alternativeAdvertisingNameEnabled: alternativeAdvertisingNameEnabled, + result: result) + } + + private func startDfu( + _ address: String, + name: String?, + filePath: String, + forceDfu: Bool?, + enableUnsafeExperimentalButtonlessServiceInSecureDfu: Bool?, + alternativeAdvertisingNameEnabled: Bool?, + result: @escaping FlutterResult) { + guard let uuid = UUID(uuidString: address) else { + result(FlutterError(code: "DEVICE_ADDRESS_ERROR", message: "Device address conver to uuid failed", details: "Device uuid \(address) convert to uuid failed")) + return + } + + do{ + let firmware = try DFUFirmware(urlToZipFile: URL(fileURLWithPath: filePath)) + + + + let dfuInitiator = DFUServiceInitiator(queue: nil) + .with(firmware: firmware); + dfuInitiator.delegate = self + dfuInitiator.progressDelegate = self + dfuInitiator.logger = self + + if let enableUnsafeExperimentalButtonlessServiceInSecureDfu = enableUnsafeExperimentalButtonlessServiceInSecureDfu { + dfuInitiator.enableUnsafeExperimentalButtonlessServiceInSecureDfu = enableUnsafeExperimentalButtonlessServiceInSecureDfu + } + + if let forceDfu = forceDfu { + dfuInitiator.forceDfu = forceDfu + } + + if let alternativeAdvertisingNameEnabled = alternativeAdvertisingNameEnabled { + dfuInitiator.alternativeAdvertisingNameEnabled = alternativeAdvertisingNameEnabled + } + + pendingResult = result + deviceAddress = address + + dfuController = dfuInitiator.start(targetWithIdentifier: uuid) + } + catch{ + result(FlutterError(code: "DFU_FIRMWARE_NOT_FOUND", message: "Could not dfu zip file", details: nil)) + return + } + } + +// MARK: DFUServiceDelegate + public func dfuStateDidChange(to state: DFUState) { + switch state { + case .completed: + sink?(["onDfuCompleted":deviceAddress]) + pendingResult?(deviceAddress) + pendingResult = nil + dfuController = nil + case .disconnecting: + sink?(["onDeviceDisconnecting":deviceAddress]) + case .aborted: + sink?(["onDfuAborted": deviceAddress]) + pendingResult?(FlutterError(code: "DFU_ABORTED", message: "DFU ABORTED by user", details: "device address: \(deviceAddress!)")) + pendingResult = nil + case .connecting: + sink?(["onDeviceConnecting":deviceAddress]) + case .starting: + sink?(["onDfuProcessStarting":deviceAddress]) + case .enablingDfuMode: + sink?(["onEnablingDfuMode":deviceAddress]) + case .validating: + sink?(["onFirmwareValidating":deviceAddress]) + case .uploading: + sink?(["onFirmwareUploading":deviceAddress]) + } + } + + public func dfuError(_ error: DFUError, didOccurWithMessage message: String) { + sink?(["onError":["deviceAddress": deviceAddress!, "error": error.rawValue, "errorType":error.rawValue, "message": message]]) + pendingResult?(FlutterError(code: "\(error.rawValue)", message: "DFU FAILED: \(message)", details: "Address: \(deviceAddress!), Error type \(error.rawValue)")) + pendingResult = nil + } + + //MARK: DFUProgressDelegate + public func dfuProgressDidChange(for part: Int, outOf totalParts: Int, to progress: Int, currentSpeedBytesPerSecond: Double, avgSpeedBytesPerSecond: Double) { + sink?(["onProgressChanged":["deviceAddress": deviceAddress!, "percent": progress, "speed":currentSpeedBytesPerSecond, "avgSpeed": avgSpeedBytesPerSecond, "currentPart": part, "partsTotal": totalParts]]) + } + + //MARK: - LoggerDelegate + public func logWith(_ level: LogLevel, message: String) { + //print("\(level.name()): \(message)") + } +} diff --git a/macos/nordic_dfu.podspec b/macos/nordic_dfu.podspec new file mode 100644 index 0000000..137ef19 --- /dev/null +++ b/macos/nordic_dfu.podspec @@ -0,0 +1,25 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint hello.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'nordic_dfu' + s.version = '1.0.0' + s.summary = 'MACOS DFU plugin for flutter.' + s.description = <<-DESC +A new Flutter plugin project. + DESC + s.homepage = 'http://www.timeyaa.com' + s.license = { :file => '../LICENSE' } + s.author = { 'Timeyaa' => 'fengqiangboy@timeyaa.com' } + + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.public_header_files = 'Classes/**/*.h' + s.swift_version = '5.4' + s.dependency 'FlutterMacOS' + s.dependency 'iOSDFULibrary', '~> 4.13.0' + + s.platform = :osx, '10.14' + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } +end From a85cfef7978f2aacf6167af71b3b46450e9d08d3 Mon Sep 17 00:00:00 2001 From: Knightro <50028636+Knightro63@users.noreply.github.com> Date: Tue, 10 Jan 2023 16:21:33 -0500 Subject: [PATCH 03/15] Delete temp --- macos/temp | 1 - 1 file changed, 1 deletion(-) delete mode 100644 macos/temp diff --git a/macos/temp b/macos/temp deleted file mode 100644 index 8b13789..0000000 --- a/macos/temp +++ /dev/null @@ -1 +0,0 @@ - From e25c3fd72756168a18f1e5ec04a5138df170bf40 Mon Sep 17 00:00:00 2001 From: Knightro <50028636+Knightro63@users.noreply.github.com> Date: Tue, 10 Jan 2023 16:23:35 -0500 Subject: [PATCH 04/15] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 829125f..09d48a8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ [![mobile_scanner](https://github.com/juliansteenbakker/nordic_dfu/actions/workflows/flutter_format.yml/badge.svg)](https://github.com/juliansteenbakker/nordic_dfu/actions/workflows/flutter_format.yml) [![GitHub Sponsors](https://img.shields.io/github/sponsors/juliansteenbakker?label=sponsor%20me%20)](https://github.com/sponsors/juliansteenbakker) -## 5.0.0 Breaking changes! +## 5.3.0 Breaking changes! +From version 5.3.0, macos implimentation. From version 5.0.0, the callbacks are defined as function parameters in NordicDfu().startDfu(). Please see the example app for more information. From f491c8ccba394008820a653841ec0eef00849f6b Mon Sep 17 00:00:00 2001 From: Knightro <50028636+Knightro63@users.noreply.github.com> Date: Tue, 10 Jan 2023 16:24:18 -0500 Subject: [PATCH 05/15] Update pubspec.yaml --- pubspec.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index ef99501..c5413ec 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: nordic_dfu description: This library allows you to do a Device Firmware Update (DFU) of your nrf51 or nrf52 chip from Nordic Semiconductor. Fork of flutter-nordic-dfu. -version: 5.2.1 +version: 5.3.0 homepage: https://github.com/juliansteenbakker/nordic_dfu environment: @@ -22,3 +22,5 @@ flutter: pluginClass: NordicDfuPlugin ios: pluginClass: NordicDfuPlugin + macos: + pluginClass: NordicDfuPlugin From 4a7366e125585b7694314dd5b01f804bd8319d75 Mon Sep 17 00:00:00 2001 From: Knightro <50028636+Knightro63@users.noreply.github.com> Date: Thu, 9 Feb 2023 07:29:26 -0500 Subject: [PATCH 06/15] Update SwiftNordicDfuPlugin.swift --- macos/Classes/SwiftNordicDfuPlugin.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macos/Classes/SwiftNordicDfuPlugin.swift b/macos/Classes/SwiftNordicDfuPlugin.swift index 15beb85..1d4b0cb 100644 --- a/macos/Classes/SwiftNordicDfuPlugin.swift +++ b/macos/Classes/SwiftNordicDfuPlugin.swift @@ -71,7 +71,7 @@ public class SwiftNordicDfuPlugin: NSObject, FlutterPlugin, FlutterStreamHandler if (fileInAsset) { //let key = registrar.lookupKey(forAsset: filePath) - guard let pathInAsset = Bundle.main.path(forResource: "key", ofType: nil) else { + guard let pathInAsset = Bundle.main.path(forResource: filePath, ofType: nil) else { result(FlutterError(code: "ABNORMAL_PARAMETER", message: "file in asset not found \(filePath)", details: nil)) return } From f02705a536daf57f268973b9c7e555ecf4fc9a25 Mon Sep 17 00:00:00 2001 From: Knightro <50028636+Knightro63@users.noreply.github.com> Date: Thu, 9 Feb 2023 16:23:09 -0500 Subject: [PATCH 07/15] Update to 6.0.0 Made the change from 5.3.0 to 6.0.0 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 09d48a8..3187c82 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ [![mobile_scanner](https://github.com/juliansteenbakker/nordic_dfu/actions/workflows/flutter_format.yml/badge.svg)](https://github.com/juliansteenbakker/nordic_dfu/actions/workflows/flutter_format.yml) [![GitHub Sponsors](https://img.shields.io/github/sponsors/juliansteenbakker?label=sponsor%20me%20)](https://github.com/sponsors/juliansteenbakker) -## 5.3.0 Breaking changes! -From version 5.3.0, macos implimentation. +## 6.0.0 Breaking changes! +From version 6.0.0, macos implimentation. From version 5.0.0, the callbacks are defined as function parameters in NordicDfu().startDfu(). Please see the example app for more information. From 2ce8243700bbd708150c5d8f851f8c29a579875e Mon Sep 17 00:00:00 2001 From: Knightro <50028636+Knightro63@users.noreply.github.com> Date: Thu, 9 Feb 2023 16:23:38 -0500 Subject: [PATCH 08/15] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3187c82..df36817 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,9 @@ ## 6.0.0 Breaking changes! From version 6.0.0, macos implimentation. + From version 5.0.0, the callbacks are defined as function parameters in NordicDfu().startDfu(). + Please see the example app for more information. Fork from [flutter_nordic_dfu](https://pub.dev/packages/flutter_nordic_dfu) and updated with latest dependencies. From 3d41db7f5bbd2f551bd42222a8dc55ac6b1c871e Mon Sep 17 00:00:00 2001 From: Knightro <50028636+Knightro63@users.noreply.github.com> Date: Thu, 9 Feb 2023 16:24:51 -0500 Subject: [PATCH 09/15] Delete HelloPlugin.swift --- macos/Classes/HelloPlugin.swift | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 macos/Classes/HelloPlugin.swift diff --git a/macos/Classes/HelloPlugin.swift b/macos/Classes/HelloPlugin.swift deleted file mode 100644 index cfcc010..0000000 --- a/macos/Classes/HelloPlugin.swift +++ /dev/null @@ -1,19 +0,0 @@ -import Cocoa -import FlutterMacOS - -public class HelloPlugin: NSObject, FlutterPlugin { - public static func register(with registrar: FlutterPluginRegistrar) { - let channel = FlutterMethodChannel(name: "hello", binaryMessenger: registrar.messenger) - let instance = HelloPlugin() - registrar.addMethodCallDelegate(instance, channel: channel) - } - - public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { - switch call.method { - case "getPlatformVersion": - result("macOS " + ProcessInfo.processInfo.operatingSystemVersionString) - default: - result(FlutterMethodNotImplemented) - } - } -} From e3fa0d88628730ea72cb2efcf53137bef8f8eced Mon Sep 17 00:00:00 2001 From: Knightro <50028636+Knightro63@users.noreply.github.com> Date: Thu, 9 Feb 2023 16:25:46 -0500 Subject: [PATCH 10/15] Updated to 6.0.0 Changed 5.3.0 to 6.0.0 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index c5413ec..8e638be 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: nordic_dfu description: This library allows you to do a Device Firmware Update (DFU) of your nrf51 or nrf52 chip from Nordic Semiconductor. Fork of flutter-nordic-dfu. -version: 5.3.0 +version: 6.0.0 homepage: https://github.com/juliansteenbakker/nordic_dfu environment: From 0a7b84a0d168015d462ae8ecf871033731f4b9cf Mon Sep 17 00:00:00 2001 From: Knightro <50028636+Knightro63@users.noreply.github.com> Date: Thu, 9 Feb 2023 16:27:37 -0500 Subject: [PATCH 11/15] Delete NordicDfuPlugin.h --- macos/Classes/NordicDfuPlugin.h | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 macos/Classes/NordicDfuPlugin.h diff --git a/macos/Classes/NordicDfuPlugin.h b/macos/Classes/NordicDfuPlugin.h deleted file mode 100644 index 6958d61..0000000 --- a/macos/Classes/NordicDfuPlugin.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface NordicDfuPlugin : NSObject -@end From cab696956f2c2ca1d7ad399033a4fe9f47b762a8 Mon Sep 17 00:00:00 2001 From: Knightro <50028636+Knightro63@users.noreply.github.com> Date: Thu, 9 Feb 2023 16:27:42 -0500 Subject: [PATCH 12/15] Delete NordicDfuPlugin.m --- macos/Classes/NordicDfuPlugin.m | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 macos/Classes/NordicDfuPlugin.m diff --git a/macos/Classes/NordicDfuPlugin.m b/macos/Classes/NordicDfuPlugin.m deleted file mode 100644 index 5bb1172..0000000 --- a/macos/Classes/NordicDfuPlugin.m +++ /dev/null @@ -1,15 +0,0 @@ -#import "NordicDfuPlugin.h" -#if __has_include() -#import -#else -// Support project import fallback if the generated compatibility header -// is not copied when this plugin is created as a library. -// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 -#import "nordic_dfu-Swift.h" -#endif - -@implementation NordicDfuPlugin -+ (void)registerWithRegistrar:(NSObject*)registrar { - [SwiftNordicDfuPlugin registerWithRegistrar:registrar]; -} -@end From 20feef8c8eb846d13623b76eab3ec5ffcc861999 Mon Sep 17 00:00:00 2001 From: Knightro <50028636+Knightro63@users.noreply.github.com> Date: Thu, 9 Feb 2023 16:31:54 -0500 Subject: [PATCH 13/15] Update README.md --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index df36817..c5256f7 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,11 @@ [![pub package](https://img.shields.io/pub/v/nordic_dfu.svg)](https://pub.dev/packages/nordic_dfu) [![mobile_scanner](https://github.com/juliansteenbakker/nordic_dfu/actions/workflows/flutter_format.yml/badge.svg)](https://github.com/juliansteenbakker/nordic_dfu/actions/workflows/flutter_format.yml) [![GitHub Sponsors](https://img.shields.io/github/sponsors/juliansteenbakker?label=sponsor%20me%20)](https://github.com/sponsors/juliansteenbakker) +## 6.0.0 +Version 6.0.0 adds support for macos. -## 6.0.0 Breaking changes! -From version 6.0.0, macos implimentation. - +## 5.0.0 Breaking changes! From version 5.0.0, the callbacks are defined as function parameters in NordicDfu().startDfu(). - Please see the example app for more information. Fork from [flutter_nordic_dfu](https://pub.dev/packages/flutter_nordic_dfu) and updated with latest dependencies. From 9b8c337ede091e707ac634219d935f2c589461c7 Mon Sep 17 00:00:00 2001 From: Knightro <50028636+Knightro63@users.noreply.github.com> Date: Thu, 9 Feb 2023 16:33:51 -0500 Subject: [PATCH 14/15] Update README.md --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index c5256f7..013f4e9 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,10 @@ ## 6.0.0 Version 6.0.0 adds support for macos. -## 5.0.0 Breaking changes! -From version 5.0.0, the callbacks are defined as function parameters in NordicDfu().startDfu(). -Please see the example app for more information. - Fork from [flutter_nordic_dfu](https://pub.dev/packages/flutter_nordic_dfu) and updated with latest dependencies. This library allows you to do a Device Firmware Update (DFU) of your nrf51 or -nrf52 chip from Nordic Semiconductor. It works for Android and iOS. +nrf52 chip from Nordic Semiconductor. It works for Android, iOS, and MacOS. This is the implementation of the reference "[react-native-nordic-dfu](https://github.com/Pilloxa/react-native-nordic-dfu)" From c07a5a349e477ce2faed3cddeba8dc193430aa14 Mon Sep 17 00:00:00 2001 From: Knightro <50028636+Knightro63@users.noreply.github.com> Date: Thu, 9 Feb 2023 16:37:32 -0500 Subject: [PATCH 15/15] Update build.gradle --- example/android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/android/build.gradle b/example/android/build.gradle index bd9b5a8..53cabe8 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.3.1' + classpath 'com.android.tools.build:gradle:7.4.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } }