"REACT NATIVE cross-platform application development" Environmental building problem records several substitution methods of command+r invalidation on &&xcode7 simulator

Source: Internet
Author: User

This site article is Li Himi original, reproduced must be clearly noted:
reprinted from "Black Rice gamedev Block" original link: http://www.himigame.com/react-native/2147.html


React Native not much to introduce here, in fact, is a cross-platform development of native applications of the open Source engine.

For a more detailed introduction, you can search for "Facebook react native" or "Taobao react native"

Attached React Native official website: http://reactnative.cn

React Native Environment Configuration document: Http://reactnative.cn/docs/0.23/getting-started.html

 mac under the environment (the document writing process is very detailed, here only the more important steps and to note):

1. Note react-native Init awesomeproject This step, it may take a longer time to down the Awesomeproject project. Himi replaces the NPM repository source with a domestic mirror, but is still slow.

2. If the time is too long or can not be down awesomeproject, you can go to the bottom of the connection to download MyProject is the same:

Http://bbs.reactnative.cn/topic/11/react-native official release of the complete new project package-no INIT required

Note Download your own corresponding platform version. If you download using MyProject, you need to be aware of the following:

A) after downloading the myproject.xcodeproj in the iOS directory will prompt "It is a unidentified developer" similar statement, will also let you choose whether to continue to open, choose Open just fine. If there is no button to select just the prompt cannot open, then go to the security option to allow apps download from anywhere.

b) Open the myproject.xcodeproj with Xcode, and the compiler will report the error about the permission. Use Chmod-r 777 xx (xx is the directory path to download MyProject), change the MyProject all files to 777 or 755 permissions, and then rerun the project.

Environment everything is configured successfully as follows: (runtime, React Packager is started in addition to the emulator)

650) this.width=650; "class=" Alignnone size-medium wp-image-2150 "src=" http://www.himigame.com/wp-content/uploads/ 2016/04/20160407-300x190.png "alt=" 20160407 "width=" "height=" "style=" margin:0px;padding:1px;border:1px Solid RGB (97,146,140); font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height : Inherit;font-family:inherit;height:auto; "/>

3. About the document says,"Press-R in iOS emulator to refresh the app and see your latest changes!" "This refers to the previous version of Xcode7, so the Xcode7 or more versions can be replaced by the following two ways:

A) Use the shortcut key "Ctrl+command+z" or the Simulator's menu "Hardware->shake gestrue" in the simulator to pop up as follows;

650) this.width=650; "class=" Alignnone size-medium wp-image-2148 "src=" http://www.himigame.com/wp-content/uploads/ 2016/04/2341-163x300.png "alt=" 2341 "width=" 163 "height=" "style=" margin:0px;padding:1px;border:1px solid RGB ( 97,146,140); font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height:inherit; Font-family:inherit;height:auto; "/>

Then select "Reload" to refresh to see the latest modified results.

b) in the React Native project, the Global Search "-(void) Showonshake" function, then the [Self show]; directly modified to [self reload];

This time we use the shortcut key "Ctrl+command+z" will not display react Native function bar, but directly refresh.

c) Bind our own favorite shortcut keys, just call reload reload function.

Process for Windows environment configuration:

    1. According to the official documentation. Http://reactnative.cn/docs/0.22/android-setup.html#content

Attention:

Himi using react-native run-android command cannot start React Packager! Although I can install the application to my emulator, but also cannot start the program directly ....

So himi are used react-native start first to start the React Packager, and then manually click on the installation of the project (Laugh and cry ...)

The basic requirements for installation are as follows:

A) JDK

b) adroid-sdk

c) Android-studio-ide (non-essential)

d) Git for Window

here Himi with the official Google Simulator, refresh, in the simulator using F2 to bring up the function menu, reload JS

650) this.width=650; "class=" Alignnone size-medium wp-image-2156 "src=" http://www.himigame.com/wp-content/uploads/ 2016/04/8234444-171x300.png "alt=" 8234444 "width=" 171 "height=" "style=" margin:0px;padding:1px;border:1px Solid RGB (97,146,140); Font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height: Inherit;font-family:inherit;height:auto; "/>

After the completion of:

650) this.width=650; "class=" Alignnone size-medium wp-image-2155 "src=" http://www.himigame.com/wp-content/uploads/ 2016/04/0160408233736-300x164.png "alt=" 0160408233736 "width=" "height=" 164 "style=" MARGIN:0PX;PADDING:1PX; border:1px solid RGB (97,146,140); font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit; Line-height:inherit;font-family:inherit;height:auto; "/>


This article is from the "Li Himi" blog, please be sure to keep this source http://xiaominghimi.blog.51cto.com/2614927/1761961

"REACT NATIVE cross-platform application development" Environmental building problem records several substitution methods of command+r invalidation on &&xcode7 simulator

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.