Skip to content

Commit 03feaf4

Browse files
committed
Fix running in Android issues and proceeding with iOS
1 parent fa2cb81 commit 03feaf4

File tree

13 files changed

+550
-247
lines changed

13 files changed

+550
-247
lines changed

.github/workflows/build-for-android.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ jobs:
3434
- name: Build for Android
3535
run: |
3636
cd example
37-
npm run build-android
37+
npm run build:android
3838
cd ..
3939

.github/workflows/build-for-ios.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ jobs:
4141
- name: Build for iOS Simulator
4242
run: |
4343
cd example
44-
npm run build-ios
44+
npm run build:ios
4545
cd ..
4646

babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: ['module:metro-react-native-babel-preset'],
2+
presets: ['module:@react-native/babel-preset'],
33
};

example/android/app/src/main/java/com/reactnativeantmediaexample/MainActivity.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class MainActivity : ReactActivity() {
1111
* Returns the name of the main component registered from JavaScript. This is used to schedule
1212
* rendering of the component.
1313
*/
14-
override fun getMainComponentName(): String = "ReactNativeNameExample"
14+
override fun getMainComponentName(): String = "ReactNativeAntMediaExample"
1515

1616
/**
1717
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]

example/babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = {
55
presets: ['module:@react-native/babel-preset'],
66
plugins: [
77
[
8-
'module-resolver',
8+
'module-resolver', // we need babel-plugin-module-resolver to make it work
99
{
1010
extensions: ['.tsx', '.ts', '.js', '.json'],
1111
alias: {

example/index.tsx example/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { AppRegistry } from 'react-native';
22
//import App from './src/App';
3-
//import App from './src/Play';
3+
import App from './src/Play';
44
//import App from './src/Peer';
5-
import App from './src/Conference';
5+
//import App from './src/Conference';
66
import { name as appName } from './app.json';
77

88
AppRegistry.registerComponent(appName, () => App);

example/ios/Podfile.lock

+41
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ PODS:
77
- hermes-engine (0.75.2):
88
- hermes-engine/Pre-built (= 0.75.2)
99
- hermes-engine/Pre-built (0.75.2)
10+
- JitsiWebRTC (124.0.1)
1011
- RCT-Folly (2024.01.01.00):
1112
- boost
1213
- DoubleConversion
@@ -1237,6 +1238,9 @@ PODS:
12371238
- ReactCommon/turbomodule/bridging
12381239
- ReactCommon/turbomodule/core
12391240
- Yoga
1241+
- react-native-webrtc (124.0.4):
1242+
- JitsiWebRTC (~> 124.0.0)
1243+
- React-Core
12401244
- React-nativeconfig (0.75.2)
12411245
- React-NativeModulesApple (0.75.2):
12421246
- glog
@@ -1497,6 +1501,29 @@ PODS:
14971501
- React-logger (= 0.75.2)
14981502
- React-perflogger (= 0.75.2)
14991503
- React-utils (= 0.75.2)
1504+
- ReactNativeIncallManager (4.2.0):
1505+
- React-Core
1506+
- RNVectorIcons (10.1.0):
1507+
- DoubleConversion
1508+
- glog
1509+
- hermes-engine
1510+
- RCT-Folly (= 2024.01.01.00)
1511+
- RCTRequired
1512+
- RCTTypeSafety
1513+
- React-Core
1514+
- React-debug
1515+
- React-Fabric
1516+
- React-featureflags
1517+
- React-graphics
1518+
- React-ImageManager
1519+
- React-NativeModulesApple
1520+
- React-RCTFabric
1521+
- React-rendererdebug
1522+
- React-utils
1523+
- ReactCodegen
1524+
- ReactCommon/turbomodule/bridging
1525+
- ReactCommon/turbomodule/core
1526+
- Yoga
15001527
- SocketRocket (0.7.0)
15011528
- Yoga (0.0.0)
15021529

@@ -1538,6 +1565,7 @@ DEPENDENCIES:
15381565
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
15391566
- React-Mapbuffer (from `../node_modules/react-native/ReactCommon`)
15401567
- React-microtasksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`)
1568+
- react-native-webrtc (from `../node_modules/react-native-webrtc`)
15411569
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
15421570
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
15431571
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
@@ -1564,10 +1592,13 @@ DEPENDENCIES:
15641592
- React-utils (from `../node_modules/react-native/ReactCommon/react/utils`)
15651593
- ReactCodegen (from `build/generated/ios`)
15661594
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
1595+
- ReactNativeIncallManager (from `../node_modules/react-native-incall-manager`)
1596+
- RNVectorIcons (from `../node_modules/react-native-vector-icons`)
15671597
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
15681598

15691599
SPEC REPOS:
15701600
trunk:
1601+
- JitsiWebRTC
15711602
- SocketRocket
15721603

15731604
EXTERNAL SOURCES:
@@ -1642,6 +1673,8 @@ EXTERNAL SOURCES:
16421673
:path: "../node_modules/react-native/ReactCommon"
16431674
React-microtasksnativemodule:
16441675
:path: "../node_modules/react-native/ReactCommon/react/nativemodule/microtasks"
1676+
react-native-webrtc:
1677+
:path: "../node_modules/react-native-webrtc"
16451678
React-nativeconfig:
16461679
:path: "../node_modules/react-native/ReactCommon"
16471680
React-NativeModulesApple:
@@ -1694,6 +1727,10 @@ EXTERNAL SOURCES:
16941727
:path: build/generated/ios
16951728
ReactCommon:
16961729
:path: "../node_modules/react-native/ReactCommon"
1730+
ReactNativeIncallManager:
1731+
:path: "../node_modules/react-native-incall-manager"
1732+
RNVectorIcons:
1733+
:path: "../node_modules/react-native-vector-icons"
16971734
Yoga:
16981735
:path: "../node_modules/react-native/ReactCommon/yoga"
16991736

@@ -1704,6 +1741,7 @@ SPEC CHECKSUMS:
17041741
fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
17051742
glog: 69ef571f3de08433d766d614c73a9838a06bf7eb
17061743
hermes-engine: 3b6e0717ca847e2fc90a201e59db36caf04dee88
1744+
JitsiWebRTC: d0ae5fd6a81e771bfd82c2ee6c6bb542ebd65ee8
17071745
RCT-Folly: 4464f4d875961fce86008d45f4ecf6cef6de0740
17081746
RCTDeprecation: 34cbf122b623037ea9facad2e92e53434c5c7422
17091747
RCTRequired: 24c446d7bcd0f517d516b6265d8df04dc3eb1219
@@ -1733,6 +1771,7 @@ SPEC CHECKSUMS:
17331771
React-logger: 8db32983d75dc2ad54f278f344ccb9b256e694fc
17341772
React-Mapbuffer: 1c08607305558666fd16678b85ef135e455d5c96
17351773
React-microtasksnativemodule: 87b8de96f937faefece8afd2cb3a518321b2ef99
1774+
react-native-webrtc: 48295e7228279470c4f5acb38570e170723bd3b2
17361775
React-nativeconfig: 57781b79e11d5af7573e6f77cbf1143b71802a6d
17371776
React-NativeModulesApple: 7ff2e2cfb2e5fa5bdedcecf28ce37e696c6ef1e1
17381777
React-perflogger: 8a360ccf603de6ddbe9ff8f54383146d26e6c936
@@ -1759,6 +1798,8 @@ SPEC CHECKSUMS:
17591798
React-utils: 81a715d9c0a2a49047e77a86f3a2247408540deb
17601799
ReactCodegen: 60973d382704c793c605b9be0fc7f31cb279442f
17611800
ReactCommon: 6ef348087d250257c44c0204461c03f036650e9b
1801+
ReactNativeIncallManager: bfc9c67358cd524882a7c4116dcb311ac2293d4b
1802+
RNVectorIcons: ef957b2a1cd5efb71e53397257ec4ccffa34d0c4
17621803
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
17631804
Yoga: a1d7895431387402a674fd0d1c04ec85e87909b8
17641805

example/ios/ReactNativeAntMediaExample/Info.plist

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>NSCameraUsageDescription</key>
6+
<string>Allow Camera permission to publish WebRTC streams</string>
7+
<key>NSMicrophoneUsageDescription</key>
8+
<string>Allow Microphone permission to publish WebRTC streams</string>
9+
510
<key>CFBundleDevelopmentRegion</key>
611
<string>en</string>
712
<key>CFBundleDisplayName</key>

0 commit comments

Comments
 (0)