Skip to content

Bug Fix on PlatformFile.delete() API in iOS target#594

Merged
vinceglb merged 1 commit into
vinceglb:mainfrom
AnsifDev:ios-delete-api-fix
Jun 11, 2026
Merged

Bug Fix on PlatformFile.delete() API in iOS target#594
vinceglb merged 1 commit into
vinceglb:mainfrom
AnsifDev:ios-delete-api-fix

Conversation

@AnsifDev

@AnsifDev AnsifDev commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

The public expect suspend fun PlatformFile.delete(mustExist: Boolean = true): Unit API definision in jvmAndNative target, which is the API definision used by the ios target, is defined the delete logic without the securityScopedAccess. Because of this, the delete API fails on files which are picked using system file pickers, causing a crash. I wrapped the logic in withScopedAccess block, assuming this is an implementation mistake while every other APIs are implemented in that scope. Validate the commit and merge if applicable

@vinceglb vinceglb left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for the PR!

@vinceglb vinceglb merged commit 5706d6f into vinceglb:main Jun 11, 2026
6 of 7 checks passed
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