-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from RougeWare/develop
Sync `develop` into `master`
- Loading branch information
Showing
10 changed files
with
133 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.DS_Store | ||
/.build | ||
/Packages | ||
/*.xcodeproj | ||
xcuserdata/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDEDidComputeMac32BitWarning</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// swift-tools-version:5.1 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "CrossKitTypes", | ||
products: [ | ||
// Products define the executables and libraries produced by a package, and make them visible to other packages. | ||
.library( | ||
name: "CrossKitTypes", | ||
targets: ["CrossKitTypes"]), | ||
], | ||
dependencies: [ | ||
// Dependencies declare other packages that this package depends on. | ||
// .package(url: /* package url */, from: "1.0.0"), | ||
], | ||
targets: [ | ||
// Targets are the basic building blocks of a package. A target can define a module or a test suite. | ||
// Targets can depend on other targets in this package, and on products in packages which this package depends on. | ||
.target( | ||
name: "CrossKitTypes", | ||
dependencies: []), | ||
.testTarget( | ||
name: "CrossKitTypesTests", | ||
dependencies: ["CrossKitTypes"]), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
Swift-Cross-Kit-Types | ||
# Cross-Kit Types # | ||
|
||
Just some convenient `typealias`es and `extension`s to make it easier to use Apple types which are different in their different kits, like UIColor in UIKit and NSColor in AppKit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// Cross-Kit Color.swift | ||
// Cross-Kit Types | ||
// | ||
// Created by Ben Leggiero on 2019-10-28. | ||
// Copyright © 2019 BH-1-PS | ||
// | ||
|
||
|
||
|
||
#if !ONLY_APP_KIT && canImport(UIKit) | ||
import UIKit | ||
|
||
|
||
|
||
typealias NativeColor = UIColor | ||
|
||
#elseif canImport(AppKit) | ||
import AppKit | ||
|
||
|
||
|
||
typealias NativeColor = NSColor | ||
|
||
#else | ||
#error("Unsupported platform; neither UIKit nor AppKit") | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// Cross-Kit Font.swift | ||
// Cross-Kit Types | ||
// | ||
// Created by Ben Leggiero on 2019-10-28. | ||
// Copyright © 2019 BH-1-PS | ||
// | ||
|
||
|
||
|
||
#if !ONLY_APP_KIT && canImport(UIKit) | ||
import UIKit | ||
|
||
|
||
|
||
typealias NativeFont = UIFont | ||
|
||
#elseif canImport(AppKit) | ||
import AppKit | ||
|
||
|
||
|
||
typealias NativeFont = NSFont | ||
|
||
#else | ||
#error("Unsupported platform; neither UIKit nor AppKit") | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import XCTest | ||
@testable import CrossKitTypes | ||
|
||
final class CrossKitTypesTests: XCTestCase { | ||
func testNothing() { | ||
// TODO: Add tests | ||
} | ||
|
||
static var allTests = [ | ||
("testNothing", testNothing), | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import XCTest | ||
|
||
#if !canImport(ObjectiveC) | ||
public func allTests() -> [XCTestCaseEntry] { | ||
return [ | ||
testCase(CrossKitTypesTests.allTests), | ||
] | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import XCTest | ||
|
||
import CrossKitTypesTests | ||
|
||
var tests = [XCTestCaseEntry]() | ||
tests += CrossKitTypesTests.allTests() | ||
XCTMain(tests) |