Skip to content

Commit 422caf5

Browse files
authored
Release 4.2.2
2 parents 88b2a83 + c2479c5 commit 422caf5

34 files changed

+370
-279
lines changed

Example/Podfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PODS:
2-
- iOSDFULibrary (4.2.1):
2+
- iOSDFULibrary (4.2.2):
33
- Zip (~> 1.0)
44
- Zip (1.1.0)
55

@@ -15,7 +15,7 @@ EXTERNAL SOURCES:
1515
:path: "../"
1616

1717
SPEC CHECKSUMS:
18-
iOSDFULibrary: eb0c271a853dcf24898736dfa0ab3817bad5b357
18+
iOSDFULibrary: 6bdbe1c17821f6fe2be1ec987fe55d35d1f178b6
1919
Zip: 8877eede3dda76bcac281225c20e71c25270774c
2020

2121
PODFILE CHECKSUM: e69e51e1629146ef9887fb3e893d62b3afd2b845

Example/Pods/Local Podspecs/iOSDFULibrary.podspec.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Manifest.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Target Support Files/iOSDFULibrary-iOS/iOSDFULibrary-iOS-Info.plist

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Target Support Files/iOSDFULibrary-macOS/iOSDFULibrary-macOS-Info.plist

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/iOSDFULibrary/Info.plist

+2-2
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.2.0</string>
18+
<string>1.0.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>45</string>
22+
<string>1</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
2525
<key>UIBackgroundModes</key>

Example/iOSDFULibrary/View Controllers/DFUViewController.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class DFUViewController: UIViewController, CBCentralManagerDelegate, DFUServiceD
175175
partProgressView.progress = 0.0
176176

177177
// Create DFU initiator with some default configuration
178-
let dfuInitiator = DFUServiceInitiator(target: dfuPeripheral, queue: DispatchQueue(label: "Other"))
178+
let dfuInitiator = DFUServiceInitiator(queue: DispatchQueue(label: "Other"))
179179
dfuInitiator.delegate = self
180180
dfuInitiator.progressDelegate = self
181181
dfuInitiator.logger = self
@@ -202,7 +202,7 @@ class DFUViewController: UIViewController, CBCentralManagerDelegate, DFUServiceD
202202
// Apply step's modifications to the DFU initiator
203203
firmwareProvider.applyModifier(to: dfuInitiator)
204204

205-
dfuController = dfuInitiator.with(firmware: firmware).start()
205+
dfuController = dfuInitiator.with(firmware: firmware).start(target: dfuPeripheral)
206206
}
207207

208208
func prepareNextStep() {

Example/macOS-DFU-Example/Info.plist

+2-2
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>4.1.1</string>
20+
<string>1.0.0</string>
2121
<key>CFBundleVersion</key>
22-
<string>43</string>
22+
<string>1</string>
2323
<key>LSMinimumSystemVersion</key>
2424
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
2525
<key>NSHumanReadableCopyright</key>

changelog

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
### Changelog
2+
- **4.2.2**
3+
- Bugfix: Fixed issue #245 where operationFailed error messages where not reported in some cases.
24
- **4.2.1**
35
- Bugfix: Fixed issue causing a crash when the target peripheral was set to `nil` and `discoverServices()` got called.
46
- Bugfix: Raised MacOS Deployment target to 10.14 due to missing `identifier` property on `CBPeripheral` to avoid hacky workarounds.

iOSDFULibrary.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "iOSDFULibrary"
3-
s.version = "4.2.1"
3+
s.version = "4.2.2"
44
s.summary = "This repository contains a tested library for iOS 8+ devices to perform Device Firmware Update on the nRF5x devices"
55
s.description = <<-DESC
66
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/DFUPeripheralSelectorDelegate.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ import CoreBluetooth
5151
/**
5252
Returns whether the given peripheral is a device in DFU Bootloader mode.
5353

54-
- parameter peripheral: the peripheral to be checked
55-
- parameter advertisementData: scanned advertising data
56-
- parameter RSSI: received signal strength indication in dBm
57-
- parameter name: an optional name to look for in the advertisement packet (see Buttonless DFU in SDK 14)
54+
- parameter peripheral: The peripheral to be checked.
55+
- parameter advertisementData: Scanned advertising data.
56+
- parameter RSSI: Received signal strength indication in dBm.
57+
- parameter name: An optional name to look for in the advertisement packet (see Buttonless DFU in SDK 14).
5858

59-
- returns: true (YES) if given peripheral is what service is looking for
59+
- returns: True (YES) if given peripheral is what service is looking for.
6060
*/
6161
@objc func select(_ peripheral: CBPeripheral, advertisementData: [String : AnyObject], RSSI: NSNumber, hint name: String?) -> Bool
6262

@@ -65,13 +65,13 @@ import CoreBluetooth
6565
when scanning for a device in DFU Bootloader mode. To find out what UUID you should return,
6666
switch your device to DFU Bootloader mode (with a button!) and check the advertisment packet.
6767
The result of this method will be applied to
68-
`centralManager.scanForPeripheralsWithServices([CBUUID]?, options: [String : AnyObject]?)`
68+
`centralManager.scanForPeripheralsWithServices([CBUUID]?, options: [String : AnyObject]?)`.
6969

70-
- parameter dfuServiceUUID: the UUID of the DFU service that was used to flash SoftDevice and/or Bootloader.
70+
- parameter dfuServiceUUID: The UUID of the DFU service that was used to flash SoftDevice and/or Bootloader.
7171
Usually this service UUID is present in the DFU Bootloader's advertising packet. Then this method may simply
7272
return [dfuServiceUUID].
7373

74-
- returns: an optional list of services or nil
74+
- returns: An optional list of services or nil.
7575
*/
7676
@objc func filterBy(hint dfuServiceUUID: CBUUID) -> [CBUUID]?
7777
}

