baumblatt / capacitor-firebase-auth

Capacitor Firebase Authentication Plugin
MIT License
261 stars 129 forks source link

Replace TwitterKit (IOS) #76

Closed cstange closed 4 years ago

cstange commented 4 years ago

Hi, Great job.

After uplodad my app to apple store connect I get the next error

ITMS-90809: Deprecated API Usage

I Fixed it, replacing TwitterKit with TwitterKit5, maybe it can help.

Regards.

mirzailhami commented 4 years ago

Hi @cstange, where to replace it? Could you please elaborate it more details? Thanks bro.

baumblatt commented 4 years ago

Hi @cstange,

This work is in progress on release next where I not use Twitter Kit anymore. At the moment, is ready only on Android.

You can help, doing a PR on current release.

Best regards, Bernardo Baumblatt

On Mon, May 4, 2020 at 9:16 AM Mirza Ilhami notifications@github.com wrote:

Hi @cstange https://github.com/cstange, where to replace it? Could you please elaborate it more details? Thanks bro.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/baumblatt/capacitor-firebase-auth/issues/76#issuecomment-623428946, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJMCV6TW52IFJE2TTSGWN3RP2W3HANCNFSM4MYFXNEA .

-- Atenciosamente, Bernardo Baumblatt.

cstange commented 4 years ago

Hi @mirzailhami ,

The follow step work for me

1) In file node_modules/capacitor-firebase-auth/ios/plugin/Podfile Line 12: pod 'TwitterKit' replace by: pod 'TwitterKit5'

2) In file ios/App/Podfile, (I use twitter) Use: pod 'TwitterKit5'

For example, my pods are:

pod 'Firebase/Core' pod 'Firebase/Auth' pod 'Firebase/Messaging' pod 'GoogleSignIn' pod 'FBSDKCoreKit' pod 'FBSDKLoginKit' pod 'TwitterKit5'

3) clean your pods,in ios/App folder pod deintegrate pod install

4) resync capacitor, in project folder ionic capacitor sync

That's all

Regards

Note: The full Podfile.lock look at:

PODS:

DEPENDENCIES:

SPEC REPOS: trunk:

EXTERNAL SOURCES: Capacitor: :path: "../../node_modules/@capacitor/ios" CapacitorCordova: :path: "../../node_modules/@capacitor/ios" CapacitorFirebaseAuth: :path: "../../node_modules/capacitor-firebase-auth" CordovaPlugins: :path: "../capacitor-cordova-ios-plugins"

SPEC CHECKSUMS: AppAuth: 73574f3013a1e65b9601a3ddc8b3158cce68c09d Capacitor: 8197af225080b4135ad39d76ae44cd0b8dc87519 CapacitorCordova: e45e617a0b5fe6a27f7b822b2014f9c12e8a8198 CapacitorFirebaseAuth: 88fb1f79e7c52a2664195bad793842a9467f6bbd CordovaPlugins: 3c90584e24b7835b330aaf33f5a184420d6ef83f FBSDKCoreKit: 3ecb604427e115bd90ff7fc62ee1e30ebd12285b FBSDKLoginKit: 8b2bc5fa30ea269e9d7208a1165c0a668c0ae826 Firebase: 32f9520684e87c7af3f0704f7f88042626d6b536 FirebaseAnalytics: 83f822fd0d33a46f49f89b8c3ab16ab4d89df08a FirebaseAnalyticsInterop: 3f86269c38ae41f47afeb43ebf32a001f58fcdae FirebaseAuth: a6da11d78dfd956b7f7af3222a0f0b1c93ef8fc9 FirebaseAuthInterop: a0f37ae05833af156e72028f648d313f7e7592e9 FirebaseCore: 9aca0f1fffb405176ba15311a5621fcde4106fcf FirebaseCoreDiagnostics: 13a6564cd6d5375066bbc8940cc1753af24497f3 FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850 FirebaseInstallations: acb3216eb9784d3b1d2d2d635ff74fa892cc0c44 FirebaseInstanceID: cef67c4967c7cecb56ea65d8acbb4834825c587b FirebaseMessaging: 828e66eb357a893e3cebd9ee0f6bc1941447cc94 GoogleAppMeasurement: e49be3954045b17d046f271b9cc1ec052bad9702 GoogleDataTransport: 6ffa4dd0b6d547f8d27b91bd92fa9e197a3f5f1f GoogleDataTransportCCTSupport: 12f02e5c8f09c055615de90bcd5ba2c375546051 GoogleSignIn: 7137d297ddc022a7e0aa4619c86d72c909fa7213 GoogleUtilities: ad0f3b691c67909d03a3327cc205222ab8f42e0e GTMAppAuth: 4deac854479704f348309e7b66189e604cf5e01e GTMSessionFetcher: cea130bbfe5a7edc8d06d3f0d17288c32ffe9925 nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6 Protobuf: 176220c526ad8bd09ab1fb40a978eac3fef665f7 TwitterCore: 8cbc9ad34d91c63a0035ea05bfbfc0d7ca72a28c TwitterKit5: de28c7a3e022f18fd644e0bd61f9fca448991faa

PODFILE CHECKSUM: ac5d1b61a381d194019397d4c2c94bdd9102badb

COCOAPODS: 1.9.1

mirzailhami commented 4 years ago

Hi @cstange, This work is in progress on release next where I not use Twitter Kit anymore. At the moment, is ready only on Android. You can help, doing a PR on current release. Best regards, Bernardo Baumblatt On Mon, May 4, 2020 at 9:16 AM Mirza Ilhami @.***> wrote: Hi @cstange https://github.com/cstange, where to replace it? Could you please elaborate it more details? Thanks bro. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#76 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJMCV6TW52IFJE2TTSGWN3RP2W3HANCNFSM4MYFXNEA . -- Atenciosamente, Bernardo Baumblatt.

Thanks for update bro. Please update on next version where to configure when we dont want to use Twitter auth. Just like my case, I use Facebook, Google, Phone only for auth. It was rejected by apple due to ITMS-90809: Deprecated API Usage.

Thank you.

mirzailhami commented 4 years ago

Hi @cstange, working on it now. Thanks for update.

mirzailhami commented 4 years ago

@cstange your solution will install TwitterKit and TwitterKit5, so UiWebView issue still remain. The solution is just change the TwitterKit with TwitterKit5 in node_modules/capacitor-firebase-auth/CapacitorFirebaseAuth.podspec or if you dont want to use Twitter auth, you can remove it and comment the if/else twitter provider in node_modules/capacitor-firebase-auth/ios/Plugin/Plugin/Plugin.swift file.

Thanks.

sabahang commented 4 years ago

This is hurting us as well :( We are only using phone auth and can't submit to app store anymore... This means we have to remove the library as a whole and find a replacement unfortunately even though we are not using Twitter at all. I wish there was a way (a configuration) to tell the plugin to not load libraries that are not used so that we wouldn't have to deal with outdated library issues in the first place.... Unfortunately I don't know a single thing about ios/swift development but if anyone was kind enough to say where to begin to create a minimal PR to fix this issue I would gladly do it cause we really need this urgently...

sabahang commented 4 years ago

I confirm that the above workarounds fix the problem. Is there anyone who can put together a minimal PR (even if by just conditionally excluding Twitter for now) or show the way how to do it with minimal effort just to make this plugin usable again?

hawekotte commented 4 years ago

@sabahang, if it helps here is what I did to get my setup working (as I need Twitter login).

  1. In the following pod files swap TwitterKit for TwitterKit5
    • node_modules/capacitor-firebase-auth//CapacitorFirebaseAuth.podspec
    • node_modules/capacitor-firebase-auth//ios/Plugin/Podfile
    • mobile/ios/App/Podfile
  2. Now remove the current pods and reinstall them using: pod deintegrate && pod install
  3. Then run a sync: ionic capacitor sync
  4. Update the TwitterProviderHandler.swift file to handle the "main thread" issue by taking the current Twitter Handler signOut method:

    func signOut() {
    guard let session = TWTRTwitter.sharedInstance().sessionStore.session() else {
      return;
    }
    
    TWTRTwitter.sharedInstance().sessionStore.logOutUserID(session.userID)
    }

    to

    func signOut() { 
      DispatchQueue.global(qos: .background).async {
      // Background Thread
      DispatchQueue.main.async { 
         guard let session = TWTRTwitter.sharedInstance().sessionStore.session() else {
            return;
         }
         TWTRTwitter.sharedInstance().sessionStore.logOutUserID(session.userID)
      }
    } 
    }
  5. We can now compile and run the app.
baumblatt commented 4 years ago

Hi @cstange,

The release next already has a Twitter working with firebase OAuthProvider on iOS.

Just reviewing the Facebook implementation to finish the work.

Best regards, Bernardo Baumblatt

wouterraateland commented 4 years ago

Hi @baumblatt ,

Just wanted to let you know that in the next release there is still a reference to TwitterKit in CapacitorFirebaseAuth.podspec. To resolve the UIWebView issue, I still have to replace it manually with TwitterKit5.

Best, Wouter

baumblatt commented 4 years ago

Hello @wouterraateland

Really thank you for the information and sorry about the delay on solving this.

Please, can you take a look at version 2.0.1 (still tagged as next).

As soon as I hearing from your tests I will release this as latest.

Best regards, Bernardo Baumblatt

baumblatt commented 4 years ago

Hello,

In face of the test reported on issue #89 the version 2.0.1 is now tagged as latest and I'm closing this issue, please reopen it if you need more help.

Best regards, Bernardo Baumblatt