Skip to content

Commit 967e5f5

Browse files
committed
Update versions and build in github workflow
1 parent bb4b442 commit 967e5f5

File tree

6 files changed

+62
-13
lines changed

6 files changed

+62
-13
lines changed

.github/workflows/build.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: iOS Build
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
runs-on: macos-latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Set up Xcode
12+
uses: maxim-lobanov/setup-xcode@v1
13+
with:
14+
xcode-version: '15.3'
15+
- name: Installation of node
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 20
19+
registry-url: 'https://registry.npmjs.org'
20+
21+
- name: npm install for SDK
22+
run: npm install
23+
24+
- name: npm install for example
25+
run: |
26+
cd example
27+
npm install
28+
cd ..
29+
30+
- name: Pod Install for iOS
31+
run: |
32+
cd example/ios
33+
pod install
34+
cd ../..
35+

example/ios/Podfile

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
require_relative '../node_modules/react-native/scripts/react_native_pods'
22
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
33

4-
platform :ios, '11.0'
4+
IOS_VERSION = '12.4'
5+
6+
platform :ios, IOS_VERSION
7+
58
install! 'cocoapods', :deterministic_uuids => false
69

710
target 'ReactNativeAntMediaExample' do
@@ -28,10 +31,20 @@ target 'ReactNativeAntMediaExample' do
2831
#
2932
# Note that if you have use_frameworks! enabled, Flipper will not work and
3033
# you should disable the next line.
31-
use_flipper!()
34+
#use_flipper!()
3235

3336
post_install do |installer|
3437
react_native_post_install(installer)
3538
__apply_Xcode_12_5_M1_post_install_workaround(installer)
39+
40+
installer.pods_project.targets.each do |target|
41+
target.build_configurations.each do |config|
42+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = IOS_VERSION
43+
end
44+
end
45+
3646
end
47+
48+
49+
3750
end

example/ios/ReactNativeAntMediaExample/AppDelegate.mm

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ @implementation AppDelegate
2929

3030
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
3131
{
32-
RCTAppSetupPrepareApp(application);
32+
RCTAppSetupPrepareApp(application, true);
3333

3434
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
3535

@@ -41,7 +41,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
4141
bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
4242
#endif
4343

44-
UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"ReactNativeAntMediaExample", nil);
44+
UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"ReactNativeAntMediaExample", nil, true);
4545

4646
if (@available(iOS 13.0, *)) {
4747
rootView.backgroundColor = [UIColor systemBackgroundColor];

example/package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@
99
"start": "react-native start"
1010
},
1111
"dependencies": {
12-
"@react-native-community/cli": "^7.0.4",
12+
"@react-native-community/cli": "^14.0.1",
13+
"@react-native-community/cli-platform-ios": "^14.0.1",
1314
"babel-runtime": "^6.26.0",
14-
"react": "17.0.2",
15-
"react-native": "0.68.2",
15+
"react": "18.2.0",
16+
"react-native": "0.71.4",
1617
"react-native-eject": "^0.2.0",
1718
"react-native-incall-manager": "^4.0.0",
1819
"react-native-vector-icons": "^10.0.3",
1920
"react-native-webrtc": "124.0.4"
2021
},
2122
"devDependencies": {
22-
"@babel/core": "^7.18.2",
23-
"@babel/runtime": "^7.18.3",
23+
"@babel/core": "^7.20.0",
24+
"@babel/runtime": "^7.20.0",
2425
"@types/react-native-incall-manager": "^3.2.1",
2526
"@types/react-native-vector-icons": "^6.4.18",
2627
"babel-plugin-module-resolver": "^4.0.0",

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
"jest": "^26.0.1",
6262
"pod-install": "^0.1.0",
6363
"prettier": "^2.0.5",
64-
"react": "16.13.1",
65-
"react-native": "0.63.4",
64+
"react": "18.2.0",
65+
"react-native": "0.71.4",
6666
"react-native-builder-bob": "^0.18.0",
6767
"release-it": "^14.2.2",
6868
"typescript": "^4.1.3"

src/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export function useAntMedia(params: Params) {
236236
if (debug) console.log('onicecandidate', event);
237237
iceCandidateReceived(event, closedStreamId);
238238
};
239-
239+
// @ts-ignore
240240
remotePeerConnection[streamId].ontrack = (event: any) => {
241241
if (debug) console.log('onTrack', event);
242242
onTrack(event, closedStreamId);
@@ -824,7 +824,7 @@ export function useAntMedia(params: Params) {
824824
} catch (err: any) {
825825
console.log("Cannot get devices -> error: " + err);
826826
}
827-
827+
// @ts-ignore
828828
mediaDevices.ondevicechange = async () => {
829829
console.log("Device change event")
830830
getDevices();

0 commit comments

Comments
 (0)