# ChargEco - React Native
Application ID: com.strides.chargeco

## 环境搭建
`npm install -g yarn`  
`yarn global add react-native-cli`  

## 初始化
`npx react-native init Strides`

## 安装库
`yarn add @react-native-community/art`  
`yarn add @react-native-community/cameraroll`  
`yarn add @react-native-async-storage/async-storage`  
`yarn add @react-native-community/checkbox`  
`yarn add @react-native-community/geolocation`  
`yarn add @react-native-masked-view/masked-view`  
`yarn add @react-native-community/push-notification-ios`  
`yarn add @react-native-firebase/app`  
`yarn add @react-native-firebase/messaging`  
`yarn add @react-native-picker/picker`  
`yarn add @react-navigation/drawer`  
`yarn add @react-navigation/native`  
`yarn add @react-navigation/stack`   

`yarn add axios`  
`yarn add react 17.0.1`  
`yarn add react-native 0.64.0`  
`yarn add react-native-camera`  
`//yarn add react-native-cluster-map`  
`yarn add react-native-code-push@6.4.0`
`yarn add react-native-device-info`  
`yarn add react-native-gesture-handler`  
`yarn add react-native-gradients`  
`yarn add react-native-linear-gradient`  
`yarn add react-native-i18n`
`yarn add react-native-image-crop-picker`  
`//yarn add react-native-image-picker`  
`yarn add react-native-map-clustering`  
`yarn add react-native-map-link`  
`yarn add react-native-maps`  
`yarn add react-native-modal`  
`yarn add react-native-permissions`  
`yarn add react-native-progress`  
`yarn add react-native-push-notification`  
`yarn add react-native-qrcode-scanner`  
`yarn add react-native-reanimated`   
`yarn add react-native-reanimated-skeleton`  
`yarn add react-native-root-siblings`  
`yarn add react-native-root-toast`  
`yarn add react-native-safe-area-context`  
`yarn add react-native-screens`  
`yarn add react-native-share`  
`yarn add react-native-svg`  
`yarn add react-native-vector-icons`  
`yarn add react-native-view-shot`  
`yarn add react-native-webview`  
`yarn add victory-native`  

## 运行（快捷命令）
>Debug Android (yarn android)  
`react-native run-android`  

>Debug iOS (yarn ios)  
`react-native run-ios`  

>Start Metro Server (yarn start)  
`react-native start`  

## 测试（快捷命令）
>Test Release (yarn release)  
`npx react-native run-android --variant=release`

>Test jest (yarn test)  
`npx jest`

>Check ESLint (yarn lint)  
`npx eslint .`

## 清理（快捷命令）
>Reset Caches (yarn reset)  
`react-native start --reset-cache`

>Clean Project (yarn clean)   
`cd android & ./gradlew clean`

## 打包（快捷命令）
>Build AAB for Android (yarn bundle)  
`cd android & ./gradlew bundleRelease`

>Build APK (yarn apk)  
`cd android & ./gradlew assembleRelease`

>Build JS to Android (yarn build:android)  
`react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/`

>Build JS to iOS (yarn build:ios)  
`react-native bundle --platform ios --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/`

----------

