How to build and compile PJSIP for desktop Mac?
I have done with iPhone/iPad. But still have an issue, so now I want to try to build in a desktop Mac version.
I followed this link, honestly i dont understand at all how to use it. Because it's different for what I have done in mobile.
Any clue? thanks.
For iphone you had to define the PJ_CONFIG_IPHONE to your config:
#define PJ_CONFIG_IPHONE 1
This part is not needed anymore.
Then you had to call ./configure-iphone
for mac you just have to call ./configure and in the rest is like any other package compilation and installation on linux and unix environment:
# ./configure
# make dep
# make
# make install
Related
I'm new to cydia dev and I downloaded a couple of examples fro iphonedevwiki.
I've got my iPad jailbroken and how do I install the demo Theos tweak to my device? Thanks.
And by the way is iOSOpenDev working for iOS 8?
Once you have compiled your tweak (using make), you need to create a deb package file (using make package). This will create a .deb file. Then you transfer the .deb file to your iPad. Once it is transfered, open an ssh session to it and install it from the command line using:
dpkg -i 'filename.deb'
Of course, the method Cl3ment mentioned works too but this is a step-by-step way of doing it in case you wanted to do some parts manually.
If your device and your computer use the same Wi-Fi network, you need to edit the project's Makefile to add this to its first line :
THEOS_DEVICE_IP = 192.168.1.4
(Of course, replace the IP address with your iDevice's IP)
To install the tweak, you need to use the make package install command within Terminal. It will compile the tweak, then create a .deb package for it, then attempt to install it to your device (you will be prompted for root password two times, and your iDevice will then respring)
I'm trying to install Cordova and Ionic Framework on a Ubuntu server. I already used Node.js on it, so simply ran:
sudo npm install -g cordova
Then I cloned a sample project from GitHub
sudo git clone https://github.com/driftyco/ionic-weather.git
I entered the directory and tried to add the iOS platform library in order to build it:
cd ionic-weather
sudo cordova platform add ios
However it throws the following error:
Creating ios project...
/home/benedict/.cordova/lib/ios/cordova/3.4.0/bin/create: 33: /home/benedict/.cordova/lib/ios/cordova/3.4.0/bin/create: Syntax error: "(" unexpected
Error: /home/benedict/.cordova/lib/ios/cordova/3.4.0/bin/create: Command failed with exit code 2
at ChildProcess.whenDone (/usr/lib/node_modules/cordova/src/superspawn.js:112:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
I've tried reinstalling Cordova in case something got corrupted, but no luck. I can't seem to find anyone else with this issue either so I'm kinda stuck. Any ideas?
This turned out to be a combination of several problems:
Ant is a required dependency, although it's not documented as a dependency as far as I can tell from any of the install guides the ionic guide or cordova guide point to. In fact I found this out by digging around SO and a few other dark corners of the internet
JDK must also be installed. (not just JRE)
2 folders have to be added to the path (for Android anyways).
Ant
This can be installed via sudo apt-get install ant.
jdk
sudo update-alternatives --config java
first, you can find out if you have jdk by running `sudo update-alternatives --get-selections | grep ^java
if you already have the jdk, you can update your jre to the jdk version using sudo update-alternatives --config java
if not, then install jdk (not just the jre), using sudo apt-get install openjdk-7-jdk
Path setting in ~/.bashrc
$ cd ~
$ sudo vi .bashrc
at the bottom, before the PATH= add the path to the bundle folders for both platform-tools folder and the tools folder under the sdk folder. Several of the guides only mention the platform-tools folder.
The guide specifically mentions ios can't be installed on Windows, but strangely leaves out Linux. This may be an oversight, but I can't be sure. There was some indication in the ionic guides that ios emulation could be done on linux, even though actual development could only be done on OSx.
the ios platform requires xcode 4.5 with cordova, which needs OSx 10.7 you basically can't add the ios platform tools on Windows or Linux. Unfortunately cordova and ionic both seem to forget Linux exists, and therefore the docs imply this will run on Linux when they note inoperability on Windows but say nothing about Linux.
Your problem is that your trying to build the app on a machine that doesnt have Mac OS installed. In order to add IOS platform you need to run this command on a mac.
Check the Prerequisites here:
http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html
I would like to write/use an open source script that can access iOS filesystem (non-jailbroken). On a Jailbroken device, i use ssh/scp to access, transfer data from the device. Intent is to copy some part of the iOS filesystem (say /var/mobile/Applications/xxx-xxxx/Documents) to a Mac, from a non-Jailbroken device, using some script. I see that tools like iFunBox is able to do it. Would like to know it manages to do so.
I came across mobiledevice.h but could not really understand how to use it.
Also, would prefer getting this done over USB.. for a jailbroken device, i use tcprelay.py for doing the usb tunneling. Is there something i can use for a non jailbroken device?
You can install the ifuse tool, which is hosted here: https://github.com/libimobiledevice/ifuse
In order to compile this tool, you will need the a working set of Gnu-tools (make, libtool, etc).
#Don't worry - clang is still default
sudo port install gcc48
NB: Update your .bash_profile (or similar) to include the following:
#Important - this is where your compiled libs will get installed to, so we need this
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/**
The rest of this process should take a few minutes
Install fuse4x
sudo port install fuse4x
Build the dependencies:
Check out: https://github.com/libimobiledevice/libplist, cd into the checkout, and run:
./autogen.sh
./configure
make
sudo make install
Check out: https://github.com/libimobiledevice/libusbmuxd, cd into the checkout, and run:
./autogen.sh
./configure
make
sudo make install
Check out: https://github.com/libimobiledevice/libimobiledevice, cd into the checkout, and run:
./autogen.sh
./configure
make
sudo make install
(If you're on Linux you'll also need to install usbmuxd, after building libusbmuxd and libimobiledevice. . otherwise, for Windows and OSX . . . )
Now build iFuse:
Check out: https://github.com/libimobiledevice/ifuse
./autogen.sh
./configure
make
sudo make install
To use ifuse to access your app's documents directory:
Make a mount directory:
sudo mkdir -p /Volumes/myapp.app
Now mount the app's dir:
ifuse --container <appid> /Volumes/abced.app
Where app id is the name what's displayed in the bundle identifier . . example:
ifuse --container mycompany.ABCED.com /Volumes/abced.app/
(Refer to the attached pic)
The MobileDeviceManager library brings us simple filesystem operations (it's an easy-to-use Objective-C wrapper around the MobileDevice framework you have come across).
The thing is that it doesn't support copying files from the device to the computer, only the other way around. So, in order to work around this issue, I've created a patch (GitHub gist) that you can merge into the included sample program to have it understand the copyFrom command.
I was successfully able to build WebRTC on MAC following these instructions: http://www.webrtc.org/reference/getting-started
Has anyone successfully built it on iOS? I understand that someone (arik) has successfully built it on iOS: https://groups.google.com/forum/#!msg/discuss-webrtc/VJg-fk2-i_0/dtG200DOzsgJ But the steps are not clear.
Can someone (who built on ios) summarize the steps so that it will be useful for everyone trying it in the future?
I wrote a detailed blog post with all of the instructions on how to build the WebRTC example iOS application, as well as how to run it on the iOS simulator or an actual iOS device. You can take a look here to read the details, it's a pretty lengthy process.
Yes, compiling for iOS was a very painful task... especially getting it work in Xcode.
Here's my attempt to get AppRTC Demo for ios
Clone/Pull: https://github.com/pristineio/webrtc-build-scripts
After getting the repo, then open the xcode project within the ios directory. Set the target to WebRTC Dance, then execute. At this point the scripts will update depot_tools and do all the dirty work (pull, modify, build) so that your target for AppRTCDemo will able to resolve the missing files and execute.
Once that completes, you can change the target to AppRTC Demo with a simulator or a real device, click run and it should execute. There's more detailed information in the guide linked in there and updates in the readme.
If you are wondering what gets ran under the hood, check out the build.sh file in the ios directory of the git repo. The dance function is what's actually getting executed for you when you select WebRTC Dance.
Its not really easy to describe the build process (way too much going on) but the build scripts repo should definitely point you in the right direction and help you get AppRTCDemo on ios 'just work'
There's also a google developers video posted here, where they try and break down the build process so you can build for ios (the youtube title is misleading).
Also, I just added cocoapods support for ios webrtc, add this to your Podfile,
pod "libjingle_peerconnection"
# Add this to the bottom so it won't have issues with active architecture
post_install do |installer_representation|
installer_representation.project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
config.build_settings['VALID_ARCHS'] = ['armv7', 'i386']
end
end
end
Not all the revisions are built, so check out the the cocoadocs for which revisions are available
I have been working in this space for the past few months now - webrtc on iOS is not easy. To help this problem I have added a github repo with a working example of and iOS app using webrtc.
https://github.com/gandg/webrtc-ios
The site references the google code site as well, so it should be a helpful starting point.
Well, it's been a long time to answer this post. But, I hope someone might
get better intuition from it.
I have been dealing with webrtc compilation processes for iOS and Android platforms. This process is really simple if you follow each step efficiently. To compile the library for iOS, follow the below-given commands and make sure you're using the same(only-1) tab of Mac terminal for WebRTC Native Compilation Setup as follows:
Prerequisites
Link Xcode with Command line
Setup depot_tools
Fetch Code for Development
Selection of Branch
Compile Library (iOS Framework)
1. Prerequisites:
First of all, make sure of the following things that you have already installed, if not then use these commands to do that:
- sudo add-apt-repository ppa:openjdk-r/ppa
- sudo apt-get install openjdk-8-jdk
- sudo apt-get install pkg-config
- sudo apt-get update
Please also install python==2.7, if it's not already installed.
2. Link Xcode with Command line:
- sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
- sudo xcode-select --switch /Library/Developer/CommandLineTools
3. Setup the Depot_tools:
- git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
- export PATH="$PATH:${HOME}/depot_tools"
After that, start the following steps one by one. Every step takes its own time based on the machine specs and internet speed, so make sure every step is completed without interruption.
4. Fetch Code:
- mkdir webrtc_ios
- cd webrtc_ios
- fetch --nohooks webrtc_ios
- gclient sync
5. Select Branch-head:
- cd src
- ./build/install-build-deps.sh
- git checkout origin/master
- git branch
6. To compile every time:
Make sure you are in the webrtc_ios/src/ directory, then simply run this command:
- ./tools_webrtc/ios/build_ios_libs.sh
It turns out that you will end up with the compilation and building of WebRtc Framework holding Webrtc Header Files. You can simply drag and drop this framework into your Xcode production environment or simply import it.
As you have set up your compilation environment, now every time you make changes into your native stack, you can simply run this command ./tools_webrtc/ios/build_ios_libs.sh to generate an updated framework.
If you end up with an issue regarding the compilation of webrtc framework. Please follow these steps. Make sure you're in this directory webrtc_ios/src/:
- git checkout origin/master
# To make sure you're using origin/master
- git branch
- gclient revert
- gclient sync
- ./tools_webrtc/ios/build_ios_libs.sh
And hopefully, you will have your issues sorted. I always recommend you guys that You can check out a branch that would be behind the origin/master and doesn't have all dependencies and modules over there which are necessary to build webrtc framework for iOS. So, Please always checkout to branch/head of webrtc native stack
Now, if you tried with these both procedures to build the WebRTC such as:
1- Using Bash Build Tools (./tools_webrtc/ios/build_ios_libs.sh)
2- Using Manual Compilation
Examples
$ # debug build for 64-bit iOS
$ gn gen out/ios_64 --args='target_os="ios" target_cpu="arm64"'
$ # debug build for simulator
$ gn gen out/ios_sim --args='target_os="ios" target_cpu="x64"'
2.1- Compiling (ninja -C out/Debug)
Both procedures will work.
This seems to build some of the modules: https://code.google.com/p/webrtc/issues/detail?id=1421#makechanges
I'm trying to compile Qt for the iOS simulator, as explained in this article.
At first I ran into this problem but after it (kinda) solved itself I had some more.
First I kept getting this error after executing the first command, which is supposed to build qmake (../qt/configure ... etc etc):
The OpenGL ES 2.0 functionality test failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in /Qt/qt/mkspecs/qpa/macx-iphonesimulator-g++.
Since I knew that I had the 4.3 SDK, I delved into it some more, analyzed the configure script, and after some tracing I saw that the Makefile generated by qmake, required g++-4.2 (which I didn't have), so I just ln -s g++ g++-4.2 and ln -s gcc gcc-4.2 in /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/.
I'm not sure if the aforementioned steps matter, that's why I'm writing about them. Anyway, with that, the configure step was successful. Now I ran make. After some successfully compiled files I got this:
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/WebServicesCore.framework/Headers/WebServicesCore.h:15,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37,
from ../../include/QtCore/private/../../../../qt/src/corelib/kernel/qcore_mac_p.h:83,
from ../../include/QtCore/private/qcore_mac_p.h:1,
from /Qt/qt/src/corelib/tools/qlocale_mac.mm:49:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/WebServicesCore.framework/Headers/WSMethodInvocation.h:759:
error: 'CFXMLTreeRef' has not been declared
The same error appears several more times, from several different lines of WebServicesCore.h. So, basically, here's where I'm stuck now.
Any help? Again?...
Edit: Absolutely, 100% the same thing happens when I configure and try to make Qt for the device (as opposed to the simulator)
Additional info:
gcc --version : i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
iOS SDK: I have both 4.3 and 5
OS X version: 10.7.2
Xcode version (if it matters): 4.2.1
Didn't you forget to add -nomake tools and other -nomake ... to your configure ?
Try poking this guys: http://labs.qt.nokia.com/2011/08/09/update-on-uikit-lighthouse-platform/