Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes if remote app returns nil for Date property #28

Open
rinsuki opened this issue Oct 26, 2024 · 0 comments
Open

App crashes if remote app returns nil for Date property #28

rinsuki opened this issue Oct 26, 2024 · 0 comments

Comments

@rinsuki
Copy link

rinsuki commented Oct 26, 2024

currently, if we generate Swift file from the Music app (com.apple.Music), MusicTrack have a releaseDate property with Date type:

// MARK: MusicTrack
@objc public protocol MusicTrack: MusicItem {
/* (snip) */
    @objc optional var releaseDate: Date { get } // the release date of this track

but, If try to get releaseDate property when Music app doesn't have current track (e.g. after re-opened), it will crash instead of returns nil:

image

but, If I change property type to Date? or NSDate manually, crash never occured (property returns nil).

maybe It is Apple-side issue (I'm not sure), but we might be want to include workaround for this.

Environment

  • Xcode: 16.1 (16B40)
  • macOS: 14.7 (23H124)
  • Chip: Apple M1 Max
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant