'How can I bundle a Package with another custom Package in Swift 5?

I created a custom Package MyCustomPackage and would like to mimic the following UIKit / SwiftUI behavior.

import SwiftUI / UIKit      // Already imports Foundation

import Foundation           //
import MyCustomPackage      // I have to manually import Foundation 

How can I achieve my goal of already bundling MyCustomPackage with Foundation?



Solution 1:[1]

import Foundation
import MyCustomPackage

class BaseVC: UIViewController {

}

Then, use this BaseVc any where in the project

import UIKit

class LoginVC: BaseVC {

}

Sources

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

Source: Stack Overflow

Solution Source
Solution 1 Kumar Lav