本文共 1317 字,大约阅读时间需要 4 分钟。
1、首先准备工作:下载linphone官方SDK
我的Demo中使用的是3.12.1版本2、新建项目:
(1):Build Setting->Other Linker Flags 增加-Objc (2):Build Phases->Link Binary With Libraries 增加如下 libxml2.tbd libz.tbd libiconv.tbd libsqlite3.tbd libc++.tbd libstdc++.6.tbd libresolv.tbd AudioToolbox.framework AddressBookUI.framework AddressBook.framework AssetsLibrary.framework AVFoundation.framework CoreGraphics.framework CFNetwork.framework CoreAudio.framework CoreMedia.framework CoreTelephony.framework CoreVideo.framework CoreLocation.framework UIKit.framework QuartzCore.framework OpenGLES.framework MessageUI.framework MediaPlayer.framework MobileCoreSevers.framework SystemConfiguration.framework Foundation.framework VideoToolbox.framework3、打开info.plist文件增加key :Required background modes (array) 在下面添加两个项:App plays audio和App provides Voice over IP services 如果需要倒退http,则还需要增加key :Key:NSAppTransportSecurity(dictionary)设置Boolean为YES
4、将liblinphone-sdk和BQL_VOIP拖到工程里面(根目录)
(1):Build Phases->Compile Source 如下图配置 (2):Build Setting 搜索search 如下图 查看路径是否正确(静态库关联)5、测试登陆:
// 端口号是要加的(官方的不用加是做了相应处理,我这自己集成的SDK功能欠缺了点- -!) [[BQLIPPManager InstanceIPPManager] addProxyConfig:@”100” password:@”100” DisplayName:@”” domain:@”192.168.1.161” Port:@”5060” withTransport:@”TCP”]; 测试拨号: [[BQLIPPManager InstanceIPPManager] call:@”18012341234” displayName:@”” transfer:NO];转载地址:http://gxevn.baihongyu.com/