@@ -22,14 +22,13 @@ NS_ASSUME_NONNULL_BEGIN
2222// MARK: - Color
2323
2424#if !TARGET_OS_OSX
25- #define RCTPlatformColor UIColor
25+ @compatibility_alias RCTPlatformColor UIColor;
26+ @compatibility_alias RCTUIColor UIColor;
2627#else
27- #define RCTPlatformColor NSColor
28+ @compatibility_alias RCTPlatformColor NSColor ;
29+ @compatibility_alias RCTUIColor NSColor ;
2830#endif
2931
30- // Backward compatibility
31- #define RCTUIColor RCTPlatformColor
32-
3332// MARK: - Event types
3433
3534#if TARGET_OS_OSX
@@ -209,30 +208,28 @@ typedef NS_ENUM(NSInteger, UIActivityIndicatorViewStyle) {
209208// MARK: - Gesture recognizer
210209
211210#if !TARGET_OS_OSX
212- #define RCTPlatformPanGestureRecognizer UIPanGestureRecognizer
211+ @compatibility_alias RCTPlatformPanGestureRecognizer UIPanGestureRecognizer;
212+ @compatibility_alias RCTUIPanGestureRecognizer UIPanGestureRecognizer;
213213#else
214214#define UIGestureRecognizer NSGestureRecognizer
215215#define UIGestureRecognizerDelegate NSGestureRecognizerDelegate
216- #define RCTPlatformPanGestureRecognizer NSPanGestureRecognizer
217- #define UIApplication NSApplication
216+ @compatibility_alias RCTPlatformPanGestureRecognizer NSPanGestureRecognizer ;
217+ @compatibility_alias RCTUIPanGestureRecognizer NSPanGestureRecognizer ;
218+ @compatibility_alias UIApplication NSApplication ;
218219#endif
219220
220- // Backward compatibility
221- #define RCTUIPanGestureRecognizer RCTPlatformPanGestureRecognizer
222-
223221// MARK: - Cross-platform typedefs
224222
225223#if !TARGET_OS_OSX
226- typedef UIApplication RCTPlatformApplication;
227- typedef UIWindow RCTPlatformWindow;
228- typedef UIViewController RCTPlatformViewController;
224+ @compatibility_alias RCTPlatformApplication UIApplication;
225+ @compatibility_alias RCTPlatformWindow UIWindow;
226+ @compatibility_alias RCTPlatformViewController UIViewController;
227+ @compatibility_alias RCTUIApplication UIApplication;
229228#else
230- typedef NSApplication RCTPlatformApplication;
231- typedef NSWindow RCTPlatformWindow;
232- typedef NSViewController RCTPlatformViewController;
229+ @compatibility_alias RCTPlatformApplication NSApplication ;
230+ @compatibility_alias RCTPlatformWindow NSWindow ;
231+ @compatibility_alias RCTPlatformViewController NSViewController ;
232+ @compatibility_alias RCTUIApplication NSApplication ;
233233#endif
234234
235- // Backward compatibility
236- #define RCTUIApplication RCTPlatformApplication
237-
238235NS_ASSUME_NONNULL_END
0 commit comments