How to use the same code (e.g. common librarieswith application?
Check out Explore app clips from #wwdc20, it shows how to create a new App Clip target in your Xcode project and add common files.
https://developer.apple.com/wwdc20/10174
https://developer.apple.com/wwdc20/10174