-
Create a directory
Framework/include
and symlink or copy these headers into it:This is only necessary because the headers import each other in such a way that they assume they will have all been copied into the same directory before they are actually used.
-
Add this
Package.swift
:
// swift-tools-version:5.2
import PackageDescription
let package = Package(
name: "MASShortcut",
products: [
.library(name: "MASShortcut", targets: ["MASShortcut"])
],
targets: [
.target(
name: "MASShortcut",
path: "Framework",
exclude: [
"Model/MASShortcutTests.m",
"Monitoring/MASHotKeyTests.m",
"Monitoring/MASShortcutMonitorTests.m",
"User Defaults Storage/MASDictionaryTransformerTests.m",
"User Defaults Storage/MASShortcutBinderTests.m"
],
cSettings: [
.headerSearchPath("UI"),
]
)
]
)
- Add
#import <AppKit/AppKit.h>
to the top of any file that still does not compile. (Xcode was doing this automatically with the.pch
file).
These instructions are enough to build and import. (They do not set up any test target or do anything with the resources.)