Skip to content

Commit 4c97ff9

Browse files
authored
Merge pull request #176 from NordicSemiconductor/develop
Release 4.4.1
2 parents 56b0e12 + 1e976eb commit 4c97ff9

File tree

7 files changed

+21
-11
lines changed

7 files changed

+21
-11
lines changed

Example/iOSDFULibrary/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>4.1.0</string>
18+
<string>4.1.1</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>42</string>
22+
<string>43</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
2525
<key>UILaunchStoryboardName</key>

Example/macOS-DFU-Example/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.0</string>
20+
<string>4.1.1</string>
2121
<key>CFBundleVersion</key>
22-
<string>1</string>
22+
<string>43</string>
2323
<key>LSMinimumSystemVersion</key>
2424
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
2525
<key>NSHumanReadableCopyright</key>

changelog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
### Changelog
22

3+
- **4.1.1**
4+
- Bugfix: Fixed an issue with DFU processes that had multiple DFU parts that caused the executor to connect to wrong peripherals after flashing the first part.
5+
The peripheral is now held in memory until it comes back online, so the library will no longer scan for DFU peripherals while waiting for it to restart.
6+
- Bugfix: Fixed an issue related to the new address expected flag.
7+
- Improvement: Carthage support for MacOS.
8+
- Improvement: Firmware size information is now available for Obj-C projects.
9+
- Improvement: Added required imports for projects built without Cocoapods.
10+
311
- **4.1.0**
412
- Improvement: Using iOS 11's new `canSendWriteWithoutResponse` API to remove the need of using packet receipt notifications, setting a PRN value of 0 on iOS 11 will enable this feature.
513
- PRN will still be used as the default option.

iOSDFULibrary.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = "iOSDFULibrary"
11-
s.version = "4.1.0"
11+
s.version = "4.1.1"
1212
s.summary = "This repository contains a tested library for iOS 8+ devices to perform Device Firmware Update on the nRF5x devices"
1313
s.description = <<-DESC
1414
The nRF5x Series chips are flash-based SoCs, and as such they represent the most flexible solution available. A key feature of the nRF5x Series and their associated software architecture and S-Series SoftDevices is the possibility for Over-The-Air Device Firmware Upgrade (OTA-DFU). See Figure 1. OTA-DFU allows firmware upgrades to be issued and downloaded to products in the field via the cloud and so enables OEMs to fix bugs and introduce new features to products that are already out on the market. This brings added security and flexibility to product development when using the nRF5x Series SoCs.

iOSDFULibrary/Classes/Implementation/GenericDFU/DFUExecutor.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,14 @@ extension DFUExecutor {
137137

138138
// MARK: - BasePeripheralDelegate API
139139

140-
func peripheralDidDisconnectAfterFirmwarePartSent() {
140+
func peripheralDidDisconnectAfterFirmwarePartSent() -> Bool {
141141
// Check if there is another part of the firmware that has to be sent
142142
if firmware.hasNextPart() {
143143
firmware.switchToNextPart()
144144
DispatchQueue.main.async(execute: {
145145
self.delegate?.dfuStateDidChange(to: .connecting)
146146
})
147-
peripheral.switchToNewPeripheralAndConnect()
148-
return
147+
return true
149148
}
150149
// If not, we are done here. Congratulations!
151150
DispatchQueue.main.async(execute: {
@@ -155,5 +154,6 @@ extension DFUExecutor {
155154

156155
// Release the cyclic reference
157156
peripheral.destroy()
157+
return false
158158
}
159159
}

iOSDFULibrary/Classes/Implementation/GenericDFU/DFUPeripheral.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,10 @@ internal class BaseCommonDFUPeripheral<TD : DFUPeripheralDelegate, TS : DFUServi
476476
}
477477
} else if activating {
478478
activating = false
479-
// This part of firmware has been successfully
480-
delegate?.peripheralDidDisconnectAfterFirmwarePartSent()
479+
// This part of firmware has been successfully sent
480+
if (delegate?.peripheralDidDisconnectAfterFirmwarePartSent() ?? false) {
481+
connect()
482+
}
481483
} else {
482484
super.peripheralDidDisconnect()
483485
}

iOSDFULibrary/Classes/Implementation/GenericDFU/DFUPeripheralDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ internal protocol DFUPeripheralDelegate : BasePeripheralDelegate {
7070
a device advertising in DFU Bootloader mode, connect to it. The `peripheralDidBecomeReady()`
7171
callback will be called again when DFU service will be found in its database.
7272
*/
73-
func peripheralDidDisconnectAfterFirmwarePartSent()
73+
func peripheralDidDisconnectAfterFirmwarePartSent() -> Bool
7474
}

0 commit comments

Comments
 (0)