且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将Linphone集成到自己的iOS项目中

更新时间:2023-02-08 09:21:17


  • 从链接下载Liblinphone iPhone SDK: http://www.linphone.org/releases/ios/liblinphone-iphone-sdk-latest.zip
    OR 从这里开始, http://www.linphone.org/releases/ios
    并从此处选择最新的一个。

  • 将两个文件夹(包括 lib )移动到您的项目中文件夹

  • 在项目中添加这些文件夹的路径构建设置 - INCLUDE文件夹转到标题,LIB文件夹转到图书馆

  • 链接框架中的>常规标签添加 LIB 文件夹中的所有文件

  • 下载/克隆repo https://github.com/BelledonneCommunications/linphone-iphone

  • 查找4个文件: LinphoneManager.h / .m Utils.h / .m ,将它们包含在项目文件夹中,并将它们添加到左窗格中,同时将其添加到其他类文件中

  • 尝试编译您的项目 - xCode会向您发送错误消息 - 这没关系。

  • 您需要检查错误并删除导致的所有文件导入错误(一些Linphone地址簿文件/一些配置存储文件以及您在项目中不需要基本使用的一些帮助程序类(因为很可能你已经是我)在现有项目中实现此功能))

  • 然后再次编译并检查方法中的所有错误。注释删除任何有问题的代码块(大约有10-15个代码)。

    • Download Liblinphone iPhone SDK from the link: http://www.linphone.org/releases/ios/liblinphone-iphone-sdk-latest.zip OR from here, http://www.linphone.org/releases/ios and choose latest one from here.
    • Move two folders (include and lib) to your project folder
    • Add paths to these folders in your project Build settings - INCLUDE folder goes to headers and LIB folder goes to libraries.
    • In General tab in Linked frameworks add all files from LIB folder
    • Download/clone the repo https://github.com/BelledonneCommunications/linphone-iphone
    • Find 4 files: LinphoneManager.h/.m and Utils.h/.m , include them in your project folder and add them to the left pane to other class files also
    • Try to compile your project - xCode will spam you with errors - this is ok.
    • You need to inspect errors and just delete all file imports causing errors (Some Linphone Address book files/ some config store files and some helpers classes that you do not need for basic use in your project (because most likely you already implemented this features in your existing project))
    • Then compile again and inspect all errors in methods. Comment delete any problematic chunks of code (there will be about 10-15 of them).
    • LinphoneManager类已经包含许多有用的功能 - 喜欢好的手表和使用linphone核心与良好的伐木等等,但不是所有(不幸的是)。

      LinphoneManager class already include many useful features - like good watch and use of linphone core with good logging and etc and etc, but not all of them (unfortunately).