react-native 0.71.14 → 0.71.16

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.
@@ -12,6 +12,6 @@
12
12
  exports.version = {
13
13
  major: 0,
14
14
  minor: 71,
15
- patch: 14,
15
+ patch: 16,
16
16
  prerelease: null,
17
17
  };
@@ -30,6 +30,7 @@ export type LogData = $ReadOnly<{|
30
30
  message: Message,
31
31
  category: Category,
32
32
  componentStack: ComponentStack,
33
+ stack?: string,
33
34
  |}>;
34
35
 
35
36
  export type Observer = (
@@ -154,7 +155,7 @@ function appendNewLog(newLog: LogBoxLog) {
154
155
  if (newLog.level === 'fatal') {
155
156
  // If possible, to avoid jank, we don't want to open the error before
156
157
  // it's symbolicated. To do that, we optimistically wait for
157
- // sybolication for up to a second before adding the log.
158
+ // symbolication for up to a second before adding the log.
158
159
  const OPTIMISTIC_WAIT_TIME = 1000;
159
160
 
160
161
  let addPendingLog: ?() => void = () => {
@@ -198,7 +199,7 @@ export function addLog(log: LogData): void {
198
199
  // otherwise spammy logs would pause rendering.
199
200
  setImmediate(() => {
200
201
  try {
201
- const stack = parseErrorStack(errorForStackTrace?.stack);
202
+ const stack = parseErrorStack(log.stack ?? errorForStackTrace?.stack);
202
203
 
203
204
  appendNewLog(
204
205
  new LogBoxLog({
@@ -10,6 +10,8 @@
10
10
 
11
11
  import typeof {enable} from 'promise/setimmediate/rejection-tracking';
12
12
 
13
+ import LogBox from './LogBox/LogBox';
14
+
13
15
  type ExtractOptionsType = <P>(((options?: ?P) => void)) => P;
14
16
 
15
17
  let rejectionTrackingOptions: $Call<ExtractOptionsType, enable> = {
@@ -34,19 +36,36 @@ let rejectionTrackingOptions: $Call<ExtractOptionsType, enable> = {
34
36
  ? rejection
35
37
  : JSON.stringify((rejection: $FlowFixMe));
36
38
  }
39
+ // It could although this object is not a standard error, it still has stack information to unwind
40
+ // $FlowFixMe ignore types just check if stack is there
41
+ if (rejection.stack && typeof rejection.stack === 'string') {
42
+ stack = rejection.stack;
43
+ }
37
44
  }
38
45
 
39
- const warning =
40
- `Possible Unhandled Promise Rejection (id: ${id}):\n` +
41
- `${message ?? ''}\n` +
42
- (stack == null ? '' : stack);
43
- console.warn(warning);
46
+ const warning = `Possible unhandled promise rejection (id: ${id}):\n${
47
+ message ?? ''
48
+ }`;
49
+ if (__DEV__) {
50
+ LogBox.addLog({
51
+ level: 'warn',
52
+ message: {
53
+ content: warning,
54
+ substitutions: [],
55
+ },
56
+ componentStack: [],
57
+ stack,
58
+ category: 'possible_unhandled_promise_rejection',
59
+ });
60
+ } else {
61
+ console.warn(warning);
62
+ }
44
63
  },
45
64
  onHandled: id => {
46
65
  const warning =
47
- `Promise Rejection Handled (id: ${id})\n` +
66
+ `Promise rejection handled (id: ${id})\n` +
48
67
  'This means you can ignore any previous messages of the form ' +
49
- `"Possible Unhandled Promise Rejection (id: ${id}):"`;
68
+ `"Possible unhandled promise rejection (id: ${id}):"`;
50
69
  console.warn(warning);
51
70
  },
52
71
  };
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(71),
26
- RCTVersionPatch: @(14),
26
+ RCTVersionPatch: @(16),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -241,7 +241,7 @@ task createNativeDepsDirectories {
241
241
  }
242
242
 
243
243
  task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
244
- src("https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz")
244
+ src("https://archives.boost.io/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz")
245
245
  onlyIfNewer(true)
246
246
  overwrite(false)
247
247
  dest(new File(downloadsDir, "boost_${BOOST_VERSION}.tar.gz"))
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.71.14
1
+ VERSION_NAME=0.71.16
2
2
  GROUP=com.facebook.react
3
3
 
4
4
  # JVM Versions
@@ -113,6 +113,7 @@ public abstract class ReactActivity extends AppCompatActivity
113
113
  @Override
114
114
  public void onRequestPermissionsResult(
115
115
  int requestCode, String[] permissions, int[] grantResults) {
116
+ super.onRequestPermissionsResult(requestCode, permissions, grantResults);
116
117
  mDelegate.onRequestPermissionsResult(requestCode, permissions, grantResults);
117
118
  }
118
119
 
@@ -12,9 +12,7 @@ import static com.facebook.react.uimanager.common.UIManagerType.DEFAULT;
12
12
  import static com.facebook.react.uimanager.common.UIManagerType.FABRIC;
13
13
  import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
14
14
 
15
- import android.app.Activity;
16
15
  import android.content.Context;
17
- import android.content.ContextWrapper;
18
16
  import android.graphics.Canvas;
19
17
  import android.graphics.Insets;
20
18
  import android.graphics.Point;
@@ -917,12 +915,18 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
917
915
  checkForDeviceDimensionsChanges();
918
916
  }
919
917
 
920
- private Activity getActivity() {
921
- Context context = getContext();
922
- while (!(context instanceof Activity) && context instanceof ContextWrapper) {
923
- context = ((ContextWrapper) context).getBaseContext();
918
+ private @Nullable WindowManager.LayoutParams getWindowLayoutParams() {
919
+ View view = ReactRootView.this;
920
+ if (view.getLayoutParams() instanceof WindowManager.LayoutParams) {
921
+ return (WindowManager.LayoutParams) view.getLayoutParams();
924
922
  }
925
- return (Activity) context;
923
+ while (view.getParent() instanceof View) {
924
+ view = (View) view.getParent();
925
+ if (view.getLayoutParams() instanceof WindowManager.LayoutParams) {
926
+ return (WindowManager.LayoutParams) view.getLayoutParams();
927
+ }
928
+ }
929
+ return null;
926
930
  }
927
931
 
928
932
  @RequiresApi(api = Build.VERSION_CODES.R)
@@ -942,7 +946,13 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
942
946
  Insets barInsets = rootInsets.getInsets(WindowInsets.Type.systemBars());
943
947
  int height = imeInsets.bottom - barInsets.bottom;
944
948
 
945
- int softInputMode = getActivity().getWindow().getAttributes().softInputMode;
949
+ int softInputMode;
950
+ WindowManager.LayoutParams windowLayoutParams = getWindowLayoutParams();
951
+ if (windowLayoutParams != null) {
952
+ softInputMode = windowLayoutParams.softInputMode;
953
+ } else {
954
+ return;
955
+ }
946
956
  int screenY =
947
957
  softInputMode == WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING
948
958
  ? mVisibleViewArea.bottom - height
@@ -17,6 +17,6 @@ public class ReactNativeVersion {
17
17
  public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
18
18
  "major", 0,
19
19
  "minor", 71,
20
- "patch", 14,
20
+ "patch", 16,
21
21
  "prerelease", null);
22
22
  }
@@ -204,6 +204,11 @@ import java.util.Map;
204
204
  mDefaultValue = defaultValue;
205
205
  }
206
206
 
207
+ public ColorPropSetter(ReactPropGroup prop, Method setter, int index, int defaultValue) {
208
+ super(prop, "mixed", setter, index);
209
+ mDefaultValue = defaultValue;
210
+ }
211
+
207
212
  @Override
208
213
  protected Object getValueOrDefault(Object value, Context context) {
209
214
  if (value == null) {
@@ -331,6 +336,10 @@ import java.util.Map;
331
336
  super(prop, "mixed", setter);
332
337
  }
333
338
 
339
+ public BoxedColorPropSetter(ReactPropGroup prop, Method setter, int index) {
340
+ super(prop, "mixed", setter, index);
341
+ }
342
+
334
343
  @Override
335
344
  protected @Nullable Object getValueOrDefault(Object value, Context context) {
336
345
  if (value != null) {
@@ -463,7 +472,11 @@ import java.util.Map;
463
472
  }
464
473
  } else if (propTypeClass == int.class) {
465
474
  for (int i = 0; i < names.length; i++) {
466
- props.put(names[i], new IntPropSetter(annotation, method, i, annotation.defaultInt()));
475
+ if ("Color".equals(annotation.customType())) {
476
+ props.put(names[i], new ColorPropSetter(annotation, method, i, annotation.defaultInt()));
477
+ } else {
478
+ props.put(names[i], new IntPropSetter(annotation, method, i, annotation.defaultInt()));
479
+ }
467
480
  }
468
481
  } else if (propTypeClass == float.class) {
469
482
  for (int i = 0; i < names.length; i++) {
@@ -476,7 +489,11 @@ import java.util.Map;
476
489
  }
477
490
  } else if (propTypeClass == Integer.class) {
478
491
  for (int i = 0; i < names.length; i++) {
479
- props.put(names[i], new BoxedIntPropSetter(annotation, method, i));
492
+ if ("Color".equals(annotation.customType())) {
493
+ props.put(names[i], new BoxedColorPropSetter(annotation, method, i));
494
+ } else {
495
+ props.put(names[i], new BoxedIntPropSetter(annotation, method, i));
496
+ }
480
497
  }
481
498
  } else {
482
499
  throw new RuntimeException(
@@ -17,7 +17,7 @@ namespace facebook::react {
17
17
  constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 71;
20
- int32_t Patch = 14;
20
+ int32_t Patch = 16;
21
21
  std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.71.14",
3
+ "version": "0.71.16",
4
4
  "bin": "./cli.js",
5
5
  "description": "A framework for building native apps using React",
6
6
  "license": "MIT",
@@ -111,9 +111,9 @@
111
111
  },
112
112
  "dependencies": {
113
113
  "@jest/create-cache-key-function": "^29.2.1",
114
- "@react-native-community/cli": "10.2.4",
114
+ "@react-native-community/cli": "10.2.6",
115
115
  "@react-native-community/cli-platform-android": "10.2.0",
116
- "@react-native-community/cli-platform-ios": "10.2.4",
116
+ "@react-native-community/cli-platform-ios": "10.2.5",
117
117
  "@react-native/assets": "1.0.0",
118
118
  "@react-native/normalize-color": "2.1.0",
119
119
  "@react-native/polyfills": "2.0.0",
@@ -159,7 +159,7 @@
159
159
  "@definitelytyped/dtslint": "^0.0.127",
160
160
  "@react-native-community/eslint-config": "*",
161
161
  "@react-native-community/eslint-plugin": "*",
162
- "@react-native/eslint-plugin-specs": "^0.71.1",
162
+ "@react-native/eslint-plugin-specs": "^0.71.2",
163
163
  "@reactions/component": "^2.0.2",
164
164
  "@types/react": "^18.0.18",
165
165
  "@typescript-eslint/parser": "^5.30.5",
@@ -53,22 +53,35 @@ class ReactNativePodsUtils
53
53
  end
54
54
  end
55
55
 
56
- def self.exclude_i386_architecture_while_using_hermes(installer)
57
- projects = installer.aggregate_targets
56
+ def self.extract_projects(installer)
57
+ return installer.aggregate_targets
58
58
  .map{ |t| t.user_project }
59
59
  .uniq{ |p| p.path }
60
60
  .push(installer.pods_project)
61
+ end
61
62
 
63
+ def self.exclude_i386_architecture_while_using_hermes(installer)
64
+ is_using_hermes = self.has_pod(installer, 'hermes-engine')
62
65
 
63
- # Hermes does not support 'i386' architecture
64
- excluded_archs_default = ReactNativePodsUtils.has_pod(installer, 'hermes-engine') ? "i386" : ""
66
+ if is_using_hermes
67
+ key = "EXCLUDED_ARCHS[sdk=iphonesimulator*]"
65
68
 
66
- projects.each do |project|
67
- project.build_configurations.each do |config|
68
- config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = excluded_archs_default
69
- end
69
+ projects = self.extract_projects(installer)
70
70
 
71
- project.save()
71
+ projects.each do |project|
72
+ project.build_configurations.each do |config|
73
+ current_setting = config.build_settings[key] || ""
74
+
75
+ excluded_archs_includes_I386 = current_setting.include?("i386")
76
+
77
+ if !excluded_archs_includes_I386
78
+ # Hermes does not support `i386` architecture
79
+ config.build_settings[key] = "#{current_setting} i386".strip
80
+ end
81
+ end
82
+
83
+ project.save()
84
+ end
72
85
  end
73
86
  end
74
87
 
@@ -147,7 +160,7 @@ class ReactNativePodsUtils
147
160
 
148
161
  # fix for weak linking
149
162
  self.safe_init(config, other_ld_flags_key)
150
- if self.is_using_xcode15_or_greter(:xcodebuild_manager => xcodebuild_manager)
163
+ if self.is_using_xcode15_0(:xcodebuild_manager => xcodebuild_manager)
151
164
  self.add_value_to_setting_if_missing(config, other_ld_flags_key, xcode15_compatibility_flags)
152
165
  else
153
166
  self.remove_value_from_setting_if_present(config, other_ld_flags_key, xcode15_compatibility_flags)
@@ -286,7 +299,7 @@ class ReactNativePodsUtils
286
299
  end
287
300
  end
288
301
 
289
- def self.is_using_xcode15_or_greter(xcodebuild_manager: Xcodebuild)
302
+ def self.is_using_xcode15_0(xcodebuild_manager: Xcodebuild)
290
303
  xcodebuild_version = xcodebuild_manager.version
291
304
 
292
305
  # The output of xcodebuild -version is something like
@@ -297,7 +310,8 @@ class ReactNativePodsUtils
297
310
  regex = /(\d+)\.(\d+)(?:\.(\d+))?/
298
311
  if match_data = xcodebuild_version.match(regex)
299
312
  major = match_data[1].to_i
300
- return major >= 15
313
+ minor = match_data[2].to_i
314
+ return major == 15 && minor == 0
301
315
  end
302
316
 
303
317
  return false
@@ -52,13 +52,8 @@ function build_host_hermesc {
52
52
 
53
53
  # Utility function to configure an Apple framework
54
54
  function configure_apple_framework {
55
- local build_cli_tools enable_bitcode enable_debugger cmake_build_type xcode_15_flags xcode_major_version
55
+ local build_cli_tools enable_debugger cmake_build_type xcode_15_flags xcode_major_version
56
56
 
57
- if [[ $1 == iphoneos || $1 == catalyst ]]; then
58
- enable_bitcode="true"
59
- else
60
- enable_bitcode="false"
61
- fi
62
57
  if [[ $1 == macosx ]]; then
63
58
  build_cli_tools="true"
64
59
  else
@@ -94,7 +89,7 @@ function configure_apple_framework {
94
89
  -DHERMES_ENABLE_LIBFUZZER:BOOLEAN=false \
95
90
  -DHERMES_ENABLE_FUZZILLI:BOOLEAN=false \
96
91
  -DHERMES_ENABLE_TEST_SUITE:BOOLEAN=false \
97
- -DHERMES_ENABLE_BITCODE:BOOLEAN="$enable_bitcode" \
92
+ -DHERMES_ENABLE_BITCODE:BOOLEAN=false \
98
93
  -DHERMES_BUILD_APPLE_FRAMEWORK:BOOLEAN=true \
99
94
  -DHERMES_BUILD_APPLE_DSYM:BOOLEAN=true \
100
95
  -DHERMES_ENABLE_TOOLS:BOOLEAN="$build_cli_tools" \
Binary file
Binary file
package/template/Gemfile CHANGED
@@ -3,5 +3,7 @@ source 'https://rubygems.org'
3
3
  # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4
4
  ruby '>= 2.6.10'
5
5
 
6
- gem 'cocoapods', '>= 1.11.3'
6
+ # Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7
+ # bound in the template on Cocoapods with next React Native release.
8
+ gem 'cocoapods', '>= 1.13', '< 1.15'
7
9
  gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "react": "18.2.0",
14
- "react-native": "0.71.14"
14
+ "react-native": "0.71.16"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@babel/core": "^7.20.0",
@@ -10,7 +10,7 @@ Pod::Spec.new do |spec|
10
10
  spec.homepage = 'http://www.boost.org'
11
11
  spec.summary = 'Boost provides free peer-reviewed portable C++ source libraries.'
12
12
  spec.authors = 'Rene Rivera'
13
- spec.source = { :http => 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2',
13
+ spec.source = { :http => 'https://archives.boost.io/release/1.76.0/source/boost_1_76_0.tar.bz2',
14
14
  :sha256 => 'f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41' }
15
15
 
16
16
  # Pinning to the same version as React.podspec.