Summary of RN development issues

Mondo Technology Updated on 2024-02-16

usexcworkspaceFile to open the project, do not usexcodeprojOpen the project.

Check the cause of the error and prioritize whether the dependencies are added. Yesnpm iAnd thencd iospod install

Not using the Ruby Gem, using Homebrew.

If you encounter that the boost file cannot proceed normally over http, you can find the image *** and reference it from the file in the dependency file.

Use ADB for port mappingadb reverse tcp:8081 tcp:8081

When introducing the SDK, pay attention to the schema of the SDK limitations, and if the SDK has a restriction on the schema, remember to declare it in the NDK.

The iOS side needs to listen to the event on the JS side first, and then sendEvent natively, otherwise an error will be reportedlistener not registAndroid, which doesn't have this problem. Therefore, when processing, you can pre-set the listener.

You need to set up a developer account, if the iOS version is too high to preview normally when previewing the real machine, you can put the corresponding dependency ** after it is good/applications/xcode.app/contents/developer/platforms/iphoneos.platform/devicesupport

*Address:

typeerror: null is not an object (evaluating 'rngesturehandlermodule.flushoperations')

Android updated gradle and ios re-pod install

sudo xcode-select -s /applications/xcode.app/contents/developer/
In the home folder (C: users username.).gradle or .gradle).properties file, add.

org.gradle.jvmargs=-xmx1024m -xx:maxpermsize=256m

to Build Setting Architectures excluded architectures

Add arm64

sduo arch -x86_64 gem install ffiarch -x86_64 pod install
Xcode runs in Rosetta mode.

podfile

post_install do |installer| react_native_post_install( installer, )# note: change iphoneos_deployment_target to 12.4. installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['iphoneos_deployment_target'] = '12.4' end end __apply_xcode_12_5_m1_post_install_workaround(installer) end
Component library: native-basewebview: react-native-webview, state management: zustandicon: react-native-vector-icons, form: react-hook-form, route: reactn**igation, wifi@react-native-community, netinfo, enlightenment** :react-native-splash-screen**Select:react-native-image-pickerShare:react-native-sharepressable In the touchableopacity outer layer cannot trigger the click time will bepositionSet toabsolute, pay attention to the direct hierarchical relationship of the Sibling or Parent Sibling elements to avoid the problem of not being able to click normallykeyboard**oidin**iewIt is possible to avoid the view being entered into the keyboard to change the layout, but internally, if there ispositionforabsoluteelements that will still be affected by the execution of commands in the android directory.

./gradlew assemblerelease // apk./gradlew bundlerelease // aab
The generated file is located in the app build outputs apk release directory.

Use xcode to package product->archieve, select the corresponding channel for distribution, and add n**igatets

import from '@react-n**igation/native'export const n**igationref = createn**igationcontainerref()export function n**igate(name: any) }
Hang in the ref in the app

You can use it in ***.

n**igate('login')

Related Pages