BlueHuskyStudios / BlueHuskyStudios/DeadassSimpleMediaPlayer
Remove `_demo data` from release builds
- Dominant language
- Swift
- Stars
- 0
- Forks
- 3
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 9
Description
`_demo data/` is in `fileSystemSynchronizedGroups` for **both** targets and the project has no `PBXFileSystemSynchronizedBuildFileExceptionSet`, so it ships. Inside:
```swift
state: .ready(resync { await .init(url: .null)! })
```
Three concerns stacked: `MediaItem(url:)` is failable and force-unwrapped; `URL.null` is `/dev/null`, which is a plausible bookmark-creation failure; and `resync` blocks its calling thread until suspending work completes (*unverified* — based on your description of `resync`'s contract, not its source).
`PlayerSession.demo` guards itself with `#if DEBUG` / `fatalError` in release, but `[Playlist.Entry].demo`, `[MediaReference].demo`, `[SavedPlaylist].demo`, and `[PlaybackHistory.Entry].demo` are **not** guarded and are reachable in release. Simplest fix is excluding the folder from the release target, or wrapping each file's contents in `#if DEBUG`.
Contributor guide
Research direction
Inspect the project’s fileSystemSynchronizedGroups for both targets and the `_demo data/` contents, including the listed `.demo` definitions. First compare the release target’s file inclusion settings with the existing `#if DEBUG` guard in `PlayerSession.demo`; done means the demo folder or its release-inaccessible contents no longer ship in release builds while debug behavior remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 76/100