If you are not familiar with ReactJS or React Native , then we highly recommend that you read, these frameworks already have a significant impact on where the world of mobile and web application development is heading. Our article is about how to enable a web developer to make iOS applications with audio / video calls and other pleasures of the voximplant platform. Creating native modules for React Native is such an extensive topic that you can write about it endlessly and there are still a lot of materials about it on the network. When creating the module, we relied on a number of ready-made examples with github, which really helped not to dig in with this for centuries.
I suspect that the vast majority of readers Habra knows about it. But just in case: it is a framework from Facebook that allows you to create native iOS applications in javascript, while ReactJS is used to create the user interface. Which, in turn, creates native operating system widgets instead of HTML DOM. Moreover, the authors promise to do the same for Android in the future.
In React Native, there are already a number of ready-made modules that come with the framework and allow you to do a lot of useful things, but obviously not all that a mobile application developer may want, and here come native modules to help:“Sometimes the corresponding module yet doesn’t need a corresponding module yet. If you want to use it, it can be javascript, it can be javascript, it can be javascript or

In our case, everything is simple - the functionality of the module should repeat the functionality of voximplant mobile sdk, that is, support both audio and video calls through the platform, give the opportunity to turn on / off the loud speaker, microphone, change camera, etc. In general, there is no way to restrict the developer due to the fact that he chose the path of the warrior react native.npm install react-native-voximplant@latest --save
After that, open your project in Xcode, in the project navigator, right-click Add Files to , go to node_modules / react-native-voximplant and select VoxImplant.xcodeproj .
Next, in the Xcode project navigator, select the project, switch to the “Build Phases” tab, and in the “Link Binary with Libraries” section specify GLKit.framework , libc ++. Dylib , libvoximplant.a and react-native-voximplant / VoxImplantSDK / libVoxImplantSDK.a var VoxImplant = require('react-native-voximplant'); // Adding SDK event listener RCTDeviceEventEmitter.addListener( 'ConnectionSuccessful', () => { console.log('Connection successful'); } ); ... componentDidMount: function() { VoxImplant.SDK.connect(); VoxImplant.SDK.setCameraResolution(320,240); }, … makeCall: function() { VoxImplant.SDK.createCall(number, settings_video, null, function(callId) { currentCallId = callId; VoxImplant.SDK.startCall(callId); }); }, ... 
Source: https://habr.com/ru/post/265761/
All Articles