## 文档
[React Native中文文档](https://reactnative.cn)  
[导航库-React Navigation](https://reactnavigation.org)  
[动画库-Reanimated](https://docs.swmansion.com/react-native-reanimated/docs/)   
[矢量图标集](https://oblador.github.io/react-native-vector-icons/)  
[React Native常用库查询](https://reactnative.directory/)  
[React Native教程集合](https://github.com/reactnativecn/react-native-guide)  
[React Native Firebase](https://rnfirebase.io/)  
[骨架屏 Skeleton](https://github.com/marcuzgabriel/react-native-reanimated-skeleton)  

## Library Used
[地图库](https://github.com/react-native-maps/react-native-maps)  
[定位服务](https://github.com/react-native-geolocation/react-native-geolocation)   
[地图聚合ClusterMap](https://github.com/codempireio/react-native-cluster-map)   
[地图聚合Clustering](https://github.com/venits/react-native-map-clustering)   
[地图聚合Clustered](https://github.com/novalabio/react-native-maps-super-cluster)  
[矢量图标库](https://github.com/oblador/react-native-vector-icons)  
[Modal弹窗](https://github.com/jacklam718/react-native-modals)   
[颜色渐变](https://github.com/FriendsOfReact/react-native-gradients)  
[Camera相机](https://github.com/react-native-camera)   
[二维码扫描](https://github.com/moaazsidat/react-native-qrcode-scanner)   
[权限处理](https://github.com/zoontek/react-native-permissions)   
[下拉选择](https://github.com/react-native-picker/picker)   
[多选框](https://github.com/react-native-checkbox/react-native-checkbox)   
[Toast消息提示](https://github.com/magicismight/react-native-root-toast)   
[react-native-svg](https://github.com/react-native-svg/react-native-svg)   
[react-native-progress](https://github.com/oblador/react-native-progress)  
[react-native-screens](https://github.com/software-mansion/react-native-screens)  
[react-native-root-siblings](https://github.com/magicismight/react-native-root-siblings)  
[React Native Image Picker](https://github.com/react-native-image-picker/react-native-image-picker)  
[React Native Image Crop Picker](https://github.com/ivpusic/react-native-image-crop-picker)  
[Victory Native](https://formidable.com/open-source/victory/docs/native/)  
[Push NOtification](https://github.com/zo0r/react-native-push-notification)  
[push-notification-ios](https://github.com/react-native-push-notification-ios/push-notification-ios)  
[react-native-view-shot](https://github.com/gre/react-native-view-shot)  
[Cameraroll](https://github.com/react-native-cameraroll/react-native-cameraroll)  
[React Native Share](https://react-native-share.github.io/react-native-share/)  
[RNWebView](https://github.com/react-native-webview/react-native-webview)  
[react-native-device-info](https://github.com/react-native-device-info/react-native-device-info)  
[微软热更新react-native-code-push](https://learn.microsoft.com/zh-cn/appcenter/distribution/codepush/)  
[国际化react-native-i18n](https://github.com/AlexanderZaytsev/react-native-i18n)  

## 文章
https://blog.csdn.net/first_helloword/article/details/109903486  
https://blog.csdn.net/LeoStarry2014/article/details/101178607  
https://blog.csdn.net/daniel1227/article/details/95972996  
https://blog.csdn.net/SpicyBoiledFish/article/details/70237681  
https://www.jianshu.com/p/78fd5694446a  
https://blog.csdn.net/qq_28483283/article/details/108239912  
https://stackoverflow.com/questions/36685372/how-to-zoom-in-out-in-react-native-map  
https://stackoverflow.com/questions/57227291/victory-native-events-props-not-working-in-react-native-event-not-firing-in/57723808  
https://www.jianshu.com/p/0a51624dee2f  
https://www.jianshu.com/p/8f75eb58b030  
https://www.cnblogs.com/sundaysgarden/p/10357051.html  

## 踩坑记
[疑难杂症之module map file not found](https://blog.csdn.net/weixin_43883776/article/details/106793263)  

## iOS16专题
https://github.com/facebook/react-native/issues/32496  
https://stackoverflow.com/questions/71597475/symbols-not-found-for-architecture-arm64-xcode  

## RN 0.72踩坑记
https://stackoverflow.com/questions/71702392/viewproptypes-will-be-removed-from-react-native-migrate-to-viewproptypes-export  
https://stackoverflow.com/questions/55664673/require-cycles-are-allowed-but-can-result-in-uninitialized-values-consider-ref  
https://www.jianshu.com/p/dd7c5d002303  
https://stackoverflow.com/questions/75772965/error-react-native-permissions-nativemodule-rnpermissions-is-null   
