Skip to content

Commit

Permalink
Deprecate [RCTConvert UIBarStyle:] (facebook#42100)
Browse files Browse the repository at this point in the history
Summary:
The enums [UIBarStyleBlackOpaque](https://developer.apple.com/documentation/uikit/uibarstyle/uibarstyleblackopaque) and [UIBarStyleBlackTranslucent](https://developer.apple.com/documentation/uikit/uibarstyle/uibarstyleblacktranslucent) have been deprecated since iOS 13, already below React Native's minimum OS of iOS 13.4. Indeed, they are not available on visionOS and tvOS, making this a source of extra diffs.

Rather than deprecate and remove those options, I noticed that we don't actually use that `RCTConvert` method in the core repo, and haven't since `0.58-stable` (presumably before the lean core effort). Let's just remove it, it's a conversion that should be easy enough to replicate elsewhere. However, removal is a breaking change, so let's deprecate it for one release (0.74) and remove it for the next one (0.75). For posterity, tracking deprecation with microsoft#2008 and removal with microsoft#2009 .

## Changelog:

[IOS] [DEPRECATED] - Deprecate `[RCTConvert UIBarStyle:]`

Pull Request resolved: facebook#42100

Test Plan: CI should pass

Reviewed By: shwanton

Differential Revision: D52458912

Pulled By: NickGerleman

fbshipit-source-id: 5614b6624b9b929ba601ac976149b2002163ff54
  • Loading branch information
Saadnajmi authored and Othinn committed Jan 9, 2024
1 parent a297037 commit 02c16cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-native/React/Base/RCTConvert.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ typedef NSURL RCTFileURL;

+ (UIViewContentMode)UIViewContentMode:(id)json;
#if !TARGET_OS_TV
+ (UIBarStyle)UIBarStyle:(id)json;
+ (UIBarStyle)UIBarStyle:(id)json __deprecated;
#endif

+ (CGFloat)CGFloat:(id)json;
Expand Down

0 comments on commit 02c16cd

Please sign in to comment.