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

Improves messages background fetch #162

Open
2 tasks
tomastiminskas opened this issue Sep 27, 2024 · 0 comments
Open
2 tasks

Improves messages background fetch #162

tomastiminskas opened this issue Sep 27, 2024 · 0 comments
Labels

Comments

@tomastiminskas
Copy link
Contributor

Improve messages background fetch so new messages are available and visible any time you enter the app from background as any other chat app in the market

Base branch: develop

Requirements

  • Improves messages background fetch while in background
  • Gets new messages while in background to have them available to be shown immediately when entering the app from background

Acceptance Criteria

  • Reduce messages load time to ~0 when entering the app from background
  • Improves fetching time and consistency on any way

References and suggestions

  1. SphinxOnionManager.swift - func reconnectToServer: every time app becomes active the reconnectToServer logic will be called. App will connect to MQTT and onConnected callback app will publish to MQTT and will get new messages from it.
  2. didReceiveRemoteNotification method on AppDelegate is called every time a push is received (since push notifications includes content-available: 1 param). This method triggers a connection to MQTT and a fetch of new messages
  3. In addition a BGTaskScheduler is registered and scheduled every 15 minutes in didFinishLaunchingWithOptions which also triggers a new messages fetch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant