Skip to content

Can I read and write files on iOS? #175

Answered by temeddix
hoslo asked this question in Q&A
Discussion options

You must be logged in to vote

This was an interesting issue, though it wasn't related to RIF.

Now I understand why it was not working on iOS. The Rust thread panicked because you didn't have the permission to store test.db beside the executable binary. In iOS, you are only allowed to access specific folders of the app itself. Also, you didn't add ?mode=wrc to the end of the sqlite path to create one if not present.

To understand what sandboxing is in iOS apps, take a look at this post:

I was able to fix your app to make it work on iOS. Take a look at my fork:
https://github.com/hoslo/tally/compare/m…

Replies: 13 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@hoslo
Comment options

@hoslo
Comment options

@temeddix
Comment options

Answer selected by temeddix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #133 on September 28, 2023 14:46.