realm-js: Coop with Jisti-Meet library: Realm has no setter or ivar for its bridge, which is not permitted.

Goals

I want to use Jitsi-Meet (Video calling library) with Realm

Expected Results

App should run without any issue

Actual Results

When I run the app on iOS, Realm does not work. It shows the following error:

2018-12-28 16:22:34.504 [error][tid:main][RCTModuleData.mm:179] Realm has no setter or ivar for its bridge, which is not permitted. You must either @synthesize the bridge property, or provide your own setter method.

Realm works fine if I remove Jisti-Meet Library

Steps to Reproduce

  1. Create a new react-native app: react-native init AwesomeProject
  2. Install realm-js: npm install realm --save and react-native link realm
  3. Install React Native Jisti Meet: npm install react-native-jitsi-meet --save
  4. Under Build setting set Dead Code Stripping to No, set Enable Bitcode to No and Always Embed Swift Standard Libraries to Yes
  5. add node_modules/react-native-jitsi-meet/ios/WebRTC.framework and node_modules/react-native-jitsi-meet/ios/JitsiMeet.framework to the Embed Binaries.
  6. select Build Settings, find Search Paths . Edit BOTH Framework Search Paths and Library Search Paths. and add path on BOTH sections with: $(SRCROOT)/../node_modules/react-native-jitsi-meet/ios with recursive

Now run the app and the app will show the error.

Code Sample

filename: App.js

import React, {Component} from 'react'; import {Platform, StyleSheet, Text, View, Button} from 'react-native'; import Realm from 'realm'; `const instructions = Platform.select({ ios: ‘Press Cmd+R to reload,\n’ + ‘Cmd+D or shake for dev menu’, android: ‘Double tap R on your keyboard to reload,\n’ + ‘Shake or press menu button for dev menu’, });

type Props = {}; export default class App extends Component<Props> {

constructor(props) { super(props); this.state = { realm: null }; }

componentWillMount() { Realm.open({ schema: [{name: ‘Dog’, properties: {name: ‘string’}}] }).then(realm => { realm.write(() => { realm.create(‘Dog’, {name: ‘Rex’}); }); this.setState({ realm }); }); }

render() {

const info = this.state.realm
? 'Number of dogs in this Realm: ' + this.state.realm.objects('Dog').length
: 'Loading...';


return (
  <View style={styles.container}>
    <Text style={styles.welcome}>Welcome to React Native!</Text>
    <Text style={styles.instructions}>To get started, edit App.js</Text>
    <Text style={styles.instructions}>{instructions}</Text>
    <Button title="Video" 
    // onPress = {() => initiateVideoCall()} 
    />
    <Text style={styles.welcome}>
      {info}
    </Text>
  </View>
);

} }

const styles = StyleSheet.create({ container: { flex: 1, justifyContent: ‘center’, alignItems: ‘center’, backgroundColor: ‘#F5FCFF’, }, welcome: { fontSize: 20, textAlign: ‘center’, margin: 10, }, instructions: { textAlign: ‘center’, color: ‘#333333’, marginBottom: 5, }, }); `

Version of Realm and Tooling

  • Realm JS SDK Version: 2.21.1 (Lower versions also have the same issue )
  • Node or React Native: RN 0.57.8
  • Client OS & Version: iOS Real Device - 12.1.2
  • MacOS: 10.13.6 High Sierra
  • Which debugger for React Native: React Native Debugger

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 15 (3 by maintainers)

Commits related to this issue

Most upvoted comments

Best of luck 😃

@bmunkholm I have sent an email to sales@realm.io. Could you please look into it? We have a fast approaching deadline. If it is taking time, we will have to shift to WatermelonDB.