'getting module not found after importing packages in swift

I've done a bit of swift, but I've never tried to use a third party package before. I created a brand new swift app, with Mac/iOS version and tests from the wizard. I went to xcode, right clicked on the sidebar, and chose add packages, and put in a package by url:

https://github.com/witekbobrowski/EPUBKit.git

It goes away for a little bit - and three package dependencies appear on my screen:

enter image description here

and when I look at my project settings, I can see them there: enter image description here

(I actually added the zip package separately after the first one didn't work, just to test it, wondering whether something was wrong with the package)

Anyway - I can now see the packages, browse into them, see code or whatever - and the package found its own dependencies, so everything looks like it's working fine. But if I go into my swift app main, and add

import EPUBkit

or

import Zip

it just says "No such module ...". I've obviously missed a step - what am I doing wrong - how do I fix it? I don't even know how to investigate it, because everything I look at just looks completely fine and I don't get any errors. I tried cleaning builds, restarting Xcode, using the real version of Xcode 13.2.1, using Xcode 13.3 beta - and nothing works.

NEW LEARNINGS

so - I tried changing how I'm running it to produce an IOS app - and it's working fine - but when I produce a Mac app, it's like the package isn't even there? Why would that be, and how do I make it work for Mac as well as IOS?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source