-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: React Native
-
1 - XS (<= 1 day)
-
3579
Goals
A unified experience when running with or without chrome debugging mode.
Expected Results
Calling the getApp static method on the App class should work when in Chrome debugging mode.
Actual Results
An error is thrown in the Chrome console:
TypeError: _realm.App.getApp is not a function
Steps to Reproduce & Code Sample
Run this in a React Native app running Chrome debugging mode:
import { App } from 'realm'; const app = App.getApp('realmjstestapp-jjhtf');
Version of Realm and Tooling
- Realm JS SDK Version: 10.2.0
- Node or React Native: React Native in Chrome debugging mode
- Client OS & Version: iOS, N/A
- Which debugger for React Native: Chrome
Additional context
A workaround for now is to create the app using the constructor:
const app = new App('realmjstestapp-jjhtf');
As documented in the implementation of App#_setVersions we have an outstanding task of making it easier to implement the RPC for a static method on some class (App, User, Credentials, etc.): https://github.com/realm/realm-js/blob/master/lib/browser/app.js#L38-L42