The Package Manager for the Swift Programming Language

Overview

Swift Package Manager Project

The Swift Package Manager is a tool for managing distribution of source code, aimed at making it easy to share your code and reuse others’ code. The tool directly addresses the challenges of compiling and linking Swift packages, managing dependencies, versioning, and supporting flexible distribution and collaboration models.

We’ve designed the system to make it easy to share packages on services like GitHub, but packages are also great for private personal development, sharing code within a team, or at any other granularity.

Swift Package Manager includes a build system that can build for macOS and Linux. Starting with Xcode 11, Xcode integrates with SwiftPM to provide support for including packages in iOS, macOS, watchOS, and tvOS applications.

The SourceKit-LSP project leverages libSwiftPM and provides Language Server Protocol implementation for editors that support LSP.


Table of Contents


Getting Started

Please use this guide for learning package manager basics.


Documentation

For Quick Help use the swift package --help command.

For documentation on using Swift Package Manager, creating packages, and more, see the documentation directory.

For documentation on developing the Swift Package Manager itself, see the contribution guide.

For detailed documentation on the package manifest API, see PackageDescription API.

For release notes with information about changes between versions, see the release notes.


System Requirements

The package manager’s system requirements are the same as those for Swift with the caveat that the package manager requires Git at runtime as well as build-time.


Installation

The package manager is available as part the Swift toolchains available on Swift.org) including snapshots for the latest versions built from main branch. For installation instructions for downloaded snapshots, please see the Getting Started section of Swift.org.

The Swift Package Manager is also included in Xcode 8.0 and all subsequent releases.

You can verify your installation by typing swift package --version in a terminal:

$ swift package --version
Apple Swift Package Manager - ...

Contributing

There are several ways to contribute to Swift Package Manager. To learn about the policies, best practices that govern contributions to the Swift project and instructions for setting up the development environment please read the Contributor Guide.

The Swift package manager uses llbuild as the underlying build system for compiling source files. It is also open source and part of the Swift project.


Reporting issues

If you have any trouble with the package manager, help is available. We recommend:

When reporting an issue please follow the bug reporting guidelines, they can be found in Resources.md.

If you’re not comfortable sharing your question with the list, contact details for the code owners can be found in CODEOWNERS; however, the mailing list is usually the best place to go for help.


License

Copyright 2015 - 2020 Apple Inc. and the Swift project authors. Licensed under Apache License v2.0 with Runtime Library Exception.

See https://swift.org/LICENSE.txt for license information.

See https://swift.org/CONTRIBUTORS.txt for Swift project authors.

