I am building a cordova app for iOS and I am using Twilio Plugin with the corresponding Twilio iOS SDK. For some reason, after calling the setup method from Twilio plugin ( which then calls native code ), the app crashes. Here is the link of stack trace:
我正在为iOS构建一个cordova应用程序,我正在使用Twilio插件和相应的Twilio iOS SDK。出于某种原因,在从Twilio插件(然后调用本机代码)调用setup方法后,应用程序崩溃了。这是堆栈跟踪的链接:
The exception I get is EXC_BAD_ACCESS
. I know that the problem may not be in cordova because i downloaded phonekit app and it does not crashes. https://github.com/jconst/PhoneKit
我得到的例外是EXC_BAD_ACCESS。我知道问题可能不在cordova,因为我下载了phonekit应用程序并且它不会崩溃。 https://github.com/jconst/PhoneKit
This is cordova plugin I am using:
这是我使用的cordova插件:
The method I call is : Twilio.Device.setup
我调用的方法是:Twilio.Device.setup
From there, it will execute native code which is in TCPlugin.
从那里,它将执行TCPlugin中的本机代码。
jefflinwood - twilio_client_phonegap
jefflinwood - twilio_client_phonegap
I would appreciate any insight on the topic.
我很感激有关该主题的任何见解。
Unfortunately, I am still struggling with how to make both sdks work together. I am contacting opentok support to see if the can help.
不幸的是,我仍然在努力使两个sdks协同工作。我正在联系opentok支持,看看是否可以提供帮助。
(EDITED)
(编者)
2 个解决方案
#1
1
Problem Solved. Here is what was going on. I was using OpenTok plugin as well in my project. OpenTok also uses openssl which conflicts with the one used by twilio ( differente version). I partialy solved this by removing openTok. Eventually Ill need to find a way to use both plugins.
问题解决了。这是正在发生的事情。我在我的项目中也使用OpenTok插件。 OpenTok也使用openssl与twilio(differente版本)使用的openssl冲突。我通过删除openTok来解决这个问题。最终我需要找到一种方法来使用这两个插件。
#2
1
The solution is simple. Just remove libssl references from project. That way, twilio will use opentok openssl libraries. In my case, I delete libssl from twilio folder. I was using xCode and was not that simple to exclude it from project, since There is "search libraries path" which looks for all libraries. Then if you are using Pods, make sure to do not use Pods.config, because it will also look for libssl library. Hope that helps!
解决方案很简单。只需从项目中删除libssl引用即可。这样,twilio将使用opentok openssl库。就我而言,我从twilio文件夹中删除了libssl。我正在使用xCode,并不是那么简单,从项目中排除它,因为有“搜索库路径”,它寻找所有库。然后,如果您使用Pod,请确保不要使用Pods.config,因为它也会查找libssl库。希望有所帮助!
#1
1
Problem Solved. Here is what was going on. I was using OpenTok plugin as well in my project. OpenTok also uses openssl which conflicts with the one used by twilio ( differente version). I partialy solved this by removing openTok. Eventually Ill need to find a way to use both plugins.
问题解决了。这是正在发生的事情。我在我的项目中也使用OpenTok插件。 OpenTok也使用openssl与twilio(differente版本)使用的openssl冲突。我通过删除openTok来解决这个问题。最终我需要找到一种方法来使用这两个插件。
#2
1
The solution is simple. Just remove libssl references from project. That way, twilio will use opentok openssl libraries. In my case, I delete libssl from twilio folder. I was using xCode and was not that simple to exclude it from project, since There is "search libraries path" which looks for all libraries. Then if you are using Pods, make sure to do not use Pods.config, because it will also look for libssl library. Hope that helps!
解决方案很简单。只需从项目中删除libssl引用即可。这样,twilio将使用opentok openssl库。就我而言,我从twilio文件夹中删除了libssl。我正在使用xCode,并不是那么简单,从项目中排除它,因为有“搜索库路径”,它寻找所有库。然后,如果您使用Pod,请确保不要使用Pods.config,因为它也会查找libssl库。希望有所帮助!