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

Background refresh not updating badge #86

Open
emichael opened this issue Jun 21, 2019 · 6 comments
Open

Background refresh not updating badge #86

emichael opened this issue Jun 21, 2019 · 6 comments

Comments

@emichael
Copy link

It seems like the app isn't actually updating in the background. I have both "Sync on Start" and "Sync in Background" turned on in settings. I saw an update in the news on the nextcloud web client. The app was open in the background, I left it on the charger connected to wifi all night, and in the morning still no update to the unread badge. As soon as I opened the app it updated.

I'm running iOS 12.3.1 on an iPhone 8 and am using a Nextcloud 15 server. I have background app refresh turned on in the iOS settings as well.

@phedlund
Copy link
Contributor

The app relies on the background fetch mechanism provided by iOS. The frequency and time of updates is determined by the OS. What you as a user can do to influence those parameters is to actually use the app. iOS will adapt to how frequently the app is opened, when it's being used, and if there is actually new data available to fetch.

@emichael
Copy link
Author

emichael commented Jun 23, 2019

Sure, I just thought that 10+ hours was definitely long enough to wait based on my experience with other apps and background refresh. I'll keep an eye on it and see what happens after I've been using the app for a couple weeks.

@phedlund
Copy link
Contributor

Other apps might have the possibility of sending silent push notifications in background letting it know that there is new content available. With the NextCloud model of personal servers it's hard to achieve something like that.

@emichael
Copy link
Author

emichael commented Jun 24, 2019

I think I have more info. I noticed this morning that my server has a couple log entries like this every hour or two.

{"reqId":"XXXXXXXXXXXXXXXX","level":2,"time":"2019-06-24T19:59:16+00:00","remoteAddr":"192.168.1.12","user":"--","app":"core","method":"GET","url":"\/index.php\/apps\/news\/api\/v1-2\/feeds","message":"Login failed: '(null)' (Remote IP: '192.168.1.12')","userAgent":"iOCNews\/3.8.4 (iPhone; iOS 12.3.1; Scale\/2.00)","version":"15.0.8.1"}

192.168.1.12 is the IP of my iPhone on my LAN.

These entries do not appear when I manually refresh the app, and the sync does actually succeed then.

@phedlund
Copy link
Contributor

Interesting. I have not seen that before. Try adding /index.php to the url when you log in from CloudNews. Have you configured pretty urls as described https://docs.nextcloud.com/server/16/admin_manual/installation/source_installation.html#pretty-urls?

@emichael
Copy link
Author

No luck with adding /index.php. Connection Failure on the client, I can't even add the server like that.

I have not configured pretty URLs. I'm running the snap distribution of Nextcloud, and it looks like there are some issues with trying to get that setup.

Sync is working when I refresh manually, though.

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

No branches or pull requests

2 participants