Hi Mahendra,

This mailing list is primarily focused on development work of Cordova
itself, rather than user support. You might get more response posting on
the Cordova community GitHub Discussions:
https://github.com/apache/cordova/discussions

That said, embedding a Cordova WebView in an existing project is supported,
although not particularly well-documented.
There are some old docs here:
https://cordova.apache.org/docs/en/11.x/guide/platforms/ios/webview.html

One exciting new development is that CordovaLib in cordova-ios 7.0.0 is
available as a Swift Package, which should allow you to skip the steps
about Carthage and Cleaver and adding CordovaLib.xcodeproj as a subproject
to Xcode.
You can simply add "https://github.com/apache/cordova-ios.git"; in Xcode as
a package dependency, with a tag of "rel/7.0.0" to get the latest version.

Hope that helps to steer you in the right direction,
~Darryl

On Fri, Jul 14, 2023 at 11:11 AM Mahendra Liya <liyamahend...@gmail.com>
wrote:

> Hello,
>
> I've an existing Swift Project which doesn't use Storyboard or XIBs. All
> the UI Screens are programmatically coded. Instead of adding a simple
> webview, I was inclined towards adding Cordova instead.
>
> I was wondering if it's documented anywhere (which I couldn't find though)
> if Cordova can be programmatically added to an existing Swift (not
> Objective-C though) project and if so, how please?
>
> I was wondering doing something like this:
>
> - Adding CordovaLib to the project and then
>
> *let* cordovaView = CDVViewController()
>
> // any other configuration / initialization that may be required for
> Cordova to work properly
>
> *self*.view.addSubview(cordovaView)
>
>
>
> Any advice or insights would be greatly appreciated.
>
> Cheers,
> Mahendra
>

Reply via email to