Skip to content

Removing UIWebView support#391

Open
stury wants to merge 2 commits into
marcuswestin:masterfrom
stury:Remove-UIWebView-Support
Open

Removing UIWebView support#391
stury wants to merge 2 commits into
marcuswestin:masterfrom
stury:Remove-UIWebView-Support

Conversation

@stury

@stury stury commented Nov 4, 2019

Copy link
Copy Markdown

Removing UIWebView support from this library, since Apple is now warning developers of the usage of the UIWebView APIs when submitting apps to the App Store for review. 


  1. Removed UIWebView support from the code, and the tests
    
2. Kept the WebView macOS support, as I don't think that has been targetted by Apple yet.
    
3. Updated the README.md file to remove any UIWebView references.
    
4. Update the podspec (version number, and description)

We are under the impression that since ht eUIWebView warning is being shown to all apps being submitted to Apple, that it's just a matter of time before iOS apps will not be allowed to ship with this code. This will help eliminate that possibility. If a user needs UIWebView support, they can always use the 6.x version of the library.

Thanks for taking a look at this patch @marcuswestin!

…ing developers of their usage of the UIWebView APIs when submitting apps to the App Store for review. 
1. Removed UIWebView support and tests
2. Kept the WebView macOS support, as I don't think that has an issue yet.
3. Update the README.md to remove any UIWebView references.
4. Update the Podspec (version number, and description)
@stury

stury commented Nov 7, 2019

Copy link
Copy Markdown
Author

@marcuswestin Here is the wording from Apple on submissions referencing UIWebView:

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.

@stury

stury commented Nov 18, 2019

Copy link
Copy Markdown
Author

How do I get the continuous-integration/travis-ci check to run for this PR? I'd love to move this forward.

@stury

stury commented Jan 6, 2020

Copy link
Copy Markdown
Author

@marcuswestin Please take a look at this PR.

Apple published a note on December 23, 2019 stating that apps shipping with UIWebView support will be rejected as of April 2020.

Here's the link to the article:
Updating Apps that Use Web Views

This PR should remove UIWebView from the codebase. I did not remove it from the macOS target, but I can do that work if you'd like.

We have several apps that rely on this framework, and would love to support your Open Source efforts with this patch to keep things working moving forward.

Thanks for the consideration.

@stury stury requested a review from marcuswestin February 10, 2020 15:30
@stury

stury commented Feb 10, 2020

Copy link
Copy Markdown
Author

@marcuswestin It would be nice to get this PR merged and released before the April 2020 deadline. It's February now, and people will need time to migrate up to the latest version of the SDK. This update will eliminate the chance that a consuming app will have of being rejected by Apple upon submission in April.

Let me know if you have any questions.

@hrabkin

hrabkin commented Feb 28, 2020

Copy link
Copy Markdown

The owner of the repository is probably won't support it anymore =(

@hrabkin

hrabkin commented Feb 28, 2020

Copy link
Copy Markdown

Actually your pull request doesn't remove fully UIWebView code

@stury

stury commented Feb 28, 2020

Copy link
Copy Markdown
Author

Actually your pull request doesn't remove fully UIWebView code

@GRyabkin Only UIWebView code I see in my branch is in the Example app. I can remove it from there as well.

@hrabkin

hrabkin commented Feb 28, 2020

Copy link
Copy Markdown

@stury take a look at WebViewJavascriptBridge.m it has conditional branching to use UIWebView if it's iOS version macros lower than iOS version with WKWebView

…the code. I think this should eliminate them all now.
@stury

stury commented Feb 28, 2020

Copy link
Copy Markdown
Author

@GRyabkin Sorry, you are correct! Updated, and removed the rest of the references I could find. Let me know if you see anything else I need to clean up. All Tests pass, and the sample app works without UIWebView.

Oh, and thank you for reviewing the changes! 😄

@akbayt

akbayt commented May 26, 2020

Copy link
Copy Markdown

@stury thanks for your effort :)

I am exactly in a situation you described. Our new app rejected due to the usage of UIWebView, which comes from this package actually. Did you happen to fork from this project for your update?

Otherwise, I am going to use this one: https://cocoapods.org/pods/WKWebViewJavascriptBridge

@stury

stury commented May 26, 2020

Copy link
Copy Markdown
Author

@akbayt I did fork from this repo: https://github.com/stury/WebViewJavascriptBridge/tree/Remove-UIWebView-Support

You can use that fork, or try out the WKWebViewJavascriptBridge. I hadn't seen that one before. Looks like they have the right idea. Cheers!

@akbayt

akbayt commented May 26, 2020

Copy link
Copy Markdown

@stury thanks for the quick answer.

WKWebViewJavascriptBridge didn't work for me. It doesn't give the option to set WebView delegate (setWebViewDelegate), which necessary for me to handle URL redirections.

I will try your fork. I will try adding it manually since the pod installation doesn't work:

pod 'WebViewJavascriptBridge', '~> 7.0'

or do you have a pod with a different name?

@stury

stury commented May 26, 2020

Copy link
Copy Markdown
Author

@akbayt I believe I've merged everything to master at this point in my fork, so you should be able to just use the following:

pod 'WebViewJavascriptBridge', :git => 'git@github.com:stury/WebViewJavascriptBridge.git', :branch => 'master'

Or you can replace the git@github with the HTTPS URL if you'd rather:

pod 'WebViewJavascriptBridge', :git => 'https://github.com/stury/WebViewJavascriptBridge.git', :branch => 'master'

Give that a shot, and it should work.

@akbayt

akbayt commented May 26, 2020

Copy link
Copy Markdown

@stury worked just fine!

I tested essential functionalities, all works fine. And also, I tried to upload a new version to the app store connect; it didn't give the warning about unsupported UIWebView.

Thanks, this saved my time a lot :)

@truongluuxuan

Copy link
Copy Markdown

Thank @stury , you save my day

@ajabade

ajabade commented Sep 17, 2020

Copy link
Copy Markdown

@stury -Thank a lot.

You saved lots of time. When it will be available on the cocoa pod?

Once again thank you

@SunnyJ-CN

Copy link
Copy Markdown

@stury Thank you, really helped

@akbayt I believe I've merged everything to master at this point in my fork, so you should be able to just use the following:

pod 'WebViewJavascriptBridge', :git => 'git@github.com:stury/WebViewJavascriptBridge.git', :branch => 'master'

Or you can replace the git@github with the HTTPS URL if you'd rather:

pod 'WebViewJavascriptBridge', :git => 'https://github.com/stury/WebViewJavascriptBridge.git', :branch => 'master'

Give that a shot, and it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants