Skip to content

Commit c3bac12

Browse files
committed
Updated example projects
1 parent a47f8ec commit c3bac12

File tree

9 files changed

+21
-22
lines changed

9 files changed

+21
-22
lines changed

.swiftpm/xcode/xcshareddata/xcschemes/TimecodeKit-CI.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1220"
3+
LastUpgradeVersion = "1610"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

.swiftpm/xcode/xcshareddata/xcschemes/TimecodeKit-Package.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1600"
3+
LastUpgradeVersion = "1610"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"

Examples/Movie Timecode/Movie Timecode.xcodeproj/project.pbxproj

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
attributes = {
9191
BuildIndependentTargetsInParallel = 1;
9292
LastSwiftUpdateCheck = 1600;
93-
LastUpgradeCheck = 1600;
93+
LastUpgradeCheck = 1610;
9494
TargetAttributes = {
9595
E2B3AD952CB1E50000149DEF = {
9696
CreatedOnToolsVersion = 16.0;
@@ -174,6 +174,7 @@
174174
CLANG_WARN_UNREACHABLE_CODE = YES;
175175
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
176176
COPY_PHASE_STRIP = NO;
177+
DEAD_CODE_STRIPPING = YES;
177178
DEBUG_INFORMATION_FORMAT = dwarf;
178179
ENABLE_STRICT_OBJC_MSGSEND = YES;
179180
ENABLE_TESTABILITY = YES;
@@ -198,6 +199,7 @@
198199
ONLY_ACTIVE_ARCH = YES;
199200
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
200201
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
202+
SWIFT_VERSION = 6.0;
201203
};
202204
name = Debug;
203205
};
@@ -235,6 +237,7 @@
235237
CLANG_WARN_UNREACHABLE_CODE = YES;
236238
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
237239
COPY_PHASE_STRIP = NO;
240+
DEAD_CODE_STRIPPING = YES;
238241
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
239242
ENABLE_NS_ASSERTIONS = NO;
240243
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -251,6 +254,7 @@
251254
MTL_ENABLE_DEBUG_INFO = NO;
252255
MTL_FAST_MATH = YES;
253256
SWIFT_COMPILATION_MODE = wholemodule;
257+
SWIFT_VERSION = 6.0;
254258
};
255259
name = Release;
256260
};
@@ -262,6 +266,7 @@
262266
CODE_SIGN_ENTITLEMENTS = "Movie Timecode/App/MovieTimecode.entitlements";
263267
CODE_SIGN_STYLE = Automatic;
264268
CURRENT_PROJECT_VERSION = 1;
269+
DEAD_CODE_STRIPPING = YES;
265270
DEVELOPMENT_TEAM = "";
266271
ENABLE_HARDENED_RUNTIME = YES;
267272
ENABLE_PREVIEWS = YES;
@@ -289,7 +294,6 @@
289294
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
290295
SUPPORTS_MACCATALYST = NO;
291296
SWIFT_EMIT_LOC_STRINGS = YES;
292-
SWIFT_VERSION = 5.0;
293297
TARGETED_DEVICE_FAMILY = "1,2,7";
294298
XROS_DEPLOYMENT_TARGET = 1.3;
295299
};
@@ -303,6 +307,7 @@
303307
CODE_SIGN_ENTITLEMENTS = "Movie Timecode/App/MovieTimecode.entitlements";
304308
CODE_SIGN_STYLE = Automatic;
305309
CURRENT_PROJECT_VERSION = 1;
310+
DEAD_CODE_STRIPPING = YES;
306311
DEVELOPMENT_TEAM = "";
307312
ENABLE_HARDENED_RUNTIME = YES;
308313
ENABLE_PREVIEWS = YES;
@@ -330,7 +335,6 @@
330335
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
331336
SUPPORTS_MACCATALYST = NO;
332337
SWIFT_EMIT_LOC_STRINGS = YES;
333-
SWIFT_VERSION = 5.0;
334338
TARGETED_DEVICE_FAMILY = "1,2,7";
335339
XROS_DEPLOYMENT_TARGET = 1.3;
336340
};

Examples/Movie Timecode/Movie Timecode.xcodeproj/xcshareddata/xcschemes/Movie Timecode.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1600"
3+
LastUpgradeVersion = "1610"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"

Examples/Movie Timecode/Movie Timecode/Model/Model.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
// © 2020-2024 Steffan Andrews • Licensed under MIT License
55
//
66

7-
import AVFoundation
7+
@preconcurrency import AVFoundation
88
import Observation
99
import TimecodeKit
1010

