Hello eskimo, thank you for your answer! Yes indeed, your code in swift works like a charm!
However, I didn't mention before, but my project is in objective-c. I've tried to replicate the same thing in objective-c code, but without any success. The closest analog to swifts ".write()" method that I've found is NSString writeToUrl method, however it returns "Operation not permitted" error.
If I select a specific file (using "public.data" document type), I can access and edit the already existing file without any issues, so I'm kinda lost on the permission error.
I'll post my code in a different comment, so it'd be easyer to read.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: