Skip to content

Commit fc4a1c8

Browse files
authored
Merge pull request #66 from orchetect/v2
TmecodeKit V2
2 parents c588182 + 44dc8bb commit fc4a1c8

File tree

167 files changed

+10647
-7033
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+10647
-7033
lines changed

.swiftformat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
--funcattributes prev-line
2424
--groupedextension "MARK: %c"
2525
--guardelse auto
26-
--header "\n {file}\n TimecodeKit • https://github.com/orchetect/TimecodeKit\n © {year} Steffan Andrews • Licensed under MIT License\n"
26+
--header "\n {file}\n TimecodeKit • https://github.com/orchetect/TimecodeKit\n © 2020-{year} Steffan Andrews • Licensed under MIT License\n"
2727
--hexgrouping 4,8
2828
--hexliteralcase uppercase
2929
--ifdef no-indent
@@ -37,7 +37,7 @@
3737
--markcategories true
3838
--markextensions always
3939
--marktypes always
40-
--maxwidth 100
40+
--maxwidth 140
4141
--modifierorder
4242
--nevertrailing
4343
--nospaceoperators

Images/timecode-init.png

47.1 KB
Loading

Package.swift

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.5
1+
// swift-tools-version: 5.5
22
// (be sure to update the .swift-version file when this Swift version changes)
33

44
import PackageDescription
@@ -11,7 +11,16 @@ let package = Package(
1111
// certain features of the library are marked @available only on newer versions of OSes,
1212
// but a platforms spec here determines what base platforms
1313
// the library is currently supported on
14-
platforms: [.macOS(.v10_12), .iOS(.v9), .tvOS(.v9), .watchOS(.v2)],
14+
15+
// Add visionOS platform in supported Swift toolchain / Xcode versions
16+
// TODO: Not yet implemented in Xcode 15.0 but can be added later
17+
platforms: {
18+
// #if swift(>=5.9.1)
19+
// [.macOS(.v10_12), .iOS(.v9), .tvOS(.v9), .watchOS(.v2), .visionOS(.v1)]
20+
// #else
21+
[.macOS(.v10_12), .iOS(.v9), .tvOS(.v9), .watchOS(.v2)]
22+
// #endif
23+
}(),
1524

1625
products: [
1726
.library(
@@ -28,7 +37,7 @@ let package = Package(
2837
],
2938

3039
dependencies: [
31-
// used only for Dev tests, not part of regular unit test
40+
// used only for Dev tests, not part of regular unit tests
3241
// .package(url: "https://github.com/orchetect/XCTestUtils", from: "1.0.3")
3342
],
3443

@@ -44,10 +53,20 @@ let package = Package(
4453
name: "TimecodeKitUI",
4554
dependencies: ["TimecodeKit"],
4655
linkerSettings: [
47-
.linkedFramework("SwiftUI", .when(platforms: [.macOS, .iOS, .tvOS, .watchOS]))
56+
.linkedFramework(
57+
"SwiftUI",
58+
.when(platforms: {
59+
// Xcode 15 beta 8 (Swift 5.9) introduced visionOS
60+
#if swift(>=5.9)
61+
[.macOS, .iOS, .tvOS, .watchOS, .visionOS]
62+
#else
63+
[.macOS, .iOS, .tvOS, .watchOS]
64+
#endif
65+
}())
66+
)
4867
]
4968
),
50-
69+
5170
// unit tests
5271
.testTarget(
5372
name: "TimecodeKit-Unit-Tests",
@@ -56,14 +75,17 @@ let package = Package(
5675
),
5776

5877
// dev tests
59-
// (not meant to be run as unit tests, but only to verify library's computational integrity when making major changes to the library, as these tests require modification to be meaningful)
78+
// (not meant to be run as unit tests, but only to verify library's computational integrity when making major changes to the
79+
// library, as these tests require modification to be meaningful)
6080
.testTarget(
6181
name: "TimecodeKit-Dev-Tests",
62-
dependencies: ["TimecodeKit"] // , "SegmentedProgress"
82+
dependencies: ["TimecodeKit"] // , "XCTestUtils"
6383
)
6484
]
6585
)
6686

87+
// MARK: - Conditional Unit Testing
88+
6789
func addShouldTestFlag() {
6890
package.targets.filter { $0.isTest }.forEach { target in
6991
if target.swiftSettings == nil { target.swiftSettings = [] }

0 commit comments

Comments
 (0)