From 5f94b2295fa819b80466d106725433e4f5531fc3 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Tue, 8 Jan 2019 16:01:30 +0100 Subject: [PATCH] create folder on my iphone/ipad to store documents --- Classes/ChatConversationView.m | 9 ++++++++- linphone-Info.plist | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index 8c111d43b..99d20683b 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -1029,8 +1029,15 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog } - (NSURL *)getICloudFileUrl:(NSString *)name { + if (@available(iOS 11.0, *)) { + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); + NSString *documentsPath = [paths objectAtIndex:0]; + NSURL *url = [NSURL fileURLWithPath:documentsPath]; + return [url URLByAppendingPathComponent:name]; + } + NSFileManager *fileManager = [NSFileManager defaultManager]; - NSURL *icloudPath = [[fileManager URLForUbiquityContainerIdentifier:nil]URLByAppendingPathComponent:@"Documents"]; + NSURL *icloudPath = [[fileManager URLForUbiquityContainerIdentifier:nil] URLByAppendingPathComponent:@"Documents"]; if (icloudPath) { if (![fileManager fileExistsAtPath:icloudPath.path isDirectory:nil]) { diff --git a/linphone-Info.plist b/linphone-Info.plist index 751d442db..51f6873d0 100644 --- a/linphone-Info.plist +++ b/linphone-Info.plist @@ -159,6 +159,8 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationPortrait + UISupportsDocumentBrowser + UIViewControllerBasedStatusBarAppearance