Mohammed Gomaa
Mohammed Gomaa

Reputation: 91

How to prevent files inside my app folder in Files app to open my application

Both Application supports iTunes file sharing and Supports opening documents in place are set to YES on my Info.plist and I'm successfully able to download pdf files and store it on my app folder in Files application but the issue is when I'm trying to explore this PDF file it's directly open my app .. is there any way to avoid this and open normal preview ?

Here is how I'm creating the file :

FileManager.default.createFile(atPath: filePath, contents: pdfData, attributes: nil)

Upvotes: 0

Views: 442

Answers (1)

Awais Mobeen
Awais Mobeen

Reputation: 852

Don't use the Files app use document directory instead of Files, If you are using files app then the files in your application folder will be visible to all those apps that are using Files app.

Upvotes: 1

Related Questions