Twilio on cross platform mobile tools(Ionic,React-Native) [英] Twilio on cross platform mobile tools (Ionic, React-Native)

查看:218
本文介绍了Twilio on cross platform mobile tools(Ionic,React-Native)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望使用像React Native或Ionic这样的跨移动框架来构建Twilio的IP消息传递API。我的问题是 - 这是一个理智的要求吗?我看到Twilio有一个我计划使用的Javascript库。成功/失败的例子也会有所帮助。

I'm looking to build with Twilio's IP Messaging APIs using a cross mobile framework like React Native or Ionic. My question is - is this a sane request? I see that Twilio has a Javascript library that I plan to use. Examples of successes/failures would also help.

我的总体目标是建立跨平台的简单聊天室。

My overall goal is to build in simple chat rooms cross platform.

推荐答案

当前的解决方案是为Twilio Messaging实现本机模块。查看Twilio的IPM文档,了解他们的iOS快速入门。 Twilio Node SDK使用的库太多,与Apple的JavaScriptCore运行时冲突。

The current solution is to implement a native module for Twilio Messaging. Check Twilio's IPM docs for their iOS quickstart. There are too many libraries that the Twilio Node SDK uses that conflict with Apple's JavaScriptCore runtime.

您的本机模块将通过RN桥与React Native应用程序通信。在较高级别,您必须从RN - > iOS实现 sendMessage / joinChannel ,并从iOS实现 receivedMessage / Channel - > RN。

Your native module would communicate with the React Native app through the RN bridge. At a high level you'd have to implement sendMessage/joinChannel from RN -> iOS and receivedMessage/Channel from iOS -> RN.

一个例子(我已经与Twilio团队沟通)是他们的JS SDK在以npm-V8为中心的deps(如 crypto 无法移植。我猜测还有其他一些在Node中常见的基本库,它们不会被React Native的构建系统移植。

One example (that I've communicated to the Twilio team) is that their JS SDKs break when npm-V8 centric deps like crypto can't be ported. I'm guessing there are several other basic libraries that are commonplace in Node that don't get ported over by React Native's build system.

你可以跟踪相关的React Native问题这里:
(症状 - 缺少节点模块): https:// github。 com / facebook / react-native / issues / 4968

You can track related React Native issues here: (Symptom - node modules are missing): https://github.com/facebook/react-native/issues/4968

这篇关于Twilio on cross platform mobile tools(Ionic,React-Native)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