iOSDFULibrary/Classes/Implementation/DFUSelector/DFUServiceSelector.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ internal protocol DFUStarterPeripheralDelegate : BasePeripheralDelegate {
3030
- parameter ExecutorType: The type of the seleceted executor.
3131

3232
- returns: The executor type based on the found DFU Service:
33-
SecureDFUExecutor or LegacyDFUExecutor
33+
SecureDFUExecutor or LegacyDFUExecutor.
3434
*/
3535
func peripheralDidSelectedExecutor(_ ExecutorType: DFUExecutorAPI.Type)
3636
}

iOSDFULibrary/Classes/Implementation/DFUSelector/DFUStarterPeripheral.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ internal class DFUStarterPeripheral : BaseDFUPeripheral<DFUServiceSelector> {
2727
/**
2828
Method called when a DFU service has been found.
2929

30-
- parameter service: The DFU service found on the device
30+
- parameter service: The DFU service found on the device.
3131
*/
3232
override func peripheralDidDiscoverDfuService(_ service: CBService) {
3333

iOSDFULibrary/Classes/Implementation/DFUServiceDelegate.swift

+13-13
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ import Foundation
8585
/**
8686
The state of the DFU Service.
8787

88-
- connecting: Service is connecting to the DFU target
89-
- starting: DFU Service is initializing DFU operation
90-
- enablingDfuMode: Service is switching the device to DFU mode
91-
- uploading: Service is uploading the firmware
92-
- validating: The DFU target is validating the firmware
93-
- disconnecting: The iDevice is disconnecting or waiting for disconnection
94-
- completed: DFU operation is completed and successful
95-
- aborted: DFU Operation was aborted
88+
- connecting: Service is connecting to the DFU target.
89+
- starting: DFU Service is initializing DFU operation.
90+
- enablingDfuMode: Service is switching the device to DFU mode.
91+
- uploading: Service is uploading the firmware.
92+
- validating: The DFU target is validating the firmware.
93+
- disconnecting: The iDevice is disconnecting or waiting for disconnection.
94+
- completed: DFU operation is completed and successful.
95+
- aborted: DFU Operation was aborted.
9696
*/
9797

9898
@objc public enum DFUState : Int {
@@ -132,19 +132,19 @@ import Foundation
132132

133133
This method is called in the main thread and is safe to update any UI.
134134

135-
- parameter part: number of part that is currently being transmitted. Parts start from 1
135+
- parameter part: Number of part that is currently being transmitted. Parts start from 1
136136
and may have value either 1 or 2. Part 2 is used only when there were Soft Device and/or
137137
Bootloader AND an Application in the Distribution Packet and the DFU target does not
138138
support sending all files in a single connection. First the SD and/or BL will be sent, then
139139
the service will disconnect, reconnect again to the (new) bootloader and send the Application.
140-
- parameter totalParts: total number of parts that are to be send (this is always equal to 1 or 2).
141-
- parameter progress: the current progress of uploading the current part in percentage (values 0-100).
140+
- parameter totalParts: Total number of parts that are to be send (this is always equal to 1 or 2).
141+
- parameter progress: The current progress of uploading the current part in percentage (values 0-100).
142142
Each value will be called at most once - in case of a large file a value e.g. 3% will be called only once,
143143
despite that it will take more than one packet to reach 4%. In case of a small firmware file
144144
some values may be ommited. For example, if firmware file would be only 20 bytes you would get
145145
a callback 0% (called always) and then 100% when done.
146-
- parameter currentSpeedBytesPerSecond: the current speed in bytes per second
147-
- parameter avgSpeedBytesPerSecond: the average speed in bytes per second
146+
- parameter currentSpeedBytesPerSecond: The current speed in bytes per second.
147+
- parameter avgSpeedBytesPerSecond: The average speed in bytes per second.
148148
*/
149149
@objc func dfuProgressDidChange(for part: Int, outOf totalParts: Int, to progress: Int,
150150
currentSpeedBytesPerSecond: Double, avgSpeedBytesPerSecond: Double)

0 commit comments

Comments
 (0)