Comments
  • Improve `Destination.sdkPlatformFrameworkPaths()`

    Improve `Destination.sdkPlatformFrameworkPaths()`

    We should not ignore errors or an empty SDK platform path since that means XCTest imports and test execution might silently fail on macOS with no indication to what the problem is.

    opened by neonichu 124
  • [SE-0301] Package Editor Commands Implementation

    [SE-0301] Package Editor Commands Implementation

    This PR:

    • Updates the SPMPackageEditor library so it compiles against ToT SwiftSyntax
    • Removes spm-manifest-tool, instead conditionally compiling package editor functionality into the Commands module
    • Refactors the library a bit to fix some bugs and make it more extensible
    • adds support for adding products

    Possible future directions (not in this PR):

    • deleting products/targets/dependencies
    • a swift package upgrade command that could update requirement specs
    • Use the PackageSyntax infra to emit manifest-related diagnostics with source locations
    opened by owenv 74
  • [PackageLoading] Improve flexibility in formatting Package manifests and correctness in parsing Swift tools version specifications

    [PackageLoading] Improve flexibility in formatting Package manifests and correctness in parsing Swift tools version specifications

    ORIGINAL DESCRIPTION

    SR-13566

    This pull request changes the regex pattern on line 181 of swift-package-manager/Sources/PackageLoading/ToolsVersionLoader.swift to allow any combination of horizontal whitespace characters between "//" and "swift-tools-version" in the swift tools version specification in Package.swift

    The old regex pattern is ^// swift-tools-version:(.*?)(?:;.*|$)

    The new regex pattern is ^//\h*?swift-tools-version:(.*?)(?:;.*|$)


    NEW DESCRIPTION (2020-11-04)

    This PR proposes the following changes to the parsing of the Package manifest and its Swift tools version specification, starting from Swift Next (assumed to be Swift 5.4):

    • Allow leading (any combination of all) whitespace characters in the Package manifest, instead of just line feed characters (U+000A).

      Rationale: This allows SwiftPM to skip all initial whitespace-only lines (if any) when looking for the Swift tools version specification, eliminating a common source of bug for Swift packages. Additionally, this allows SwiftPM to recognise all Unicode line terminators, because all of them are whitespace characters.

    • Allow any combination of all horizontal whitespace characters¹ immediately after the comment marker (//) in the Swift tools version specification, instead of just a single space (U+0020).

      Rationale: Sometimes a user may prefer to follow the comment marker with a character tabulation (U+0009) or 2 space characters, or some other horizontal whitespace characters, in order to line up developer (//) and documentation (///) comments throughout the source files. For example:

      //  This is a demonstration of how comments may be lined up.
      /// A struct that represents nothing.
      struct Foo {}
      
    • Allow any combination of all horizontal whitespace characters immediately before the version specifier in the Swift tools version specification.

      Rationale: This mirrors the most common style of type declaration in Swift sources. For example,

      let foo: Foo
      
    • Recognise all Unicode line terminators instead of just line feed (U+000A) in the Package manifest up to the line terminator that immediately follows the Swift tools version specification line².

      Rationale: With Swift becoming supported on more and more platforms (many of them Unix-unlike or POSIX-incompliant), SwiftPM will see more and more Package manifests that use line terminators other than line feed. Further, even though many systems are not yet supported, Swift source files can still be edited on them, and many IDEs/editors silently changes the line terminators to the platforms' native ones when saving the edited files. SwiftPM needs to recognise all possible line terminators³ before it becomes a problem

    • End the silent fallback to using Swift 3.1 as the lowest supported version. This used to happen when the Swift tools version specification is malformed AND SwiftPM couldn't find either swift-tool or tool-version in the specification.

      Rationale: It is actively harmful to hide this behaviour from the user. It is also actively harmful to decide on a Swift version without user consent. With source breaks from past Swift releases accumulated, this could result in unexpected behaviour in Swift packages. This behaviour was originally intended to peacefully accept Swift packages created before the Swift tools version specification was required. However, this purpose has become outdated.

    Additional user-facing changes as the result of implementing the changes above:

    • If the manifest has a formatting error, SwiftPM now identifies more accurately where the error is, and provides to the user a more detailed description/explanation and a suggestion tailored for each error.

    • SwiftPM now throws an error if the manifest is not properly encoded in UTF-8.

    Additional SwiftPM client-facing changes as the result of implementing the changes above:

    • ToolsVersionLoader.Error.malformedToolsVersion(specifier: String, currentToolsVersion: ToolsVersion) is replaced by more granular error cases.

    • ToolsVersionLoader.split(_ bytes: ByteString) -> (versionSpecifier: String?, rest: [UInt8]) and ToolsVersionLoader.regex are replaced by the Substring-oriented ToolsVersionLoader.split(_ manifest: String) -> ManifestComponents.

    ¹ Whitespace characters consists of horizontal and vertical whitespace characters. No whitespace character can be both horizontal and vertical. All vertical whitespace characters are line terminators, and vice versa. In the PR's implementation, horizontal whitespace characters are not identified directly, but through the process of elimination: All line terminators are "stripped" from the manifest first, then the horizontal whitespace characters are identified by being whitespace characters.

    ² Everything after the Swift tools version specification, such as the initilisation of the Package instance, is handled by the Swift compiler's lexer. It's beyond the power of ToolsVersionLoader and SwiftPM's manifest-loading in general.

    ³ Only Unicode line terminators are recognised, so line terminators in some other encodings such as EBCDIC are not recognised. This is fine because if a Package manifest isn't encoded in UTF-8, then it's already entirely unreadable by SwiftPM.

    opened by WowbaggersLiquidLunch 63
  • Initial implementation of Command Plugins

    Initial implementation of Command Plugins

    Initial implementation of https://forums.swift.org/t/pitch-package-manager-command-plugins/53172.

    This feature is experimental until approved, so it requires a tools version of 999.0 in the package that declares the command plugin, and requires SWIFTPM_ENABLE_COMMAND_PLUGINS to be set to 1 in the environment when invoked.

    This implementation temporarily uses a swift package plugin <verb> form for invoking command plugins. Per the pitch and proposal, plugin-defined commands are intended to be invocable using the shortcut swift package <verb> when the feature is complete (there is discussion of even supporting swift <verb> but that is not part of the current proposal).

    Motivation:

    Implementation of a new feature being pitched, kept under a feature flag until the proposal is accepted.

    Staging:

    This feature is being developed incrementally across this PR and follow-on PRs. This PR it is in a state where it could be merged to get most of the functionality into the mainline (behind the feature flag), including all the planned changes to PackageDescription and PackagePlugin. Remaining items of the full feature would then be landed in future PRs. The SWIFTPM_ENABLE_COMMAND_PLUGINS guard flag will only be removed once the evolution proposal has been approved and the feature has been fully implemented including any amendments.

    Modifications:

    • add the new enum cases for the command plugin capability to PackageDescription
    • add serialization of those cases in PackageDescriptionSerializer
    • deserialize them in the ManifestJSONLoader and add to the package model
    • add manifest source generation for the command capability
    • add ability to describe packages that have command plugins
    • add a unit test to check loading a manifest with a command capability
    • add protocol declarations for command plugin entry point in the plugin API
    • ability to invoke the command plugin in libSwiftPM and unit tests
    • add a unit test to check round trip calling into the plugin
    • add ability to invoke the command plugin from CLI
    • made the host-to-plugin communication be bidirectional and interactive
    • ability for plugin to call back into SwiftPM for services
    • ability to create symbol graphs for a target when a plugin requests it
    • ability to run a build when the plugin requests it

    Remaining in upcoming PRs:

    • request approval to run command plugins that need special permissions
    • implement the option to list the available command plugins
    • support qualifiers for ambiguous plugin commands
    • ability to run a test when the plugin requests it
    • build any executables needed by command plugins before invoking the plugin
    • provide access to toolchain executables in the map sent to plugins
    • add async to all the plugin APIs (in separate PR, depends on back deployment)
    opened by abertelrud 50
  • [SR-12851] System-wide cache of SwiftPM dependencies

    [SR-12851] System-wide cache of SwiftPM dependencies

    I reworked my approach from PR #2835 to not only operate on GitRepository but on any kind of repository from within Repository Manager.

    SR-12851

    This PR requires the Lock Improvements in swift-tools-support-core to be merged.

    opened by tgymnich 47
  • Bootstrap script needs to build PackageDescription and PackagePlugin universal

    Bootstrap script needs to build PackageDescription and PackagePlugin universal

    The bootstrap script needs to build the PackageDescription and PackagePlugin runtime support libraries universal when cross-compiling. This PR builds on https://github.com/apple/swift-package-manager/pull/3464, so it will be easier to review that PR first.

    Motivation

    Even when invoking the bootstrap script with flags to build universal for macOS x86_64 and arm64, the PackageDescription and PackagePlugin libraries ended up single-architecture. This is because the bootstrap script copied them from the CMake-built artifacts instead of the swiftpm-built artifacts.

    PR https://github.com/apple/swift-package-manager/pull/3464 resolves the complication of PackageDescription having both a 4.0 and a 4.2 variant.

    Modifications:

    • in the bootstrap script, build SwiftPM so that Swift interface files are emitted
    • consolidate some of the bootstrap script logic for installing dynamic libraries and their companion modules

    rdar://75186958

    opened by abertelrud 45
  • Android: add cross-compilation configuration file flag

    Android: add cross-compilation configuration file flag

    Motivation:

    This enables cross-compiling SPM for other hosts, such as Android.

    Modifications:

    In addition to --cross-compile-hosts, add a new bootstrap flag, --cross-compile-config, that will pass in a JSON file with the destination cross-compilation flags.

    Result:

    SPM can be cross-compiled for another OS, with Android as the first example.

    opened by buttaface 45
  • Verify that only targets that are manifest dependencies can be imported.

    Verify that only targets that are manifest dependencies can be imported.

    This change introduces a build verification step that attempts to detect scenarios where a target contains an import of another target in the package without declaring the imported target as a dependency in the manifest. This is done via SwiftDriver's import-prescan capability which relies on libSwiftScan to quickly parse a target's sources and identify all imported modules.

    opened by artemcm 44
  • Package version data

    Package version data

    Work in Progress This is initial commit for SR-473

    We need to generate version data for every package on build. Now it creates a new folder versionData inside .build dir and creates a swift file for every package.

    Could you please provide any feedback for the initial implementation.

    • Should these files be inside .build dir or somewhere else?
    • Should we generate a new .swift file for every Package or place all data in 1 file?
    • Any other suggestion?

    ToDo:

    • [x] Add unit test
    • [x] Add better error handling
    • [x] Merge PR #225
    • [x] add additional information to Root package (local changes)
    opened by kostiakoval 43
  • [SR-40] Port Swift to Linux on Raspberry Pi

    [SR-40] Port Swift to Linux on Raspberry Pi

    | | | |------------------|-----------------| |Previous ID | SR-40 | |Radar | None | |Original Reporter | @gribozavr | |Type | New Feature | |Status | Resolved | |Resolution | Done |

    Attachment: Download

    Additional Detail from JIRA

    | | | |------------------|-----------------| |Votes | 24 | |Component/s | Compiler, Foundation, Package Manager, Standard Library, XCTest | |Labels | New Feature, NewPortRequest, arm | |Assignee | @hpux735 | |Priority | Medium |

    md5: 7062026e0685ad58b94ffcbb4be1f47b

    Sub-Tasks:

    • SR-387 Undef. symbols when linking SwiftPM
    • SR-359 Undef. symbols when linking to Foundation (ARM)

    Issue Description:

    It would be good to get Swift compiler running on Raspberry Pi, as well as having a cross-compiler from x86 to Raspberry Pi.

    enhancement 
    opened by gribozavr 42
  • Finish SE‐0226 (Ignore Unused Products)

    Finish SE‐0226 (Ignore Unused Products)

    This pull request should complete the implementation of SE‐0226: Package Manager Target Based Dependency Resolution. @hartbit already taught the resolver to only care about products in #2424. This takes that work further so that the resolver only cares about products that are actually used.

    This pull request is sizeable, so I’ll elaborate the main points here.

    The changes broadly fall into four groups:

    1. The manifest is now able to compute the downward‐facing products required for any upward‐facing product set. This is mostly housed in PackageModel/Manifest.swift, and boils down to turning @hartbit’s allRequiredDependencies into dependenciesRequired(for:), along with the input type ProductFilter.

    2. The resolver now operates on abstract nodes. See DependencyResolutionNode for the nitty‐gritty details. Essentially, it resolves individual products instead of whole packages. The new node type has simply been slotted in to replace the PackageReferences that were in use before. None of @kiliankoe’s Pubgrub decision making processes has been changed in any way. The diagnostics have also been left alone except for the inclusion of the specific product alongside the package name where relevant.

    3. Dozens of new method parameters and instance properties have been added to various types and methods in order to pass the new information along from where it originates to where it is needed. Unfortunately, this affects a whole swath of things across the PackageModel, PackageLoading, PackageGraph, Workspace, Commands and SPMTestSupport modules, but all of these changes are straightforward.

    4. Many tests required fixing. Most of them merely needed to provide the new parameters required in order to satisfy the new API. Several were expecting failures that were no longer reachable, and needed dependencies to be made explicit so that the resolver would even enter the code branch in question. All but three are straightforward. (See below.)


    While I was working through the tests, three things came up which need a closer look. They are tests that expected behaviour at least partially at odds with SE‐0226.

    1. The test suite expected unreachable executable products to be available. swift run dependency‐executable is apparently supposed to work, even if no dependency is declared on that product. I can see how that could be useful, and it wouldn’t surprise me if users are taking advantage of it in their workflows. But SE‐0226 says this:

      Another example of packages requiring additional dependencies is for sample code targets. A library package may want to create an executable target which demonstrates some functionality of the library. This executable may require other dependencies such as a command-line argument parser.

      So including such executables would undermine one of the motivating use cases for SE‐0226. As such, what I have implemented right now does not resolve such executables by default.

      However, as a compromise to maintain backwards compatibility, I have channeled the argument provided to any swift run invocation through to the resolver, so that if you explicitly ask to run an executable of an immediate dependency, you will still be able to. Since it has some minor drawbacks, I consider this an interim solution. This implementation will suffice for now, but a separate evolution proposal should probably be made to design something better if we want to continue supporting this long‐term. See the Fix‐Me in the initializer for PackageGraphRoot for more details.

    2. The test suite expected unreachable targets to be available to a swift build --target dependency‐target invocation. Since there is no infrastructure in the resolver to handle targets, there is no easy way to locate or load such a target. Since it seems backwards to SE‐0226 and has no practical use I can think of, I simply removed the test.

    3. The test suite expected legacy system packages to work without an explicit target dependency declaration. Such packages have been triggering a deprecation warning since Swift 4.2. Continuing to support them implicitly is problematic, because there is no way to know if that’s what a package is until after fetching and loading it, so it would defeat the whole of SE‐0226.

      As a compromise to maintain as much backwards compatibility as possible, I have taught the manifest loader to internally convert such a package into a modern‐style one with a system target and product, which inherit the package’s name and details. This allows the current toolchain to still use such dependencies by referencing the synthesized product. However, if the client package wants to support both old and new toolchains at once (such as 5.1 and 5.4), it will have to make use of #if compiler, because the old toolchain will be unable to locate the declared product, whereas the new toolchain will not resolve an undeclared product.

    opened by SDGGiesbrecht 40
  • Error while fetching remote repository xxxx An unknown error occurred. username does not match previous request (-1)

    Error while fetching remote repository xxxx An unknown error occurred. username does not match previous request (-1)

    Description

    I can clone this repo from the command line by using: git clone XXXXX However, swift package manager always displays he error message.

    Error while fetching remote repository xxxx An unknown error occurred. username does not match previous request (-1)

    There seems to be no work around for this.

    Expected behavior

    It should allow me to clone the repo in swift package manager with the same as the git command line. This does not work properly and needs a fix.

    Actual behavior

    No response

    Steps to reproduce

    No response

    Swift Package Manager version/commit hash

    No response

    Swift & OS version (output of swift --version && uname -a)

    swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) Target: x86_64-apple-macosx12.0 Darwin MacBook-Pro-5.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64 x86_64

    bug 
    opened by veescope 0
  • Basics: extract `darwinCacheDirectories` from `TSCUtility`

    Basics: extract `darwinCacheDirectories` from `TSCUtility`

    This function is used solely in SPM and is the last portion of TSCUtility.Platform in use. Move the implementation into the single use site to allow us to deprecate the interface in swift-tools-support-core.

    opened by compnerd 1
  • Add support for writing the tests output in JSON format

    Add support for writing the tests output in JSON format

    Add support for writing the result of the tests to a json file, similar to the XUnit feature

    Motivation:

    I would like to be able to parse the result of the tests in other commands/programs without to have an elaborated regular expression parsing. For my needs specifically, I would love to be able to read the results using elisp and present them in a nice buffer with options such as retry.

    Modifications:

    Added a very similar implementation as how XUnit file generation is implemented. I didn't want to do additional modifications in order to keep the changes as minimum as possible but in the future we could abstract this functionality to its own struct/file/module and generalize it to support mode encodings.

    One particularity is that I didn't used codable for the implementation given that I noticed that we have our own custom JSON support. I imagined that this has a bigger reason (maybe not wanting to import foundation), so I decided to follow suit.

    That said, if I were able to made additional changes I would have loved to implement a --output option so we could simplify the call site read like: `swift test --parallel -output json | jq"

    Result:

    The swift test command has a new option --json-output that receives an absolute path where the result of the tests will be written encoded in JSON format.

    I'm new to the source code and the repository and I'm very flexible to move things around, or change the implementation details. Please let me know! I would love to be able to merge this at some point.

    opened by NSCoder 0
  • Can not resolve dependency's dependency when mirror it from url to package identifier

    Can not resolve dependency's dependency when mirror it from url to package identifier

    Description

    My package has a dependency package (RecoilSwift), and the dependency has one dependency package as well. My package uses the package identifier to pull dependencies.

    My Package.swift :

    let package = Package(
        name: "Dependencies",
       ...
        products: [
            .library( name: "Dependencies", targets: ["Dependencies"]),
        ],
        dependencies: [
            .package(id: "hollyoops.RecoilSwift", from: "0.2.1"),
        ],
        targets: [
            .target(
                name: "Dependencies",
                dependencies: [
                    .product(name: "RecoilSwift", package: "hollyoops.RecoilSwift"),
                ])
        ]
    )
    

    RecoilSwift's Package.swift, RecoilSwift has a dependency SwiftUI-Hooks, RecoilSwift use URL to fetch the dependencies:

    let package = Package(
        name: "RecoilSwift",
        ...
        dependencies: [
          .package(url: "https://github.com/hollyoops/SwiftUI-Hooks", from: "0.0.3")
        ],
        targets: [
            .target(
                name: "RecoilSwift",
                dependencies: [
                  .product(name: "Hooks", package: "SwiftUI-Hooks")
                ],
                path: "Sources")
        ]
    )
    

    My goal is to let the SwiftUI-Hooks use the swiftPM registry to fetch all the code. So I use the set mirror subcommand to "mapping" the URL to package id. Here is the mirrors.json:

    {
      "object": [
        {
          "mirror": "hollyoops.SwiftUI-Hooks",
          "original": "https://github.com/hollyoops/SwiftUI-Hooks"
        }
      ],
      "version": 1
    }
    

    However, when we resolve the dependencies we get an error:

    warning: dependency 'hollyoops.RecoilSwift' is missing; downloading again error: 'hollyoops.RecoilSwift': unknown package 'SwiftUI-Hooks' in dependencies of target 'RecoilSwift'; valid packages are: 'hollyoops.SwiftUI-Hooks'

    How can I resolve the dependency's dependency without changing the source code of the package while fetching by package identifier?

    Expected behavior

    Can resolve the dependency's dependency correctly

    Actual behavior

    get an error:

    error: 'hollyoops.RecoilSwift': unknown package 'SwiftUI-Hooks' in dependencies of target 'RecoilSwift'; valid packages are: 'hollyoops.SwiftUI-Hooks'

    Steps to reproduce

    1. Add a dependency that has some dependencies. and the dependencies fetched by the URL
    2. Add a mirror to map the dependencies from the URL to the package-identifier
    3. resolve the package swift package reslove

    Swift Package Manager version/commit hash

    5.7.1

    Swift & OS version (output of swift --version && uname -a)

    swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) Target: arm64-apple-macosx13.0 Darwin XXX.lan 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64

    bug 
    opened by hollyoops 0
  • build: bring CMake build up to date

    build: bring CMake build up to date

    Add CMake based build support for the missing components as the Windows build depends on this still. This allows us to work towards enabling the swift package collection and registry functionality.

    opened by compnerd 3
Releases(0.6.0)
Owner
Apple
Apple
A simple, decentralized dependency manager for Cocoa

Carthage Carthage is intended to be the simplest way to add frameworks to your Cocoa application. Carthage builds your dependencies and provides you w

Carthage 14.7k Dec 29, 2022
Injector - A Swift package for simple dependency injection that also supports Swift UI previews

A Swift package for simple dependency injection that also supports Swift UI prev

null 6 Aug 9, 2022
DIContainer Swift is an ultra-light dependency injection container made to help developers to handle dependencies easily. It works with Swift 5.1 or above.

?? DIContainer Swift It is an ultra-light dependency injection container made to help developers to handle dependencies easily. We know that handle wi

Victor Carvalho Tavernari 10 Nov 23, 2022
Pilgrim - Dependency injection for Swift (iOS, OSX, Linux). Strongly typed, pure Swift successor to Typhoon.

pilgrim.ph Pilgrim is a dependency injection library for Swift with the following features: Minimal runtime-only library that works with pure Swift (s

AppsQuick.ly 60 Oct 24, 2022
Cleanse is a dependency injection framework for Swift.

Cleanse - Swift Dependency Injection Cleanse is a dependency injection framework for Swift. It is designed from the ground-up with developer experienc

Square 1.7k Dec 16, 2022
DIKit Dependency Injection Framework for Swift, inspired by KOIN.

DIKit Dependency Injection Framework for Swift, inspired by KOIN. Basically an implementation of service-locator pattern, living within the applicatio

null 95 Dec 22, 2022
Tranquillity is a lightweight but powerful dependency injection library for swift.

DITranquillity Tranquillity is a lightweight but powerful dependency injection library for swift. The name "Tranquillity" laid the foundation in the b

Ivlev Alexander 393 Dec 24, 2022
A micro-framework that leverages Swift Property Wrappers to implement the Service Locator pattern

Locatable Context Locatable is a Swift micro framework that leverages Property Wrappers to implement the Service Locator pattern, through a custom att

Vincent Pradeilles 116 Jan 9, 2022
Pure makes Pure DI easy in Swift.

Pure Pure makes Pure DI easy in Swift. This repository also introduces a way to do Pure DI in a Swift application. Table of Contents Background Pure D

Suyeol Jeon 363 Dec 26, 2022
Swinject is a lightweight dependency injection framework for Swift.

Swinject Swinject is a lightweight dependency injection framework for Swift. Dependency injection (DI) is a software design pattern that implements In

null 5.6k Dec 31, 2022
Dependency Injection framework for Swift (iOS/macOS/Linux)

Declarative, easy-to-use and safe Dependency Injection framework for Swift (iOS/macOS/Linux) Features Dependency declaration via property wrappers or

Scribd 684 Dec 12, 2022
Swift Ultralight Dependency Injection / Service Locator framework

Swift Ultralight Dependency Injection / Service Locator framework

Michael Long 1.9k Jan 6, 2023
Kraken - Simple Dependency Injection container for Swift. Use protocols to resolve dependencies with easy-to-use syntax!

Kraken Photo courtesy of www.krakenstudios.blogspot.com Introduction Kraken is a simple Dependency Injection Container. It's aimed to be as simple as

Syed Sabir Salman-Al-Musawi 1 Oct 9, 2020
Guise - An elegant, flexible, type-safe dependency resolution framework for Swift

Guise is an elegant, flexible, type-safe dependency resolution framework for Swift. Flexible dependency resolution, with optional caching Elegant, str

null 52 Oct 3, 2022
ViperServices - Simple dependency injection container for services written for iOS in swift supporting boot order

ViperServices Introduction ViperServices is dependency injection container for iOS applications written in Swift. It is more lightweight and simple in

Siarhei Ladzeika 5 Dec 8, 2022
Needle - Compile-time safe Swift dependency injection framework

Needle is a dependency injection (DI) system for Swift. Unlike other DI frameworks, such as Cleanse, Swinject, Needle encourages hierarchical DI struc

Uber Open Source 1.4k Jan 3, 2023
Inject Dylib - Swift code to programmatically perform dylib injection

Inject_Dylib Swift code to programmatically perform dylib injection. You can als

Cedric Owens 40 Sep 27, 2022
SwiftDependencyChecker - Swift Dependency Checker

SwiftDependencyChecker SwiftDependencyChecker can be installed with homebrew wit

Kristiina 34 Dec 6, 2022
CarbonGraph - A Swift dependency injection / lookup framework for iOS

CarbonGraph is a Swift dependency injection / lookup framework for iOS. You can

Baidu 244 Jan 4, 2023