I use Windev mobile to developpe apps for both Android and IOS. For IOS apps, Windev mobile gave me an objective-c project that i should build in xcode then send to app store .. I'm know only basics of basics step on xcode and i need to clean my code from "UIWebView", I have seen more than discussion about that but none of them repond to my case .. For exemple thay talk about using: grep -r UIWebView project path . But i realy dont know how to use that ... Please your help will be very very appreciated ! Thanks!
-
please show what you have tried and what isnt working. – FutureCake Jun 12 '20 at 22:49
1 Answers
Really just some guidance - how to do it actually depends on your situation.
Don't use grep - just use your IDE's search to locate all the UIWebView
and then replace them with WKWebView
. It can be as simple as that depending on what you use your webview's for. If for complex processing then you'll need to figure out how to do what you did in UIWebView in the WKWebView.
Another suggestion - why not wrap all your UIWebViews in some custom class and move all the functionality in there. Then it is easy to replace the UIWebView there and also rework the functionality there with the class staying the same. Apart from the functionality you'll have code that looks something like this in there.
+ ( UIWebView / WKWebView * ) addWebViewToView:( UIView * ) view
{
// Code to create webview - initially UIWebView and later WKWevView
..
// Code to embed the webview into the view
.. set the constraints to fill the view
return webview;
}
Then you can use normal UIView's in your project and use this to prime them with a webview.
To this you can later add navigation delegates to beef up the functionality or, if you just use the webview to display some HTML, you can pass in the string or URL to display.

- 2,988
- 1
- 8
- 16
-
Basicaly, I'm not using any UIWebView since i'm not trying to show any website .. i just call some urls with rest requests .. – amr belhadad Jun 13 '20 at 16:20
-
-
Ok then I suppose it is used internally somewhere. Can't help you then, those directions I gave are if you've implemented / used it yourself. – skaak Jun 13 '20 at 17:08
-
FWIW the steps would be more or less the same as what I've described except for the custom class refinement. In stead of grep you could use your OS find to search for all files containing UIWebView if your IDE does not help. – skaak Jun 15 '20 at 07:24