MAC OS编译iOS版Linphone SDK和APP

来源:互联网 发布:黑客攻防编程解析 编辑:程序博客网 时间:2024/05/16 14:42
最近由于开发一款基于SIP通信的VOIP应用程序项目需要,自己研究了一下几款开源SIP实现,主要有PJSIP和Linphone,PJSIP由于文档说明详细,编译和测试都没有费多大事情。Linphone的编译就比较费神费力了,开始之前查看互联网上的资料,大家都说各种痛苦折磨,后来自己实践了一把,除了文档说明奇缺之外,编译还算顺利,除了调查耗费了不少时间。



简单说明一下PJSIP和Linphone
PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. It combines signaling protocol (SIP) with rich multimedia framework and NAT traversal functionality into high level API that is portable and suitable for almost any type of systems ranging from desktops, embedded systems, to mobile handsets.

Linphone is an open source SIP Phone, available on mobile and desktop environments (iOS, Android, Windows Phone 8, Linux, Windows Desktop, MAC OSX) and on web browsers.
Linphone has inside a separation between the user interfaces and the core engine, allowing to create various kinds of user interface on top of the same functionalities.

编译环境
MAC OS 10.10.5
Xcode 6.4

以下是编译的方法步骤,500M的源代码官方只提供一段README.MD来说明。

1.安装Xcode和command line tools,去AppStore下载即可,已安装过的跳过
2.安装HomeBrew,去http://brew.sh,按提示安装最新版本的HomeBrew即可,或者联网打开终端使用以下命令安装。

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

3.Xcode和Homebrew安装无误后可以使用以下命令进行准备工作,首先下载linphone的源代码,折腾即将开始。

git clone git://git.linphone.org/linphone-iphone.git --recursive

这里准备好网络,大约500M左右的文件,建议使用VPN下载。

4.编译源代码需要安装必要的依赖包和lib,运行以下命令,按要求安装即可。

./prepare.py


5.准备工作完成后使用以下命令编译linphone的SDK。

./prepare.py -c && ./prepare.py && make


6.SDK编译完成后可以打开linphone.xcodeproj,后面按正常的ios应用程序进行编译即可。

编译过程中问题与解决
1.无法安装和卸载homebrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Failed to locate Homebrew!

原因可能是这台电脑上的其他用户安装过homebrew,解决办法是运行以下命令重新安装

#清理git缓存
rm -rf /usr/local/.git
#彻底清理Cellar,尽量不要使用
#rm -rf /usr/local/Cellar


2.提示找不到libtoolize,要求安装libtool,原因是MAC OS上libtool和libtoolize这两位改成了glibtoolize和glibtool。连接一下即可

sudo ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize


参考资料
http://blog.csdn.net/showhilllee/article/details/42966305



--------------------------------------------------------------------------------------

- 版权声明:

- 如在本页面内无特别说明,本文内容均为[李大仁博客]原创,本文版权归[李大仁博客]所有。

- 欢迎转载,转载请务必在文章页面明显位置提供原文链接并注明出处。欢迎您在转载本文时保留本段声明。

- 文章标题:MAC OS编译iOS版Linphone SDK和APP

- 独立博客:李大仁博客

- 永久链接:http://www.lidaren.com/archives/1590

--------------------------------------------------------------------------------------

以上内容由博客自动发布工具自动发布,最终显示内容和效果会与原文内容有所偏差,敬请谅解。




0 0