# \[Accepted with Modifications\] SE-0272: Package Manager Binary Dependencies

**URL:** <https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926>\
**Category:** Announcements\
**Tags:** packagemanager\
**Created:** [December 20, 2019, 2:19pm UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926 "2019-12-20T14:19:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeoNacho](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/neonacho/32/1368_2.png) [@NeoNacho](https://forums.swift.org/u/NeoNacho)\
**Post date:** [December 20, 2019, 2:19pm UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/1 "2019-12-20T14:19:38Z")

</div>

Hello Swift Community,

The second review for SE-0272: Package Manager Binary Dependencies ran from December 13th through December 20th, 2019. You can find the review thread [here](https://forums.swift.org/t/se-0272-review-2-package-manager-binary-dependencies/31668).

Feedback was sparse, but we had generally positive feedback during the first round of review. Therefore the proposal has been accepted with modifications, local binary targets will not be able to reference zipped artifacts.

Thank you to everyone who participated in the review!

Boris Buegling  
Review Manager

---

<div class="post-metadata">

**Author:** ![JonasVautherin](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jonasvautherin/32/4586_2.png) [@JonasVautherin](https://forums.swift.org/u/JonasVautherin)\
**Post date:** [February 12, 2020, 3:40pm UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/2 "2020-02-12T15:40:57Z")

</div>

Where can we track the implementation of this?

---

<div class="post-metadata">

**Author:** ![afarnham](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/afarnham/32/10969_2.png) [@afarnham](https://forums.swift.org/u/afarnham)\
**Post date:** [February 12, 2020, 4:09pm UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/3 "2020-02-12T16:09:06Z")

</div>

I have been watching the Swift Package Manager master branch for that. As far as I can tell, it landed in the master branch with this pull request: [Merge pull request #2514 from hartbit/binary-targets-linking · apple/swift-package-manager@12cce64 · GitHub](https://github.com/apple/swift-package-manager/commit/12cce64acc0e410fbab4c39d89359576757f3631)

---

<div class="post-metadata">

**Author:** ![hartbit](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/hartbit/32/738_2.png) [@hartbit](https://forums.swift.org/u/hartbit)\
**Post date:** [February 12, 2020, 9:11pm UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/4 "2020-02-12T21:11:33Z")

</div>

It mostly landed in the master branch over multiple pull requests in last weeks. It's only missing diagnostics when using them from other platforms than macOS.

---

<div class="post-metadata">

**Author:** ![mackoj](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/mackoj/32/42395_2.png) [@mackoj](https://forums.swift.org/u/mackoj)\
**Post date:** [February 12, 2020, 11:59pm UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/5 "2020-02-12T23:59:06Z")

</div>

@hartbit would spm team plan to maintain their changelog file ? It’s hard to know which feature is shipped.

---

<div class="post-metadata">

**Author:** ![bdrelling](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/bdrelling/32/2711_2.png) [@bdrelling](https://forums.swift.org/u/bdrelling)\
**Post date:** [February 13, 2020, 12:16am UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/6 "2020-02-13T00:16:29Z")

</div>

I agree with this. Tracking SPM properly is currently very difficult. It would be great to see the changes per version and better understand when things are released.

Please correct us if we’re missing something we should be seeing.

---

<div class="post-metadata">

**Author:** ![hartbit](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/hartbit/32/738_2.png) [@hartbit](https://forums.swift.org/u/hartbit)\
**Post date:** [February 13, 2020, 6:24am UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/7 "2020-02-13T06:24:36Z")

</div>

In terms of when things are officially released, I think proposals are updated to indicate when they are implemented and in which version they are available.

---

<div class="post-metadata">

**Author:** ![mackoj](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/mackoj/32/42395_2.png) [@mackoj](https://forums.swift.org/u/mackoj)\
**Post date:** [February 13, 2020, 6:38am UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/8 "2020-02-13T06:38:13Z")

</div>

Thanks @hartbit.  
That means that these evolution proposal:

- [swift-evolution/0226-package-manager-target-based-dep-resolution.md at master · apple/swift-evolution · GitHub](https://github.com/apple/swift-evolution/blob/master/proposals/0226-package-manager-target-based-dep-resolution.md)
- [swift-evolution/0271-package-manager-resources.md at master · apple/swift-evolution · GitHub](https://github.com/apple/swift-evolution/blob/master/proposals/0271-package-manager-resources.md)
- [swift-evolution/0272-swiftpm-binary-dependencies.md at master · apple/swift-evolution · GitHub](https://github.com/apple/swift-evolution/blob/master/proposals/0272-swiftpm-binary-dependencies.md)
- [swift-evolution/0273-swiftpm-conditional-target-dependencies.md at master · apple/swift-evolution · GitHub](https://github.com/apple/swift-evolution/blob/master/proposals/0273-swiftpm-conditional-target-dependencies.md)

Are not currently fully implemented ?

---

<div class="post-metadata">

**Author:** ![hartbit](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/hartbit/32/738_2.png) [@hartbit](https://forums.swift.org/u/hartbit)\
**Post date:** [February 13, 2020, 3:25pm UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/9 "2020-02-13T15:25:53Z")

</div>

There are all implemented, but only SE-0226 is in an announced Swift version (5.2). I'll make sure that proposal is updated. The other proposals are implemented in master and will appear in the major Swift version after 5.2, although that version hasn't be announced yet.

---

<div class="post-metadata">

**Author:** ![JonasVautherin](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jonasvautherin/32/4586_2.png) [@JonasVautherin](https://forums.swift.org/u/JonasVautherin)\
**Post date:** [March 29, 2020, 11:39am UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/10 "2020-03-29T11:39:25Z")

</div>

> will appear in the major Swift version after 5.2

Just to be sure: this means 6.0, and not 5.3, so it could be relatively far away. Correct?

---

<div class="post-metadata">

**Author:** ![tkrajacic](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/tkrajacic/32/1173_2.png) [@tkrajacic](https://forums.swift.org/u/tkrajacic)\
**Post date:** [March 29, 2020, 11:45am UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/11 "2020-03-29T11:45:54Z")

</div>

As Ted has already commented on package resource support coming in 5.3 ([SE-0271: Package Manager Resources - #74 by tkremenek](https://forums.swift.org/t/se-0271-package-manager-resources/30730/74)) I'd guess that binary dependencies will also come in 5.3.

---

<div class="post-metadata">

**Author:** ![hartbit](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/hartbit/32/738_2.png) [@hartbit](https://forums.swift.org/u/hartbit)\
**Post date:** [March 30, 2020, 9:51am UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/12 "2020-03-30T09:51:07Z")

</div>

Correct. Package Manager Resources will come in 5.3

---

<div class="post-metadata">

**Author:** ![rursache](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/rursache/32/17607_2.png) [@rursache](https://forums.swift.org/u/rursache)\
**Post date:** [March 31, 2020, 4:29pm UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/13 "2020-03-31T16:29:03Z")

</div>

> [@hartbit](#):
>
> Correct. Package Manager Resources will come in 5.3

how about binary dependencies? i see no reason for shipping those in different releases as they are needed for SPM to take off

---

<div class="post-metadata">

**Author:** ![hartbit](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/hartbit/32/738_2.png) [@hartbit](https://forums.swift.org/u/hartbit)\
**Post date:** [March 31, 2020, 7:13pm UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/14 "2020-03-31T19:13:28Z")

</div>

Binary dependencies will also come in 5.3

---

<div class="post-metadata">

**Author:** ![SwiftUI](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/swiftui/32/24361_2.png) [@SwiftUI](https://forums.swift.org/u/SwiftUI)\
**Post date:** [March 31, 2020, 11:03pm UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/15 "2020-03-31T23:03:16Z")

</div>

hooray！

---

<div class="post-metadata">

**Author:** ![antonino-u](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/antonino-u/32/11419_2.png) [@antonino-u](https://forums.swift.org/u/antonino-u)\
**Post date:** [April 1, 2020, 2:51am UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/16 "2020-04-01T02:51:50Z")

</div>

Great news all around! SPM will become the default dependency manager for Apple platforms with Swift 5.3. Monumental! Congratulations to @hartbit and the rest of the team for making it happen.

---

<div class="post-metadata">

**Author:** ![bamx23](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/bamx23/32/9153_2.png) [@bamx23](https://forums.swift.org/u/bamx23)\
**Post date:** [July 8, 2020, 3:16pm UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/17 "2020-07-08T15:16:28Z")

</div>

Binary dependencies is a fantastic feature!  
Is there a way to specify system dependencies for static frameworks? I.e. I have a static framework(inside an xcframework) I want to make an SPM package and it has some dependencies like `CoreLocation.framework` and `libsqlite3.dylib`.

---

<div class="post-metadata">

**Author:** ![NeoNacho](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/neonacho/32/1368_2.png) [@NeoNacho](https://forums.swift.org/u/NeoNacho)\
**Post date:** [July 8, 2020, 6:30pm UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/18 "2020-07-08T18:30:00Z")

</div>

We didn't actually consider that use case, but I think there might a suitable workaround:

- declare the binary target as you would for your static framework
- create a regular target with a dummy source file that declares the additional build settings and depends on the binary target
- create a product that vends the regular target
- clients depend on that product and import the module of the binary target, they should get the additional linker flags from the regular target.

I haven't tested this myself, so please report back on your success with this!

---

<div class="post-metadata">

**Author:** ![bamx23](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/bamx23/32/9153_2.png) [@bamx23](https://forums.swift.org/u/bamx23)\
**Post date:** [July 9, 2020, 8:22am UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/19 "2020-07-09T08:22:09Z")

</div>

Thanks for the answer. Actually, I had tried this but with no success. It seems that linker settings only applied to that dummy sources. I've just tried to play with linker settings one more time and still no results. And also I don't see libraries and frameworks in Xcode's build log so maybe I do something wrong.  
Another problem is that the framework I try to wrap in a package is ObjC one with some categories that don't work without `-ObjC` in linker flags. The only way I can set this flag is `.unsafeFlags()` but this option produce an error during import in Xcode project.

---

<div class="post-metadata">

**Author:** ![Nick\_Brook](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nick_brook/32/12438_2.png) [@Nick\_Brook](https://forums.swift.org/u/Nick_Brook)\
**Post date:** [July 10, 2020, 3:43pm UTC](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926/20 "2020-07-10T15:43:15Z")

</div>

Binary dependencies is a great feature and will hopefully allow me to add SwiftPM packages for several SDKs. However, I have a couple challenges:

- It isn't possible to reference an XCFramework other than at the root of a zip. This means we have to upload multiple zips for different variations of the SDK (static, dynamic)
- There is no way to provide credentials for HTTP authentication. Cocapods uses .netrc.

[Next page](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926.md?page=2)
