Context: I want to create a simple Swift command line tool using CryptoSwift I am relatively new to Xcode and Swift (and MacOS!).
Configuration:
- MacOS High Sierra 10.13.2
- Xcode: 9.2
Steps:
- I start Xcode
- Create a new project “Command Line tool” for MacOS
- Option for my project:
- Product name: cryptodemo
- Organisation Identifier: com.demo
- Language Swift
- I create the project into
~/Documents
Fill my main.swift with:
import Foundation import CryptoSwift print("Hello, World!") let bytes:Array<UInt8> = [0x01, 0x02, 0x03] let digest = Digest.md5(bytes)
Open the shell and go into
~/Documents/cryptodemo
- Add CryptoSwift as a submodule as defined by the project’s README using:
git submodule add https://github.com/krzyzanowskim/CryptoSwift.git
- Open Finder and drag the
CryptoSwift.xcodeproj
file into my Xcode project In Xcode, I go into my project
Build Phase
Then I build it. I have this error:
Check dependencies Unable to run command 'PBXCp CryptoSwift.framework' - this target might include its own product. Unable to run command 'CodeSign A' - this target might include its own product.
Here is the archive of the project cryptodemo.zip