Bundle Ionic project into cocoapod for use in another iOS app?

I have a requirement for an existing iOS app to only use cocoapods to bring in 3rd party functionality. I’m an Ionic newbie and would like to package a project into a cocoapod Podspec and publish to a private spec repo making it super simple for the existing iOS app to utilise the various components/screens it needs from the Ionic project and reference the Ionic project with no dependences other than the pod itself. Can this be done? Clear as mud?

See:

Am i thinking about this too complex? Should the approach instead be to externally host a deployed Ionic www project on the web at https://blahblahblah and reference the URL to it using WKWebView or UIWebView from native iOS code?

Or alternatively looking at the output of: ionic cordova run ios
I wonder if i am able to create a plain vanilla iOS project:

  • Copy to it the contents of: platforms/ios/www
  • Create a Podfile for the cordova dependencies
    It might be possible to fire up a WKWebView that references the index.html in the bundled www folder.

Remember my aim here is to create an iOS library project that has its own .podspec so other iOS projects can simply reference my library project in their own Podfile and display views from within my library project onto their own iOS project (with no knowledge of Ionic / cordova).

Just a ping to see if anyone else wanted to weigh in…

Think i’ll either expose the www folder with a WKWebView or look into Ionic 4 with Capacitor. I can’t seem to find info on the benefit of using CDVViewController specifically.