Skip to content
This repository has been archived by the owner on Oct 5, 2019. It is now read-only.

IOS removing UIWebView #120

Open
maximus123123 opened this issue Sep 4, 2019 · 5 comments
Open

IOS removing UIWebView #120

maximus123123 opened this issue Sep 4, 2019 · 5 comments

Comments

@maximus123123
Copy link

This package uses UIWebView, Is there a way of removing just that section?

ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See https://developer.apple.com/documentation/uikit/uiwebview for more information.

@touren
Copy link

touren commented Sep 23, 2019

I created a new pod TwitterKit5, migrated from UIWebView to WKWebView. Hope that will help.

pod 'TwitterKit5'

@HackingGate
Copy link

@touren Thank you for your work. But it's crashing.

After investigating in the DemoApp. The first time it will use SFSafariViewController and everything goes right. When any session is stored, it will use WKWebView instead. My project will crash here.

- (UIViewController *)webController
{
    if (_useWebFlow) {
        // My project goes crash when WKWebView being used
        return [self webViewController];
    } else {
        // No crash here
        [self.navigationController setNavigationBarHidden:YES];
        return [self safariViewController];
    }
}

I've created touren#2 for you, so DemoApp is able to run.

If anyone got crashing and is in a hurry. The workaround is to change _useWebFlow to NO, it will force SFSafariViewController to be used every time to prevent the crash. Since UIWebView is not referenced in the code it should be able to submit to the App Store.

Don't know why TwitterKit uses two different ways for non-app auth.
Please correct me if anything is wrong.

@touren
Copy link

touren commented Sep 28, 2019

@HackingGate Thanks for your solution.
Could you please share the steps you did to crash the DemoApp?

@HackingGate
Copy link

Hi @touren
Here's the steps to reproduce.

  1. Don't install Twitter app
  2. Create a Xcode project. Install pod 'TwitterKit5'
  3. Implement Log In With Twitter, create a button, let's call it "login"
  4. Tap "login", SafariViewController popped up.
  5. Enter username and password then login
  6. SafariViewController dismissed and Log In With Twitter is completed
  7. Tap "login" again
  8. Crash

@touren
Copy link

touren commented Sep 30, 2019

@HackingGate Thanks for your instructions.
I published TwitterKit5 v5.0.2, fixed the crash.

pod 'TwitterKit5'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants