React Native開源項目-Github客戶端(Android、iOS)-來自阿里開發人員
來自: http://www.lcode.org/react-native-source-gitfeed/
@xiekw2010 做的純React Native Github客戶端,兼容Android、iOS平臺,開源地址: https://github.com/xiekw2010/react-native-gitfeed
來自阿里巴巴技術人員,重點推薦。歡迎大家star,fork....
項目介紹
采用React Native技術進行開發的Github客戶端,完成兼容Android、iOS平臺。
剛創建的React Native技術交流2群( 496601483 )歡迎各位大牛,React Native技術愛好者加入交流!
運行效果
功能說明
- Feeds like web github home. (Github個人主頁)
- Search users or repos. (搜索用戶或者開源庫)
- Star, watch repos, follow guys. (start,watch庫,follow用戶)
- Explore trending repos daily, weekly, monthly. (查看瀏覽趨勢)
- Check who's famous in some filed all of the world. (檢查特殊的commit)
構建方法
(一).注冊(如果你不要進行登錄,就可以跳過這一步)
1.需要你的一個Github開發的key和secret,通過點擊 這里 進行檢查
2.change
config.js (修改config.js文件)
(二).安裝JS環境
1.命令行切換到項目根目錄,運行npm install
if error about 'EACCS' try 那么繼續執行sudo chown -R $(whoami) "$HOME/.npm"命令一下
(三).iOS環境
切換到ios項目中,使用xcode進行打開ios項目,命令上cd ios,然后運行pod install
(四).iOS Release模式修改
1.編寫 xcode 項目 RN_CNNode's scheme to release 模式,截圖如下:
2.在項目跟路徑,打包 JS resources,具體命令如下:
react-native bundle --platform ios --entry-file index.ios.js --bundle-output ./release/main.jsbundle --assets-dest ./release --dev false
3.xcode運行即可(五).iOS Debug模式修改
編輯 xcode 項目
RN_CNNode
's scheme to Debug 模式,然后xcode直接運行既可以
(六).Android環境
通過AndroidStudio進行打開項目,然后可能會發很長時間的進行構建項目,這個過程一定要耐心等待。
(七).Release模式
使用USB連接設備,打開AndroidStudio修改Build Variants成Release。設備運行如下命令:
sh ./build_android.sh
如果是模擬器直接運行項目即可。
(八).Debug模式
開發模式直接運行如下命令即可
</div>
react-native run-android</div>