Skip to content

Automattic/spm-abstraction-layer-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo for a Swift package architecture where an Objective-C package which depends on a Swift package fails to be found when used as a dependency. See apple/swift-package-manager#5951

The solution is to introduce an abstraction layer to break the direct dependency chain.

flowchart TD
    A(App) --> B(Objective-C package)
    A --> C(Swift package)
    B --> D(Abstraction Layer - must be Objective-C )
    C --> D
    E(Implementaion Layer) --> |implements| D
    A --> E
    E --> |Injected by App|B
    E --> |Injected by App|C

Notice that the abstraction layer needs to be implemented in Objective-C. If implemented in Swift, then we'd be back to the situation described in the SPM issues. For more details, see #1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published