# \[Swift Package Manager\] Use of Info-plist; use for apps

**URL:** <https://forums.swift.org/t/swift-package-manager-use-of-info-plist-use-for-apps/6532>\
**Category:** Using Swift\
**Created:** [August 22, 2017, 5:13am UTC](https://forums.swift.org/t/swift-package-manager-use-of-info-plist-use-for-apps/6532 "2017-08-22T05:13:43Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Gavin\_Eadie](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/gavin_eadie/32/40830_2.png) [@Gavin\_Eadie](https://forums.swift.org/u/Gavin_Eadie)\
**Post date:** [January 5, 2022, 7:30am UTC](https://forums.swift.org/t/swift-package-manager-use-of-info-plist-use-for-apps/6532/13 "2022-01-05T07:30:59Z")

</div>

If this worked in November 2020, something has changed.

The flags are passed to the Swift compiler so, in order to pass them along to the linker, each string must be preceded by `-Xlinker` like this:

```swift
      linkerSettings: [
      	.unsafeFlags( ["-Xlinker", "-sectcreate",
                       "-Xlinker", "__TEXT",
                       "-Xlinker", "__info_plist",
                       "-Xlinker", "Resources/Info.plist"] )
      ]),

```

How the incorrect description of this usage has lasted so long in this forum, and others, is beyond me, unless I'm being really stupid .. I suspect people read the documentation but never actually tried it. The error reported elsewhere in this thread: `error: unknown argument: '-sectcreate'` is a direct result of the missing `-Xlinker` options.

I have verified that the above code works .. here's a piece of my `swift build` generated executable:

```swift
 . . . . 5F5F 696E 666F 5F70 6C69 7374 == "__info_plist"

```

and I verified that the contents of `Resources/Info.plist` is also embedded in the executable. SPM's `linkerSettings.unsafeFlags` should perhaps stuff in the `-Xlinker` options for us?

---

_[View the full topic](https://forums.swift.org/t/swift-package-manager-use-of-info-plist-use-for-apps/6532)._
