React Native开源项目-Github客户端(Android、iOS)-来自阿里开发人员

xinqing623 8年前

来自: 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技术爱好者加入交流!

运行效果

功能说明
  1. Feeds like web github home.  (Github个人主页)
  2. Search users or repos.      (搜索用户或者开源库)
  3. Star, watch repos, follow guys.  (start,watch库,follow用户)
  4. Explore trending repos daily, weekly, monthly.   (查看浏览趋势)
  5. 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模式

开发模式直接运行如下命令即可

react-native run-android
</div>