# Cannot using SPM module with some custom configuration not Debug/Release on Xcode 11

**URL:** <https://forums.swift.org/t/cannot-using-spm-module-with-some-custom-configuration-not-debug-release-on-xcode-11/26412>\
**Category:** Using Swift\
**Tags:** xcode, packagemanager\
**Created:** [June 28, 2019, 11:49am UTC](https://forums.swift.org/t/cannot-using-spm-module-with-some-custom-configuration-not-debug-release-on-xcode-11/26412 "2019-06-28T11:49:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kwanghoon\_Choi](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/kwanghoon_choi/32/44787_2.png) [@Kwanghoon\_Choi](https://forums.swift.org/u/Kwanghoon_Choi)\
**Post date:** [June 28, 2019, 11:49am UTC](https://forums.swift.org/t/cannot-using-spm-module-with-some-custom-configuration-not-debug-release-on-xcode-11/26412/1 "2019-06-28T11:49:55Z")

</div>

I create Sandbox configuration(duplicated from Debug) and add SPM module(SnapKit, etc...) to Xcode project. But, couldn't import SnapKit to project. Finally, I found location of build results of SnapKit is in Build/~/Debug, and project is in Build/~/Sandbox directory.  
How can I fix SPM module build location to Sandbox?

---

<div class="post-metadata">

**Author:** ![CatalinM](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/catalinm/32/8755_2.png) [@CatalinM](https://forums.swift.org/u/CatalinM)\
**Post date:** [August 19, 2019, 2:43pm UTC](https://forums.swift.org/t/cannot-using-spm-module-with-some-custom-configuration-not-debug-release-on-xcode-11/26412/2 "2019-08-19T14:43:10Z")

</div>

One solution I found, even if it's a bit hacky, is to edit Build Locations (in the Project's Build settings) to have all derived configurations build to the same location (eg: have both Debug and Sandbox in your case build to Build/~/Debug). This worked just fine in my case, as the code itself was the same (only the xcconfig was different in order to have separate environment variables)

---

<div class="post-metadata">

**Author:** ![Kwanghoon\_Choi](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/kwanghoon_choi/32/44787_2.png) [@Kwanghoon\_Choi](https://forums.swift.org/u/Kwanghoon_Choi)\
**Post date:** [August 19, 2019, 9:56pm UTC](https://forums.swift.org/t/cannot-using-spm-module-with-some-custom-configuration-not-debug-release-on-xcode-11/26412/3 "2019-08-19T21:56:15Z")

</div>

that is the answer i finding. The point was to match the build location. thanks.

---

<div class="post-metadata">

**Author:** ![domagojstankovic](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/domagojstankovic/32/35518_2.png) [@domagojstankovic](https://forums.swift.org/u/domagojstankovic)\
**Post date:** [October 28, 2019, 2:16pm UTC](https://forums.swift.org/t/cannot-using-spm-module-with-some-custom-configuration-not-debug-release-on-xcode-11/26412/4 "2019-10-28T14:16:50Z")

</div>

I am having the same problem but suggested hack doesn't work. Packages only get built for Debug and Release configurations, doesn't matter how I set build location. Also, build location isn't shared so that's another reason why this solution is inappropriate.

---

<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:** [November 3, 2019, 7:29pm UTC](https://forums.swift.org/t/cannot-using-spm-module-with-some-custom-configuration-not-debug-release-on-xcode-11/26412/5 "2019-11-03T19:29:35Z")

</div>

This blog post explain how to fix this [Swift Package Hack. Read this post if you have “No such… | by Álvaro Royo | Medium](https://medium.com/@alvaroroyo/swift-package-hack-e75ad56c1a5a) but I would love to know if this is already a bug known by Apple folks @Aciid ?
