Closed jamielob closed 7 years ago
Default:
Reloader.configure({
check: false,
reload: 'start',
resumeMethod: 'eventAndTimer',
resumeTimer: 1000 * 60 * 60, // 1 hour
launchScreenDelay: 100,
});
For reload: start
, we're never calling .reload()
, so we don't need resumeMethod/Timer
, right? I'm fine w/ rest, let's just strongly recommend at least check first start :)
I think we do - because if the resumeTimer
runs out then it would be considered a start next time.
Also, I think you're right to have check on firstStart as the default. I'll adjust above.
I would say that's reload: startAndResume
with a resume minimum 1 hr.
But consider this situation. reload: 'start'
is set.
This is why I think we need a timer that says, if you come back to the app within a certain time, it should always be considered a resume.
This is based on the scenario provided here: https://github.com/jamielob/reloader/issues/3
App is reloaded because it considers it a "start".
We can't stop that from happening, right? With 1.3, if new code has been downloaded, it will be used on the next cold start?
Hmmm. Yeh I think you're right, I'd forgotten that bit. In that case I don't think there's a need for resumeMethod
- I only introduced that to combat the above scenario.
@lorensr You had previously mentioned two timers, one for check and one for resume - what scenario's were you thinking those would be used for?
{
check: 'firstStart'
checkIdleCutoff: N/A
checkTimer: 3000
reload: 'startAndResume'
reloadIdleCutoff: 1 hour? dunno. just don't want it restarting when the user is multitasking, and about to come back to the app soon.
launchScreenDelay: 0
}
one for reload startAndResume
, and one for check: everyStart
@jamielob cool package - I have been hitting some issues with reload on resume (see https://github.com/meteor/meteor/issues/7876#issuecomment-260181121 ) and wanted to check if there's a config I could use for manual updates?
ie always be manual, use the updateAvailable
helper to allow a user to manually get a hot code push.
@adamgins yes you could do check: false
, although I would at least do 'firstStart'
, and refresh: 'start'
(default behavior in current Meteor)
Hi @lorensr thanks, I am still seeing some refreshes on some users' phones without displaying the "click to reload". Always hard to debug on someone's physical phone, but I wanted to check two things regarding my configuration:
Reloader.configure({
check: 'firstStart', // Check for new code every time the app starts
checkTimer: 5000, // Wait 3 seconds to see if new code is available
refresh: 'start',
idleCutoff: 1000 * 60 * 10 // Wait 10 minutes before treating a resume as a start
});
So I am thinking of a couple of causes:
1) The user does not have the latest code... I had not refreshed the appStore yet, so reloader
is not actually running
2) My settings allow a refresh
3) perhaps a bug
If I only want manual refreshes, ie via
{{#if updateAvailable}}
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert">×</button>
<a class="button" reloader-update>Tap here to update the Buzzy app!</a>
</div>
{{/if}}
Are my settings correct or can the app refresh without a user clicking the button?
thanks for the help
Are my settings correct
Yep. And idleCutoff
is unnecessary.
@lorensr - closing the v2 issues since it looks like we've both moved on to React Native and probably won't improve this package.
Working blueprint
When to do additional checks:
When to reload the code already downloaded:
How to differentiate between a start and a resume: