diff --git a/packages/react-native/.doxygen.config.template b/packages/react-native/.doxygen.config.template index cd4047ae375..d7f5cd197aa 100644 --- a/packages/react-native/.doxygen.config.template +++ b/packages/react-native/.doxygen.config.template @@ -2443,7 +2443,21 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = FOLLY_PACK_PUSH="" FOLLY_PACK_POP="" FOLLY_PACK_ATTR="" __attribute__(x)="" __deprecated_msg(x)="" ${PREDEFINED} +PREDEFINED = FOLLY_PACK_PUSH="" \ + FOLLY_PACK_POP="" \ + FOLLY_PACK_ATTR="" \ + __attribute__(x)="" \ + __deprecated_msg(x)="" \ + NS_REQUIRES_SUPER="" \ + NS_UNAVAILABLE="" \ + CF_RETURNS_NOT_RETAINED="" \ + NS_DESIGNATED_INITIALIZER="" \ + NS_DESIGNATED_INITIALIZER="" \ + RCT_EXTERN="" \ + RCT_DEPRECATED="" \ + RCT_EXTERN_MODULE="" \ + API_AVAILABLE(x)="" \ + ${PREDEFINED} # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/scripts/cxx-api/manual_test/.doxygen.config.template b/scripts/cxx-api/manual_test/.doxygen.config.template index 6f762bb4b57..15952235cae 100644 --- a/scripts/cxx-api/manual_test/.doxygen.config.template +++ b/scripts/cxx-api/manual_test/.doxygen.config.template @@ -2442,7 +2442,20 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = FOLLY_PACK_PUSH="" FOLLY_PACK_POP="" FOLLY_PACK_ATTR="" __attribute__(x)="" __deprecated_msg(x)="" ${PREDEFINED} +PREDEFINED = FOLLY_PACK_PUSH="" \ + FOLLY_PACK_POP="" \ + FOLLY_PACK_ATTR="" \ + __attribute__(x)="" \ + __deprecated_msg(x)="" \ + NS_REQUIRES_SUPER="" \ + NS_UNAVAILABLE="" \ + CF_RETURNS_NOT_RETAINED="" \ + NS_DESIGNATED_INITIALIZER="" \ + RCT_EXTERN="" \ + RCT_DEPRECATED="" \ + RCT_EXTERN_MODULE="" \ + API_AVAILABLE(x)="" \ + ${PREDEFINED} # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/scripts/cxx-api/tests/snapshots/.doxygen.config.template b/scripts/cxx-api/tests/snapshots/.doxygen.config.template index 13cbc7b5737..50d418c394f 100644 --- a/scripts/cxx-api/tests/snapshots/.doxygen.config.template +++ b/scripts/cxx-api/tests/snapshots/.doxygen.config.template @@ -2442,7 +2442,19 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = FOLLY_PACK_PUSH="" FOLLY_PACK_POP="" FOLLY_PACK_ATTR="" __attribute__(x)="" __deprecated_msg(x)="" +PREDEFINED = FOLLY_PACK_PUSH="" \ + FOLLY_PACK_POP="" \ + FOLLY_PACK_ATTR="" \ + __attribute__(x)="" \ + __deprecated_msg(x)="" \ + NS_REQUIRES_SUPER="" \ + NS_UNAVAILABLE="" \ + CF_RETURNS_NOT_RETAINED="" \ + NS_DESIGNATED_INITIALIZER="" \ + RCT_EXTERN="" \ + RCT_DEPRECATED="" \ + RCT_EXTERN_MODULE="" \ + API_AVAILABLE(x)="" # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/scripts/cxx-api/tests/snapshots/should_strip_objc_macros/snapshot.api b/scripts/cxx-api/tests/snapshots/should_strip_objc_macros/snapshot.api new file mode 100644 index 00000000000..b0c18447476 --- /dev/null +++ b/scripts/cxx-api/tests/snapshots/should_strip_objc_macros/snapshot.api @@ -0,0 +1,14 @@ +interface RCTTestMacros { + public @property (strong, readonly) dispatch_queue_t methodQueue; + public @property (weak, readonly) id bridge; + public virtual instancetype initWithDelegate:options:(id delegate, NSDictionary * options); + public virtual instancetype initWithName:(NSString * name); + public virtual static UIUserInterfaceStyle userInterfaceStyle(); + public virtual void deprecatedMethod(); +} + +protocol RCTTestProtocol { + public @property (assign, readonly) NSString * name; + public virtual void normalMethod(); + public virtual void requiredMethod(); +} diff --git a/scripts/cxx-api/tests/snapshots/should_strip_objc_macros/test.h b/scripts/cxx-api/tests/snapshots/should_strip_objc_macros/test.h new file mode 100644 index 00000000000..d03ef29db63 --- /dev/null +++ b/scripts/cxx-api/tests/snapshots/should_strip_objc_macros/test.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +@interface RCTTestMacros + +- (instancetype)initWithName:(NSString *)name NS_DESIGNATED_INITIALIZER; + +- (instancetype)initWithDelegate:(id)delegate options:(NSDictionary *)options NS_DESIGNATED_INITIALIZER; + +@property (nonatomic, strong, readonly) dispatch_queue_t methodQueue RCT_DEPRECATED; + +@property (nonatomic, weak, readonly) id bridge RCT_DEPRECATED; + +- (void)deprecatedMethod RCT_DEPRECATED; + ++ (UIUserInterfaceStyle)userInterfaceStyle API_AVAILABLE(ios(12)); + +@end + +RCT_EXTERN void RCTExternFunction(const char *input, NSString **output); + +RCT_EXTERN NSString *RCTParseType(const char **input); + +@protocol RCTTestProtocol + +- (void)normalMethod; + +- (void)requiredMethod NS_DESIGNATED_INITIALIZER; + +@property (nonatomic, readonly) NSString *name RCT_DEPRECATED; + +@end