onnela-lab / beiwe-ios

Beiwe is a smartphone-based digital phenotyping research platform. This is the Beiwe iOS app code. The Beiwe2 app is also available on the Apple app store to use with open source builds of the Beiwe backend.
https://www.beiwe.org/
BSD 3-Clause "New" or "Revised" License
21 stars 13 forks source link

[ios] app-initiated Notifications and survey scheduling logic Don't Exist #30

Open biblicabeebli opened 1 year ago

biblicabeebli commented 1 year ago

The iOS app is currently wholly dependent on push notifications sent by the server. App version 2.5+ is stable enough for this to be viable, but the correct solution is to extend the app's understanding of state to allow it to display notifications and run surveys under conditions where it has no internet connection. (this feature should be built from scratch and the state should be shared with the backend so that the app state can be displayed.)

Original post

In my own testing of push notification enhancements on the backend it has become clear that the device notifications that are supposed to be initiated by the app simply are not working reliably.

This occurred in developing the moving window backend hack to force absolute and relative survey schedules to appear as "weekly" surveys, they simply did not work where they worked fine on Android.

biblicabeebli commented 1 year ago

I need to retest this, it may be resolved by the same changes that fixed other at-launch-time issues. (This issue was not automatically added to my todo list on creation, need to fix that)

biblicabeebli commented 1 year ago

Survey schedule logic is ... gone?? I found some old code from the original dev in an old commit from 2017 that involved parsing the scheduling logic for surveys, but its not in the app anymore.

How did this happen?

hydawo commented 11 months ago

Eli will need a chunk of continuous time (~1 week) to work on this. It is important, but not urgent right now. Revisit in September

biblicabeebli commented 7 months ago

I have made some improvements to ios timers, but this issue is not yet complete.

biblicabeebli commented 3 weeks ago

Update: during the substantial 2.5 iOS app dev push I rewrote a lot of code, and decided to remove the single internal survey scheduling feature that I found. This feature was crap, it set a timer for 7 days on weekly surveys, and probably did not work before 2.5 because the app was not persistent enough across 7 days. (I meant that it did not set the next schedule, it literally just set a hardcoded 7 day timer.)

I guess now that I know there isn't any logic AT ALL I'll rename the issue.