Closed toothbrush closed 3 years ago
Do you import the SpotifyExampleContent
module anywhere?
Nope! I have run grep
on my entire project, and i don't find mentions of it. Is it because of the way i'm importing SpotifyAPI, as a Swift package manager module? (I don't know if it helps, but the project is https://github.com/toothbrush/Spotiqueue)
Both the SpotifyExampleContent
and SpotifyWebAPI
targets are part of the SpotifyAPI
library:
As shown below, package products are linked against projects on a per-library basis, not a per-target basis. There may still be a way to exclude these resources from your app, but I'm not sure how.
Notice that the "Link Libraries with Binaries" section contains the SpotifyAPI
library, not the targets.
If you're really concerned about these resources ballooning the size of your app (how much space do they take up in total?), you could fork my library and remove them straight from the source. Let me know if this is something you're interested in.
Fair enough! I don't think it's making a big difference to my final binary size at all, i just thought i'd ask if i'm doing something wrong or whether this is intentional. Stupid question maybe, but is it simply possible to remove "SpotifyExampleContent"
from the package definition?
Yes, you can do that in your fork. It's that module which contains the resources.
I'm not sure if this is something i can control as a project consuming your library, but i noticed that when i use
Product > Archive
to create a.app
bundle which i can distribute, it contains lots of files as follows:Is it possible to configure my project to exclude that part of your library? Or is it something caused by this setting?
https://github.com/Peter-Schorn/SpotifyAPI/blob/1e37a426f5198cc4bde71ccdd434a7b187809d9c/Package.swift#L13