I am a React native developer and I was trying to integrate a native ios code.
One of the instance takes NSURL *
which should be a local path I guess
+ (nonnull instancetype)priorRunAtDirectoryURL:(nullable NSURL *)directoryURL;
I am not sure what does localPath Url looks like in IOS, like what should I pass? for example?
Ps: intentionally including swift tag as well because I think swift developers could also answer it.
2
Answers
Based on description of that function:
you need to provide a directory they can write into. So Apps’s document directory would be the best (as a root) + whatever folder you want (which, based on their code, they will even create for you).
So:
it will look something like:
Try looking up documentation for
That will get you the URL and check out FileManager.SearchPathDirectory enum for all the viable options:
Here’s an example for getting the caches directory
It could be any one of the 25-26 options in SearchPathDirectory depending on where they put that stuff.