11-
@Observable class Model {
11+
@Observable @MainActor class Model {
1212
private(set) var movie: Movie?
1313
var error: ModelError?
1414
}
1515

1616
extension Model {
17-
struct Movie {
17+
@MainActor struct Movie {
1818
private(set) var avMovie: AVMovie
1919
private(set) var frameRate: TimecodeFrameRate?
2020
private(set) var timecodeStart: Timecode?
@@ -191,7 +191,7 @@ extension Model {
191191
private func export(
192192
to url: URL,
193193
revealInFinderOnCompletion: Bool,
194-
_ mutation: (_ mutableMovie: AVMutableMovie) async throws -> Void
194+
_ mutation: @Sendable (_ mutableMovie: AVMutableMovie) async throws -> Void
195195
) async {
196196
do {
197197
let mutableMovie = try getMutableCopy()

Examples/Movie Timecode/Movie Timecode/Support/AVMutableMovie Extensions.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,14 @@ extension AVMutableMovie {
2121
return self
2222
}
2323

24-
func export(
25-
to url: URL,
26-
_ configuration: ((AVAssetExportSession) -> Void)? = nil
27-
) async throws {
24+
func export(to url: URL) async throws {
2825
guard let exportSession = AVAssetExportSession(
2926
asset: self,
3027
presetName: AVAssetExportPresetPassthrough
3128
) else {
3229
throw ModelError.exportError(nil)
3330
}
3431

35-
configuration?(exportSession)
36-
3732
try await exportSession.export(to: url, as: .mov)
3833
}
3934
}

Examples/Movie Timecode/Movie Timecode/Support/PathView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import AppKit
1010
import SwiftUI
1111

1212
/// SwiftUI view wrapper for `NSPathControl`.
13-
struct PathView: NSViewRepresentable {
13+
@MainActor struct PathView: NSViewRepresentable {
1414
public let url: URL?
1515
public let style: NSPathControl.Style
1616
public let isEditable: Bool
@@ -57,7 +57,7 @@ struct PathView: NSViewRepresentable {
5757
Coordinator()
5858
}
5959

60-
class Coordinator: NSObject, NSPathControlDelegate {
60+
@MainActor class Coordinator: NSObject, NSPathControlDelegate {
6161
@objc
6262
func action(sender: NSPathControl) {
6363
// reveal file/folder in Finder

Examples/Timecode Math/Timecode Math.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@
205205
ONLY_ACTIVE_ARCH = YES;
206206
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
207207
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
208+
SWIFT_VERSION = 6.0;
208209
};
209210
name = Debug;
210211
};
@@ -258,6 +259,7 @@
258259
MTL_ENABLE_DEBUG_INFO = NO;
259260
MTL_FAST_MATH = YES;
260261
SWIFT_COMPILATION_MODE = wholemodule;
262+
SWIFT_VERSION = 6.0;
261263
};
262264
name = Release;
263265
};
@@ -295,7 +297,6 @@
295297
SDKROOT = auto;
296298
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
297299
SWIFT_EMIT_LOC_STRINGS = YES;
298-
SWIFT_VERSION = 5.0;
299300
TARGETED_DEVICE_FAMILY = "1,2,7";
300301
XROS_DEPLOYMENT_TARGET = 2.0;
301302
};
@@ -335,7 +336,6 @@
335336
SDKROOT = auto;
336337
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
337338
SWIFT_EMIT_LOC_STRINGS = YES;
338-
SWIFT_VERSION = 5.0;
339339
TARGETED_DEVICE_FAMILY = "1,2,7";
340340
XROS_DEPLOYMENT_TARGET = 2.0;
341341
};

Examples/Timecode UI/Timecode UI.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@
205205
ONLY_ACTIVE_ARCH = YES;
206206
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
207207
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
208+
SWIFT_VERSION = 6.0;
208209
};
209210
name = Debug;
210211
};
@@ -258,6 +259,7 @@
258259
MTL_ENABLE_DEBUG_INFO = NO;
259260
MTL_FAST_MATH = YES;
260261
SWIFT_COMPILATION_MODE = wholemodule;
262+
SWIFT_VERSION = 6.0;
261263
};
262264
name = Release;
263265
};
@@ -295,7 +297,6 @@
295297
SDKROOT = auto;
296298
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
297299
SWIFT_EMIT_LOC_STRINGS = YES;
298-
SWIFT_VERSION = 5.0;
299300
TARGETED_DEVICE_FAMILY = "1,2,7";
300301
XROS_DEPLOYMENT_TARGET = 2.0;
301302
};
@@ -335,7 +336,6 @@
335336
SDKROOT = auto;
336337
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
337338
SWIFT_EMIT_LOC_STRINGS = YES;
338-
SWIFT_VERSION = 5.0;
339339
TARGETED_DEVICE_FAMILY = "1,2,7";
340340
XROS_DEPLOYMENT_TARGET = 2.0;
341341
};

0 commit comments

Comments
 (0)