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:
- Set up update listener
- Set channel
- 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 |
/attempt #231
Options
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! ππ