简体   繁体   English

如何将 Linphone SDK 与现有的 Swift 项目集成?

[英]How to integrate Linphone SDK with Existing Swift Project?

I have followed to this instruction about how to integrate with linphone SDK我已按照有关如何与 linphone SDK 集成的说明进行操作

After that, I follow with this intruction之后,我遵循这个指令

I have done with the final build Linphone SDK file, so next is the integration process.我已经完成了 Linphone SDK 文件的最终构建,接下来是集成过程。 I didn't find any document or any suggestion for how to implement with the swift project我没有找到有关如何使用 swift 项目实施的任何文档或任何建议

The document of liblinphone(Does not include how to integration just the class function) liblinphone 的文档(不包括如何集成 class 功能)

Hope you have installed the pod for linphone with version 4.2.希望您已经为 linphone 安装了 4.2 版的 pod。 If not then please have a look at this.如果没有,那么请看看这个。

source "https://gitlab.linphone.org/BC/public/podspec.git"
source "https://github.com/CocoaPods/Specs.git"

def basic_pods
  if ENV['PODFILE_PATH'].nil?
    pod 'linphone-sdk', '4.2'
    else
    pod 'linphone-sdk', :path => ENV['PODFILE_PATH']  # loacl sdk
  end
end

Step 1-> You need to add a bridge file and import the below files in that.步骤 1-> 您需要添加一个桥接文件并在其中导入以下文件。

#include "linphone/lpconfig.h"
#include "linphone/linphonecore.h"
#include "linphone/linphonecore_utils.h"

Step 2-> After that create 1 .h and .m file and in that copy all the call related functionality from the linphone project like outgoing call, incoming call and so on.步骤 2-> 之后创建 1 个.h.m文件,并在其中复制 linphone 项目中的所有呼叫相关功能,如拨出电话、来电等。

Step 3-> Create the object which you have entered the name of .h file.步骤 3-> 创建 object,您已输入.h文件的名称。

Step4-> Call that functionality with the help of your object variable. Step4-> 在 object 变量的帮助下调用该功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM