-
Notifications
You must be signed in to change notification settings - Fork 758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building a code-push feature with this plugin? #335
Comments
Yes, I pretty much assume the existing plugins in that area are already using it. I would start by looking at the existing plugins from Microsoft and Ionic, they both have working implementations. Maybe you can even reuse them or something similar (which you will surely find by googling). |
thank you so much @janpio -- Would you believe i have tried a few "code push" plugins and they were not right, abandoned or will be rejected by Apple. I decided to go PhoneGap because the hydration feature was bait, it turns out PhoneGap is just broken, the whole thing feels like a temporary scaffold riddled with problems. Next, i gave MS App Center a try and their code-push plugin completely breaks my app. At 40/month you would think they would offer a clear path. Their code-push plugin renders a white screen of death with 'deviceready' never firing. That was 4 months ago and many trials and errors of removing platforms, re-adding, restoring plugins, in a deep analysis, methodical at first, and with patience. No luck, yesterday, i gave it a go again, i tried to get their plugin to run on 4 different machines with different configurations of dependencies. SO -- code-push is a 0 to 4 win. I don't even know how developers get it to work, i'm no noob either, 24 years engineering, i feel defeated. I told myself, there's got to be a simple way to write this and hence i landed on this repo looking for answers, not sure where to begin with a design. |
It would go at it this way: Make an archive of the files, upload somewhere, download it into the app, extract it, somehow remodel your app to load theses files on startup instead of the normal The most critical part being the remodeeling part - no idea how that could work. |
Your starting point really helped me visualize things a bit more. I've attached a drawing. The framework i am using, intrinsically has a "shell" setup. There is mainly 1 "src" folder that is the guts of the app. This is the folder i would need to archive/download and replace as you've suggested. So the index.html that is there along with other shell files can remain static and ship with initial app store builds. Problem is, how would "cordova-plugin-file" help me replace this folder with an updated "src" zip that i downloaded from server xyz? Or, can you suggest an alternative design to this? If so, it's a W3C-WebComponent meta-framework, not the traditional angular/react blackboxes. I have fully control of the entire life-cycle from "deviceready" all the way to render. |
It doesn't really matter what your source looks like, but what the built Cordova project looks like: You have a But I would look at the other plugins how they solve that problem - because that one is the hardest for now I think. |
What is the status of this query? |
@Nashorn Just stumbled over it when researching something unrelated: https://github.com/ionic-team/cordova-plugin-ionic/blob/8c64b2e42bdbe9f926e696cb93a784e012bfc377/www/common.ts#L359-L360 So Ionic Deploy downloads the files, puts them somewhere, then reloads the webview to that new location's |
Closing due to enough code pointers from Jan and lack of feedback from OP. |
Hi,
Is it possible to build a code push feature for apps using this api? I am not sure where to start/design it. Can anyone chime in?
The text was updated successfully, but these errors were encountered: