Reputation: 496
I am able to compile pjsip iOS for armv7. After that I am not sure how exactly to use this in a Xcode project. I mean how to include this Xcode.
Thanks in advance.
Upvotes: 2
Views: 1064
Reputation: 1054
After compiling the PJSIP project for armv7, you can open the project in your xcode project. To open the xcode project, go to the path: /your_pjsip_project_directory/pjsip-apps/src/pjsua/ios/ipjsua.xcodeproj and open it directly. Generally, armv7 is used for running your project in your iphone. There are different architecture to run your xcode project.The Following figure show you in detail, to choose which architecture you want to build.
For adding particular architecture library file into your pjsip project, go to your projects target and select build phases tab. Select Link Binary with Library option and click "+" button below. Add Your compiled Library file there. Now Build and Run Your Project.
To combine several architecture for supporting multiple architecture to run your project, Follow below link.
check Supporting multiple architectures (armv6, armv7, armv7s, arm64, and so on) section in following link.
Source:https://trac.pjsip.org/repos/wiki/Getting-Started/iPhone
Upvotes: 5
Reputation: 1155
you have to Link pjsip libraries as well as pjsip headers. I could not upload screen shot here as i am new here. So I uploaded the screenshots below links.
First add the headers in Header search path.
For this go to Build Settings and then header search paths.
Then add the header.
See the below url for screenshot:
After that add libraries in the Linked binary section in general tabs. See the below url for screenshot.
Then include the below code in your class.
After that you are ready to use pjsip library.
#include <pjsua-lib/pjsua.h>
Upvotes: 0
Reputation: 672
Cocoapods was a great option for me when I was struggling to make compiled libraries integrated in my Xcode project it manages dependencies integration.
all you have to do is install it on your machine using this command $ sudo gem install cocoapods
then go to your Xcode project folder using the terminal cd ~/project_path
and create a new file nano Podfile
use this template and change the project_name with your project name
platform :ios, '7.0'
xcodeproj 'project_name'
pod 'pjsip'
then run pod install command you will see another Xcode project will be created
you need then to open the.xcworkspace
file you will see Pods project will look like this.
all you have to do now is to start using your pjsip libraries using #include <pjsua-lib/pjsua.h>
for reference please visit https://github.com/chebur/pjsip
Upvotes: 1