Skip to content

Commit 41a7dbf

Browse files
committed
chore: cherry-pick to 0.74-stable
1 parent d7fa3d4 commit 41a7dbf

File tree

12 files changed

+342
-426
lines changed

12 files changed

+342
-426
lines changed

packages/out-of-tree-platforms/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@callstack/out-of-tree-platforms",
3-
"version": "0.75.0-main",
3+
"version": "0.74.75",
44
"description": "Utils for React Native out of tree platforms.",
55
"keywords": ["out-of-tree", "react-native"],
66
"homepage": "https://github.com/callstack/react-native-visionos/tree/HEAD/packages/out-of-tree-platforms#readme",

packages/react-native/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
#import <UIKit/UIKit.h>
89
#import <React/RCTAnimationUtils.h>
910
#import <React/RCTColorAnimatedNode.h>
1011
#import <React/RCTObjectAnimatedNode.h>

packages/react-native/Libraries/NativeAnimation/RCTAnimationUtils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
#import <UIKit/UIKit.h>
89
#import <CoreGraphics/CoreGraphics.h>
910
#import <Foundation/Foundation.h>
1011

packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ typedef void (^RCTRemoteNotificationCallback)(UIBackgroundFetchResult result);
4545
*/
4646
+ (void)setInitialNotification:(UNNotification *)notification;
4747

48+
#if !TARGET_OS_VISION
4849
/** DEPRECATED. Use didReceiveNotification instead. */
4950
+ (void)didReceiveLocalNotification:(UILocalNotification *)notification RCT_DEPRECATED;
5051
/** DEPRECATED. Use didReceiveNotification instead. */
5152
+ (void)didReceiveRemoteNotification:(NSDictionary *)notification RCT_DEPRECATED;
53+
#endif
5254

5355
@end

packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ @implementation RCTConvert (UIBackgroundFetchResult)
9797

9898
@implementation RCTPushNotificationManager
9999

100+
#if !TARGET_OS_VISION
100101
/** DEPRECATED. UILocalNotification was deprecated in iOS 10. Please don't add new callsites. */
101102
static NSDictionary *RCTFormatLocalNotification(UILocalNotification *notification)
102103
{
@@ -116,6 +117,7 @@ @implementation RCTPushNotificationManager
116117
formattedLocalNotification[@"remote"] = @NO;
117118
return formattedLocalNotification;
118119
}
120+
#endif
119121

120122
/** For delivered notifications */
121123
static NSDictionary<NSString *, id> *RCTFormatUNNotification(UNNotification *notification)
@@ -267,6 +269,7 @@ + (void)setInitialNotification:(UNNotification *)notification
267269
kInitialNotification = notification;
268270
}
269271

272+
#if !TARGET_OS_VISION
270273
// Deprecated
271274
+ (void)didReceiveLocalNotification:(UILocalNotification *)notification
272275
{
@@ -283,6 +286,7 @@ + (void)didReceiveRemoteNotification:(NSDictionary *)notification
283286
object:self
284287
userInfo:userInfo];
285288
}
289+
#endif
286290

287291
- (void)invalidate
288292
{

packages/react-native/Libraries/WindowManager/React-RCTWindowManager.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Pod::Spec.new do |s|
4545
s.dependency "React-jsi"
4646
s.dependency "React-Core/RCTWindowManagerHeaders"
4747

48-
add_dependency(s, "ReactCodegen", :additional_framework_paths => ["build/generated/ios"])
48+
add_dependency(s, "React-Codegen", :additional_framework_paths => ["build/generated/ios"])
4949
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
5050
add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"])
5151
end

packages/react-native/Libraries/XR/React-RCTXR.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Pod::Spec.new do |s|
4545
s.dependency "React-jsi"
4646
s.dependency "React-Core/RCTXRHeaders"
4747

48-
add_dependency(s, "ReactCodegen", :additional_framework_paths => ["build/generated/ios"])
48+
add_dependency(s, "React-Codegen", :additional_framework_paths => ["build/generated/ios"])
4949
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
5050
add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"])
5151
end

packages/react-native/sdks/hermes-engine/hermes-engine.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ package = JSON.parse(File.read(File.join(react_native_path, "package.json")))
1313
version = package['version']
1414

1515
# Temporaily build from source until visionOS supports prebuilt binaries
16-
source_type = HermesEngineSourceType::BUILD_FROM_GITHUB_MAIN # hermes_source_type(version, react_native_path)
16+
source_type = HermesEngineSourceType::BUILD_FROM_GITHUB_TAG # hermes_source_type(version, react_native_path)
1717
source = podspec_source(source_type, version, react_native_path)
1818

1919
Pod::Spec.new do |spec|

packages/react-native/sdks/hermes-engine/utils/build-hermes-xcode.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ function get_platform_copy_destination {
1616
if [[ $1 == "macosx" ]]; then
1717
echo "macosx"
1818
return
19-
elif [[ $1 == "xros" ]]; then
20-
echo "xros"
21-
return
22-
elif [[ $1 == "xrsimulator" ]]; then
19+
elif [[ $1 == "xrsimulator" || $1 == "xros" ]]; then
2320
echo "xros"
2421
return
2522
fi
@@ -31,8 +28,10 @@ function get_deployment_target {
3128
if [[ $1 == "macosx" ]]; then
3229
echo ${MACOSX_DEPLOYMENT_TARGET}
3330
return
31+
elif [[ $1 == "xrsimulator" || $1 == "xros" ]]; then
32+
echo ${XROS_DEPLOYMENT_TARGET}
33+
return
3434
fi
35-
3635
echo ${IPHONEOS_DEPLOYMENT_TARGET}
3736
}
3837

packages/react-native/template/package.json

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,25 @@
1515
"react-native": "0.74.0-rc.4",
1616
"@callstack/react-native-visionos": "0.74.0-rc.4"
1717
},
18-
"codegenConfig": {
19-
"name": "AppSpecs",
20-
"type": "all",
21-
"jsSrcsDir": ".",
22-
"android": {
23-
"javaPackageName": "com.facebook.fbreact.specs"
24-
}
18+
"devDependencies": {
19+
"@babel/core": "^7.20.0",
20+
"@babel/preset-env": "^7.20.0",
21+
"@babel/runtime": "^7.20.0",
22+
"@callstack/out-of-tree-platforms": "0.74.0-rc.4",
23+
"@react-native/babel-preset": "0.74.75",
24+
"@react-native/eslint-config": "0.74.75",
25+
"@react-native/metro-config": "0.74.75",
26+
"@react-native/typescript-config": "0.74.75",
27+
"@types/react": "^18.2.6",
28+
"@types/react-test-renderer": "^18.0.0",
29+
"babel-jest": "^29.6.3",
30+
"eslint": "^8.19.0",
31+
"jest": "^29.6.3",
32+
"prettier": "2.8.8",
33+
"react-test-renderer": "18.2.0",
34+
"typescript": "5.0.4"
35+
},
36+
"engines": {
37+
"node": ">=18"
2538
}
2639
}

0 commit comments

Comments
 (0)