matrix-org / matrix-org/matrix-ios-sdk

Store Messages And Rooms

Open
#497 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C
Stars
484
Forks
225
PR merge metrics
No merged PRs in 30d

Description

Hello. We want to offer offline experience and we use the **MXFileStore** in the app delegate:
```objc
...
// Prepare account manager
MXKAccountManager *accountManager = [MXKAccountManager sharedManager];

// Use MXFileStore as MXStore to permanently store events.
accountManager.storeClass = [MXFileStore class];

[accountManager prepareSessionForActiveAccounts];
....

```

Then to load the recents we use this code:
```objc
// Create a data source for managing data
MXKRecentsDataSource *recentsDataSource = [[MXKRecentsDataSource alloc] initWithMatrixSession:mxSession];

// Create the view controller that will display it
MXKRecentListViewController *recentListViewController = [[MXKRecentListViewController alloc] init];
[recentListViewController displayList:recentsDataSource];
```

But without internet connection any room is shown... Why?

P.S. The session comes form the AccountManager.shared.account.first.mxSession

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the MXFileStore setup in the app delegate and how MXKRecentsDataSource obtains rooms from the session. Reproduce the behavior with the session from AccountManager.shared.account.first.mxSession while offline, then determine why stored rooms are not displayed and verify that recents load without an internet connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.