im using Xcode 8.2.1 and also my swift version is 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1)
and here is my package.swift contents
import PackageDescription
let package = Package(
name: "MyAwesomeProject",
dependencies: [
.Package(
url: "https://github.com/PerfectlySoft/Perfect-HTTPServer.git",
majorVersion: 2, minor: 0
),
.Package(url: "https://github.com/PerfectlySoft/Perfect-PostgreSQL.git", majorVersion: 2, minor: 0),
.Package(url: "https://github.com/SwiftORM/Postgres-StORM.git", majorVersion: 1, minor: 0)
]
)
here explains how to add Postgres stORM to your project. when i add PostgresStrom to my package and build i get the following build errors:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/module.modulemap:1:8: error: redefinition of module 'AppleTextureEncoder'
module AppleTextureEncoder [system] [extern_c]
how can i fix this? i couldn't find anything on web
What I've tried and didn't work: 1- clear project (command +shift + k) and (command + option + shift + k) 2- delete diverted data 3- create complete new project 4- deleted /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/module.modulemap which ruined my xcode and had to put it back.
I had excaclty the same problem when I was using Docker and created some server side stuff. I created by commandline in Docker the package and build it.
swift package init --type executable
swift build
after it's IMPORTANT to go on your terminal outside of Docker to your project directory and create the xcode file.
swift package generate-xcodeproj
enjoy :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With