UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

When using a .fileimporter all files greyed out (iOS)

Forums > SwiftUI

I've written an app and set the two properties

'Supports opening documents in place' and 'Application supports iTunes file sharing'

to 'YES' in the Custom iOS Taget Properties.

My app is saving a .json file to the appropriate documents folder. When I start the fileimporter via

.fileImporter( isPresented: $showFileImporter, allowedContentTypes: supportedTypes, allowsMultipleSelection: false, ...

and supportedTypes -> let supportedTypes : [UTType] = [UTType.json]

All files are greyed out and I can't open them. What am I doing wrong!?

I would be very grateful for your support!

greets

René

   

Hacking with Swift is sponsored by RevenueCat.

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.