Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

elnoidelkargol

macrumors newbie
Original poster
Sep 6, 2023
1
0
I'm trying to open a file from Files iPad app after a user chose to open a file with my app
In iOS 16 or before I do
NSString *pathForFile = [NSHomeDirectory() stringByAppendingPathComponent:mad:"Documents/Inbox/myfile.customFile"];

if ([fileManager fileExistsAtPath:pathForFile])
{
// Do something
}
but on iOS 17 there is not Documents/Inbox directory.
Anyone know how to do it ?

thanks
 

prime17569

macrumors regular
May 26, 2021
207
524
Does your app support Open In Place? If so, there won't be anything in the Inbox directory, and your app will be launched with the URL passed to your scene delegate.

Also, I would recommend using NSFileManager to get the path to the documents directory rather than appending a string to the home directory path.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.