To create a hybrid native iOS WebRTC app, below are the items required
- Mac OSX
- Cordova
- ios-deploy (optional)
cordova was installed in the machine already, so did not have to do that again.
The cordova plugin includes WebRTC libraries for iOS, and SIP.js is a custom media handler to use the iOS WebRTC libraries, and a cordova build script to build and run the project on devices.
Below are the steps to be followed:
1. create a cordova project using cordova create Cordova-WebRTC
2. now add the iOS platform by running the below command inside the project directory
cd Cordova-WebRTC
cordova platform add iOS
Add the OnSIP cordova plugin
Below command adds the PhoneRTC WebRTC library to the Cordova project
cordova plugin add http://github.com/onsip/onsip-cordova.git
To run the project just need to follow the regular procedure
cordova run ios
Since there is an inherent problem in running from the command line, used to run from the
Xcode project. Based on the instructions, Set the architecture only to armv7. However,
running the project seems to be giving the error saying the architecture not found for certain
object files during link time. Below are the error spitted out by the Xcode.
"_OBJC_CLASS_$_RTCICECandidate", referenced from:
objc-class-ref in PhoneRTCDelegate.o
"_OBJC_CLASS_$_RTCSessionDescription", referenced from:
objc-class-ref in PhoneRTCDelegate.o
"_OBJC_CLASS_$_RTCPeerConnectionFactory", referenced from:
objc-class-ref in PhoneRTCDelegate.o
"_OBJC_CLASS_$_RTCVideoCapturer", referenced from:
objc-class-ref in PhoneRTCDelegate.o
"_OBJC_CLASS_$_RTCPair", referenced from:
objc-class-ref in PhoneRTCDelegate.o
"_OBJC_CLASS_$_RTCMediaConstraints", referenced from:
objc-class-ref in PhoneRTCDelegate.o
"_OBJC_CLASS_$_RTCEAGLVideoView", referenced from:
objc-class-ref in PhoneRTCPlugin.o
"_OBJC_CLASS_$_RTCICEServer", referenced from:
objc-class-ref in PhoneRTCPlugin.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
To continue investigating on this.
references:
No comments:
Post a Comment