Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CHIPTool build on iOS. #18523

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@
#import <CHIP/CHIP.h>
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

extern NSString * const kCHIPToolDefaultsDomain;
extern NSString * const kNetworkSSIDDefaultsKey;
extern NSString * const kNetworkPasswordDefaultsKey;
extern NSString * const kFabricIdKey;

CHIPDeviceController * InitializeCHIP(void);
CHIPDeviceController * CHIPRestartController(CHIPDeviceController * controller);
id CHIPGetDomainValueForKey(NSString * domain, NSString * key);
BOOL CHIPSetDomainValueForKey(NSString * domain, NSString * key, id value);
CHIPDeviceController * _Nullable InitializeCHIP(void);
CHIPDeviceController * _Nullable CHIPRestartController(CHIPDeviceController * controller);
id _Nullable CHIPGetDomainValueForKey(NSString * domain, NSString * key);
BOOL CHIPSetDomainValueForKey(NSString * domain, NSString * key, id _Nullable value);
void CHIPRemoveDomainValueForKey(NSString * domain, NSString * key);
uint64_t CHIPGetNextAvailableDeviceID(void);
NSString * KeyForPairedDevice(uint64_t id);
Expand All @@ -37,12 +39,10 @@ BOOL CHIPIsDevicePaired(uint64_t id);
BOOL CHIPGetConnectedDevice(CHIPDeviceConnectionCallback completionHandler);
BOOL CHIPGetConnectedDeviceWithID(uint64_t deviceId, CHIPDeviceConnectionCallback completionHandler);
void CHIPUnpairDeviceWithID(uint64_t deviceId);
CHIPDevice * CHIPGetDeviceBeingCommissioned(void);

NS_ASSUME_NONNULL_BEGIN
CHIPDevice * _Nullable CHIPGetDeviceBeingCommissioned(void);

@interface CHIPToolPersistentStorageDelegate : NSObject <CHIPPersistentStorageDelegate>
- (NSData *)storageDataForKey:(NSString *)key;
- (nullable NSData *)storageDataForKey:(NSString *)key;
- (BOOL)setStorageData:(NSData *)value forKey:(NSString *)key;
- (BOOL)removeStorageDataForKey:(NSString *)key;
@end
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIPTests/CHIPTestStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
NS_ASSUME_NONNULL_BEGIN

@interface CHIPTestStorage : NSObject <CHIPPersistentStorageDelegate>
- (NSData *)storageDataForKey:(NSString *)key;
- (nullable NSData *)storageDataForKey:(NSString *)key;
- (BOOL)setStorageData:(NSData *)value forKey:(NSString *)key;
- (BOOL)removeStorageDataForKey:(NSString *)key;
@end
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIPTests/CHIPTestStorage.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ @interface CHIPTestStorage ()

@implementation CHIPTestStorage

- (NSData *)storageDataForKey:(NSString *)key
- (nullable NSData *)storageDataForKey:(NSString *)key
{
return _values[key];
}
Expand Down