Skip to content

Commit 77e4be1

Browse files
authored
Merge pull request #304 from funnyzak/feat/rn715
upgrade rn to 0.71.5
2 parents 43e3f47 + 936ef17 commit 77e4be1

File tree

6 files changed

+651
-742
lines changed

6 files changed

+651
-742
lines changed

.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4-
ruby File.read(File.join(__dir__, '.ruby-version')).strip
4+
ruby '>= 2.6.10'
55

6-
gem 'cocoapods', '~> 1.11', '>= 1.11.3'
6+
gem 'cocoapods', '>= 1.11.3'

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![GitHub last commit][last-commit-image]][repository-url]
88
[![tag][tag-image]][rle-url]
99

10-
项目使用了 React Native 构建了一个 [V2EX](https://v2ex.com) 移动客户端应用。目的是为了构建一个 React Native 快速开发脚手架。客户端数据完全基于 [V2EX](https://v2ex.com) 开放 API。基于 RN 0.71.3
10+
项目使用了 React Native 构建了一个 [V2EX](https://v2ex.com) 移动客户端应用。目的是为了构建一个 React Native 快速开发脚手架。客户端数据完全基于 [V2EX](https://v2ex.com) 开放 API。基于 RN 0.71.5
1111

1212
`Figma 设计稿` 已经开源,可[从此 Duplicate](https://www.figma.com/community/file/1101074002447399194)
1313

@@ -24,6 +24,7 @@
2424
## Done
2525

2626
- [x] 升级提醒
27+
- [x] 升级 RN 到到 **0.71.5**
2728
- [x] 升级 RN 到到 **0.71.3**
2829
- [x] 升级 RN 到到 **0.70.6**
2930
- [x] 升级 RN 到到 **0.70.5**
@@ -74,10 +75,10 @@
7475
目前在 MacOS 下开发,在 iOS 为 16+ 的 iPhone Simulator/iPhone 14、Android 9.0 的 AVD 模拟器/Mi Phone 均编译成功运行。
7576

7677
- 安装 NodeJS(18.0+)、Yarn、[Watchman](https://reactnative.cn/docs/environment-setup)
77-
- Java JDK建议用 11(配置环境变量 **JAVE_HOME**,高于这个版本编译可能会报错)。
78-
- iOS平台需要配置[CocoaPods](https://reactnative.cn/docs/environment-setup)、Xcode、iOS Simulator。
78+
- Java JDK 建议用 11(配置环境变量 **JAVE_HOME**,高于这个版本编译可能会报错)。
79+
- iOS 平台需要配置[CocoaPods](https://reactnative.cn/docs/environment-setup)、Xcode、iOS Simulator。
7980
- Android Studio、Gradle、Android SDK、[Android Home 配置](https://reactnative.cn/docs/environment-setup)、Android NDK。
80-
- Android平台需要 [Android 真机](https://reactnative.cn/docs/running-on-device)[Android AVD](https://developer.android.com/studio/run/managing-avds)(建议用真机)。
81+
- Android 平台需要 [Android 真机](https://reactnative.cn/docs/running-on-device)[Android AVD](https://developer.android.com/studio/run/managing-avds)(建议用真机)。
8182

8283
具体可根据官网进行 React Native 开发环境和 iOS、Android 运行环境的配置。参考[这里](https://reactnative.dev/docs/environment-setup)
8384

@@ -197,7 +198,7 @@ npx react-native run-android --variant release
197198
- **[Hermes Debugger](https://reactnative.cn/docs/hermes#debugger)** is a standalone app for debugging React Native apps that use Hermes.
198199
- **[Flipper](https://fbflipper.com/docs/getting-started/index/)** is a desktop debugging platform for mobile developers.
199200
- **[react-devtools](https://www.npmjs.com/package/react-devtools)** is a standalone app for inspecting the React component hierarchy.
200-
- **[React Native Debugger](https://github.com/jhen0409/react-native-debugger/blob/master/docs/getting-started.md) is a standalone app for debugging React Native apps, and includes React DevTools.
201+
- \*\*[React Native Debugger](https://github.com/jhen0409/react-native-debugger/blob/master/docs/getting-started.md) is a standalone app for debugging React Native apps, and includes React DevTools.
201202
- Google Chrome 调试,[参考](https://reactnative.cn/docs/debugging#chrome)
202203

203204
### Debug Menu
@@ -214,7 +215,7 @@ npx react-native run-android --variant release
214215

215216
## FAQ
216217

217-
### 配置BugSnag
218+
### 配置 BugSnag
218219

219220
1. [Create a bugsnag account](https://app.bugsnag.com/user/new).
220221
2. Add your project api key to [android/app/src/main/AndroidManifest.xml](android/app/src/main/AndroidManifest.xml#L25-L26):
@@ -231,7 +232,7 @@ npx react-native run-android --variant release
231232
<string>YOUR-API-KEY-HERE</string>
232233
```
233234

234-
The API key can be found in the Bugsnag settings for your project.
235+
The API key can be found in the Bugsnag settings for your project.
235236

236237
### Invariant Violation: Module AppRegistry is not a registered callable module
237238

@@ -276,7 +277,7 @@ iOS 使用 LaunchScreen.storyboard,使用 Xcode 修改即可。
276277

277278
[看这里](https://stackoverflow.com/questions/37389905/change-package-name-for-android-in-react-native)
278279

279-
### Android签名打包发布
280+
### Android 签名打包发布
280281

281282
[看这里](https://reactnative.cn/docs/signed-apk-android/)
282283

@@ -285,12 +286,13 @@ iOS 使用 LaunchScreen.storyboard,使用 Xcode 修改即可。
285286
1. Edit the android/app/src/main/AndroidManifest.xml
286287
2. Add the android:networkSecurityConfig="@xml/network_security_config" to the <application /> tag
287288
3. Create the folder android/app/src/main/res/xml and inside a file called network_security_config.xml
288-
```xml
289-
<?xml version="1.0" encoding="utf-8"?>
290-
<network-security-config>
291-
<base-config cleartextTrafficPermitted="true" />
292-
</network-security-config>
293-
```
289+
```xml
290+
<?xml version="1.0" encoding="utf-8"?>
291+
<network-security-config>
292+
<base-config cleartextTrafficPermitted="true" />
293+
</network-security-config>
294+
```
295+
294296
- [https://github.com/facebook/react-native/issues/32931](https://github.com/facebook/react-native/issues/32931)
295297
- [https://developer.android.com/training/articles/security-config](https://developer.android.com/training/articles/security-config)
296298

@@ -347,7 +349,6 @@ iOS 使用 LaunchScreen.storyboard,使用 Xcode 修改即可。
347349

348350
Apache-2.0 License © 2021 [funnyzak](https://github.com/funnyzak)
349351

350-
351352
<!-- [![action][ci-image]][ci-url] -->
352353
<!-- [![js-standard-style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/feross/standard) -->
353354
<!-- [![GitHub commit activity][commit-activity-image]][repository-url] -->
@@ -369,4 +370,4 @@ Apache-2.0 License © 2021 [funnyzak](https://github.com/funnyzak)
369370
[sg-url]: https://sourcegraph.com/github.com/funnyzak/react-native-v2ex
370371
[build-status-image]: https://github.com/funnyzak/react-native-v2ex/actions/workflows/release.yml/badge.svg
371372
[build-status]: https://github.com/funnyzak/react-native-v2ex/actions
372-
[tag-image]: https://img.shields.io/github/tag/funnyzak/react-native-v2ex.svg
373+
[tag-image]: https://img.shields.io/github/tag/funnyzak/react-native-v2ex.svg

ios/Podfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ
44
platform :ios, min_ios_version_supported
55
prepare_react_native_project!
66

7+
# https://github.com/facebook/react-native/pull/36759
8+
# Force pods to match minimum iOS version for React Native
9+
# Fixes build issue on Xcode Cloud where some pods
10+
# Use iOS 12 calls despite being set as iOS 11
11+
def __apply_Xcode_14_3_RC_post_install_workaround(installer)
12+
installer.pods_project.targets.each do |target|
13+
target.build_configurations.each do |config|
14+
current_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
15+
minimum_target = min_ios_version_supported
16+
if current_target.to_f < minimum_target.to_f
17+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = minimum_target
18+
end
19+
end
20+
end
21+
end
22+
723
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
824
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
925
#
@@ -57,5 +73,6 @@ target 'app' do
5773
:mac_catalyst_enabled => false
5874
)
5975
__apply_Xcode_12_5_M1_post_install_workaround(installer)
76+
__apply_Xcode_14_3_RC_post_install_workaround(installer)
6077
end
6178
end

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"i18n-js": "^3.8.0",
6262
"lodash": "^4.17.21",
6363
"react": "18.2.0",
64-
"react-native": "0.71.3",
64+
"react-native": "0.71.5",
6565
"react-native-actions-sheet": "^0.8.10",
6666
"react-native-device-info": "^10.3.0",
6767
"react-native-easy-toast": "2.3.0",

0 commit comments

Comments
 (0)