Convert from Xcode project to Swift package

This commit is contained in:
Sami Samhuri 2024-09-18 08:51:02 -07:00
parent aaaf227c96
commit b2aecd9d00
No known key found for this signature in database
22 changed files with 46 additions and 575 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.build
.swiftpm

29
Package.swift Normal file
View file

@ -0,0 +1,29 @@
// swift-tools-version: 6.0
import PackageDescription
let package = Package(
name: "SJSAssetExportSession",
platforms: [
.macOS(.v14),
.iOS(.v17),
],
products: [
.library(
name: "SJSAssetExportSession",
targets: ["SJSAssetExportSession"]),
],
targets: [
.target(name: "SJSAssetExportSession"),
.testTarget(
name: "SJSAssetExportSessionTests",
dependencies: ["SJSAssetExportSession"],
resources: [
.process("Resources/test-4k-hdr-hevc-30fps.mov"),
.process("Resources/test-720p-h264-24fps.mov"),
.process("Resources/test-no-audio.mp4"),
.process("Resources/test-no-video.m4a"),
]
),
]
)

View file

@ -1,545 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 70;
objects = {
/* Begin PBXBuildFile section */
7B4C031A2C7256760091C5DB /* ReadmeExamples.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B4C03192C7256760091C5DB /* ReadmeExamples.swift */; };
7B7AE3092C36615700DB7391 /* SampleWriter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B7AE3082C36615700DB7391 /* SampleWriter.swift */; };
7B9867982C6AF57C001353BC /* AVAsset+sending.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BC5FC8B2C3BB0180090B757 /* AVAsset+sending.swift */; };
7B9BC00E2C305D2C00C160C2 /* SJSAssetExportSession.docc in Sources */ = {isa = PBXBuildFile; fileRef = 7B9BC00D2C305D2C00C160C2 /* SJSAssetExportSession.docc */; };
7B9BC0142C305D2C00C160C2 /* SJSAssetExportSession.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B9BC0092C305D2C00C160C2 /* SJSAssetExportSession.framework */; };
7B9BC0192C305D2C00C160C2 /* SJSAssetExportSessionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B9BC0182C305D2C00C160C2 /* SJSAssetExportSessionTests.swift */; };
7B9BC01A2C305D2C00C160C2 /* SJSAssetExportSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B9BC00C2C305D2C00C160C2 /* SJSAssetExportSession.h */; settings = {ATTRIBUTES = (Public, ); }; };
7B9BC0282C30612C00C160C2 /* ExportSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B9BC0272C30612C00C160C2 /* ExportSession.swift */; };
7BC5FC772C3B8C5A0090B757 /* SendableWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BC5FC762C3B8C5A0090B757 /* SendableWrapper.swift */; };
7BC5FC792C3B90F70090B757 /* AutoDestructingURL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BC5FC782C3B90F70090B757 /* AutoDestructingURL.swift */; };
7BC5FC8A2C3BAA150090B757 /* ExportSession+Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BC5FC892C3BAA150090B757 /* ExportSession+Error.swift */; };
7BC5FC902C3BB2030090B757 /* AudioOutputSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BC5FC8F2C3BB2030090B757 /* AudioOutputSettings.swift */; };
7BC5FC922C3BB4BD0090B757 /* VideoOutputSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BC5FC912C3BB4BD0090B757 /* VideoOutputSettings.swift */; };
7BC5FC942C3BC3AD0090B757 /* CMTime+seconds.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BC5FC932C3BC3AD0090B757 /* CMTime+seconds.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
7B9BC0152C305D2C00C160C2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 7B9BC0002C305D2C00C160C2 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 7B9BC0082C305D2C00C160C2;
remoteInfo = SJSAssetExportSession;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
7B4C03172C723EA40091C5DB /* License.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = License.md; sourceTree = "<group>"; };
7B4C03182C723F3B0091C5DB /* Readme.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = Readme.md; sourceTree = "<group>"; };
7B4C03192C7256760091C5DB /* ReadmeExamples.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadmeExamples.swift; sourceTree = "<group>"; };
7B7AE3082C36615700DB7391 /* SampleWriter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleWriter.swift; sourceTree = "<group>"; };
7B9BC0092C305D2C00C160C2 /* SJSAssetExportSession.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SJSAssetExportSession.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7B9BC00C2C305D2C00C160C2 /* SJSAssetExportSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SJSAssetExportSession.h; sourceTree = "<group>"; };
7B9BC00D2C305D2C00C160C2 /* SJSAssetExportSession.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = SJSAssetExportSession.docc; sourceTree = "<group>"; };
7B9BC0132C305D2C00C160C2 /* SJSAssetExportSessionTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SJSAssetExportSessionTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
7B9BC0182C305D2C00C160C2 /* SJSAssetExportSessionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SJSAssetExportSessionTests.swift; sourceTree = "<group>"; };
7B9BC0272C30612C00C160C2 /* ExportSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExportSession.swift; sourceTree = "<group>"; };
7BC5FC762C3B8C5A0090B757 /* SendableWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SendableWrapper.swift; sourceTree = "<group>"; };
7BC5FC782C3B90F70090B757 /* AutoDestructingURL.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoDestructingURL.swift; sourceTree = "<group>"; };
7BC5FC892C3BAA150090B757 /* ExportSession+Error.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ExportSession+Error.swift"; sourceTree = "<group>"; };
7BC5FC8B2C3BB0180090B757 /* AVAsset+sending.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AVAsset+sending.swift"; sourceTree = "<group>"; };
7BC5FC8F2C3BB2030090B757 /* AudioOutputSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioOutputSettings.swift; sourceTree = "<group>"; };
7BC5FC912C3BB4BD0090B757 /* VideoOutputSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoOutputSettings.swift; sourceTree = "<group>"; };
7BC5FC932C3BC3AD0090B757 /* CMTime+seconds.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CMTime+seconds.swift"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedRootGroup section */
7BC5FC812C3B9E3D0090B757 /* Resources */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Resources; sourceTree = "<group>"; };
/* End PBXFileSystemSynchronizedRootGroup section */
/* Begin PBXFrameworksBuildPhase section */
7B9BC0062C305D2C00C160C2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7B9BC0102C305D2C00C160C2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
7B9BC0142C305D2C00C160C2 /* SJSAssetExportSession.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7B9BBFFF2C305D2C00C160C2 = {
isa = PBXGroup;
children = (
7B4C03172C723EA40091C5DB /* License.md */,
7B4C03182C723F3B0091C5DB /* Readme.md */,
7B9BC00B2C305D2C00C160C2 /* SJSAssetExportSession */,
7B9BC0172C305D2C00C160C2 /* SJSAssetExportSessionTests */,
7B9BC00A2C305D2C00C160C2 /* Products */,
);
sourceTree = "<group>";
};
7B9BC00A2C305D2C00C160C2 /* Products */ = {
isa = PBXGroup;
children = (
7B9BC0092C305D2C00C160C2 /* SJSAssetExportSession.framework */,
7B9BC0132C305D2C00C160C2 /* SJSAssetExportSessionTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
7B9BC00B2C305D2C00C160C2 /* SJSAssetExportSession */ = {
isa = PBXGroup;
children = (
7BC5FC8F2C3BB2030090B757 /* AudioOutputSettings.swift */,
7BC5FC912C3BB4BD0090B757 /* VideoOutputSettings.swift */,
7BC5FC932C3BC3AD0090B757 /* CMTime+seconds.swift */,
7B9BC0272C30612C00C160C2 /* ExportSession.swift */,
7BC5FC892C3BAA150090B757 /* ExportSession+Error.swift */,
7B7AE3082C36615700DB7391 /* SampleWriter.swift */,
7B9BC00C2C305D2C00C160C2 /* SJSAssetExportSession.h */,
7B9BC00D2C305D2C00C160C2 /* SJSAssetExportSession.docc */,
);
path = SJSAssetExportSession;
sourceTree = "<group>";
};
7B9BC0172C305D2C00C160C2 /* SJSAssetExportSessionTests */ = {
isa = PBXGroup;
children = (
7B4C03192C7256760091C5DB /* ReadmeExamples.swift */,
7BC5FC782C3B90F70090B757 /* AutoDestructingURL.swift */,
7BC5FC8B2C3BB0180090B757 /* AVAsset+sending.swift */,
7BC5FC812C3B9E3D0090B757 /* Resources */,
7BC5FC762C3B8C5A0090B757 /* SendableWrapper.swift */,
7B9BC0182C305D2C00C160C2 /* SJSAssetExportSessionTests.swift */,
);
path = SJSAssetExportSessionTests;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
7B9BC0042C305D2C00C160C2 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
7B9BC01A2C305D2C00C160C2 /* SJSAssetExportSession.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
7B9BC0082C305D2C00C160C2 /* SJSAssetExportSession */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7B9BC01D2C305D2C00C160C2 /* Build configuration list for PBXNativeTarget "SJSAssetExportSession" */;
buildPhases = (
7B9BC0042C305D2C00C160C2 /* Headers */,
7B9BC0052C305D2C00C160C2 /* Sources */,
7B9BC0062C305D2C00C160C2 /* Frameworks */,
7B9BC0072C305D2C00C160C2 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = SJSAssetExportSession;
productName = SJSAssetExportSession;
productReference = 7B9BC0092C305D2C00C160C2 /* SJSAssetExportSession.framework */;
productType = "com.apple.product-type.framework";
};
7B9BC0122C305D2C00C160C2 /* SJSAssetExportSessionTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7B9BC0202C305D2C00C160C2 /* Build configuration list for PBXNativeTarget "SJSAssetExportSessionTests" */;
buildPhases = (
7B9BC00F2C305D2C00C160C2 /* Sources */,
7B9BC0102C305D2C00C160C2 /* Frameworks */,
7B9BC0112C305D2C00C160C2 /* Resources */,
);
buildRules = (
);
dependencies = (
7B9BC0162C305D2C00C160C2 /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
7BC5FC812C3B9E3D0090B757 /* Resources */,
);
name = SJSAssetExportSessionTests;
productName = SJSAssetExportSessionTests;
productReference = 7B9BC0132C305D2C00C160C2 /* SJSAssetExportSessionTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7B9BC0002C305D2C00C160C2 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1600;
LastUpgradeCheck = 1600;
TargetAttributes = {
7B9BC0082C305D2C00C160C2 = {
CreatedOnToolsVersion = 16.0;
};
7B9BC0122C305D2C00C160C2 = {
CreatedOnToolsVersion = 16.0;
};
};
};
buildConfigurationList = 7B9BC0032C305D2C00C160C2 /* Build configuration list for PBXProject "SJSAssetExportSession" */;
compatibilityVersion = "Xcode 15.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7B9BBFFF2C305D2C00C160C2;
productRefGroup = 7B9BC00A2C305D2C00C160C2 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7B9BC0082C305D2C00C160C2 /* SJSAssetExportSession */,
7B9BC0122C305D2C00C160C2 /* SJSAssetExportSessionTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7B9BC0072C305D2C00C160C2 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7B9BC0112C305D2C00C160C2 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7B9BC0052C305D2C00C160C2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7BC5FC942C3BC3AD0090B757 /* CMTime+seconds.swift in Sources */,
7B7AE3092C36615700DB7391 /* SampleWriter.swift in Sources */,
7BC5FC902C3BB2030090B757 /* AudioOutputSettings.swift in Sources */,
7B9BC0282C30612C00C160C2 /* ExportSession.swift in Sources */,
7BC5FC922C3BB4BD0090B757 /* VideoOutputSettings.swift in Sources */,
7B9BC00E2C305D2C00C160C2 /* SJSAssetExportSession.docc in Sources */,
7BC5FC8A2C3BAA150090B757 /* ExportSession+Error.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7B9BC00F2C305D2C00C160C2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7B9BC0192C305D2C00C160C2 /* SJSAssetExportSessionTests.swift in Sources */,
7BC5FC792C3B90F70090B757 /* AutoDestructingURL.swift in Sources */,
7B9867982C6AF57C001353BC /* AVAsset+sending.swift in Sources */,
7B4C031A2C7256760091C5DB /* ReadmeExamples.swift in Sources */,
7BC5FC772C3B8C5A0090B757 /* SendableWrapper.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
7B9BC0162C305D2C00C160C2 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 7B9BC0082C305D2C00C160C2 /* SJSAssetExportSession */;
targetProxy = 7B9BC0152C305D2C00C160C2 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
7B9BC01B2C305D2C00C160C2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 6.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
XROS_DEPLOYMENT_TARGET = 1.3;
};
name = Debug;
};
7B9BC01C2C305D2C00C160C2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_VERSION = 6.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
XROS_DEPLOYMENT_TARGET = 1.3;
};
name = Release;
};
7B9BC01E2C305D2C00C160C2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 366SMC9MCA;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_MODULE_VERIFIER = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = (
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.0;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
PRODUCT_BUNDLE_IDENTIFIER = net.samhuri.SJSAssetExportSession;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = auto;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_INSTALL_OBJC_HEADER = NO;
TARGETED_DEVICE_FAMILY = "1,2,7";
};
name = Debug;
};
7B9BC01F2C305D2C00C160C2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 366SMC9MCA;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_MODULE_VERIFIER = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = (
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.0;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
PRODUCT_BUNDLE_IDENTIFIER = net.samhuri.SJSAssetExportSession;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = auto;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_INSTALL_OBJC_HEADER = NO;
TARGETED_DEVICE_FAMILY = "1,2,7";
};
name = Release;
};
7B9BC0212C305D2C00C160C2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 366SMC9MCA;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = net.samhuri.SJSAssetExportSessionTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
SWIFT_EMIT_LOC_STRINGS = NO;
TARGETED_DEVICE_FAMILY = "1,2,7";
};
name = Debug;
};
7B9BC0222C305D2C00C160C2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 366SMC9MCA;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = net.samhuri.SJSAssetExportSessionTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
SWIFT_EMIT_LOC_STRINGS = NO;
TARGETED_DEVICE_FAMILY = "1,2,7";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7B9BC0032C305D2C00C160C2 /* Build configuration list for PBXProject "SJSAssetExportSession" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7B9BC01B2C305D2C00C160C2 /* Debug */,
7B9BC01C2C305D2C00C160C2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7B9BC01D2C305D2C00C160C2 /* Build configuration list for PBXNativeTarget "SJSAssetExportSession" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7B9BC01E2C305D2C00C160C2 /* Debug */,
7B9BC01F2C305D2C00C160C2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7B9BC0202C305D2C00C160C2 /* Build configuration list for PBXNativeTarget "SJSAssetExportSessionTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7B9BC0212C305D2C00C160C2 /* Debug */,
7B9BC0222C305D2C00C160C2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7B9BC0002C305D2C00C160C2 /* Project object */;
}

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

