Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing UIWebView support #391

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stury
Copy link

@stury stury commented Nov 4, 2019

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
Copy link
Author

stury commented Nov 7, 2019

@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
Copy link
Author

stury commented Nov 18, 2019

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

@stury
Copy link
Author

stury commented Jan 6, 2020

@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
Copy link
Author

stury commented Feb 10, 2020

@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
Copy link

hrabkin commented Feb 28, 2020

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

@hrabkin
Copy link

hrabkin commented Feb 28, 2020

Actually your pull request doesn't remove fully UIWebView code

@stury
Copy link
Author

stury commented Feb 28, 2020

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
Copy link

hrabkin commented Feb 28, 2020

@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
Copy link
Author

stury commented Feb 28, 2020

@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
Copy link

akbayt commented May 26, 2020

@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
Copy link
Author

stury commented May 26, 2020

@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
Copy link

akbayt commented May 26, 2020

@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
Copy link
Author

stury commented May 26, 2020

@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 => '[email protected]: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
Copy link

akbayt commented May 26, 2020

@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

Thank @stury , you save my day

@ajabade
Copy link

ajabade commented Sep 17, 2020

@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

@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 => '[email protected]: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