From 29d777f39dfe3c97cd8b010a7b827b1805cc9a47 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 24 Jan 2023 17:25:26 -0500 Subject: [PATCH] Preserve the old function name for removeStorageDataForKey in Swift. (#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. --- src/darwin/Framework/CHIP/MTRStorage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/darwin/Framework/CHIP/MTRStorage.h b/src/darwin/Framework/CHIP/MTRStorage.h index 97813fdbb957e9..81b619f0e0e45c 100644 --- a/src/darwin/Framework/CHIP/MTRStorage.h +++ b/src/darwin/Framework/CHIP/MTRStorage.h @@ -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