Coop with Jisti-Meet library: Realm has no setter or ivar for its bridge, which is not permitted.
See original GitHub issueGoals
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
- Create a new react-native app:
react-native init AwesomeProject
- Install realm-js:
npm install realm --save
andreact-native link realm
- Install React Native Jisti Meet:
npm install react-native-jitsi-meet --save
- Under Build setting set Dead Code Stripping to No, set Enable Bitcode to No and Always Embed Swift Standard Libraries to Yes
- add
node_modules/react-native-jitsi-meet/ios/WebRTC.framework
andnode_modules/react-native-jitsi-meet/ios/JitsiMeet.framework
to the Embed Binaries. - select
Build Settings
, findSearch Paths
. Edit BOTHFramework Search Paths
andLibrary Search Paths
. and add path on BOTH sections with:$(SRCROOT)/../node_modules/react-native-jitsi-meet/ios
withrecursive
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
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:15 (3 by maintainers)
Top GitHub 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.