iOS演示

開源地址
專案地址
Andorid 版

Expo 版(需 Expo 移動端(Android/iOS))

簡介
專案基於Expo的 React Native 構建技術。
Expo 是一個圍繞 React Native 構建的免費開源工具鏈,可幫助您使用 JavaScript 和 React 構建本地 iOS 和 Android 專案
技術棧
- Expo
- React-Native
- React-Navigation
- Redux
- Redux-Saga
- LeanCloud
- Antd-Mobile
專案結構

準備工具
- 獲取 Expo 構建桌面客戶端(XDE)
- 獲取 Expo 預覽 iOS 或 Android 客戶端


使用方式
-
git clone https://github.com/zxj963577494/OverWatchTeams-React-Native-Expo.git
-
開啟桌面客戶端(XDE)載入本專案,啟動本專案,點選 Share 獲取二維碼
-
開啟 iOS 或 Android 客戶端,掃描 XDE 客戶端二維碼
專案生成
-
yarn global add exp
-
exp build:ios / build:android
-
exp build:status
專案釋出
-
yarn global add exp
-
exp publish
一些說明
exp build:ios/build:android
生成的是 JS Bundle 檔案,Expo 會將該檔案上傳到 Expo 雲端,由 Expo 構建 APP,使用exp build:status
可以得到 APP 在雲端構建的進度,構建完成後,會返回 APP 地址
使用 exp build:ios
時必須有$99 的開發者賬戶(我沒有,所以沒構建 iOS 版本),如果 apple id 開啟了兩步驗證,需要加--local-auth
exp publish
用於釋出 JS Bundle 檔案,用於熱更新應用,更改 app.json 檔案的版本號,icon 之類,使用者安裝的 App 會自動同步釋出時版本所改動的內。參考資料 1 參考資料 2
Expo 無法像原生 React Native 一樣,可以對本地模組進行操作,當然react-native link
命令也是無法使用的,但你可以使用 Expo 開放的操作本地功能的 API,SDK API 參考