Was wondering if there was a way I could access the list of packages (in a project) within code (don't want to explicitly import)? This is possible with Pods by looking through 'Bundle.allFrameworks'. However, it seems that packages are not put there, but instead within 'Bundle.main' as scattered files. In the package manifest, it is creating a property 'package' that holds a Package object. Surely there is a way to access these post compile using a string? For example something like:
let package = Bundle.packages.first(where: { $0.name == "MyPackage" })
Realistically, all I need is to get a list of strings containing the names of all the package names in my project. For example:
"MyPackage"
"MyPackage2"
"MyPackage3"
Then I can use a class to access the rest of the package like so:
for name in packageNames {
let class = classNamed("\(name).MyClass")
}
I understand I may not be grasping the process in which these packages work, but if anyone has some insight on this, it would be greatly appreciated!