Tag: swift package manager

Swift Package Manager and Xcode: Retaining Xcode Settings?

I am developing a server in Swift and using the Swift Package Manager. And find it convenient when doing my development on my Mac OS system to generate a Xcode project to use Xcode as my IDE (i.e., From time to time, my package dependencies have to be updated. I’ve been using swift package generate-xcodeproj […]

How to Install Package in Xcode via Swift Package Manager

I’m working on a project in Xcode and am attempting to install and use the CryptoSwift package via the Swift Package Manager. I read the documentation on SPM, but I don’t see instructions on how to invoke the SPM through Xcode. The examples often refer to calling $ swift build. Does this mean that the […]

How to build a custom Swift framework and how is it related to the SPM?

I am currently building code that I would really like to use as a framework by being able to import MyCustomFramework as I would with Apple frameworks (in the future I would also like to distribute them). I have some questions about that : What is the easiest way to build a framework as what […]

When using Swift Package Manager how can I generate an Xcode project file for development

I am using the new open source Swift Package Manager and am able to download the files. I want the manager to create a “development environment” (Through Xcode) based on the packages it retrieved. Has anybody dealt with this?

XCTest: Load file from disk without Bundle on all platforms (Xcode, SPM Mac/Linux)

I am looking for a way to load files from disk within an XCTestCase that does not depend on Bundle. Bundle works well when running the tests from Xcode (or with xcodebuild on the terminal), but bundles are part of the Xcode project and not available to Swift Package Manager (when running swift test), neither […]

How to install Swift package via package manager?

I am currently following the document from swift.org to play around with the new Swift Package Manager. I cloned the demo project from Github and run the following command from terminal. git clone https://github.com/apple/example-package-dealer.git cd example-package-dealer swift build .build/debug/Dealer While I run swift build, error arise. <unknown>:0: error: no such file or directory: ‘build’ Any […]

Swift Package Manager – UIKit Dependency

I have a Package.swift in my project like: import PackageDescription let package = Package( name: “ProjectName”, dependencies: [ .Package(url: “https://github.com/intellum/neeman.git”, majorVersion: 0) ] ) When I run swift build I get errors like… /project/Packages/WebViewController.swift:1:8: error: no such module ‘UIKit’ import UIKit ^ Where should I tell the swift package manager where to find UIKit?

Swift test give error “Undefined symbols for architecture x86_64”

I’m running swift test from command line to run the test cases. This is the test case: import XCTest @testable import vnk_swift class KeyMappingTests: XCTestCase { static var allTests : [(String, (KeyMappingTests) -> () throws -> Void)] { return [ // (“testExample”, testExample), ] } func testExample() { let keyMapping = KeyMapping() XCTAssertNotNil(keyMapping , “PASS”) […]

Adding Swift 3 packages to Xcode 8 using the Swift package manager

I am new to Swift and Xcode. I am running macOS Sierra and Swift 3. For my first forays in Swift, I am developing a simple command line tool. There are a couple of Swift packages that I want to use and the installation instructions for both packages on GitHub says to use the Swift […]

How to include assets / resources in a Swift Package Manager library?

I would to ship my library usign Apple’s Swift Package Manager. However my lib includes a .bundle file with seveal strings translated in different languages. Using cocoapods I can include it using spec.resource but in SwiftPM I cannot do it. Any solution?