Writing to "secondary file" on iOS/iPadOS (not macOS)?

I have successfully used the primaryPresentedItemURL functionality of NSFilePresenter in macOS apps to, write to file.foo after the user used, for example, NSOpenPanel to open file.bar in a sandboxed application. This makes use of the primaryPresentedItemURL property belonging to NSFilePresenter (as well as NSIsRelatedItemType in Info.plist).

I am struggling to do the same on an iOS/iPadOS app and not sure whether that can be done. primaryPresentedItemURL is not available outside of macOS. When I try to use the same approach as macOS (except for primaryPresentedItemURL of course), it works on the Simulator, but not on an actual device.

Can this be done in some other way? My internet search has not revealed a solution.

Thanks in advance!!

Accepted Reply

As far as I know this feature just isn’t available on iOS )-: I recommend that you file an enhancement request but, sadly, that won’t help in the short term.

If you do file an ER, please post your bug number here, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Replies

As far as I know this feature just isn’t available on iOS )-: I recommend that you file an enhancement request but, sadly, that won’t help in the short term.

If you do file an ER, please post your bug number here, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Quinn -- thank you for the response! (And as an aside, after seeing your helpful replies countless times over the years, it's nice to get one myself!!!)

Submitted. FB12168987.

Thanks again.

Fletcher

  • It looks like the code that detects FB bug numbers needs to be updated to support an additional digit, so anyone using the automatically generated link will be missing the trailing 7

  • Thanks for filing FB12168987. And, yeah, the off-by-one error is a known bug (r. 94795668 )-:

Add a Comment