You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use Realm in my RN application, but I get a crash on a splash screen (provided in the 'Actual Results" section).
DB is not even used. I moved initialization to the initDatabase method that I am not calling from code. Code snippet is attached at the very end.
Goals
Realm works on iOS
Expected Results
Realm works on iOS
Actual Results
Steps to Reproduce
yarn install
cd ios && pod install
Code Sample
Version of Realm and Tooling
Realm JS SDK Version: 10.5.0
Node or React Native: React Native 0.64.1
Client OS & Version: ? iPhone X, iOS 14.6
Which debugger for React Native: ? None
import Realm from 'realm'
import { Playlist } from './playlist'
class Database {
realm: Realm
playlist: Playlist
public initDatabase() {
try {
this.realm = new Realm({
schema: [Playlist],
inMemory: true,
schemaVersion: 1.0,
})
console.log('path', this.realm.path)
this.playlist = new Playlist()
} catch (err) {
const { message } = err as Error
console.error('Failed to open the realm', message)
}
}
//TODO: Specify data type. It will exist in playlist store.
public addPlaylist(data: any): void {
this.playlist.addPlaylist(this.realm, data)
}
public getPlaylists(): Realm.Results<Realm.Object> {
return this.playlist.getPlaylists(this.realm)
}
// public getPlaylistExercises(playlistId: number) {
// return this.playlist.getExercises(playlistId)
// }
public closeConnection() {
this.realm.close()
}
}
export default new Database()
The text was updated successfully, but these errors were encountered:
I am trying to use Realm in my RN application, but I get a crash on a splash screen (provided in the 'Actual Results" section).
DB is not even used. I moved initialization to the
initDatabase
method that I am not calling from code. Code snippet is attached at the very end.Goals
Realm works on iOS
Expected Results
Realm works on iOS
Actual Results
Steps to Reproduce
Code Sample
Version of Realm and Tooling
The text was updated successfully, but these errors were encountered: