A simple,,,, todo 💼
npm installin the root directory.npm installin the server directory if you want to get the server runs also.- Please also follow these steps to setup
react-native-keyboardevents
- Open
ios > reactNativeTodo.xcodeproj, then: - Search for
8081in the project, and change the IP address to another.- If you run the App in a real phone, make sure your phone are in the same network with your computer, and change the IP to your computers' one.
- If you run the App in a simulator, change the IP to
localhost(WIFI IP address may not work).
cd serverand./app.jsto start the API service, please make sure you have NodeJS and MongoDB installed.- Open
app > network > API.jswith your prefered editor, change the SERVER_PREFIX to your API service endpoint.- Again,
localhostif you are running the App in a simulator,WIFI IPif you are connected to your phone with a wifi hotspot.
- Again,
- Select the project name in the Project Explorer (Xcode 7 and above),
- then click
Build Settingsin the right panel, - search in below input box for
dead, - Find
Dead Code Stripping, switch it toNo.
- then click
- Click
Runin the Xcode!
Run react-native bundle --minify in the root directory.
- Open
ios > reactNativeTodo.xcodeproj - Right click the project in Project Navigator, select
Add files to reactNativeTodo, findios/main.jsbundle, OK. - Open
reactNativeTodo > AppDelegate.m- Comment
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"]; - Uncomment
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
- Comment
- Click
Runin the Xcode!