a react native app about fleet
- macOS 10.12
- Android Studio 2.2.2
- WebStorm 2016.2.4
- Xcode 8.0
- react-native 0.35.0
- 参照官网先搭建好react-native的开发环境,确保能顺利运行hello world
- git clone
- 在根目录下命令行 npm install
- 在ios目录下命令行 pod install
- 在根目录下命令行 react-native link
- 运行ios版本 在根目录下命令行 react-native run-ios
- 运行android版本 在根目录下命令行 react-native run-android
- iOS App图标和启动画面尺寸
- react native中文网文档
- 百度地图文档
- 安卓Back键的处理·基本+高级篇
- React/React Native 的ES5 ES6写法对照表
- Redux 中文文档
###ipad实机没法启动hot reloading来动态进行调试
在ios源码的AppDelegate.m中的jsCodeLocation改为
jsCodeLocation = [NSURL URLWithString:@"http://192.168.1.5:8081/index.ios.bundle?platform=ios&dev=true"];
(注意ip对应自己的机子),并且在info.list中的App Transport Security Settings下添加Allow Arbitrary Loads为YES,确保能加载http的数据
1.注意不要开启chrome调试 2.生成release版本,再安装到手机上,会很流畅
参考链接
参考链接
参考链接
参考链接
- react-native-vector-icons(图标字体库)
- 百度地图
- react-native-action-button
- react-native-qrcode-reader
- react-native-camera
- react-native-root-toast
- react-native-drawer-layout
- react-native-mqtt
- 在webstorm中运行
react-native bundle --entry-file index.android.js --bundle-output ./android/app/src/main/assets/index.android.jsbundle --platform android --assets-dest ./android/app/src/main/res/ --dev false
- 在MainApplication中添加
protected String getBundleAssetName() { return "index.android.jsbundle"; }
将
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
的注释打开