Skip to content

Commit

Permalink
[visionOS] Followup fixes (#2060)
Browse files Browse the repository at this point in the history
  • Loading branch information
Saadnajmi authored Jan 30, 2024
1 parent a064b85 commit f712c20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/react-native/Libraries/Text/React-RCTText.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Pod::Spec.new do |s|
s.source = source
s.source_files = "**/*.{h,m,mm}"
s.ios.exclude_files = "**/macOS/*" # [macOS]
s.visionos.exclude_files = "**/macOS/*" # [visionOS]
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTText"
# [macOS MobileCoreServices Not available on macOS
Expand Down
5 changes: 3 additions & 2 deletions packages/react-native/React/CoreModules/RCTDeviceInfo.mm
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,18 @@ - (void)initialize

_currentInterfaceDimensions = [self _exportedDimensions];

#if !TARGET_OS_OSX // [macOS]
#if TARGET_OS_IOS // [macOS] [visionOS]
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(interfaceOrientationDidChange)
name:UIApplicationDidBecomeActiveNotification
object:nil];
#endif // [macOS] [visionOS]

[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(interfaceFrameDidChange)
name:RCTUserInterfaceStyleDidChangeNotification
object:nil];
#endif // [macOS]

[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(interfaceFrameDidChange)
name:RCTRootViewFrameDidChangeNotification
Expand Down

0 comments on commit f712c20

Please sign in to comment.