Cap-go / capacitor-updater

Capacitor plugin for Instant updates: Ship updates, fixes, changes, and features within minutes

Home Page:https://capgo.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat: setChannel to trigger checking for an update

simon-acuitymd opened this issue Β· comments

Feature Request

Description

When you call setChannel, you likely want to check if there are any pending bundles for that channel and get an update. Right now you can either use manual mode API calls and string together a download, or you can reopen the app to trigger fetching a new bundle and then the user has to reload the app again.

It would be nice if setChannel had an option to trigger checking for & downloading new bundles. The pattern I would then be able to use is:

  1. Set up update listener
  2. Set channel
  3. Respond to update event in the listener by reloading the view

Platform(s)

All? I'm on ios but presumably this is useful for all platforms.

Preferred Solution

Mentioned in the description.

/bounty 50

πŸ’Ž $50 bounty created by riderx
πŸ™‹ If you start working on this, comment /attempt #231 to notify everyone
πŸ‘‰ To claim this bounty, submit a pull request that includes the text /claim #231 somewhere in its body
πŸ“ Before proceeding, please make sure you can receive payouts in your country
πŸ’΅ Payment arrives in your account 2-5 days after the bounty is rewarded
πŸ’― You keep 100% of the bounty award
ℹ️ If something is not clear ask before working on it, otherwise your chance to rework it is high
πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Join the Discord to get help
πŸ™ Thank you for contributing to Cap-go/capacitor-updater!

Attempt Started (GMT+0) Solution
🟒 @WcaleNieWolny Aug 16, 2023, 11:39:41 AM #241

Is calling getLatest() not enough?

Some user want it more simple.
Like setchannel do the getLatest and the set all at once.
An alternative solution would be to document how to do them all at once

How would I go about actually testing my changes? I believe I can test this on android as I run linux but writing code on macos would not be possible for me. How do I go about implementing this in IOS?

On ios that will be hard if you don't have a mac, maybe you can use a vm but not sure it will be convenient

I will do my best with the android feature for now. It could serve as a reference impl for somebody to implement this on IOS. Will that work?

I will probably not submit a PR for this until tomorrow or the day after that as I do have to properly setup my environment

I think i can help on IOS part

πŸ’‘ @WcaleNieWolny submitted a pull request that claims the bounty. You can visit your org dashboard to reward.

πŸŽ‰πŸŽˆ @WcaleNieWolny has been awarded $50! 🎈🎊