Resolve some XCode warnings (#31883)

Summary:
UIAccessibilityVoiceOverStatusChanged deprecated (iOS 11+) in favor for UIAccessibilityVoiceOverStatusDidChangeNotification ref: https://developer.apple.com/documentation/uikit/uiaccessibilityvoiceoverstatuschanged?language=objc

topLayoutGuide/bottomLayoutGuide deprecated (iOS 11+) in favor for safeAreaLayoutGuide ref: https://developer.apple.com/documentation/uikit/uiviewcontroller/1621367-toplayoutguide

This block declaration is not a prototype warnings fixed by adding void to specify no parameters ref: https://stackoverflow.com/questions/47916585/objective-c-block-parameter-issue-this-block-declaration-is-not-a-prototype

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] [Fixed] - Resolved some deprecations

Pull Request resolved: https://github.com/facebook/react-native/pull/31883

Test Plan: Tests should pass, no functionality should change.

Reviewed By: fkgozali

Differential Revision: D29822033

Pulled By: mdvacca

fbshipit-source-id: dec8d612885634aca090ac3372cd4c7bf8a197ee
This commit is contained in:
Jason Safaiyeh authored and Facebook GitHub Bot committed 2021-07-21 13:27:14 -07:00
1 parent aa98978302
commit 48ba8df8f2
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -430,7 +430,7 @@ RCT_EXTERN_C_END
@end
typedef void (^RCTBridgelessBundleURLSetter)(NSURL *bundleURL);
typedef NSURL * (^RCTBridgelessBundleURLGetter)();
typedef NSURL * (^RCTBridgelessBundleURLGetter)(void);
/**
* A class that allows NativeModules/TurboModules to read/write the bundleURL, with or without the bridge.
+1 -1
View File
@@ -82,7 +82,7 @@ RCT_EXPORT_MODULE()
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(voiceVoiceOverStatusDidChange:)
name:UIAccessibilityVoiceOverStatusChanged
name:UIAccessibilityVoiceOverStatusDidChangeNotification
object:nil];
self.contentSizeCategory = RCTSharedApplication().preferredContentSizeCategory;
+1 -1
View File
@@ -490,7 +490,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : unused)
while (view) {
UIViewController *controller = view.reactViewController;
if (controller) {
return (UIEdgeInsets){controller.topLayoutGuide.length, 0, controller.bottomLayoutGuide.length, 0};
return controller.view.safeAreaInsets;
}
view = view.superview;
}