View file

@ -1,8 +0,0 @@
<?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>

View file

@ -11,8 +11,8 @@ import SJSAssetExportSession
import Testing
final class ExportSessionTests {
private func resourceURL(named name: String, withExtension ext: String) -> URL {
Bundle(for: Self.self).url(forResource: name, withExtension: ext)!
private func resourceURL(named name: String) -> URL {
Bundle.module.resourceURL!.appending(component: name)
}
private func makeAsset(url: URL) -> sending AVAsset {
@ -50,7 +50,7 @@ final class ExportSessionTests {
}
@Test func test_sugary_export_720p_h264_24fps() async throws {
let sourceURL = resourceURL(named: "test-4k-hdr-hevc-30fps", withExtension: "mov")
let sourceURL = resourceURL(named: "test-4k-hdr-hevc-30fps.mov")
let destinationURL = makeTemporaryURL()
let subject = ExportSession()
@ -90,7 +90,7 @@ final class ExportSessionTests {
}
@Test func test_export_720p_h264_24fps() async throws {
let sourceURL = resourceURL(named: "test-4k-hdr-hevc-30fps", withExtension: "mov")
let sourceURL = resourceURL(named: "test-4k-hdr-hevc-30fps.mov")
let videoComposition = try await makeVideoComposition(
assetURL: sourceURL,
size: CGSize(width: 1280, height: 720),
@ -138,7 +138,7 @@ final class ExportSessionTests {
}
@Test func test_export_default_timerange() async throws {
let sourceURL = resourceURL(named: "test-720p-h264-24fps", withExtension: "mov")
let sourceURL = resourceURL(named: "test-720p-h264-24fps.mov")
let destinationURL = makeTemporaryURL()
let subject = ExportSession()
@ -154,7 +154,7 @@ final class ExportSessionTests {
}
@Test func test_export_default_composition_with_size() async throws {
let sourceURL = resourceURL(named: "test-720p-h264-24fps", withExtension: "mov")
let sourceURL = resourceURL(named: "test-720p-h264-24fps.mov")
let size = CGSize(width: 640, height: 360)
let destinationURL = makeTemporaryURL()
@ -173,7 +173,7 @@ final class ExportSessionTests {
}
@Test func test_export_default_composition_without_size() async throws {
let sourceURL = resourceURL(named: "test-720p-h264-24fps", withExtension: "mov")
let sourceURL = resourceURL(named: "test-720p-h264-24fps.mov")
let destinationURL = makeTemporaryURL()
let subject = ExportSession()
@ -191,7 +191,7 @@ final class ExportSessionTests {
}
@Test func test_export_progress() async throws {
let sourceURL = resourceURL(named: "test-720p-h264-24fps", withExtension: "mov")
let sourceURL = resourceURL(named: "test-720p-h264-24fps.mov")
let progressValues = SendableWrapper<[Float]>([])
let subject = ExportSession()
@ -213,7 +213,7 @@ final class ExportSessionTests {
}
@Test func test_export_works_with_no_audio() async throws {
let sourceURL = resourceURL(named: "test-no-audio", withExtension: "mp4")
let sourceURL = resourceURL(named: "test-no-audio.mp4")
let videoComposition = try await makeVideoComposition(assetURL: sourceURL)
let subject = ExportSession()
@ -230,7 +230,7 @@ final class ExportSessionTests {
@Test func test_export_throws_with_empty_audio_settings() async throws {
try await #require(throws: ExportSession.Error.setupFailure(.audioSettingsEmpty)) {
let sourceURL = resourceURL(named: "test-720p-h264-24fps", withExtension: "mov")
let sourceURL = resourceURL(named: "test-720p-h264-24fps.mov")
let videoComposition = try await makeVideoComposition(assetURL: sourceURL)
let subject = ExportSession()
@ -248,7 +248,7 @@ final class ExportSessionTests {
@Test func test_export_throws_with_invalid_audio_settings() async throws {
try await #require(throws: ExportSession.Error.setupFailure(.audioSettingsInvalid)) {
let sourceURL = resourceURL(named: "test-720p-h264-24fps", withExtension: "mov")
let sourceURL = resourceURL(named: "test-720p-h264-24fps.mov")
let subject = ExportSession()
try await subject.export(
@ -267,7 +267,7 @@ final class ExportSessionTests {
@Test func test_export_throws_with_invalid_video_settings() async throws {
try await #require(throws: ExportSession.Error.setupFailure(.videoSettingsInvalid)) {
let sourceURL = resourceURL(named: "test-720p-h264-24fps", withExtension: "mov")
let sourceURL = resourceURL(named: "test-720p-h264-24fps.mov")
let size = CGSize(width: 1280, height: 720)
let subject = ExportSession()
@ -288,7 +288,7 @@ final class ExportSessionTests {
@Test func test_export_throws_with_no_video_track() async throws {
try await #require(throws: ExportSession.Error.setupFailure(.videoTracksEmpty)) {
let sourceURL = resourceURL(named: "test-no-video", withExtension: "m4a")
let sourceURL = resourceURL(named: "test-no-video.m4a")
let subject = ExportSession()
try await subject.export(
asset: makeAsset(url: sourceURL),
@ -300,7 +300,7 @@ final class ExportSessionTests {
}
@Test func test_export_cancellation() async throws {
let sourceURL = resourceURL(named: "test-720p-h264-24fps", withExtension: "mov")
let sourceURL = resourceURL(named: "test-720p-h264-24fps.mov")
let destinationURL💥 = makeTemporaryURL()
let task = Task {
let sourceAsset = AVURLAsset(url: sourceURL, options: [
@ -324,7 +324,7 @@ final class ExportSessionTests {
}
@Test func test_writing_metadata() async throws {
let sourceURL = resourceURL(named: "test-720p-h264-24fps", withExtension: "mov")
let sourceURL = resourceURL(named: "test-720p-h264-24fps.mov")
let destinationURL = makeTemporaryURL()
let locationMetadata = AVMutableMetadataItem()
locationMetadata.key = AVMetadataKey.commonKeyLocation.rawValue as NSString