Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Example app

on:
push:
branches: [master]
pull_request:

permissions:
contents: read

jobs:
build:
name: Build SoundBrowser (iOS Simulator)
runs-on: macos-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Show toolchain
run: xcodebuild -version

- name: Build
run: |
xcodebuild build \
-project Examples/SoundBrowser/SoundBrowser.xcodeproj \
-scheme SoundBrowser \
-destination 'generic/platform=iOS Simulator' \
CODE_SIGNING_ALLOWED=NO
17 changes: 17 additions & 0 deletions Examples/SoundBrowser/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SoundBrowser

A small SwiftUI app that uses the `SystemSoundsLibrary` Swift package from this repository.

- Search by name, ID, file name or category
- Sounds grouped by folder (`UISounds`, `UISounds/New`, `UISounds/Modern`, `UISounds/nano`)
- Tap a row to play the sound; the info button shows ID, path, category, availability and confidence
- Share or save the sound file from the details screen

Open `SoundBrowser.xcodeproj` in Xcode 16 or later and run it on a device with iOS 17 or later.
The iOS Simulator doesn't play system sounds, and the sound files can't be read there, so
sharing is only available on a device.

The app reads files from `/System/Library/Audio/UISounds` to share them. That's fine for a
developer tool, but don't ship it in an App Store app (App Review Guideline 2.5.2).

The original Objective-C demo app is still at the repository root (`SystemSoundLibrary.xcodeproj`).
267 changes: 267 additions & 0 deletions Examples/SoundBrowser/SoundBrowser.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 77;
objects = {

/* Begin PBXBuildFile section */
5B0D00012E00000000000001 /* SystemSoundsLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = 5B0D00012E00000000000002 /* SystemSoundsLibrary */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
5B0D00012E00000000000010 /* SoundBrowser.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SoundBrowser.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFileSystemSynchronizedRootGroup section */
5B0D00012E00000000000011 /* SoundBrowser */ = {
isa = PBXFileSystemSynchronizedRootGroup;
path = SoundBrowser;
sourceTree = "<group>";
};
/* End PBXFileSystemSynchronizedRootGroup section */

/* Begin PBXFrameworksBuildPhase section */
5B0D00012E00000000000020 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5B0D00012E00000000000001 /* SystemSoundsLibrary in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
5B0D00012E00000000000030 = {
isa = PBXGroup;
children = (
5B0D00012E00000000000011 /* SoundBrowser */,
5B0D00012E00000000000031 /* Products */,
);
sourceTree = "<group>";
};
5B0D00012E00000000000031 /* Products */ = {
isa = PBXGroup;
children = (
5B0D00012E00000000000010 /* SoundBrowser.app */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
5B0D00012E00000000000040 /* SoundBrowser */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5B0D00012E00000000000050 /* Build configuration list for PBXNativeTarget "SoundBrowser" */;
buildPhases = (
5B0D00012E00000000000021 /* Sources */,
5B0D00012E00000000000020 /* Frameworks */,
5B0D00012E00000000000022 /* Resources */,
);
buildRules = (
);
dependencies = (
);
fileSystemSynchronizedGroups = (
5B0D00012E00000000000011 /* SoundBrowser */,
);
name = SoundBrowser;
packageProductDependencies = (
5B0D00012E00000000000002 /* SystemSoundsLibrary */,
);
productName = SoundBrowser;
productReference = 5B0D00012E00000000000010 /* SoundBrowser.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
5B0D00012E00000000000060 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 2600;
LastUpgradeCheck = 2600;
TargetAttributes = {
5B0D00012E00000000000040 = {
CreatedOnToolsVersion = 26.0;
};
};
};
buildConfigurationList = 5B0D00012E00000000000051 /* Build configuration list for PBXProject "SoundBrowser" */;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 5B0D00012E00000000000030;
minimizedProjectReferenceProxies = 1;
packageReferences = (
5B0D00012E00000000000003 /* XCLocalSwiftPackageReference "../.." */,
);
preferredProjectObjectVersion = 77;
productRefGroup = 5B0D00012E00000000000031 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
5B0D00012E00000000000040 /* SoundBrowser */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
5B0D00012E00000000000022 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
5B0D00012E00000000000021 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
5B0D00012E00000000000070 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_OPTIMIZATION_LEVEL = 0;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
5B0D00012E00000000000071 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
5B0D00012E00000000000072 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_CFBundleDisplayName = "Sound Browser";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.github.tuner88.SoundBrowser;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
5B0D00012E00000000000073 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_CFBundleDisplayName = "Sound Browser";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.github.tuner88.SoundBrowser;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
5B0D00012E00000000000050 /* Build configuration list for PBXNativeTarget "SoundBrowser" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5B0D00012E00000000000072 /* Debug */,
5B0D00012E00000000000073 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5B0D00012E00000000000051 /* Build configuration list for PBXProject "SoundBrowser" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5B0D00012E00000000000070 /* Debug */,
5B0D00012E00000000000071 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
5B0D00012E00000000000003 /* XCLocalSwiftPackageReference "../.." */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../..;
};
/* End XCLocalSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
5B0D00012E00000000000002 /* SystemSoundsLibrary */ = {
isa = XCSwiftPackageProductDependency;
productName = SystemSoundsLibrary;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 5B0D00012E00000000000060 /* Project object */;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "2600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5B0D00012E00000000000040"
BuildableName = "SoundBrowser.app"
BlueprintName = "SoundBrowser"
ReferencedContainer = "container:SoundBrowser.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5B0D00012E00000000000040"
BuildableName = "SoundBrowser.app"
BlueprintName = "SoundBrowser"
ReferencedContainer = "container:SoundBrowser.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5B0D00012E00000000000040"
BuildableName = "SoundBrowser.app"
BlueprintName = "SoundBrowser"
ReferencedContainer = "container:SoundBrowser.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Loading
Loading