
Yeah, I'm making some progress I thought. I searched for the "dynamic swift library" keywords and found an interesting forum topic on. I knew I shoudn't parse the Swift file, because that'd be a horrible thing to do - Swift files are messy - so let's try to import it somehow. First I was trying to replicate this behaviour without looking at the original implementation of the Swift Package Manager at github. That question was bugging me for a while, so I did a little research. ✅ But how the heck are they doing this magic? 💫 If you run for example swift package update all your dependencies in this manifest file will be resolved & you can use them inside your own code files. The first line contains the version information, next we have to import the PackageDescription module which contains all the required elements to properly describe a Swift package. Let me show you an quick example of a regular package description file: // swift-tools-version:4.2 import PackageDescription

Have you ever wondered about how does SPM parse it's manifest file in order to install your packages? Well, the Package.swift manifest is a strange beast. The aim of this article is to go deep into the SPM architecture, also before you start reading this I'd recommend to also read my article about frameworks and tools. If you don't know too much about the Swift Package Manager, but you are looking for the basics please read my tutorial about SPM that explains pretty much everything.
