• inside switch sourceType case .files, you want to use folderURL instead of pickedURL to make the document. According to the documentation, “Always use the URL passed into the block instead of the value in the url parameter.”
  • inside documentFromURL(pickedURL:), missing } underneath pickedURL.stopAccessingSecurityScopedResource().

--

--

--

WWDC21 Scholar. I like to read manga and write about Swift. Check out my app, Find — look for text in real life, with outrageous speed. getfind.app

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrew Zheng

Andrew Zheng

WWDC21 Scholar. I like to read manga and write about Swift. Check out my app, Find — look for text in real life, with outrageous speed. getfind.app

More from Medium

TheLittleRascal Lore:

Another 3.8M Tokens Fried Inside The RFOX Metaverse Ecosystem

BNBFOMO.net— High APY Yield Farming. Earn from 8% up to 13.71% Daily on your Staked BNB

Kar(an)ology