Skip to content

Fix error when creating databases on tvOS devices#470

Merged
mbrandonw merged 1 commit into
pointfreeco:mainfrom
joseph-elmallah:support-tvos
Jun 4, 2026
Merged

Fix error when creating databases on tvOS devices#470
mbrandonw merged 1 commit into
pointfreeco:mainfrom
joseph-elmallah:support-tvos

Conversation

@joseph-elmallah

@joseph-elmallah joseph-elmallah commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Remove redundant createDirectory calls that are now handled by FileManager.default.url(create:true).

@mbrandonw

Copy link
Copy Markdown
Member

On tvOS, .applicationSupportDirectory is unavailable, so switch to .cachesDirectory for the default database path.

I don't think that is the correct move. That will cause people to unknowingly store their database in a place that can be deleted at any moment. Please revert that change. People who develop for tvOS will just have to know that they need to provide a URL to defaultDatabase and cannot rely on defaults.

…port

On tvOS, `.applicationSupportDirectory` is unavailable, so switch to
`.cachesDirectory` for the default database path. Also remove redundant
`createDirectory` calls that are now handled by `FileManager.default.url(create:true)`.
@joseph-elmallah joseph-elmallah changed the title Add tvOS support by using caches directory instead of application support Fix error when creating databases on tvOS devices Jun 2, 2026
@joseph-elmallah

Copy link
Copy Markdown
Contributor Author

@mbrandonw I reverted that change and updated the PR description + title to reflect the changes.

@mbrandonw mbrandonw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good! Did you happen to run the demos and confirm that all still works in the iOS simulator?

@mbrandonw mbrandonw merged commit 9a7c01c into pointfreeco:main Jun 4, 2026
@joseph-elmallah

Copy link
Copy Markdown
Contributor Author

@mbrandonw yes I ran the Demo on a simulator no problem. I also verified the fix does address the problem on a real apple TV. Thanks a lot for your support.

@joseph-elmallah joseph-elmallah deleted the support-tvos branch June 5, 2026 22:15
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

Successfully merging this pull request may close these issues.

2 participants