diff --git a/package.json b/package.json index 56e387b640095a..6b7cb1334f16a1 100644 --- a/package.json +++ b/package.json @@ -104,5 +104,6 @@ }, "resolutions": { "react-is": "19.0.0-rc-fb9a90fa48-20240614" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts b/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts index 0aa50fe80fc277..94ca9f1aafa9e5 100644 --- a/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts +++ b/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts @@ -462,6 +462,9 @@ export interface TextInputKeyPressEventData { export interface TextInputChangeEventData extends TargetedEvent { eventCount: number; text: string; + before: number; + start: number; + count: number; } /** diff --git a/packages/react-native/Libraries/Components/TextInput/TextInput.js b/packages/react-native/Libraries/Components/TextInput/TextInput.js index 8b827ae1cc6969..9468a255042a86 100644 --- a/packages/react-native/Libraries/Components/TextInput/TextInput.js +++ b/packages/react-native/Libraries/Components/TextInput/TextInput.js @@ -1160,7 +1160,7 @@ function InternalTextInput(props: Props): React.Node { selection?.start ?? -1, selection?.end ?? -1, ); - } + console.log('JS -> Native setText:', text); } }, [ mostRecentEventCount, inputRef, @@ -1266,6 +1266,7 @@ function InternalTextInput(props: Props): React.Node { return; } + console.log('native -> JS onChange:', currentText, { eventCount: event.nativeEvent.eventCount }); setLastNativeText(currentText); // This must happen last, after we call setLastNativeText. // Different ordering can cause bugs when editing AndroidTextInputs diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm index 51914b7448e837..6dccdcceefe746 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm @@ -57,6 +57,10 @@ @implementation RCTTextInputComponentView { */ BOOL _comingFromJS; BOOL _didMoveToWindow; + + NSInteger changeStart; + NSInteger changeBefore; + NSInteger changeCount; } #pragma mark - UIView overrides @@ -327,6 +331,10 @@ - (void)textInputDidReturn - (NSString *)textInputShouldChangeText:(NSString *)text inRange:(NSRange)range { const auto &props = static_cast(*_props); + + changeStart = range.location; + changeBefore = range.length; + changeCount = text.length; if (!_backedTextInputView.textWasPasted) { if (_eventEmitter) { @@ -575,6 +583,9 @@ - (void)handleInputAccessoryDoneButton return { .text = RCTStringFromNSString(_backedTextInputView.attributedText.string), .selectionRange = [self _selectionRange], + .count = static_cast(changeCount), + .before = static_cast(changeBefore), + .start = static_cast(changeStart), .eventCount = static_cast(_mostRecentEventCount), .contentOffset = RCTPointFromCGPoint(_backedTextInputView.contentOffset), .contentInset = RCTEdgeInsetsFromUIEdgeInsets(_backedTextInputView.contentInset), diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java index d2ef20074c2a1f..48b03998b71121 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java @@ -66,7 +66,7 @@ public class NativeViewHierarchyManager { private static final String TAG = NativeViewHierarchyManager.class.getSimpleName(); - private final boolean DEBUG_MODE = ReactBuildConfig.DEBUG && false; + private final boolean DEBUG_MODE = ReactBuildConfig.DEBUG && true; private final SparseArray mTagsToViews; private final SparseArray mTagsToViewManagers; diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java index 92cd700113c86e..4cbd45ec557a15 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java @@ -27,6 +27,7 @@ import android.text.TextWatcher; import android.text.method.KeyListener; import android.text.method.QwertyKeyListener; +import android.util.Log; import android.util.TypedValue; import android.view.ActionMode; import android.view.Gravity; @@ -87,7 +88,7 @@ public class ReactEditText extends AppCompatEditText { private final InputMethodManager mInputMethodManager; private final String TAG = ReactEditText.class.getSimpleName(); - public static final boolean DEBUG_MODE = ReactBuildConfig.DEBUG && false; + public static final boolean DEBUG_MODE = ReactBuildConfig.DEBUG && true; // This flag is set to true when we set the text of the EditText explicitly. In that case, no // *TextChanged events should be triggered. This is less expensive than removing the text @@ -624,12 +625,14 @@ public int incrementAndGetEventCounter() { } public void maybeSetTextFromJS(ReactTextUpdate reactTextUpdate) { + FLog.e(TAG, "maybeSetTextFromJS text: '" + reactTextUpdate.getText() + "'"); mIsSettingTextFromJS = true; maybeSetText(reactTextUpdate); mIsSettingTextFromJS = false; } public void maybeSetTextFromState(ReactTextUpdate reactTextUpdate) { + FLog.e(TAG, "maybeSetTextFromState text: '" + reactTextUpdate.getText() + "'"); mIsSettingTextFromState = true; maybeSetText(reactTextUpdate); mIsSettingTextFromState = false; @@ -646,7 +649,9 @@ public void maybeSetText(ReactTextUpdate reactTextUpdate) { } // Only set the text if it is up to date. - if (!canUpdateWithEventCount(reactTextUpdate.getJsEventCounter())) { + int jsEventCounter = reactTextUpdate.getJsEventCounter(); + if (!canUpdateWithEventCount(jsEventCounter)) { + Log.e(TAG, String.format("Skip update, js event counter is lagging behind. JS: %d native: %d", jsEventCounter, mNativeEventCount)); return; } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextChangedEvent.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextChangedEvent.java index 4540b90abc2b4b..c44a11f1b56887 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextChangedEvent.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextChangedEvent.java @@ -23,16 +23,23 @@ public class ReactTextChangedEvent extends Event { private String mText; private int mEventCount; + // See https://developer.android.com/reference/android/text/TextWatcher#onTextChanged(java.lang.CharSequence,%20int,%20int,%20int) + private int mStart; + private int mCount; + private int mBefore; @Deprecated - public ReactTextChangedEvent(int viewId, String text, int eventCount) { - this(ViewUtil.NO_SURFACE_ID, viewId, text, eventCount); + public ReactTextChangedEvent(int viewId, String text, int eventCount, int start, int count, int before) { + this(ViewUtil.NO_SURFACE_ID, viewId, text, eventCount, start, count, before); } - public ReactTextChangedEvent(int surfaceId, int viewId, String text, int eventCount) { + public ReactTextChangedEvent(int surfaceId, int viewId, String text, int eventCount, int start, int count, int before) { super(surfaceId, viewId); mText = text; mEventCount = eventCount; + mStart = start; + mCount = count; + mBefore = before; } @Override @@ -47,6 +54,9 @@ protected WritableMap getEventData() { eventData.putString("text", mText); eventData.putInt("eventCount", mEventCount); eventData.putInt("target", getViewTag()); + eventData.putInt("start", mStart); + eventData.putInt("count", mCount); + eventData.putInt("before", mBefore); return eventData; } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java index a0e92290e417c6..b22b0887deb19f 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java @@ -315,6 +315,7 @@ public void receiveCommand( if (!args.isNull(1)) { String text = args.getString(1); + FLog.e("ReactEditText", "receive command text: '"+text+"'"); reactEditText.maybeSetTextFromJS(getReactTextUpdate(text, mostRecentEventCount)); } reactEditText.maybeSetSelection(mostRecentEventCount, start, end); @@ -326,6 +327,7 @@ private ReactTextUpdate getReactTextUpdate(String text, int mostRecentEventCount SpannableStringBuilder sb = new SpannableStringBuilder(); sb.append(TextTransform.apply(text, TextTransform.UNSET)); + FLog.e("ReactEditText", "getReactTextUpdate: '"+sb.toString()+"'"); return new ReactTextUpdate( sb, mostRecentEventCount, false, 0, 0, 0, 0, Gravity.NO_GRAVITY, 0, 0); } @@ -1118,7 +1120,13 @@ public void onTextChanged(CharSequence s, int start, int before, int count) { mSurfaceId, mEditText.getId(), s.toString(), - mEditText.incrementAndGetEventCounter())); + mEditText.incrementAndGetEventCounter(), + start, + count, + before + ) + ); + FLog.e("ReactTextInputManager", String.format("Dispatched event to JS with text '%s'", s)); } @Override @@ -1356,6 +1364,8 @@ public Object updateState( view.setPadding(0, 0, 0, 0); } + // TODO: why do we do that here? The wrapper is already a ref taken from the view ... + // Ah, we do that here, because we receive the state wrapper as parameter view.setStateWrapper(stateWrapper); MapBuffer stateMapBuffer = stateWrapper.getStateDataMapBuffer(); @@ -1387,6 +1397,7 @@ public Object updateState( int currentJustificationMode = Build.VERSION.SDK_INT < Build.VERSION_CODES.O ? 0 : view.getJustificationMode(); + FLog.e("ReactTextInputManager", String.format("getReactTextUpdate text: '%s'", spanned.toString())); return ReactTextUpdate.buildReactTextUpdateFromState( spanned, state.getInt(TX_STATE_KEY_MOST_RECENT_EVENT_COUNT), diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.cpp b/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.cpp index c2262b0326793c..4f43349cba936c 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.cpp @@ -20,6 +20,9 @@ static jsi::Value textInputMetricsPayload( jsi::String::createFromUtf8(runtime, textInputMetrics.text)); payload.setProperty(runtime, "eventCount", textInputMetrics.eventCount); + payload.setProperty(runtime, "start", textInputMetrics.start); + payload.setProperty(runtime, "count", textInputMetrics.count); + payload.setProperty(runtime, "before", textInputMetrics.before); { auto selection = jsi::Object(runtime); diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.h index 9182dd3d2edccb..c6e7b8e2bb2703 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.h @@ -19,6 +19,9 @@ class TextInputEventEmitter : public ViewEventEmitter { struct Metrics { std::string text; AttributedString::Range selectionRange; + int count; + int start; + int before; // ScrollView-like metrics Size contentSize; Point contentOffset; diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 07b5b5b40b7d4e..7ef3b7d7bedbb4 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -58,6 +58,27 @@ PODS: - ReactCommon/turbomodule/core - Yoga - OCMock (3.9.1) + - OSSLibraryExample (0.0.1): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - RCT-Folly (2024.01.01.00): - boost - DoubleConversion @@ -378,6 +399,31 @@ PODS: - React-perflogger (= 1000.0.0) - React-runtimeexecutor (= 1000.0.0) - React-debug (1000.0.0) + - React-defaultsnativemodule (1000.0.0): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-debug + - React-domnativemodule + - React-Fabric + - React-featureflags + - React-featureflagsnativemodule + - React-graphics + - React-idlecallbacksnativemodule + - React-ImageManager + - React-microtasksnativemodule + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - React-domnativemodule (1000.0.0): - DoubleConversion - glog @@ -388,9 +434,7 @@ PODS: - React-Core - React-debug - React-Fabric - - React-Fabric/components/root - - React-Fabric/dom - - React-Fabric/uimanager + - React-FabricComponents - React-featureflags - React-graphics - React-ImageManager @@ -423,10 +467,10 @@ PODS: - React-Fabric/imagemanager (= 1000.0.0) - React-Fabric/leakchecker (= 1000.0.0) - React-Fabric/mounting (= 1000.0.0) + - React-Fabric/observers (= 1000.0.0) - React-Fabric/scheduler (= 1000.0.0) - React-Fabric/telemetry (= 1000.0.0) - React-Fabric/templateprocessor (= 1000.0.0) - - React-Fabric/textlayoutmanager (= 1000.0.0) - React-Fabric/uimanager (= 1000.0.0) - React-featureflags - React-graphics @@ -528,17 +572,8 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/components/inputaccessory (= 1000.0.0) - - React-Fabric/components/iostextinput (= 1000.0.0) - React-Fabric/components/legacyviewmanagerinterop (= 1000.0.0) - - React-Fabric/components/modal (= 1000.0.0) - - React-Fabric/components/rncore (= 1000.0.0) - React-Fabric/components/root (= 1000.0.0) - - React-Fabric/components/safeareaview (= 1000.0.0) - - React-Fabric/components/scrollview (= 1000.0.0) - - React-Fabric/components/text (= 1000.0.0) - - React-Fabric/components/textinput (= 1000.0.0) - - React-Fabric/components/unimplementedview (= 1000.0.0) - React-Fabric/components/view (= 1000.0.0) - React-featureflags - React-graphics @@ -549,7 +584,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/inputaccessory (1000.0.0): + - React-Fabric/components/legacyviewmanagerinterop (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -569,7 +604,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/iostextinput (1000.0.0): + - React-Fabric/components/root (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -589,7 +624,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/legacyviewmanagerinterop (1000.0.0): + - React-Fabric/components/view (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -609,7 +644,8 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/modal (1000.0.0): + - Yoga + - React-Fabric/core (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -629,7 +665,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/rncore (1000.0.0): + - React-Fabric/dom (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -649,7 +685,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/root (1000.0.0): + - React-Fabric/imagemanager (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -669,7 +705,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/safeareaview (1000.0.0): + - React-Fabric/leakchecker (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -689,7 +725,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/scrollview (1000.0.0): + - React-Fabric/mounting (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -709,7 +745,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/text (1000.0.0): + - React-Fabric/observers (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -720,6 +756,7 @@ PODS: - React-Core - React-cxxreact - React-debug + - React-Fabric/observers/events (= 1000.0.0) - React-featureflags - React-graphics - React-jsi @@ -729,7 +766,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/textinput (1000.0.0): + - React-Fabric/observers/events (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -749,7 +786,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/unimplementedview (1000.0.0): + - React-Fabric/scheduler (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -760,16 +797,58 @@ PODS: - React-Core - React-cxxreact - React-debug + - React-Fabric/observers/events - React-featureflags - React-graphics - React-jsi - React-jsiexecutor - React-logger + - React-performancetimeline - React-rendererdebug - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/view (1000.0.0): + - React-Fabric/telemetry (1000.0.0): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/templateprocessor (1000.0.0): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/uimanager (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -780,17 +859,64 @@ PODS: - React-Core - React-cxxreact - React-debug + - React-Fabric/uimanager/consistency (= 1000.0.0) - React-featureflags - React-graphics - React-jsi - React-jsiexecutor - React-logger + - React-rendererconsistency - React-rendererdebug - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core + - React-Fabric/uimanager/consistency (1000.0.0): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererconsistency + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-FabricComponents (1000.0.0): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-Fabric + - React-FabricComponents/components (= 1000.0.0) + - React-FabricComponents/textlayoutmanager (= 1000.0.0) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/core - Yoga - - React-Fabric/core (1000.0.0): + - React-FabricComponents/components (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -801,6 +927,16 @@ PODS: - React-Core - React-cxxreact - React-debug + - React-Fabric + - React-FabricComponents/components/inputaccessory (= 1000.0.0) + - React-FabricComponents/components/iostextinput (= 1000.0.0) + - React-FabricComponents/components/modal (= 1000.0.0) + - React-FabricComponents/components/rncore (= 1000.0.0) + - React-FabricComponents/components/safeareaview (= 1000.0.0) + - React-FabricComponents/components/scrollview (= 1000.0.0) + - React-FabricComponents/components/text (= 1000.0.0) + - React-FabricComponents/components/textinput (= 1000.0.0) + - React-FabricComponents/components/unimplementedview (= 1000.0.0) - React-featureflags - React-graphics - React-jsi @@ -809,8 +945,10 @@ PODS: - React-rendererdebug - React-runtimescheduler - React-utils + - ReactCodegen - ReactCommon/turbomodule/core - - React-Fabric/dom (1000.0.0): + - Yoga + - React-FabricComponents/components/inputaccessory (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -821,9 +959,7 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/components/root - - React-Fabric/components/text - - React-Fabric/core + - React-Fabric - React-featureflags - React-graphics - React-jsi @@ -832,8 +968,10 @@ PODS: - React-rendererdebug - React-runtimescheduler - React-utils + - ReactCodegen - ReactCommon/turbomodule/core - - React-Fabric/imagemanager (1000.0.0): + - Yoga + - React-FabricComponents/components/iostextinput (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -844,6 +982,7 @@ PODS: - React-Core - React-cxxreact - React-debug + - React-Fabric - React-featureflags - React-graphics - React-jsi @@ -852,8 +991,10 @@ PODS: - React-rendererdebug - React-runtimescheduler - React-utils + - ReactCodegen - ReactCommon/turbomodule/core - - React-Fabric/leakchecker (1000.0.0): + - Yoga + - React-FabricComponents/components/modal (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -864,6 +1005,7 @@ PODS: - React-Core - React-cxxreact - React-debug + - React-Fabric - React-featureflags - React-graphics - React-jsi @@ -872,8 +1014,10 @@ PODS: - React-rendererdebug - React-runtimescheduler - React-utils + - ReactCodegen - ReactCommon/turbomodule/core - - React-Fabric/mounting (1000.0.0): + - Yoga + - React-FabricComponents/components/rncore (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -884,6 +1028,7 @@ PODS: - React-Core - React-cxxreact - React-debug + - React-Fabric - React-featureflags - React-graphics - React-jsi @@ -892,8 +1037,10 @@ PODS: - React-rendererdebug - React-runtimescheduler - React-utils + - ReactCodegen - ReactCommon/turbomodule/core - - React-Fabric/scheduler (1000.0.0): + - Yoga + - React-FabricComponents/components/safeareaview (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -904,6 +1051,7 @@ PODS: - React-Core - React-cxxreact - React-debug + - React-Fabric - React-featureflags - React-graphics - React-jsi @@ -912,8 +1060,10 @@ PODS: - React-rendererdebug - React-runtimescheduler - React-utils + - ReactCodegen - ReactCommon/turbomodule/core - - React-Fabric/telemetry (1000.0.0): + - Yoga + - React-FabricComponents/components/scrollview (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -924,6 +1074,7 @@ PODS: - React-Core - React-cxxreact - React-debug + - React-Fabric - React-featureflags - React-graphics - React-jsi @@ -932,8 +1083,10 @@ PODS: - React-rendererdebug - React-runtimescheduler - React-utils + - ReactCodegen - ReactCommon/turbomodule/core - - React-Fabric/templateprocessor (1000.0.0): + - Yoga + - React-FabricComponents/components/text (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -944,6 +1097,7 @@ PODS: - React-Core - React-cxxreact - React-debug + - React-Fabric - React-featureflags - React-graphics - React-jsi @@ -952,8 +1106,10 @@ PODS: - React-rendererdebug - React-runtimescheduler - React-utils + - ReactCodegen - ReactCommon/turbomodule/core - - React-Fabric/textlayoutmanager (1000.0.0): + - Yoga + - React-FabricComponents/components/textinput (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -964,7 +1120,7 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/uimanager + - React-Fabric - React-featureflags - React-graphics - React-jsi @@ -973,8 +1129,10 @@ PODS: - React-rendererdebug - React-runtimescheduler - React-utils + - ReactCodegen - ReactCommon/turbomodule/core - - React-Fabric/uimanager (1000.0.0): + - Yoga + - React-FabricComponents/components/unimplementedview (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -985,19 +1143,19 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/dom - - React-Fabric/uimanager/consistency (= 1000.0.0) + - React-Fabric - React-featureflags - React-graphics - React-jsi - React-jsiexecutor - React-logger - - React-rendererconsistency - React-rendererdebug - React-runtimescheduler - React-utils + - ReactCodegen - ReactCommon/turbomodule/core - - React-Fabric/uimanager/consistency (1000.0.0): + - Yoga + - React-FabricComponents/textlayoutmanager (1000.0.0): - DoubleConversion - fmt (= 9.1.0) - glog @@ -1008,17 +1166,18 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/dom + - React-Fabric - React-featureflags - React-graphics - React-jsi - React-jsiexecutor - React-logger - - React-rendererconsistency - React-rendererdebug - React-runtimescheduler - React-utils + - ReactCodegen - ReactCommon/turbomodule/core + - Yoga - React-FabricImage (1000.0.0): - DoubleConversion - fmt (= 9.1.0) @@ -1079,6 +1238,28 @@ PODS: - React-jsinspector - React-perflogger (= 1000.0.0) - React-runtimeexecutor + - React-idlecallbacksnativemodule (1000.0.0): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - React-ImageManager (1000.0.0): - glog - RCT-Folly/Fabric @@ -1116,6 +1297,7 @@ PODS: - RCT-Folly (= 2024.01.01.00) - React-featureflags - React-jsi + - React-perflogger (= 1000.0.0) - React-runtimeexecutor (= 1000.0.0) - React-jsitracing (1000.0.0): - React-jsi @@ -1157,7 +1339,12 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (1000.0.0) + - React-perflogger (1000.0.0): + - DoubleConversion + - RCT-Folly (= 2024.01.01.00) + - React-performancetimeline (1000.0.0): + - RCT-Folly (= 2024.01.01.00) + - React-cxxreact - React-RCTActionSheet (1000.0.0): - React-Core/RCTActionSheetHeaders (= 1000.0.0) - React-RCTAnimation (1000.0.0): @@ -1175,13 +1362,11 @@ PODS: - React-Core - React-CoreModules - React-debug - - React-domnativemodule + - React-defaultsnativemodule - React-Fabric - React-featureflags - - React-featureflagsnativemodule - React-graphics - React-hermes - - React-microtasksnativemodule - React-nativeconfig - React-NativeModulesApple - React-RCTFabric @@ -1215,6 +1400,7 @@ PODS: - React-Core - React-debug - React-Fabric + - React-FabricComponents - React-FabricImage - React-featureflags - React-graphics @@ -1222,6 +1408,7 @@ PODS: - React-jsi - React-jsinspector - React-nativeconfig + - React-performancetimeline - React-RCTImage - React-RCTText - React-rendererconsistency @@ -1459,6 +1646,7 @@ DEPENDENCIES: - MyNativeView (from `NativeComponentExample`) - NativeCxxModuleExample (from `NativeCxxModuleExample`) - OCMock (~> 3.9.1) + - OSSLibraryExample (from `../react-native-test-library`) - RCT-Folly (from `../react-native/third-party-podspecs/RCT-Folly.podspec`) - RCT-Folly/Fabric (from `../react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTDeprecation (from `../react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation`) @@ -1471,13 +1659,16 @@ DEPENDENCIES: - React-CoreModules (from `../react-native/React/CoreModules`) - React-cxxreact (from `../react-native/ReactCommon/cxxreact`) - React-debug (from `../react-native/ReactCommon/react/debug`) + - React-defaultsnativemodule (from `../react-native/ReactCommon/react/nativemodule/defaults`) - React-domnativemodule (from `../react-native/ReactCommon/react/nativemodule/dom`) - React-Fabric (from `../react-native/ReactCommon`) + - React-FabricComponents (from `../react-native/ReactCommon`) - React-FabricImage (from `../react-native/ReactCommon`) - React-featureflags (from `../react-native/ReactCommon/react/featureflags`) - React-featureflagsnativemodule (from `../react-native/ReactCommon/react/nativemodule/featureflags`) - React-graphics (from `../react-native/ReactCommon/react/renderer/graphics`) - React-hermes (from `../react-native/ReactCommon/hermes`) + - React-idlecallbacksnativemodule (from `../react-native/ReactCommon/react/nativemodule/idlecallbacks`) - React-ImageManager (from `../react-native/ReactCommon/react/renderer/imagemanager/platform/ios`) - React-jserrorhandler (from `../react-native/ReactCommon/jserrorhandler`) - React-jsi (from `../react-native/ReactCommon/jsi`) @@ -1490,6 +1681,7 @@ DEPENDENCIES: - React-nativeconfig (from `../react-native/ReactCommon`) - React-NativeModulesApple (from `../react-native/ReactCommon/react/nativemodule/core/platform/ios`) - React-perflogger (from `../react-native/ReactCommon/reactperflogger`) + - React-performancetimeline (from `../react-native/ReactCommon/react/performance/timeline`) - React-RCTActionSheet (from `../react-native/Libraries/ActionSheetIOS`) - React-RCTAnimation (from `../react-native/Libraries/NativeAnimation`) - React-RCTAppDelegate (from `../react-native/Libraries/AppDelegate`) @@ -1541,6 +1733,8 @@ EXTERNAL SOURCES: :path: NativeComponentExample NativeCxxModuleExample: :path: NativeCxxModuleExample + OSSLibraryExample: + :path: "../react-native-test-library" RCT-Folly: :podspec: "../react-native/third-party-podspecs/RCT-Folly.podspec" RCTDeprecation: @@ -1561,10 +1755,14 @@ EXTERNAL SOURCES: :path: "../react-native/ReactCommon/cxxreact" React-debug: :path: "../react-native/ReactCommon/react/debug" + React-defaultsnativemodule: + :path: "../react-native/ReactCommon/react/nativemodule/defaults" React-domnativemodule: :path: "../react-native/ReactCommon/react/nativemodule/dom" React-Fabric: :path: "../react-native/ReactCommon" + React-FabricComponents: + :path: "../react-native/ReactCommon" React-FabricImage: :path: "../react-native/ReactCommon" React-featureflags: @@ -1575,6 +1773,8 @@ EXTERNAL SOURCES: :path: "../react-native/ReactCommon/react/renderer/graphics" React-hermes: :path: "../react-native/ReactCommon/hermes" + React-idlecallbacksnativemodule: + :path: "../react-native/ReactCommon/react/nativemodule/idlecallbacks" React-ImageManager: :path: "../react-native/ReactCommon/react/renderer/imagemanager/platform/ios" React-jserrorhandler: @@ -1599,6 +1799,8 @@ EXTERNAL SOURCES: :path: "../react-native/ReactCommon/react/nativemodule/core/platform/ios" React-perflogger: :path: "../react-native/ReactCommon/reactperflogger" + React-performancetimeline: + :path: "../react-native/ReactCommon/react/performance/timeline" React-RCTActionSheet: :path: "../react-native/Libraries/ActionSheetIOS" React-RCTAnimation: @@ -1655,73 +1857,78 @@ EXTERNAL SOURCES: :path: "../react-native/ReactCommon/yoga" SPEC CHECKSUMS: - boost: b6c2ab552684b545148f00ac9e0bb243cc0a43f5 + boost: 4cb898d0bf20404aab1850c656dcea009429d6c1 DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 - FBLazyVector: f4492a543c5a8fa1502d3a5867e3f7252497cfe8 + FBLazyVector: 82a5f7de4dad2fc6ee2f64ab18276ff9e3c571b0 fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120 - glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: 221c62bc31d84593845e639e3288c6f64abc75ac + glog: 69ef571f3de08433d766d614c73a9838a06bf7eb + hermes-engine: a1e13825c5b3033f51ca8764bbb1f0bc18ec2406 MyNativeView: 1314dd52cc27c4a26957a5185aae6ecac6e4e2ff NativeCxxModuleExample: 65632ba6e8c216048f7af7d3c7bb1431d22bc2d0 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 - RCT-Folly: 02617c592a293bd6d418e0a88ff4ee1f88329b47 + OSSLibraryExample: 1bb0b5738f855e16ca3d5c60aaadfc7342cbf25d + RCT-Folly: 4464f4d875961fce86008d45f4ecf6cef6de0740 RCTDeprecation: 3808e36294137f9ee5668f4df2e73dc079cd1dcf - RCTRequired: 82c56a03b3efd524bfdb581a906add903f78f978 - RCTTypeSafety: 5f57d4ae5dfafc85a0f575d756c909b584722c52 - React: cb6dc75e09f32aeddb4d8fb58a394a67219a92fe - React-callinvoker: bae59cbd6affd712bbfc703839dad868ff35069d - React-Core: 738c8db837b21aae813479f2eb284d5507a5c256 - React-CoreModules: 7647d54882adb778c614ac0053865ef1f92eb211 - React-cxxreact: 73a61f1e212fa084d3ae19a4ee4e3531aff646a9 - React-debug: 296b501a90c41f83961f58c6d96a01330d499da5 - React-domnativemodule: d38559c0807e0694565b806f347a465a2486a30e - React-Fabric: 1ea5efc1cd04fd179021a481a82773bb6574f46a - React-FabricImage: da62cc5089fe6bdaa6ec0ab6ccca75c7d679065d - React-featureflags: 23f83a12963770bf3cff300e8990678192436b36 - React-featureflagsnativemodule: 7f69e5d1ddaf2dacd69ba0d75faf396c5f148508 - React-graphics: 62a954b0806e51009878ea1a65497bb3f5e32968 - React-hermes: 65dd94615e5cb47f0f2f7510231f80c65abf338c - React-ImageManager: 716592dcbe11a4960e1eb3d82adb264ee15b5f6d - React-jserrorhandler: 3dded3f19f30d85a3eb7c866921edbe954ca6439 - React-jsi: fe80ef997eef6f16a7ee40b585db2b6013d51db8 - React-jsiexecutor: 42eeb6b4e73e1b50caa3940ad0189171723c6b29 - React-jsinspector: 8c41e3113f94f08385a730aff19eb16af810c82d - React-jsitracing: dd08057dd5b74119cb406beb42028da85ed5b8a5 - React-logger: 8486d7a1d32b972414b1d34a93470ee2562c6ee2 - React-Mapbuffer: fd0d0306c1c4326be5f18a61e978d32a66b20a85 - React-microtasksnativemodule: 0f4976afa97a9e6cac7e8ec7bf15b856c690c4d9 - React-nativeconfig: 40a2c848083ef4065c163c854e1c82b5f9e9db84 - React-NativeModulesApple: 48f0205edc54b8a1c24328f2deeb74b4f1570418 - React-perflogger: 70d009f755dd10002183454cdf5ad9b22de4a1d7 - React-RCTActionSheet: 943bd5f540f3af1e5a149c13c4de81858edf718a - React-RCTAnimation: 4d88a95a05dbb9a5cbc9a55e08f1a79364aeb206 - React-RCTAppDelegate: 937edc1048069bc6ff393d594a258bd50a35b90d - React-RCTBlob: 74c2fa0adba3a2e4ebbc4f9fc4ec3c3691b93854 - React-RCTFabric: 88e94c937c676ef00351244e8043908ba5b43e81 - React-RCTImage: 2413fa5ca25235b878fb2694115b26b176280f31 - React-RCTLinking: 7c821b30c5b4401037ed3da63f9580ac42b9e02e - React-RCTNetwork: a556f5005d28d99df0b577d9ef8b28f29c0ff498 - React-RCTPushNotification: c0871d7ebfd7832a5763b571f68b936772654ed3 - React-RCTSettings: 25141964d76155f25dd993b87345656a29dd0d24 - React-RCTTest: 3b9f62c66c3814ccace402441597160aefc9e812 - React-RCTText: d9925903524a7b179cf7803162a98038e0bfb4fd - React-RCTVibration: 63e015aa41be5e956440ebe8b8796f56ddd1acc8 - React-rendererconsistency: e4c6cb78c9cf114b3f3371f5e133c2db025951ef - React-rendererdebug: 0abbd75e947eeae23542f3bf7491b048ae063141 - React-rncore: e903b3d2819a25674403c548ec103f34bf02ba2b - React-RuntimeApple: b43ad6a5d60157f37ff3139e4dfb0cd6340e9be6 - React-RuntimeCore: 7cfdac312222d7260d8ba9604686fbb4aa4f8a13 - React-runtimeexecutor: e1c32bc249dd3cf3919cb4664fd8dc84ef70cff7 - React-RuntimeHermes: b19a99a600c6e1e33d7796cb91a5c76f92bd3407 - React-runtimescheduler: ca22ce34a60276d228399191dd039929cc9c6bc1 - React-utils: f5525c0072f467cf2f25bdd8dbbf0835f6384972 + RCTRequired: 50345eff6510c5e2b918e35636cddf16734eea58 + RCTTypeSafety: 9636bb02b22ffac1e9464c1aee4605775d980bf9 + React: 9e7bbd92fe78158f16d29576b6f44f3fdc462fdf + React-callinvoker: c5537e1db8db60a2f81edf50c6144bb99ea7524c + React-Core: d40fbe2e4314788f23544feeb0ba695560ac3994 + React-CoreModules: c1482733874c2b621a282c198521df26461406e1 + React-cxxreact: 0b70b17d02d1bd36c89575d960d6ca617d0a9c3a + React-debug: 6062f835311f398ab4de1dfbfa3e80f3f2d494a7 + React-defaultsnativemodule: 5a40a3c471ec836ab8cca3fb0cbad2ad4d46b6bf + React-domnativemodule: a0118a3025f2fecc4179bb0e9e2f631953f337f6 + React-Fabric: 58ca929ae4699f061cdf34fc332459ced5f48782 + React-FabricComponents: cef4f25a96cc6785bdcc6fd3fdf9fede60e39dad + React-FabricImage: 9e65f718380a83a136b6e1c2151d1265f0ce538a + React-featureflags: 9afc0d175b8e869d5c910927f773ad0416a969ce + React-featureflagsnativemodule: a56f9f21f7f09c45f617bb4640e710f656796586 + React-graphics: fefd11754ac4d66e6fcbad5b182d9ae0cfdc3581 + React-hermes: 3807dc715f05c282e2ee0df9fa2bdd7dfd0f7ef9 + React-idlecallbacksnativemodule: f5c8864a142c693097f95ad695dd77cccdf9b1d4 + React-ImageManager: 72fb8334924095918fa4bee271692b0604521021 + React-jserrorhandler: 783d3cdc0dad067e77009bff4f775d088190af37 + React-jsi: 0f48fffb718ccabd71aeef657fe7d8af6e949f48 + React-jsiexecutor: 4ebe76dc953a0a00711a4a958db8f29d3c1dbf09 + React-jsinspector: c665475367cb53c85b7af096fbf95958838cfb76 + React-jsitracing: d61774d1509cf26dc274a5d2f4a53ed3fbac6d22 + React-logger: 574657d997de31f3eacbc633cf4fa5af78420766 + React-Mapbuffer: bd894267a5d54fc27d13032b8b04fe76f4ff33fe + React-microtasksnativemodule: 42f5078c754fb37a310c59642397954578f3ed10 + React-nativeconfig: efe60dc6e0a7dc503fa08795a35b514de70a88bf + React-NativeModulesApple: a9255d2ddf5c59011e93b77d073b9c1afde43f15 + React-perflogger: b87830e5510888e6a957adad94e71a8fcb28d593 + React-performancetimeline: 400774799d4ef078a0308343eb09539ad8e15e6c + React-RCTActionSheet: 749c7be8f4fc1978937aaa40dca7f81ffd2beb48 + React-RCTAnimation: 8e6cbd1c322a84dbeaa5c74e2bdf9c698b98c2c7 + React-RCTAppDelegate: 168f850c586c07427cf206d074dbe188cd9ee7a8 + React-RCTBlob: 1e3caff02209d1447d65dbf50bd4bcefc4bb04ea + React-RCTFabric: 3e92c736a8138ffe2310f348f023d4f72866a8e1 + React-RCTImage: c1fce518f1db1729d0e34929337c7f1140f67cfb + React-RCTLinking: fe1071b903fae2deb796ac7052a8d01e0194c772 + React-RCTNetwork: 3432eed2cfcd10193fc323166fd712017b7bc51e + React-RCTPushNotification: 79fa6cfafc247b6c5318a8459f246d16adc4b2f7 + React-RCTSettings: a0eb50faedb3dd4cc03477e17e299df66bb2ac22 + React-RCTTest: 7c0446993b348f163169860b9deb66f9310ea2ea + React-RCTText: ad7a1595bc1b04a5c57d8ef3ff80f04405d6d9d3 + React-RCTVibration: cca3d9a52a2856dfc47c398fbfd6df55ce5ef293 + React-rendererconsistency: 80181d4e57381cce9012bea46bdeafe5170eae8d + React-rendererdebug: a67caf84865da33feb243d81555c949a5c8609a1 + React-rncore: 03cb8a4335d02f4c844063aa3f1c684a98484e8b + React-RuntimeApple: 93fe13b0802cdf2388d263f1de95626a223f5d9f + React-RuntimeCore: 1ea9ca0c41a6205b64aa92edb1f64809f28fe5ff + React-runtimeexecutor: 4faf21f458e10096ef33b7b3b99b19b3ff2c4704 + React-RuntimeHermes: 213c987bde8febf5572afb3c4a3d8bdf345b5bf4 + React-runtimescheduler: b1161f90118a3465a5adf28d1f3b5ed7157e61ac + React-utils: 247fe1d45737198ebcb3b5caf16e43bf7d5d36bb ReactCodegen: 23192ed6132b7eb93d61cc2ee8e21a816b361a37 - ReactCommon: 37e362e6877a42d74cc3d71be3d15a73f5f8c8ff - ReactCommon-Samples: e2bf03c8237c461fa36bda8e4638368fa82b633c + ReactCommon: 33511ecb0162ef440f6257e7fe2183f21dc793d2 + ReactCommon-Samples: 4359cc03f4767fa6cd3fc7a59783347f81c7fde6 ScreenshotManager: 16fcf9cbbee5b261ac46641a0f502fc1cb73a089 SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d - Yoga: f58ba5e0ac1e7eb3ef4caedcf80c5aa39985b039 + Yoga: f7afccd6a244b36522943ab18f77dc7de7459940 -PODFILE CHECKSUM: 60b84dd598fc04e9ed84dbc82e2cb3b99b1d7adf +PODFILE CHECKSUM: 8591f96a513620a2a83a0b9a125ad3fa32ea1369 COCOAPODS: 1.14.3 diff --git a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj index ce240545a6a775..c529dd61ba7ca5 100644 --- a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj +++ b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj @@ -863,6 +863,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CC = ""; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "libc++"; @@ -893,6 +894,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + CXX = ""; ENABLE_BITCODE = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -933,6 +935,8 @@ "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", ); IPHONEOS_DEPLOYMENT_TARGET = 13.4; + LD = ""; + LDPLUSPLUS = ""; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "$(inherited)"; @@ -964,6 +968,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CC = ""; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "libc++"; @@ -994,6 +999,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; + CXX = ""; ENABLE_BITCODE = NO; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -1027,6 +1033,8 @@ "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", ); IPHONEOS_DEPLOYMENT_TARGET = 13.4; + LD = ""; + LDPLUSPLUS = ""; MTL_ENABLE_DEBUG_INFO = NO; OTHER_CFLAGS = "$(inherited)"; OTHER_CPLUSPLUSFLAGS = ( diff --git a/packages/rn-tester/js/RNTesterAppShared.js b/packages/rn-tester/js/RNTesterAppShared.js index 0e803557800f88..422327053e887a 100644 --- a/packages/rn-tester/js/RNTesterAppShared.js +++ b/packages/rn-tester/js/RNTesterAppShared.js @@ -1,297 +1,129 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ +import React, {useState} from 'react'; +import {Button, SafeAreaView, ScrollView, StyleSheet, Switch, Text, TextInput} from 'react-native'; -import type {RNTesterModuleInfo} from './types/RNTesterTypes'; +let logBuffer = []; -import RNTesterModuleContainer from './components/RNTesterModuleContainer'; -import RNTesterModuleList from './components/RNTesterModuleList'; -import RNTesterNavBar, {navBarHeight} from './components/RNTesterNavbar'; -import {RNTesterThemeContext, themes} from './components/RNTesterTheme'; -import RNTTitleBar from './components/RNTTitleBar'; -import RNTesterList from './utils/RNTesterList'; -import { - RNTesterNavigationActionsType, - RNTesterNavigationReducer, -} from './utils/RNTesterNavigationReducer'; -import { - Screens, - getExamplesListWithRecentlyUsed, - initialNavigationState, -} from './utils/testerStateUtils'; -import * as React from 'react'; -import { - BackHandler, - Button, - Linking, - Platform, - StyleSheet, - View, - useColorScheme, -} from 'react-native'; - -// RNTester App currently uses in memory storage for storing navigation state - -type BackButton = ({onBack: () => void}) => React.Node; - -const RNTesterApp = ({ - testList, - customBackButton, -}: { - testList?: { - components?: Array, - apis?: Array, - }, - customBackButton?: BackButton, -}): React.Node => { - const [state, dispatch] = React.useReducer( - RNTesterNavigationReducer, - initialNavigationState, - ); - const colorScheme = useColorScheme(); - - const { - activeModuleKey, - activeModuleTitle, - activeModuleExampleKey, - screen, - recentlyUsed, - } = state; +const log = (message) => { + console.log(message); + logBuffer.push(message); +}; - const examplesList = React.useMemo( - () => getExamplesListWithRecentlyUsed({recentlyUsed, testList}), - [recentlyUsed, testList], - ); +const handleClearLog = () => { + logBuffer = []; +}; - const handleBackPress = React.useCallback(() => { - if (activeModuleKey != null) { - dispatch({type: RNTesterNavigationActionsType.BACK_BUTTON_PRESS}); +function fibonacci(n) { + if (n <= 0) { + throw new Error('Invalid input. n must be a positive integer.'); } - }, [dispatch, activeModuleKey]); - - // Setup hardware back button press listener - React.useEffect(() => { - const handleHardwareBackPress = () => { - if (activeModuleKey) { - handleBackPress(); - return true; - } - return false; - }; - - BackHandler.addEventListener('hardwareBackPress', handleHardwareBackPress); - - return () => { - BackHandler.removeEventListener( - 'hardwareBackPress', - handleHardwareBackPress, - ); - }; - }, [activeModuleKey, handleBackPress]); - - const handleModuleCardPress = React.useCallback( - ({exampleType, key, title}: any) => { - dispatch({ - type: RNTesterNavigationActionsType.MODULE_CARD_PRESS, - data: {exampleType, key, title}, - }); - }, - [dispatch], - ); - - const handleModuleExampleCardPress = React.useCallback( - (exampleName: string) => { - dispatch({ - type: RNTesterNavigationActionsType.EXAMPLE_CARD_PRESS, - data: {key: exampleName}, - }); - }, - [dispatch], - ); - - const handleNavBarPress = React.useCallback( - (args: {screen: string}) => { - dispatch({ - type: RNTesterNavigationActionsType.NAVBAR_PRESS, - data: {screen: args.screen}, - }); - }, - [dispatch], - ); - - // Setup Linking event subscription - const handleOpenUrlRequest = React.useCallback( - ({url}: {url: string, ...}) => { - // Supported URL pattern(s): - // * rntester://example/ - // * rntester://example// - const match = - /^rntester:\/\/example\/([a-zA-Z0-9_-]+)(?:\/([a-zA-Z0-9_-]+))?$/.exec( - url, - ); - if (!match) { - console.warn( - `handleOpenUrlRequest: Received unsupported URL: '${url}'`, - ); - return; - } - - const rawModuleKey = match[1]; - const exampleKey = match[2]; - - // For tooling compatibility, allow all these variants for each module key: - const validModuleKeys = [ - rawModuleKey, - `${rawModuleKey}Index`, - `${rawModuleKey}Example`, - // $FlowFixMe[invalid-computed-prop] - ].filter(k => RNTesterList.Modules[k] != null); - if (validModuleKeys.length !== 1) { - if (validModuleKeys.length === 0) { - console.error( - `handleOpenUrlRequest: Unable to find requested module with key: '${rawModuleKey}'`, - ); - } else { - console.error( - `handleOpenUrlRequest: Found multiple matching module with key: '${rawModuleKey}', unable to resolve`, - ); - } - return; - } - const resolvedModuleKey = validModuleKeys[0]; - // $FlowFixMe[invalid-computed-prop] - const exampleModule = RNTesterList.Modules[resolvedModuleKey]; - - if (exampleKey != null) { - const validExampleKeys = exampleModule.examples.filter( - e => e.name === exampleKey, - ); - if (validExampleKeys.length !== 1) { - if (validExampleKeys.length === 0) { - console.error( - `handleOpenUrlRequest: Unable to find requested example with key: '${exampleKey}' within module: '${resolvedModuleKey}'`, - ); - } else { - console.error( - `handleOpenUrlRequest: Found multiple matching example with key: '${exampleKey}' within module: '${resolvedModuleKey}', unable to resolve`, - ); - } - return; - } - } + if (n === 1 || n === 2) { + return 1; + } - console.log( - `handleOpenUrlRequest: Opening module: '${resolvedModuleKey}', example: '${ - exampleKey || 'null' - }'`, - ); + return fibonacci(n - 1) + fibonacci(n - 2); +} - dispatch({ - type: RNTesterNavigationActionsType.EXAMPLE_OPEN_URL_REQUEST, - data: { - key: resolvedModuleKey, - title: exampleModule.title || resolvedModuleKey, - exampleKey, - }, - }); - }, - [dispatch], - ); - React.useEffect(() => { - // Initial deeplink - Linking.getInitialURL() - .then(url => url != null && handleOpenUrlRequest({url: url})) - .catch(_ => {}); - const subscription = Linking.addEventListener('url', handleOpenUrlRequest); - return () => subscription.remove(); - }, [handleOpenUrlRequest]); +const N = 35; - const theme = colorScheme === 'dark' ? themes.dark : themes.light; +const App = () => { + const textInputRef = React.useRef(null); + const [text, setText] = useState(''); + const [shouldSlowDown, setShouldSlowDown] = useState(false); - if (examplesList === null) { - return null; - } + const handleClearInput = () => { + log(`Clearing! Text: '${text}'. New text: ''.`); - const activeModule = - // $FlowFixMe[invalid-computed-prop] - activeModuleKey != null ? RNTesterList.Modules[activeModuleKey] : null; - const activeModuleExample = - activeModuleExampleKey != null - ? activeModule?.examples.find(e => e.name === activeModuleExampleKey) - : null; - const title = - activeModuleTitle != null - ? activeModuleTitle - : screen === Screens.COMPONENTS - ? 'Components' - : 'APIs'; + textInputRef.current.clear(); + setText(''); + }; - const BackButtonComponent: ?BackButton = customBackButton - ? customBackButton - : Platform.OS === 'ios' - ? ({onBack}) => ( -