capacitor-community / twitter

Capacitor plugin to enable TwitterKit
https://capacitor.ionicframework.com/docs/
11 stars 9 forks source link

Make it works with capacitor 3 #11

Open eidanfi opened 3 years ago

eidanfi commented 3 years ago

Change on CapacitorCommunityTwitter.podspec: From -> s.ios.deployment_target = '11.0' To -> s.ios.deployment_target = '12.0'

And change on Podfile: From -> platform :ios, '11.0' To -> platform :ios, '12.0'

mesqueeb commented 3 years ago

@eidanfi can you host fork with the required changes for Capacitor 3.0?

mesqueeb commented 3 years ago
image

@fmendoza Can you please make a PR with your Capacitor 3.x fixes?

mesqueeb commented 3 years ago

@stewones Can you have a look at @fmendoza 's fork? https://github.com/fmendoza/capacitor-twitter

He's gone and did most of the work! However, it won't build for me on Android with his fork as per his upload to npm: https://www.npmjs.com/package/@fmendoza/capacitor-twitter

Can you please help get this community plugin working with Capacitor 3.x? I can pay you.

eidanfi commented 3 years ago

Please merge the PR https://github.com/capacitor-community/twitter/pull/12

ivancduran commented 2 years ago

The fork from @fmendoza works fine for me, but I had some errors.

For Android:

/node_modules/@fmendoza/capacitor-twitter/android/src/main/java/com/getcapacitor/community/twitter/TwitterPlugin.java:5: error: cannot find symbol
import com.getcapacitor.Config;
                       ^
  symbol:   class Config
  location: package com.getcapacitor

I commented the line "import com.getcapacitor.Config" the package works fine for android.

For iOS:

When I installed the package from npm, for some reason the file FmendozaCapacitorTwitter.podspec dosen't exist.

I download the file manually here: https://github.com/fmendoza/capacitor-twitter/blob/master/FmendozaCapacitorTwitter.podspec

And I change this line on the file:

s.name = 'CapacitorCommunityTwitter'

to 

s.name = 'FmendozaCapacitorTwitter'

With that changes is working fine for iOS too.

I know that are not the best practices but works for me, I'm waiting until Fernando make the pull request or the comunity update the package to Capacitor 3, but for now this can be a workaround.