Skip to content

Commit 7a7e60e

Browse files
committed
Address Copilot PR review feedback (#22)
- Correct Peripheral init docs to point at discoveredPeripherals publisher - Write DocC output to ./docc-output via --output-path instead of .build plugin path - Add Xcode 16.4 existence check with installed-version diagnostics - Ignore docc-output/ build directory
1 parent 3484119 commit 7a7e60e

3 files changed

Lines changed: 19 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,29 @@ jobs:
1818
- uses: actions/checkout@v4
1919

2020
- name: Select Xcode
21-
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
21+
run: |
22+
if [ ! -d /Applications/Xcode_16.4.app ]; then
23+
echo "Xcode 16.4 not found. Installed Xcode versions:"
24+
ls /Applications | grep Xcode || true
25+
exit 1
26+
fi
27+
sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
2228
2329
- name: Verify Swift version
2430
run: swift --version
2531

2632
- name: Build DocC catalog
27-
run: swift package generate-documentation --target ReliaBLE --warnings-as-errors
33+
run: |
34+
swift package --allow-writing-to-directory ./docc-output \
35+
generate-documentation --target ReliaBLE --warnings-as-errors \
36+
--output-path ./docc-output
2837
2938
- name: Archive DocC output
30-
run: ditto -c -k --sequesterRsrc --keepParent .build/plugins/Swift-DocC/outputs/ReliaBLE.doccarchive ReliaBLE.doccarchive.zip
39+
run: ditto -c -k --sequesterRsrc --keepParent docc-output ReliaBLE-docs.zip
3140

3241
- name: Upload DocC archive
3342
uses: actions/upload-artifact@v4
3443
with:
35-
name: ReliaBLE.doccarchive
36-
path: ReliaBLE.doccarchive.zip
44+
name: ReliaBLE-docs
45+
path: ReliaBLE-docs.zip
3746
if-no-files-found: error

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Packages/
3333
.swiftpm
3434

3535
.build/
36+
docc-output/
3637
DerivedData/
3738

3839
# CocoaPods

Sources/ReliaBLE/Models/Peripheral.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ public class Peripheral: Identifiable, Hashable {
6666
/// The timestamp when the peripheral was last seen
6767
public internal(set) var lastSeen: Date?
6868

69-
/// Create a peripheral with a unique identifier and optional CoreBluetooth peripheral data. The integrating app
70-
/// should use this initializer to create a `Peripheral` instance when it has a unique identifier for a peripheral
71-
/// but has not yet discovered the peripheral with CoreBluetooth. ReliaBLE will update the instance
72-
/// with CoreBluetooth data when the peripheral is discovered.
69+
/// Creates a peripheral with a unique identifier and optional CoreBluetooth discovery data.
70+
///
71+
/// Prefer observing ``ReliaBLEManager/discoveredPeripherals`` for devices discovered during scanning.
72+
/// ReliaBLE updates only the ``Peripheral`` instances it manages internally and emits through that publisher.
7373
/// - Parameters:
7474
/// - id: Unique identifier for the peripheral as set by the integrating app.
7575
/// - peripheral: Reference to the CoreBluetooth `CBPeripheral` object

0 commit comments

Comments
 (0)