jefflinwood / twilio_client_phonegap

Phonegap plugins for the Twilio Client iOS and Android SDKs
MIT License
59 stars 53 forks source link

How to use in IONIC app #86

Closed ishan123456789 closed 6 years ago

ishan123456789 commented 6 years ago

I get this error when I try to add it here

Installing "com.phonegap.plugins.twilioclient" for android Android Studio project detected Subproject Path: CordovaLib Subproject Path: app Installing "com.phonegap.plugins.twilioclient" for ios Failed to install 'com.phonegap.plugins.twilioclient': undefined (node:1438) UnhandledPromiseRejectionWarning: CocoaPods was not found. Please install version 1.0.1 or greater from https://cocoapods.org/ (node:1438) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:1438) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

jefflinwood commented 6 years ago

Hi,

Do you have Cocoapods installed on your computer?

pod --version

If not, you'll need to install it from that web site.

Thanks!

ishan123456789 commented 6 years ago

After installing it does not allow me to build This is the error I'm getting while building an APK

RE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 41s
    at ChildProcess.whenDone (/Applications/MAMP/htdocs/acs-now/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:567:12)
(node:888) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:888) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
ishan123456789 commented 6 years ago

I fixed the issue by installing cordova plugin add cordova-android-support-gradle-release --fetch

And then removing and adding android platform again ionic cordova platform rm android && ionic cordova build android

ishan123456789 commented 6 years ago

Hey @jefflinwood Can you please tell how to import this twilio in my app as I don't think you have the typings available or any npm package that helps ? Do you mind if I create a npm package for it.