Skip to content
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

In Cordova hot code push, don't download all files #4858

Closed
lorensr opened this issue Aug 1, 2015 · 10 comments
Closed

In Cordova hot code push, don't download all files #4858

lorensr opened this issue Aug 1, 2015 · 10 comments
Assignees

Comments

@lorensr
Copy link
Contributor

lorensr commented Aug 1, 2015

When I have many small files, it takes a long time for them all to be fetched. Ideally, it would be nice if it automatically only downloaded files that have changed. A simpler first step could be to add a config var that excluded certain files/folders from being downloaded, eg for static assets that rarely change.

@martijnwalraven
Copy link
Contributor

You're right, and only downloading changed files is on my list of improvements to the Cordova integration that I plan on working on. I don't think this will make it into the Meteor 1.2 release, but hopefully it won't be too long after.

@glasser glasser added confirmed We want to fix or implement it Project:Mobile and removed confirmed We want to fix or implement it labels Aug 11, 2015
@derwaldgeist
Copy link

Any updates on these changes? To be honest, the whole hot code push thing really bugs me.

@martijnwalraven
Copy link
Contributor

You're not the only one :) I'm in the process of completely rewriting our Cordova plugin and other Hot Code Push code. No promises, but I'm shooting for a preview release in October.

@derwaldgeist
Copy link

Thanks a lot for taking action on this. Good to hear you're actively working on it.

So I think I'd better postpone my Meteor 1.2 upgrade until this change is included as well, because it always takes some to add all changes manually to my hybrid app. For me, it's not just a matter of calling meteor update...

BTW: Are you also planning to de-couple the tight dependency between Meteor releases and Cordova versions in the future? At the moment, I can't use Velocity Jasmine as it throws errors on Meteor 1.1, and I am hesitating to update to Meteor 1.2 because this would force me to re-apply my changes to the standard Meteor Cordova app structure (which I only want to try once your HCP improvements are available). At the moment, the whole Cordova integration seems to be so fragile to me (at least on iOS, Android works much better), that I am in the "never touch a running system" mode. Although I can understand that it is not really easy to make loose-coupling work here, it would really help a lot to sort out such kind of dependency issues.

@martijnwalraven
Copy link
Contributor

We've talked about this, but Cordova upgrades tend to be a bit unpredictable in terms of backwards compatibility and newly introduced bugs, and we'd like to make sure we do some QA of ourselves to make sure we offer a good developer experience (I'm fully aware we haven't lived up to that, but we certainly hope to improve on that in the future). I think the most important improvement here is to do more frequent releases.

Your case is kind of special because you've made modifications to the generated Cordova project, and to the Xcode project in there. Unfortunately, this is something that isn't even officially supported by Cordova itself (using what they call the cross-platform workflow). I recognize the need for better support of hybrid apps, but the current setup isn't ideal for this and a proper solution will likely require changes to either Cordova or our integration.

@derwaldgeist
Copy link

Thanks for sharing these insights. Yes, I can pretty much understand the reasons why you want to focus on good QA. And I also know that my case it somewhat special, but I think hybrid applications will become more common in the future, as they allow to combine the best of both worlds. It is still quite hard to obtain the "native feeling" with web technology alone. Maybe React native will bring us a step forward on this, once it also supports other platforms than just iOS.

Regarding Cordova's official support for hybrid scenarios: at least they're documenting how to mix your own code with a cordova implementation, as documented here. As far as I can tell from the docs, this was one of the major goals of the "Cleaver" project. So I wouldn't say this isn't officially supported.

@martijnwalraven
Copy link
Contributor

I'm pretty excited about React Native, and I believe the ability to create JavaScript-based hybrid apps would be a great match for Meteor. Android support was actually open sourced a few weeks ago.

The issue with creating hybrid apps using Cordova is that embedding web views in your own native app isn't really supported if you use the cross-platform workflow, which is how Meteor integrates with it.

@derwaldgeist
Copy link

I haven't digged deeper into React Native. Does it allow to mix the React Native parts with "real" native parts as well? I'm asking because I would need some sort of deep-integration into the OS environment to some extent; that was the main reason why I went for a hybrid approach. The other reason was that the Meteor part took so long to startup - and I wanted to cover these long startup times by having a kind of teaser functionality that is up and running instantly.

Regarding the cross-platform workflow: Yes, that's true. I'm actually using a mix of both approaches: Pure CLI for Android, and hybrid for iOS. Main reason is that I don't have the time to support both platform on a hybrid level, at least in my startup phase.

@martijnwalraven
Copy link
Contributor

Well, the main benefit of React Native is that it renders to a native view hierarchy, so these are already technically native parts. You also have the ability to write your own components with native counterparts. If there is a need for more customization, you can embed a React Native view hierarchy into an existing app.

@martijnwalraven
Copy link
Contributor

This has been fixed in Meteor 1.3! A new beta is now available, please give it a try: #6266.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants