Skip to content

Commit

Permalink
[Darwin]Fix: enable controller to skip complete step (#26248)
Browse files Browse the repository at this point in the history
* [Darwin]Fix: enable controller to skip complete step;

* [Darwin]set skipCommissioningComplete to boolean value and append MTR_NEWLY_AVAILABLE annotation

* Update src/darwin/Framework/CHIP/MTRCommissioningParameters.h

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/darwin/Framework/CHIP/MTRDeviceController.mm

Co-authored-by: Boris Zbarsky <[email protected]>

---------

Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Aug 7, 2023
1 parent 63f8e1a commit 4175729
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/darwin/Framework/CHIP/MTRCommissioningParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nonatomic, copy, nullable) NSNumber * failSafeTimeout API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4));

/**
* Only perform the PASE steps of commissioning.
* If set to YES, commissioning will be completed by another admin on the network.
*
* Defaults to NO.
*/
@property (nonatomic, assign) BOOL skipCommissioningComplete MTR_NEWLY_AVAILABLE;

@end

@interface MTRCommissioningParameters (Deprecated)
Expand Down
1 change: 1 addition & 0 deletions src/darwin/Framework/CHIP/MTRDeviceController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ - (BOOL)commissionNodeWithID:(NSNumber *)nodeID
if (commissioningParams.threadOperationalDataset) {
params.SetThreadOperationalDataset(AsByteSpan(commissioningParams.threadOperationalDataset));
}
params.SetSkipCommissioningComplete(commissioningParams.skipCommissioningComplete);
if (commissioningParams.wifiSSID) {
chip::ByteSpan ssid = AsByteSpan(commissioningParams.wifiSSID);
chip::ByteSpan credentials;
Expand Down

0 comments on commit 4175729

Please sign in to comment.