findmate / cordova-plugin-jitsi-meet

Cordova plugin for jitsi meet react native sdk
17 stars 21 forks source link

It is not necessary WebRTC and JitsiMeet frameworks manually to be embedded in the iOS/Xcode interface #3

Closed neipeixoto closed 4 years ago

neipeixoto commented 4 years ago

It is not necessary WebRTC and JitsiMeet frameworks manually to be embedded in the iOS/Xcode interface. To solve this problem, replace the 2 lines below in file config.xml :

<framework src="./framework/JitsiMeet.framework" custom="true" />
<framework src="./framework/WebRTC.framework" custom="true" />

with 4 lines below:

<source-file src="./framework/JitsiMeet.framework" target-dir="lib" framework="true" />
<source-file src="./framework/WebRTC.framework"    target-dir="lib" framework="true" />
<framework src="./framework/JitsiMeet.framework" custom="true" embed="true" />
<framework src="./framework/WebRTC.framework"    custom="true" embed="true" />

Here is the complete config.xml :

<?xml version='1.0' encoding='utf-8'?>
<plugin id='cordova-plugin-jitsi' version='1.0.2' xmlns='http://apache.org/cordova/ns/plugins/1.0' xmlns:android='http://schemas.android.com/apk/res/android'>
    <name>JitsiPlugin</name>
    <js-module name='JitsiPlugin' src='www/JitsiPlugin.js'>
        <clobbers target='jitsiplugin' />
    </js-module>

    <platform name='android'>
        <config-file parent='/*' target='res/xml/config.xml'>
            <feature name='JitsiPlugin'>
                <param name='android-package' value='com.cordova.plugin.jitsi.JitsiPlugin' />
            </feature>
        </config-file>
        <config-file parent='/*' target='AndroidManifest.xml'>
            <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
            <uses-permission android:name="android.permission.BLUETOOTH" />
            <uses-permission android:name="android.permission.CAMERA" />
            <uses-permission android:name="android.permission.INTERNET" />
            <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
            <uses-permission android:name="android.permission.RECORD_AUDIO" />
            <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
            <uses-permission android:name="android.permission.WAKE_LOCK" />
            <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
        </config-file>
        <source-file src='src/android/JitsiPlugin.java' target-dir='src/com/cordova/plugin/jitsi/' />
        <framework src='src/android/jitsiplugin.gradle' custom='true' type='gradleReference' />
    </platform>

    <!-- ios -->
    <platform name="ios">
        <config-file target="config.xml" parent="/*">
            <feature name="JitsiPlugin">
                <param name="ios-package" value="JitsiPlugin"/>
            </feature>
        </config-file>

        <header-file src="src/ios/JitsiMeetView.h" />
        <header-file src="src/ios/JitsiMeetViewDelegate.h" />
        <header-file src="src/ios/JitsiPlugin.h" />
        <source-file src="src/ios/JitsiPlugin.mm" />

        <source-file src="./framework/JitsiMeet.framework" target-dir="lib" framework="true" />
        <source-file src="./framework/WebRTC.framework"    target-dir="lib" framework="true" />

        <framework src="./framework/JitsiMeet.framework" custom="true" embed="true" />
        <framework src="./framework/WebRTC.framework"    custom="true" embed="true" />

    </platform>
</plugin>
slothentic commented 4 years ago

Repository has been updated with these changes. Thanks for figuring this out.