I want to save a configuration file (property list / NSDictionary) to the application's local Documents folder (allowing user to select new filename) :
NSURL *temporaryDirectoryURL = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory: YES];
NSURL *tempUrl = [temporaryDirectoryURL URLByAppendingPathComponent:@"tempPerf.plist"];
[self.partsConfigs writeToURL:tempUrl atomically:YES];
UIDocumentInteractionController *interactionController = [UIDocumentInteractionController interactionControllerWithURL:tempUrl];
[interactionController setDelegate:self];
[interactionController setUTI:@"com.apple.property-list"];
[interactionController setName:tempUrl.lastPathComponent]
[interactionController presentOptionsMenuFromRect:self.view.frame inView:self.view animated:YES];
However the controller's view doesn't show and logs state about some private path :
[MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/.../Library/Developer/CoreSimulator/Devices/.../data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
[MC] Reading from private effective user settings.
I also tried using another public temp path (and get same logs)
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *path = [documentsDirectory stringByAppendingPathComponent:@"tempPerf2.plist"];
NSURL *tempUrl = [NSURL fileURLWithPath:path];
NSURL *temporaryDirectoryURL = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory: YES];
NSURL *tempUrl = [temporaryDirectoryURL URLByAppendingPathComponent:@"tempPerf.plist"];
[self.partsConfigs writeToURL:tempUrl atomically:YES];
UIDocumentInteractionController *interactionController = [UIDocumentInteractionController interactionControllerWithURL:tempUrl];
[interactionController setDelegate:self];
[interactionController setUTI:@"com.apple.property-list"];
[interactionController setName:tempUrl.lastPathComponent]
[interactionController presentOptionsMenuFromRect:self.view.frame inView:self.view animated:YES];
However the controller's view doesn't show and logs state about some private path :
[MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/.../Library/Developer/CoreSimulator/Devices/.../data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
[MC] Reading from private effective user settings.
I also tried using another public temp path (and get same logs)
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *path = [documentsDirectory stringByAppendingPathComponent:@"tempPerf2.plist"];
NSURL *tempUrl = [NSURL fileURLWithPath:path];