react-native-agora
& react-native link react-native-agora
用Xcode打开RN项目里的ios/RN项目.xcodeproj
文件
选择 Build Phases -> Link Binary With Libraries -> +
libresolv.tbd
libc++.tbd
AVFoundation.framework
AudioToolbox.framework
VideoToolbox.framework
CoreMotion.framework
CoreMedia.framework
CoreTelephony.framework
选择 Build Phases-> Link Binary With Libaries中点击“+”按钮,在弹出的窗口中点击“Add Other”按钮,选择
node_modules/react-native-agora/ios/RCTAgora/libs/libcrypto.a
node_modules/react-native-agora/ios/RCTAgora/libs/AgoraRtcCryptoLoader.framework
node_modules/react-native-agora/ios/RCTAgora/libs/AgoraRtcEngineKit.framework
选择 Build Settings->Search Paths->Framework Search Paths添加 “$(SRCROOT)/../node_modules/react-native-agora/ios/RCTAgora/libs”
选择 Build Settings->Search Paths->Library Search Paths添加 “$(SRCROOT)/../node_modules/react-native-agora/ios/RCTAgora/libs”
选择 Build Settings->Enable Bitcode设置为No
选择 Capabilities->Background Modes->Modes勾选Audio,AirPlay,and Picture In Picture
修改info.plist
新增2项:
“Privacy - Camera Usage Description”:“use camera to start video call”
“Privacy - Microphone Usage Description”:“use microphone to start video call”
react-native run-ios