Coder Social home page Coder Social logo

chuyik / code-push-bsdiff Goto Github PK

View Code? Open in Web Editor NEW
4.0 8.0 0.0 5.76 MB

An enhanced CodePush with BSDiff algorithm and self-hosted server. Fully compatible with CodePush.

License: Other

JavaScript 13.74% Ruby 0.13% Java 10.95% Objective-C 15.92% C 37.63% C++ 3.11% TypeScript 9.44% C# 9.07%

code-push-bsdiff's Introduction

[WIP] CodePush BSDiff for React Native

中文文档

Note: This project is fully compatible with CodePush.
So if you want to learn any details of CodePush, please visit CodePush GitHub repo to view the docs.

What's the differences between CodePush BSDiff and CodePush?

The original CodePush client supports differential updates, that means the end users will only download the files they need, which is great.
But CodePush BSDiff takes a step forward, it allows user to download the pieces of the files they need rather than a whole file, which results in a remarkable reduction in size.
Since the CodePush service provided by Microsoft does not support BSDiff, to achieve that, you have to host a CodePush BSDiff server which is open source with the BSDiff logic.
According to our tests on a React Native starter app, the update sizes from MS CodePush service is 173KB while the size from our server is less than 1KB!

Supported React Native platforms

  • iOS (7+)
  • Android (4.1+)

This library supports React Native v0.43 and above since it's based on CodePush v2.0.
Any we try our best to merge any commits from upstream, so you won't miss any support and bugfix from MS CodePush.

Getting Started

  1. Host code-push-bsdiff-server on your server

TODO

  1. Create an account on that server

TODO

  1. Register your app with the service

TODO

  1. CodePush-ify your app

TODO

  1. Release an app update

TODO

Example App

TODO


中文文档

*注意:该项目完全兼容 CodePush。
所以如果你想了解 CodePush 的任何细节的话,请点击 CodePush 项目仓库 查阅文档学习。

CodePush BSDiffCodePush 有什么差别?

现有的 CodePush 客户端支持文件增量更新,即可以让用户只需下载他们所需的文件。
但是 CodePush BSDiff 做得更多,在热更新过程中,它只会下载所需文件的缺失部分,而不是一整个文件。
这将 大幅度减小更新包的体积
不过想要达到这个效果,你需要部署一个实现了 BSDiff 逻辑的 开源 CodePush 服务器
根据我们在一个新 RN 项目上的测试,更新包体积由原来的 173KB 下降到 > 1KB

支持的 React Native 平台

  • iOS (7+)
  • Android (4.1+)

该项目基于 CodePush v2.0,支持 React Native v0.43 以上的版本。
我们会不定时合并 MS CodePush 的代码,所以你不用担心错过新版本的支持和其它 bugfix。

入门

  1. 部署 code-push-bsdiff-server 到你的服务器上

TODO

  1. 在该服务器上创建一个账户

TODO

  1. 在该服务器上注册应用信息

TODO

  1. App 上安装 CodePush BSDiff 客户端

TODO

  1. 发布一个应用更新

TODO

示例应用

TODO


Donation

If you find this project useful, you can buy us a cup of coffee:


Acknowledgements

We are grateful to the authors of existing related projects for their ideas and collaboration:

Contributors

chuyik
chuyik

code-push-bsdiff's People

Contributors

abodalevsky avatar almouro avatar ankurd1 avatar arnif avatar buptkang avatar christopherdro avatar chuyik avatar cmcewen avatar corymsmith avatar dbasedow avatar dingbat avatar felipecsl avatar geof90 avatar greena13 avatar hilkeheremans avatar hinzo avatar igrayson avatar l-jovi avatar lostintangent avatar madsleejensen avatar max-mironov avatar mrspeaker avatar nevir avatar oney avatar opengeekslab avatar rozele avatar sergey-akhalkov avatar shishirx34 avatar sogko avatar tlvenn avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.