Skip to content

chore: remove unnecessary diff #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Pod::Spec.new do |s|
"HEADER_SEARCH_PATHS" => header_search_paths.join(' ')
}
s.framework = "UIKit"

s.dependency "React-Core/RCTLinkingHeaders", version
s.dependency "ReactCommon/turbomodule/core", version
s.dependency "React-jsi", version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Pod::Spec.new do |s|
"HEADER_SEARCH_PATHS" => header_search_paths.join(" ")
}
s.framework = ["UIKit", "QuartzCore"]

s.dependency "RCT-Folly", folly_version
s.dependency "RCTTypeSafety"
s.dependency "React-jsi"
Expand Down
15 changes: 2 additions & 13 deletions packages/react-native/React/CoreModules/RCTDeviceInfo.mm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ - (void)initialize
selector:@selector(didReceiveNewContentSizeMultiplier)
name:RCTAccessibilityManagerDidUpdateMultiplierNotification
object:[_moduleRegistry moduleForName:"AccessibilityManager"]];


_currentInterfaceDimensions = [self _exportedDimensions];

Expand Down Expand Up @@ -105,12 +104,7 @@ - (void)_cleanupObservers
[[NSNotificationCenter defaultCenter] removeObserver:self
name:RCTAccessibilityManagerDidUpdateMultiplierNotification
object:[_moduleRegistry moduleForName:"AccessibilityManager"]];
#if !TARGET_OS_VISION
[[NSNotificationCenter defaultCenter] removeObserver:self
name:UIApplicationDidChangeStatusBarOrientationNotification
object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIDeviceOrientationDidChangeNotification object:nil];
#endif

[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil];

[[NSNotificationCenter defaultCenter] removeObserver:self name:RCTUserInterfaceStyleDidChangeNotification object:nil];
Expand All @@ -127,8 +121,7 @@ - (void)_cleanupObservers
static BOOL RCTIsIPhoneNotched()
{
static BOOL isIPhoneNotched = NO;
#if !TARGET_OS_VISION
static dispatch_once_t onceToken;
static dispatch_once_t onceToken;

#if TARGET_OS_IOS
dispatch_once(&onceToken, ^{
Expand All @@ -139,10 +132,6 @@ static BOOL RCTIsIPhoneNotched()
});
#endif

// 20pt is the top safeArea value in non-notched devices
isIPhoneNotched = RCTSharedApplication().keyWindow.safeAreaInsets.top > 20;
});
#endif
return isIPhoneNotched;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ @implementation RCTKeyboardObserver

- (void)startObserving
{
#if !TARGET_OS_VISION
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];

#define ADD_KEYBOARD_HANDLER(NAME, SELECTOR) [nc addObserver:self selector:@selector(SELECTOR:) name:NAME object:nil]
Expand All @@ -36,7 +35,6 @@ - (void)startObserving
ADD_KEYBOARD_HANDLER(UIKeyboardDidChangeFrameNotification, keyboardDidChangeFrame);

#undef ADD_KEYBOARD_HANDLER
#endif
}

- (NSArray<NSString *> *)supportedEvents
Expand All @@ -53,12 +51,9 @@ - (void)startObserving

- (void)stopObserving
{
#if !TARGET_OS_VISION
[[NSNotificationCenter defaultCenter] removeObserver:self];
#endif
}

#if !TARGET_OS_VISION
// Bridge might be already invalidated by the time the keyboard is about to be dismissed.
// This might happen, for example, when reload from the packager is performed.
// Thus we need to check against nil here.
Expand All @@ -77,7 +72,6 @@ -(void)EVENT : (NSNotification *)notification
IMPLEMENT_KEYBOARD_HANDLER(keyboardDidHide)
IMPLEMENT_KEYBOARD_HANDLER(keyboardWillChangeFrame)
IMPLEMENT_KEYBOARD_HANDLER(keyboardDidChangeFrame)
#endif

- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
(const facebook::react::ObjCTurboModule::InitParams &)params
Expand Down
3 changes: 0 additions & 3 deletions packages/react-native/React/Views/RCTWrapperViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ - (instancetype)initWithContentView:(UIView *)contentView

if ((self = [super initWithNibName:nil bundle:nil])) {
_contentView = contentView;
#if !TARGET_OS_VISION
self.automaticallyAdjustsScrollViewInsets = NO;
#endif
}
return self;
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Pod::Spec.new do |s|
s.header_mappings_dir = "../../.."
header_search_paths = header_search_paths + ["\"$(PODS_TARGET_SRCROOT)/platform/ios\""]
end

s.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
"HEADER_SEARCH_PATHS" => header_search_paths.join(" "),
"DEFINES_MODULE" => "YES",
Expand Down
2 changes: 0 additions & 2 deletions packages/rn-tester/RNTester/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ - (void)application:(__unused UIApplication *)application
[RCTPushNotificationManager didFailToRegisterForRemoteNotificationsWithError:error];
}

#if !TARGET_OS_VISION
#pragma mark - UNUserNotificationCenterDelegate

// Required for the remoteNotificationReceived and localNotificationReceived events
Expand Down Expand Up @@ -137,7 +136,6 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
[RCTPushNotificationManager didReceiveNotification:notification];
completionHandler();
}
#endif

#pragma mark - New Arch Enabled settings

Expand Down
Loading