react-native-tvos 0.74.1-0 → 0.74.2-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Components/Pressable/Pressable.js +9 -5
- package/Libraries/Components/TextInput/TextInput.js +6 -3
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/Views/ScrollView/RCTScrollView.m +30 -14
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +17 -14
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.cpp +53 -1
- package/cli.js +11 -3
- package/package.json +12 -12
- package/scripts/cocoapods/privacy_manifest_utils.rb +8 -7
- package/scripts/ios-configure-glog.sh +9 -2
- package/scripts/react_native_pods.rb +3 -1
- package/sdks/.hermesversion +1 -1
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/template/package.json +5 -5
- package/types/public/ReactNativeTVTypes.d.ts +2 -2
|
@@ -275,6 +275,9 @@ function Pressable(props: Props, forwardedRef): React.Node {
|
|
|
275
275
|
|
|
276
276
|
const [focused, setFocused] = useState(false);
|
|
277
277
|
|
|
278
|
+
const shouldUpdatePressed =
|
|
279
|
+
typeof children === 'function' || typeof style === 'function';
|
|
280
|
+
|
|
278
281
|
let _accessibilityState = {
|
|
279
282
|
busy: ariaBusy ?? accessibilityState?.busy,
|
|
280
283
|
checked: ariaChecked ?? accessibilityState?.checked,
|
|
@@ -334,7 +337,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
|
|
|
334
337
|
if (android_rippleConfig != null) {
|
|
335
338
|
android_rippleConfig.onPressIn(event);
|
|
336
339
|
}
|
|
337
|
-
setPressed(true);
|
|
340
|
+
shouldUpdatePressed && setPressed(true);
|
|
338
341
|
if (onPressIn != null) {
|
|
339
342
|
onPressIn(event);
|
|
340
343
|
}
|
|
@@ -344,7 +347,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
|
|
|
344
347
|
if (android_rippleConfig != null) {
|
|
345
348
|
android_rippleConfig.onPressOut(event);
|
|
346
349
|
}
|
|
347
|
-
setPressed(false);
|
|
350
|
+
shouldUpdatePressed && setPressed(false);
|
|
348
351
|
if (onPressOut != null) {
|
|
349
352
|
onPressOut(event);
|
|
350
353
|
}
|
|
@@ -369,6 +372,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
|
|
|
369
372
|
onPressOut,
|
|
370
373
|
pressRetentionOffset,
|
|
371
374
|
setPressed,
|
|
375
|
+
shouldUpdatePressed,
|
|
372
376
|
unstable_pressDelay,
|
|
373
377
|
],
|
|
374
378
|
);
|
|
@@ -380,12 +384,12 @@ function Pressable(props: Props, forwardedRef): React.Node {
|
|
|
380
384
|
if (isTVSelectable !== false || focusable !== false) {
|
|
381
385
|
// $FlowFixMe[prop-missing]
|
|
382
386
|
if (evt?.eventType === 'focus') {
|
|
383
|
-
setFocused(true);
|
|
387
|
+
shouldUpdatePressed && setFocused(true);
|
|
384
388
|
onFocus && onFocus(evt);
|
|
385
389
|
// $FlowFixMe[prop-missing]
|
|
386
390
|
} else if (evt.eventType === 'blur') {
|
|
387
391
|
onBlur && onBlur(evt);
|
|
388
|
-
setFocused(false);
|
|
392
|
+
shouldUpdatePressed && setFocused(false);
|
|
389
393
|
}
|
|
390
394
|
}
|
|
391
395
|
// $FlowFixMe[prop-missing]
|
|
@@ -399,7 +403,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
|
|
|
399
403
|
onLongPress && onLongPress(evt);
|
|
400
404
|
}
|
|
401
405
|
},
|
|
402
|
-
[focused, onBlur, onFocus, onLongPress, onPress, focusable, isTVSelectable],
|
|
406
|
+
[focused, onBlur, onFocus, onLongPress, onPress, focusable, isTVSelectable, shouldUpdatePressed],
|
|
403
407
|
);
|
|
404
408
|
|
|
405
409
|
React.useEffect(() => {
|
|
@@ -1136,12 +1136,14 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1136
1136
|
};
|
|
1137
1137
|
|
|
1138
1138
|
const [mostRecentEventCount, setMostRecentEventCount] = useState<number>(0);
|
|
1139
|
-
|
|
1140
1139
|
const [lastNativeText, setLastNativeText] = useState<?Stringish>(props.value);
|
|
1141
1140
|
const [lastNativeSelectionState, setLastNativeSelection] = useState<{|
|
|
1142
|
-
selection:
|
|
1141
|
+
selection: Selection,
|
|
1143
1142
|
mostRecentEventCount: number,
|
|
1144
|
-
|}>({
|
|
1143
|
+
|}>({
|
|
1144
|
+
selection: {start: -1, end: -1},
|
|
1145
|
+
mostRecentEventCount: mostRecentEventCount,
|
|
1146
|
+
});
|
|
1145
1147
|
|
|
1146
1148
|
const lastNativeSelection = lastNativeSelectionState.selection;
|
|
1147
1149
|
|
|
@@ -1506,6 +1508,7 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1506
1508
|
onSelectionChange={_onSelectionChange}
|
|
1507
1509
|
onSelectionChangeShouldSetResponder={emptyFunctionThatReturnsTrue}
|
|
1508
1510
|
selection={selection}
|
|
1511
|
+
selectionColor={selectionColor}
|
|
1509
1512
|
style={StyleSheet.compose(
|
|
1510
1513
|
useMultilineDefaultStyle ? styles.multilineDefault : null,
|
|
1511
1514
|
style,
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -1002,13 +1002,13 @@ RCT_SCROLL_EVENT_HANDLER(scrollViewDidScrollToTop, onScrollToTop)
|
|
|
1002
1002
|
// scroll to bottom
|
|
1003
1003
|
// Similarly for left and right
|
|
1004
1004
|
if (context.focusHeading == UIFocusHeadingUp && self.snapToStart) {
|
|
1005
|
-
[self
|
|
1005
|
+
[self scrollToVerticalOffset:0.0];
|
|
1006
1006
|
} else if(context.focusHeading == UIFocusHeadingDown && self.snapToEnd) {
|
|
1007
|
-
[self
|
|
1007
|
+
[self scrollToVerticalOffset:self.scrollView.contentSize.height];
|
|
1008
1008
|
} else if(context.focusHeading == UIFocusHeadingLeft && self.snapToStart) {
|
|
1009
|
-
[self
|
|
1009
|
+
[self scrollToHorizontalOffset:0.0];
|
|
1010
1010
|
} else if(context.focusHeading == UIFocusHeadingRight && self.snapToEnd) {
|
|
1011
|
-
[self
|
|
1011
|
+
[self scrollToHorizontalOffset:self.scrollView.contentSize.width];
|
|
1012
1012
|
}
|
|
1013
1013
|
|
|
1014
1014
|
}
|
|
@@ -1119,7 +1119,7 @@ RCT_SCROLL_EVENT_HANDLER(scrollViewDidScrollToTop, onScrollToTop)
|
|
|
1119
1119
|
return duration;
|
|
1120
1120
|
}
|
|
1121
1121
|
|
|
1122
|
-
- (void)
|
|
1122
|
+
- (void)scrollToVerticalOffset:(CGFloat)yOffset
|
|
1123
1123
|
{
|
|
1124
1124
|
_blockFirstTouch = NO;
|
|
1125
1125
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
@@ -1133,7 +1133,7 @@ RCT_SCROLL_EVENT_HANDLER(scrollViewDidScrollToTop, onScrollToTop)
|
|
|
1133
1133
|
});
|
|
1134
1134
|
}
|
|
1135
1135
|
|
|
1136
|
-
- (void)
|
|
1136
|
+
- (void)scrollToHorizontalOffset:(CGFloat)xOffset
|
|
1137
1137
|
{
|
|
1138
1138
|
_blockFirstTouch = NO;
|
|
1139
1139
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
@@ -1149,30 +1149,46 @@ RCT_SCROLL_EVENT_HANDLER(scrollViewDidScrollToTop, onScrollToTop)
|
|
|
1149
1149
|
|
|
1150
1150
|
- (void)swipedUp
|
|
1151
1151
|
{
|
|
1152
|
+
if (!self.scrollView.scrollEnabled) {
|
|
1153
|
+
return;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1152
1156
|
CGFloat newOffset = self.scrollView.contentOffset.y - [self swipeVerticalInterval];
|
|
1153
1157
|
NSLog(@"Swiped up to %f", newOffset);
|
|
1154
|
-
[self
|
|
1158
|
+
[self scrollToVerticalOffset:newOffset];
|
|
1155
1159
|
}
|
|
1156
1160
|
|
|
1157
1161
|
- (void)swipedDown
|
|
1158
1162
|
{
|
|
1163
|
+
if (!self.scrollView.scrollEnabled) {
|
|
1164
|
+
return;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1159
1167
|
CGFloat newOffset = self.scrollView.contentOffset.y + [self swipeVerticalInterval];
|
|
1160
1168
|
NSLog(@"Swiped down to %f", newOffset);
|
|
1161
|
-
[self
|
|
1169
|
+
[self scrollToVerticalOffset:newOffset];
|
|
1162
1170
|
}
|
|
1163
1171
|
|
|
1164
1172
|
- (void)swipedLeft
|
|
1165
1173
|
{
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1174
|
+
if (!self.scrollView.scrollEnabled) {
|
|
1175
|
+
return;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
CGFloat newOffset = self.scrollView.contentOffset.x - [self swipeHorizontalInterval];
|
|
1179
|
+
NSLog(@"Swiped left to %f", newOffset);
|
|
1180
|
+
[self scrollToHorizontalOffset:newOffset];
|
|
1169
1181
|
}
|
|
1170
1182
|
|
|
1171
1183
|
- (void)swipedRight
|
|
1172
1184
|
{
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1185
|
+
if (!self.scrollView.scrollEnabled) {
|
|
1186
|
+
return;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
CGFloat newOffset = self.scrollView.contentOffset.x + [self swipeHorizontalInterval];
|
|
1190
|
+
NSLog(@"Swiped right to %f", newOffset);
|
|
1191
|
+
[self scrollToHorizontalOffset:newOffset];
|
|
1176
1192
|
}
|
|
1177
1193
|
|
|
1178
1194
|
- (void)addSwipeGestureRecognizers
|
|
@@ -653,11 +653,12 @@ public class ReactHostImpl implements ReactHost {
|
|
|
653
653
|
ReactContext currentContext = getCurrentReactContext();
|
|
654
654
|
if (currentContext != null) {
|
|
655
655
|
currentContext.onActivityResult(activity, requestCode, resultCode, data);
|
|
656
|
+
} else {
|
|
657
|
+
ReactSoftExceptionLogger.logSoftException(
|
|
658
|
+
TAG,
|
|
659
|
+
new ReactNoCrashSoftException(
|
|
660
|
+
"Tried to access onActivityResult while context is not ready"));
|
|
656
661
|
}
|
|
657
|
-
ReactSoftExceptionLogger.logSoftException(
|
|
658
|
-
TAG,
|
|
659
|
-
new ReactNoCrashSoftException(
|
|
660
|
-
"Tried to access onActivityResult while context is not ready"));
|
|
661
662
|
}
|
|
662
663
|
|
|
663
664
|
/* To be called when focus has changed for the hosting window. */
|
|
@@ -670,11 +671,12 @@ public class ReactHostImpl implements ReactHost {
|
|
|
670
671
|
ReactContext currentContext = getCurrentReactContext();
|
|
671
672
|
if (currentContext != null) {
|
|
672
673
|
currentContext.onWindowFocusChange(hasFocus);
|
|
674
|
+
} else {
|
|
675
|
+
ReactSoftExceptionLogger.logSoftException(
|
|
676
|
+
TAG,
|
|
677
|
+
new ReactNoCrashSoftException(
|
|
678
|
+
"Tried to access onWindowFocusChange while context is not ready"));
|
|
673
679
|
}
|
|
674
|
-
ReactSoftExceptionLogger.logSoftException(
|
|
675
|
-
TAG,
|
|
676
|
-
new ReactNoCrashSoftException(
|
|
677
|
-
"Tried to access onWindowFocusChange while context is not ready"));
|
|
678
680
|
}
|
|
679
681
|
|
|
680
682
|
/* This method will give JS the opportunity to receive intents via Linking.
|
|
@@ -701,10 +703,11 @@ public class ReactHostImpl implements ReactHost {
|
|
|
701
703
|
}
|
|
702
704
|
}
|
|
703
705
|
currentContext.onNewIntent(getCurrentActivity(), intent);
|
|
706
|
+
} else {
|
|
707
|
+
ReactSoftExceptionLogger.logSoftException(
|
|
708
|
+
TAG,
|
|
709
|
+
new ReactNoCrashSoftException("Tried to access onNewIntent while context is not ready"));
|
|
704
710
|
}
|
|
705
|
-
ReactSoftExceptionLogger.logSoftException(
|
|
706
|
-
TAG,
|
|
707
|
-
new ReactNoCrashSoftException("Tried to access onNewIntent while context is not ready"));
|
|
708
711
|
}
|
|
709
712
|
|
|
710
713
|
@ThreadConfined(UI)
|
|
@@ -1523,9 +1526,9 @@ public class ReactHostImpl implements ReactHost {
|
|
|
1523
1526
|
|
|
1524
1527
|
// Step 3: Stop all React Native surfaces
|
|
1525
1528
|
stopAttachedSurfaces(method, reactInstance);
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
+
synchronized (mAttachedSurfaces) {
|
|
1530
|
+
mAttachedSurfaces.clear();
|
|
1531
|
+
}
|
|
1529
1532
|
|
|
1530
1533
|
return task;
|
|
1531
1534
|
},
|
|
@@ -36,6 +36,56 @@ static jsi::Value textInputMetricsPayload(
|
|
|
36
36
|
return payload;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
+
static jsi::Value textInputMetricsScrollPayload(
|
|
40
|
+
jsi::Runtime& runtime,
|
|
41
|
+
const TextInputMetrics& textInputMetrics) {
|
|
42
|
+
auto payload = jsi::Object(runtime);
|
|
43
|
+
|
|
44
|
+
{
|
|
45
|
+
auto contentOffset = jsi::Object(runtime);
|
|
46
|
+
contentOffset.setProperty(runtime, "x", textInputMetrics.contentOffset.x);
|
|
47
|
+
contentOffset.setProperty(runtime, "y", textInputMetrics.contentOffset.y);
|
|
48
|
+
payload.setProperty(runtime, "contentOffset", contentOffset);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
{
|
|
52
|
+
auto contentInset = jsi::Object(runtime);
|
|
53
|
+
contentInset.setProperty(runtime, "top", textInputMetrics.contentInset.top);
|
|
54
|
+
contentInset.setProperty(
|
|
55
|
+
runtime, "left", textInputMetrics.contentInset.left);
|
|
56
|
+
contentInset.setProperty(
|
|
57
|
+
runtime, "bottom", textInputMetrics.contentInset.bottom);
|
|
58
|
+
contentInset.setProperty(
|
|
59
|
+
runtime, "right", textInputMetrics.contentInset.right);
|
|
60
|
+
payload.setProperty(runtime, "contentInset", contentInset);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
{
|
|
64
|
+
auto contentSize = jsi::Object(runtime);
|
|
65
|
+
contentSize.setProperty(
|
|
66
|
+
runtime, "width", textInputMetrics.contentSize.width);
|
|
67
|
+
contentSize.setProperty(
|
|
68
|
+
runtime, "height", textInputMetrics.contentSize.height);
|
|
69
|
+
payload.setProperty(runtime, "contentSize", contentSize);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
{
|
|
73
|
+
auto layoutMeasurement = jsi::Object(runtime);
|
|
74
|
+
layoutMeasurement.setProperty(
|
|
75
|
+
runtime, "width", textInputMetrics.layoutMeasurement.width);
|
|
76
|
+
layoutMeasurement.setProperty(
|
|
77
|
+
runtime, "height", textInputMetrics.layoutMeasurement.height);
|
|
78
|
+
payload.setProperty(runtime, "layoutMeasurement", layoutMeasurement);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
payload.setProperty(
|
|
82
|
+
runtime,
|
|
83
|
+
"zoomScale",
|
|
84
|
+
textInputMetrics.zoomScale ? textInputMetrics.zoomScale : 1);
|
|
85
|
+
|
|
86
|
+
return payload;
|
|
87
|
+
};
|
|
88
|
+
|
|
39
89
|
static jsi::Value textInputMetricsContentSizePayload(
|
|
40
90
|
jsi::Runtime& runtime,
|
|
41
91
|
const TextInputMetrics& textInputMetrics) {
|
|
@@ -140,7 +190,9 @@ void TextInputEventEmitter::onKeyPressSync(
|
|
|
140
190
|
|
|
141
191
|
void TextInputEventEmitter::onScroll(
|
|
142
192
|
const TextInputMetrics& textInputMetrics) const {
|
|
143
|
-
|
|
193
|
+
dispatchEvent("scroll", [textInputMetrics](jsi::Runtime& runtime) {
|
|
194
|
+
return textInputMetricsScrollPayload(runtime, textInputMetrics);
|
|
195
|
+
});
|
|
144
196
|
}
|
|
145
197
|
|
|
146
198
|
void TextInputEventEmitter::dispatchTextInputEvent(
|
package/cli.js
CHANGED
|
@@ -17,6 +17,7 @@ const {get} = require('https');
|
|
|
17
17
|
const {URL} = require('url');
|
|
18
18
|
|
|
19
19
|
const isNpxRuntime = process.env.npm_lifecycle_event === 'npx';
|
|
20
|
+
const isInitCommand = process.argv[2] === 'init';
|
|
20
21
|
const DEFAULT_REGISTRY_HOST =
|
|
21
22
|
process.env.npm_config_registry ?? 'https://registry.npmjs.org/';
|
|
22
23
|
const HEAD = '1000.0.0';
|
|
@@ -44,8 +45,10 @@ async function getLatestVersion(registryHost = DEFAULT_REGISTRY_HOST) {
|
|
|
44
45
|
* @see https://github.com/react-native-community/discussions-and-proposals/tree/main/proposals/0759-react-native-frameworks.md
|
|
45
46
|
*/
|
|
46
47
|
function warnWhenRunningInit() {
|
|
47
|
-
if (
|
|
48
|
-
console.warn(
|
|
48
|
+
if (isInitCommand) {
|
|
49
|
+
console.warn(
|
|
50
|
+
`\nRunning: ${chalk.grey.bold('npx @react-native-community/cli init')}\n`,
|
|
51
|
+
);
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
54
|
|
|
@@ -59,7 +62,12 @@ function warnWhenRunningInit() {
|
|
|
59
62
|
*
|
|
60
63
|
*/
|
|
61
64
|
async function main() {
|
|
62
|
-
if (
|
|
65
|
+
if (
|
|
66
|
+
isNpxRuntime &&
|
|
67
|
+
!process.env.SKIP &&
|
|
68
|
+
currentVersion !== HEAD &&
|
|
69
|
+
isInitCommand
|
|
70
|
+
) {
|
|
63
71
|
try {
|
|
64
72
|
const latest = await getLatestVersion();
|
|
65
73
|
if (latest !== currentVersion) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-tvos",
|
|
3
|
-
"version": "0.74.
|
|
3
|
+
"version": "0.74.2-0",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -108,16 +108,16 @@
|
|
|
108
108
|
},
|
|
109
109
|
"dependencies": {
|
|
110
110
|
"@jest/create-cache-key-function": "^29.6.3",
|
|
111
|
-
"@react-native-community/cli": "13.6.
|
|
112
|
-
"@react-native-community/cli-platform-android": "13.6.
|
|
113
|
-
"@react-native-community/cli-platform-ios": "13.6.
|
|
114
|
-
"@react-native/assets-registry": "0.74.
|
|
115
|
-
"@react-native/codegen": "0.74.
|
|
116
|
-
"@react-native/community-cli-plugin": "0.74.
|
|
117
|
-
"@react-native/gradle-plugin": "0.74.
|
|
118
|
-
"@react-native/js-polyfills": "0.74.
|
|
119
|
-
"@react-native/normalize-colors": "0.74.
|
|
120
|
-
"@react-native-tvos/virtualized-lists": "0.74.
|
|
111
|
+
"@react-native-community/cli": "13.6.8",
|
|
112
|
+
"@react-native-community/cli-platform-android": "13.6.8",
|
|
113
|
+
"@react-native-community/cli-platform-ios": "13.6.8",
|
|
114
|
+
"@react-native/assets-registry": "0.74.84",
|
|
115
|
+
"@react-native/codegen": "0.74.84",
|
|
116
|
+
"@react-native/community-cli-plugin": "0.74.84",
|
|
117
|
+
"@react-native/gradle-plugin": "0.74.84",
|
|
118
|
+
"@react-native/js-polyfills": "0.74.84",
|
|
119
|
+
"@react-native/normalize-colors": "0.74.84",
|
|
120
|
+
"@react-native-tvos/virtualized-lists": "0.74.2-0",
|
|
121
121
|
"abort-controller": "^3.0.0",
|
|
122
122
|
"anser": "^1.4.9",
|
|
123
123
|
"ansi-regex": "^5.0.0",
|
|
@@ -164,6 +164,6 @@
|
|
|
164
164
|
]
|
|
165
165
|
},
|
|
166
166
|
"devDependencies": {
|
|
167
|
-
"react-native-core": "npm:react-native@0.74.
|
|
167
|
+
"react-native-core": "npm:react-native@0.74.2"
|
|
168
168
|
}
|
|
169
169
|
}
|
|
@@ -67,7 +67,7 @@ module PrivacyManifestUtils
|
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
def self.ensure_reference(file_path, user_project, target)
|
|
70
|
-
reference_exists = target.resources_build_phase.files_references.any? { |file_ref| file_ref.path
|
|
70
|
+
reference_exists = target.resources_build_phase.files_references.any? { |file_ref| file_ref.path&.end_with? "PrivacyInfo.xcprivacy" }
|
|
71
71
|
unless reference_exists
|
|
72
72
|
# We try to find the main group, but if it doesn't exist, we default to adding the file to the project root – both work
|
|
73
73
|
file_root = user_project.root_object.main_group.children.find { |group|
|
|
@@ -80,7 +80,7 @@ module PrivacyManifestUtils
|
|
|
80
80
|
|
|
81
81
|
def self.get_privacyinfo_file_path(user_project, targets)
|
|
82
82
|
file_refs = targets.flat_map { |target| target.resources_build_phase.files_references }
|
|
83
|
-
existing_file = file_refs.find { |file_ref| file_ref.path
|
|
83
|
+
existing_file = file_refs.find { |file_ref| file_ref.path&.end_with? "PrivacyInfo.xcprivacy" }
|
|
84
84
|
if existing_file
|
|
85
85
|
return existing_file.real_path
|
|
86
86
|
end
|
|
@@ -108,11 +108,12 @@ module PrivacyManifestUtils
|
|
|
108
108
|
if File.basename(file_path) == 'PrivacyInfo.xcprivacy'
|
|
109
109
|
content = Xcodeproj::Plist.read_from_path(file_path)
|
|
110
110
|
accessed_api_types = content["NSPrivacyAccessedAPITypes"]
|
|
111
|
-
accessed_api_types
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
accessed_api_types&.each do |accessed_api|
|
|
112
|
+
api_type = accessed_api["NSPrivacyAccessedAPIType"]
|
|
113
|
+
reasons = accessed_api["NSPrivacyAccessedAPITypeReasons"]
|
|
114
|
+
next unless api_type
|
|
115
|
+
used_apis[api_type] ||= []
|
|
116
|
+
used_apis[api_type] += reasons
|
|
116
117
|
end
|
|
117
118
|
end
|
|
118
119
|
end
|
|
@@ -42,8 +42,15 @@ EOF
|
|
|
42
42
|
patch -p1 config.sub fix_glog_0.3.5_apple_silicon.patch
|
|
43
43
|
fi
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
XCRUN="$(which xcrun)"
|
|
46
|
+
if [ -n "$XCRUN" ]; then
|
|
47
|
+
export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)"
|
|
48
|
+
export CXX="$CC"
|
|
49
|
+
else
|
|
50
|
+
export CC="$CC:-$(which gcc)"
|
|
51
|
+
export CXX="$CXX:-$(which g++ || true)"
|
|
52
|
+
fi
|
|
53
|
+
export CXX="$CXX:-$CC"
|
|
47
54
|
|
|
48
55
|
# Remove automake symlink if it exists
|
|
49
56
|
if [ -h "test-driver" ]; then
|
|
@@ -297,7 +297,9 @@ def react_native_post_install(
|
|
|
297
297
|
ReactNativePodsUtils.set_use_hermes_build_setting(installer, hermes_enabled)
|
|
298
298
|
ReactNativePodsUtils.set_node_modules_user_settings(installer, react_native_path)
|
|
299
299
|
ReactNativePodsUtils.set_ccache_compiler_and_linker_build_settings(installer, react_native_path, ccache_enabled)
|
|
300
|
-
|
|
300
|
+
if Environment.new().ruby_platform().include?('darwin')
|
|
301
|
+
ReactNativePodsUtils.apply_xcode_15_patch(installer)
|
|
302
|
+
end
|
|
301
303
|
ReactNativePodsUtils.updateOSDeploymentTarget(installer)
|
|
302
304
|
ReactNativePodsUtils.set_dynamic_frameworks_flags(installer)
|
|
303
305
|
ReactNativePodsUtils.add_ndebug_flag_to_pods_in_release(installer)
|
package/sdks/.hermesversion
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
hermes-2024-05-
|
|
1
|
+
hermes-2024-06-05-RNv0.74.2-f007ae633a05700f23f4ef8678958b30600eb0d6
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/template/package.json
CHANGED
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"expo": "^50.0.11",
|
|
15
15
|
"react": "18.2.0",
|
|
16
|
-
"react-native": "npm:react-native-tvos@0.74.
|
|
16
|
+
"react-native": "npm:react-native-tvos@0.74.2-0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@babel/core": "^7.20.0",
|
|
20
20
|
"@babel/preset-env": "^7.20.0",
|
|
21
21
|
"@babel/runtime": "^7.20.0",
|
|
22
|
-
"@react-native/babel-preset": "0.74.
|
|
23
|
-
"@react-native/eslint-config": "0.74.
|
|
24
|
-
"@react-native/metro-config": "0.74.
|
|
25
|
-
"@react-native/typescript-config": "0.74.
|
|
22
|
+
"@react-native/babel-preset": "0.74.84",
|
|
23
|
+
"@react-native/eslint-config": "0.74.84",
|
|
24
|
+
"@react-native/metro-config": "0.74.84",
|
|
25
|
+
"@react-native/typescript-config": "0.74.84",
|
|
26
26
|
"@types/react": "^18.2.6",
|
|
27
27
|
"@types/react-test-renderer": "^18.0.0",
|
|
28
28
|
"babel-jest": "^29.6.3",
|