Skip to content

Commit

Permalink
Preserve the old function name for removeStorageDataForKey in Swift. (#…
Browse files Browse the repository at this point in the history
…24627)

By default, this is getting renamed to "removeData(forKey:)" in Swift, because
the protocol is now called MTRStorage and for some reason the Swift name mapping
cares about that for just this one function.

This breaks existing consumers.  Use NS_SWIFT_NAME to preserve the existing
name.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Aug 14, 2023
1 parent 769e85d commit 1098155
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ MTR_NEWLY_AVAILABLE
* Delete the key and corresponding data. Returns YES if the key was present,
* NO if the key was not present.
*/
- (BOOL)removeStorageDataForKey:(NSString *)key;
- (BOOL)removeStorageDataForKey:(NSString *)key NS_SWIFT_NAME(removeStorageData(forKey:));

@end

Expand Down

0 comments on commit 1098155

Please sign in to comment.