IllusionVK / ReplaceAppCenter

A place to discuss alternatives for CodePush and maybe also the distribution of apps.
30 stars 0 forks source link

CodePush alternative #2

Open dylanvdmerwe opened 2 years ago

dylanvdmerwe commented 2 years ago

AppCenter offers many different types of services.

The one my company and my clients all make use of heavily is CodePush.

Due to the deprecation of AppCenter, as previously mentioned, the only viable supported alternative is Ionic's AppFlow Live Update which is prohibitively expensive. If they had a much lower pricing model it that would change things, however it is not going to happen. Another problem with AppFlow's offering is that they limit the amount of deployments/installs of their "live updates" that can be deployed, which in my opinion is a bit greedy.

We can do better, and need an alternative.

Components:

An MVP alternative solution to CodePush would need to include:

Functionality after MVP to align to CodePush current functionality:

API Interface:

Should the backend be something that is centrally run and funded that everyone can make use of (like with AppCenter), or should it be something that people can setup and manage through their own infrastructure? I am leaning towards having the service being able to easily deploy on your own infrastructure.

I believe, through the code already available for CodePush, as well as things like this (https://github.com/lisong/code-push-server), we should be able to come up with something relatively simple for our needs that can replace the CodePush and negate the necessity for AppFlow's Live Updates (and monthly fees).

Happy to have further discussions about how we can go about creating something to benefit the entire community over the long-term.

IllusionVK commented 2 years ago

Hey @dylanvdmerwe thanks so much for the write up...

In the past we have used 2 other plugins/frameworks that allowed us to push updates

They took a far less complex/involved process where we would just run a command that created a manifest and then we copied the folder of code to the server. The app then downloaded the manifest and compared the hash of its current files to the manifest... if any didn't match then the app downloaded the changed files... What killed cordova-hot-code-push was the move to WKWebView and the authors changing priorities....

Anyway, thats our backstory.... I think your MVP is probably correct, but (and i'm sure you'd agree) I think the first step is to work out what lisong's repo has/doesn't have... for now if we had to manually copy a file(s) to a server to allow the app to see and download them, and it worked, that would be a massive step forward (especially as creating a node server with a few APIs is not that hard)...

So what I am ignorant on is the CodePush 'spec'... it used to be open source until MSFT bought it... so i'm not really sure how complex or simple it is.. do you have any visibility as to its architecture ?

IllusionVK commented 2 years ago

hmm, interesting, I just came across this that may be worth a look https://github.com/shm-open/code-push-cli

raphjutras commented 2 years ago

One problem I see is that if we use current code-push SDK, if Cordova/Capacitor gets updated it would not only be a 'CLI' update.. SDK plugin update for iOS and Android, more work...

One guy there looks like he is using the Ionic plugin directly: https://ion.appit-online.de/ ... using cordova-plugin-ionic@4.1.7

Now he has just forked the Original ionic plugin and host it on : https://github.com/appit-online/appit-ionic-plugin What he did is created a backend and API to publish the code, changed original code to point to it's API endpoint.

In fact, my #1 solutions to this problem was by using his service (and I probably will). The only thing that I wasn't sure about is the 'serious' of his project. Hosted on a .de website, cheap and affordable pricing, which is cool, but it doesn't 'comfort' me in a business point of view.

If we do the same, re-use cordova-plugin-ionic (MIT), we get a CLI, and a maintained Plugin. We could also try contact that guy at appit-online which has done a good part of the job so far.

PS: There are still a lot of apps on Cordova and I think it needs to be considered with Capacitor. (yes, I am still using Cordova)

byronigoe commented 2 years ago

I am ready, willing, and able to help with coding and testing (especially on Android).

To me the top priority is self-hosting, to avoid the unnecessary dependence on someone else's server. Also, the minimum viable product is client-side code that can launch the app from files stored in a writable location, and fall-back to the stock code in case of error. If we have that, then the downloading, versioning, roll-back, authorization, code-signing, and CLI are all nice-to-haves.

It would be great if we didn't have to start from scratch. Has anyone already tested any of the repos that have been linked? I don't want to duplicate efforts. Can we organize the research information better, like using the Wiki instead of Issues and comment threads?

VaibhavFuke commented 2 years ago

I actually had some experiment's directly on native side. simply tried changing url path to something else. and it worked. even with native plugin if we import cordova.js file in that update.html. So if you can help me build the simple plugin

  1. Download update.zip
  2. Extract locally
  3. Change Url.

Rest I assured. can be done. I will help. building the saas version. Which can be hosted by individuals.

riderx commented 2 years ago

Hey guys just in case you didn't see my issue here : https://github.com/IllusionVK/ReplaceAppCenter/issues/7#issue-1175870240 i made an alternative plugin fully open source in December. Only avaible for Capacitor since that what i use most theses days