React native real-machine commissioning

Source: Internet
Author: User



Recently trying to use React Native to do something, found that the real machine debugging or some pits exist.


IOS Real-Computer debugging


First, you have to make the debug computer and your phone must be in the same WiFi network below


    1. Open the files for your IOS projectAppDelegate.m

    2. ChangejsCodeLocationtolocalhostyour computer's local area network IP address

    3. InXcode, select your phone as the target device and youRuncan


You can open the development menu (reload, debug, etc.) by shaking the device


Android Real-Computer debugging


On your Android device, openUSB debuggingand connect the computer to start debugging.



The method that runs on the real machine is consistent with running on the emulator, both byreact-native run-androidinstalling and running your React Native app.



If not Android 5.0+ (API 21), then there is no way toadb reversedebug, you need to connect to your developer server via WiFi



Let the debug computer and your phone must be in the same WiFi network below


    1. Turn on vibrate menu (Shake device)

    2. ToDev Settings

    3. ChooseDebug server host for device

    4. Enter the LAN IP for the debug computer

    5. ClickReload JS

Xcode7 error resolution on the operating system


The XCODE7 specifies the real machine to run, the result is reported as follows error:


Undefined Symbols for Architecture arm64: ' _rctsetlogfunction ', referenced from:-[propertyfindertests testrenders  Welcomescreen] in PROPERTYFINDERTESTS.O ld:symbol (s) isn't found for architecture arm64 clang:error:linker command failed With exit code 1 (use-v to see invocation)

 





At first thought of React Native Library of the problem, looked up a bit of information, research, the original in theBuild SettingsetDead Code StrippingasNo(for example) can be solved









React native real-machine commissioning


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.