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

Setting up application background processes for data download #336

Open
2 tasks done
SaurabhJamadagni opened this issue Jul 1, 2023 · 1 comment
Open
2 tasks done
Labels
data Relates to data or Wikidata

Comments

@SaurabhJamadagni
Copy link
Collaborator

SaurabhJamadagni commented Jul 1, 2023

Terms

Description

This issue documents native iOS settings to request user to run processes in the backgound. This would be used in fetching updates when language data is updated as well allow data to be downloaded in the background.

Issue was discuseed in a weekly meeting conducted on 27th June, 2023.

@SaurabhJamadagni is looking into the documentation to set this up.
@andrewtavis could look into the implementation.

This issue is open to discussion from the community. Please feel free to share your ideas on ways to execute this 😊

@SaurabhJamadagni SaurabhJamadagni added the data Relates to data or Wikidata label Jul 1, 2023
@SaurabhJamadagni SaurabhJamadagni changed the title Setting up application background process for data download Setting up application background processes for data download Jul 1, 2023
@SaurabhJamadagni
Copy link
Collaborator Author

Hey @andrewtavis, here's some documentation that might be helpful for this issue:

Doc: Using background tasks to update your app

  • Tasks can be scheduled using the BGTaskScheduler object. There is a shared instance that can be used.
  • There are two types of tasks -- BGAppRefreshTask and BGProcessingTask.
    • BGAppRefreshTask is for short-duration tasks that expect quick results, such as downloading a stock quote.
    • BGProcessingTask is for tasks that might be time-consuming, such as downloading a large file or synchronizing data.
    • I think we could use BGProcessingTask to download the updated data. But then use BGAppRefreshTask to update the buttons from say Downloaded to Update Available. The strings can be as per our design files of course.
  • We need to add Background Modes capability to the necessary targets.
  • Tasks need an identifier and then we can add them to the Info.plist file under ”Permitted background task scheduler identifiers“.
  • We can then register, schedule and run tasks. I think the doc might be the best explanation for how to proceed with registering and submitting the task. We will be using the BGTaskScheduler object for registering and submitting the scheduled request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data Relates to data or Wikidata
Projects
Status: Todo
Development

No branches or pull requests

1 participant