marinofaggiana vor 4 Jahren
Ursprung
Commit
c9f00f49eb

+ 4 - 10
Nextcloud.xcodeproj/project.pbxproj

@@ -128,6 +128,7 @@
 		F74DE14425135B6800917068 /* NCTransfers.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F74DE14225135B6800917068 /* NCTransfers.storyboard */; };
 		F74DE14425135B6800917068 /* NCTransfers.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F74DE14225135B6800917068 /* NCTransfers.storyboard */; };
 		F7501C322212E57500FB1415 /* NCMedia.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7501C302212E57400FB1415 /* NCMedia.storyboard */; };
 		F7501C322212E57500FB1415 /* NCMedia.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7501C302212E57400FB1415 /* NCMedia.storyboard */; };
 		F7501C332212E57500FB1415 /* NCMedia.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7501C312212E57400FB1415 /* NCMedia.swift */; };
 		F7501C332212E57500FB1415 /* NCMedia.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7501C312212E57400FB1415 /* NCMedia.swift */; };
+		F7509BAA25DFC69C005370D1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7509BA925DFC69C005370D1 /* AppDelegate.swift */; };
 		F752011D25480387000BF3A7 /* NCViewerVideo.swift in Sources */ = {isa = PBXBuildFile; fileRef = F752011C25480387000BF3A7 /* NCViewerVideo.swift */; };
 		F752011D25480387000BF3A7 /* NCViewerVideo.swift in Sources */ = {isa = PBXBuildFile; fileRef = F752011C25480387000BF3A7 /* NCViewerVideo.swift */; };
 		F755BD9B20594AC7008C5FBB /* NCService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F755BD9A20594AC7008C5FBB /* NCService.swift */; };
 		F755BD9B20594AC7008C5FBB /* NCService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F755BD9A20594AC7008C5FBB /* NCService.swift */; };
 		F755E6462525946C008DAB45 /* NCCollectionViewCommon.swift in Sources */ = {isa = PBXBuildFile; fileRef = F755E6442525946C008DAB45 /* NCCollectionViewCommon.swift */; };
 		F755E6462525946C008DAB45 /* NCCollectionViewCommon.swift in Sources */ = {isa = PBXBuildFile; fileRef = F755E6442525946C008DAB45 /* NCCollectionViewCommon.swift */; };
@@ -196,7 +197,6 @@
 		F77B0E5F1D118A16002130FE /* NCSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = F7ACE4311BAC0268006C0017 /* NCSettings.m */; };
 		F77B0E5F1D118A16002130FE /* NCSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = F7ACE4311BAC0268006C0017 /* NCSettings.m */; };
 		F77B0E981D118A16002130FE /* CCManageAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = F7ACE42D1BAC0268006C0017 /* CCManageAccount.m */; };
 		F77B0E981D118A16002130FE /* CCManageAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = F7ACE42D1BAC0268006C0017 /* CCManageAccount.m */; };
 		F77B0ED11D118A16002130FE /* Acknowledgements.m in Sources */ = {isa = PBXBuildFile; fileRef = F7ACE42A1BAC0268006C0017 /* Acknowledgements.m */; };
 		F77B0ED11D118A16002130FE /* Acknowledgements.m in Sources */ = {isa = PBXBuildFile; fileRef = F7ACE42A1BAC0268006C0017 /* Acknowledgements.m */; };
-		F77B0ED91D118A16002130FE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F7F67BAD1A24D27800EE80DA /* main.m */; };
 		F77B0F611D118A16002130FE /* Acknowledgements.rtf in Resources */ = {isa = PBXBuildFile; fileRef = F7ACE42B1BAC0268006C0017 /* Acknowledgements.rtf */; };
 		F77B0F611D118A16002130FE /* Acknowledgements.rtf in Resources */ = {isa = PBXBuildFile; fileRef = F7ACE42B1BAC0268006C0017 /* Acknowledgements.rtf */; };
 		F77B0F631D118A16002130FE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F7E70DE91A24DE4100E1B66A /* Localizable.strings */; };
 		F77B0F631D118A16002130FE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F7E70DE91A24DE4100E1B66A /* Localizable.strings */; };
 		F77B0F7D1D118A16002130FE /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F7F67BB81A24D27800EE80DA /* Images.xcassets */; };
 		F77B0F7D1D118A16002130FE /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F7F67BB81A24D27800EE80DA /* Images.xcassets */; };
@@ -268,7 +268,6 @@
 		F7AE00FA230E81EB007ACF8A /* NCBrowserWeb.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7AE00F9230E81EB007ACF8A /* NCBrowserWeb.storyboard */; };
 		F7AE00FA230E81EB007ACF8A /* NCBrowserWeb.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7AE00F9230E81EB007ACF8A /* NCBrowserWeb.storyboard */; };
 		F7AF7633246BEDFE00B86E3C /* TOPasscodeViewController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7AF7632246BEDFE00B86E3C /* TOPasscodeViewController.framework */; };
 		F7AF7633246BEDFE00B86E3C /* TOPasscodeViewController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7AF7632246BEDFE00B86E3C /* TOPasscodeViewController.framework */; };
 		F7B1076D25D3CF2800E72DE2 /* BackgroundTasks.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7B1076C25D3CF2800E72DE2 /* BackgroundTasks.framework */; };
 		F7B1076D25D3CF2800E72DE2 /* BackgroundTasks.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7B1076C25D3CF2800E72DE2 /* BackgroundTasks.framework */; };
-		F7B174C822FAC0A8000B7579 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F7B174C722FAC0A8000B7579 /* AppDelegate.m */; };
 		F7B2DEF01F976854007CF4D2 /* NYMnemonic.m in Sources */ = {isa = PBXBuildFile; fileRef = F7B2DEEF1F976785007CF4D2 /* NYMnemonic.m */; };
 		F7B2DEF01F976854007CF4D2 /* NYMnemonic.m in Sources */ = {isa = PBXBuildFile; fileRef = F7B2DEEF1F976785007CF4D2 /* NYMnemonic.m */; };
 		F7B2DEF11F976859007CF4D2 /* english.txt in Resources */ = {isa = PBXBuildFile; fileRef = F7B2DEED1F976785007CF4D2 /* english.txt */; };
 		F7B2DEF11F976859007CF4D2 /* english.txt in Resources */ = {isa = PBXBuildFile; fileRef = F7B2DEED1F976785007CF4D2 /* english.txt */; };
 		F7B7504B2397D38F004E13EC /* UIImage+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B7504A2397D38E004E13EC /* UIImage+Extensions.swift */; };
 		F7B7504B2397D38F004E13EC /* UIImage+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B7504A2397D38E004E13EC /* UIImage+Extensions.swift */; };
@@ -486,6 +485,7 @@
 		F74DE14225135B6800917068 /* NCTransfers.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = NCTransfers.storyboard; sourceTree = "<group>"; };
 		F74DE14225135B6800917068 /* NCTransfers.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = NCTransfers.storyboard; sourceTree = "<group>"; };
 		F7501C302212E57400FB1415 /* NCMedia.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = NCMedia.storyboard; sourceTree = "<group>"; };
 		F7501C302212E57400FB1415 /* NCMedia.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = NCMedia.storyboard; sourceTree = "<group>"; };
 		F7501C312212E57400FB1415 /* NCMedia.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCMedia.swift; sourceTree = "<group>"; };
 		F7501C312212E57400FB1415 /* NCMedia.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCMedia.swift; sourceTree = "<group>"; };
+		F7509BA925DFC69C005370D1 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 		F7514EDA1C7B1336008F3338 /* CCHud.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCHud.h; sourceTree = "<group>"; };
 		F7514EDA1C7B1336008F3338 /* CCHud.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCHud.h; sourceTree = "<group>"; };
 		F7514EDB1C7B1336008F3338 /* CCHud.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCHud.m; sourceTree = "<group>"; };
 		F7514EDB1C7B1336008F3338 /* CCHud.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCHud.m; sourceTree = "<group>"; };
 		F75153232226920200323DDC /* FastScroll.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FastScroll.framework; path = Carthage/Build/iOS/FastScroll.framework; sourceTree = "<group>"; };
 		F75153232226920200323DDC /* FastScroll.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FastScroll.framework; path = Carthage/Build/iOS/FastScroll.framework; sourceTree = "<group>"; };
@@ -612,7 +612,6 @@
 		F7A0D1452592256F008F8A13 /* UIImageView+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImageView+Extensions.swift"; sourceTree = "<group>"; };
 		F7A0D1452592256F008F8A13 /* UIImageView+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImageView+Extensions.swift"; sourceTree = "<group>"; };
 		F7A321AB1E9E6AD50069AD1B /* CCAdvanced.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAdvanced.h; sourceTree = "<group>"; };
 		F7A321AB1E9E6AD50069AD1B /* CCAdvanced.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAdvanced.h; sourceTree = "<group>"; };
 		F7A321AC1E9E6AD50069AD1B /* CCAdvanced.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCAdvanced.m; sourceTree = "<group>"; };
 		F7A321AC1E9E6AD50069AD1B /* CCAdvanced.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCAdvanced.m; sourceTree = "<group>"; };
-		F7A582D71A24DAB500E903D7 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = AppDelegate.h; sourceTree = "<group>"; };
 		F7A80BC8252624C100C7CD01 /* NCFileViewInFolder.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = NCFileViewInFolder.storyboard; sourceTree = "<group>"; };
 		F7A80BC8252624C100C7CD01 /* NCFileViewInFolder.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = NCFileViewInFolder.storyboard; sourceTree = "<group>"; };
 		F7A80BC9252624C100C7CD01 /* NCFileViewInFolder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCFileViewInFolder.swift; sourceTree = "<group>"; };
 		F7A80BC9252624C100C7CD01 /* NCFileViewInFolder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCFileViewInFolder.swift; sourceTree = "<group>"; };
 		F7ACE4291BAC0268006C0017 /* Acknowledgements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Acknowledgements.h; sourceTree = "<group>"; };
 		F7ACE4291BAC0268006C0017 /* Acknowledgements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Acknowledgements.h; sourceTree = "<group>"; };
@@ -629,7 +628,6 @@
 		F7AE00F9230E81EB007ACF8A /* NCBrowserWeb.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = NCBrowserWeb.storyboard; sourceTree = "<group>"; };
 		F7AE00F9230E81EB007ACF8A /* NCBrowserWeb.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = NCBrowserWeb.storyboard; sourceTree = "<group>"; };
 		F7AF7632246BEDFE00B86E3C /* TOPasscodeViewController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TOPasscodeViewController.framework; path = Carthage/Build/iOS/TOPasscodeViewController.framework; sourceTree = "<group>"; };
 		F7AF7632246BEDFE00B86E3C /* TOPasscodeViewController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TOPasscodeViewController.framework; path = Carthage/Build/iOS/TOPasscodeViewController.framework; sourceTree = "<group>"; };
 		F7B1076C25D3CF2800E72DE2 /* BackgroundTasks.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BackgroundTasks.framework; path = System/Library/Frameworks/BackgroundTasks.framework; sourceTree = SDKROOT; };
 		F7B1076C25D3CF2800E72DE2 /* BackgroundTasks.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BackgroundTasks.framework; path = System/Library/Frameworks/BackgroundTasks.framework; sourceTree = SDKROOT; };
-		F7B174C722FAC0A8000B7579 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
 		F7B1A7761EBB3C8000BFB6D1 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
 		F7B1A7761EBB3C8000BFB6D1 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
 		F7B2DEED1F976785007CF4D2 /* english.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = english.txt; sourceTree = "<group>"; };
 		F7B2DEED1F976785007CF4D2 /* english.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = english.txt; sourceTree = "<group>"; };
 		F7B2DEEE1F976785007CF4D2 /* NYMnemonic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYMnemonic.h; sourceTree = "<group>"; };
 		F7B2DEEE1F976785007CF4D2 /* NYMnemonic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYMnemonic.h; sourceTree = "<group>"; };
@@ -692,7 +690,6 @@
 		F7F1E54B2492369A00E42386 /* NCMediaCommandView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NCMediaCommandView.xib; sourceTree = "<group>"; };
 		F7F1E54B2492369A00E42386 /* NCMediaCommandView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NCMediaCommandView.xib; sourceTree = "<group>"; };
 		F7F35B592578FB63003F5589 /* CollaboraOnlineWebViewKeyboardManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CollaboraOnlineWebViewKeyboardManager.framework; path = Carthage/Build/iOS/CollaboraOnlineWebViewKeyboardManager.framework; sourceTree = "<group>"; };
 		F7F35B592578FB63003F5589 /* CollaboraOnlineWebViewKeyboardManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CollaboraOnlineWebViewKeyboardManager.framework; path = Carthage/Build/iOS/CollaboraOnlineWebViewKeyboardManager.framework; sourceTree = "<group>"; };
 		F7F4B1D723C74B3E00D82A6E /* NCRichWorkspace.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCRichWorkspace.swift; sourceTree = "<group>"; };
 		F7F4B1D723C74B3E00D82A6E /* NCRichWorkspace.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCRichWorkspace.swift; sourceTree = "<group>"; };
-		F7F67BAD1A24D27800EE80DA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
 		F7F67BB81A24D27800EE80DA /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
 		F7F67BB81A24D27800EE80DA /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
 		F7F878AD1FB9E3B900599E4F /* NCEndToEndMetadata.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCEndToEndMetadata.swift; sourceTree = "<group>"; };
 		F7F878AD1FB9E3B900599E4F /* NCEndToEndMetadata.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCEndToEndMetadata.swift; sourceTree = "<group>"; };
 		F7F8D7191ED6183000E711F3 /* CCCellShareExt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCCellShareExt.h; sourceTree = "<group>"; };
 		F7F8D7191ED6183000E711F3 /* CCCellShareExt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCCellShareExt.h; sourceTree = "<group>"; };
@@ -1434,11 +1431,10 @@
 		F7F67BAA1A24D27800EE80DA /* iOSClient */ = {
 		F7F67BAA1A24D27800EE80DA /* iOSClient */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				F7509BA925DFC69C005370D1 /* AppDelegate.swift */,
 				F70F02A81C889183008DAB36 /* Libraries external */,
 				F70F02A81C889183008DAB36 /* Libraries external */,
 				F7C1CDD91E6DFC6F005D92BE /* Brand */,
 				F7C1CDD91E6DFC6F005D92BE /* Brand */,
 				F70211F31BAC56E9003FC03E /* Main */,
 				F70211F31BAC56E9003FC03E /* Main */,
-				F7A582D71A24DAB500E903D7 /* AppDelegate.h */,
-				F7B174C722FAC0A8000B7579 /* AppDelegate.m */,
 				F7F67BB81A24D27800EE80DA /* Images.xcassets */,
 				F7F67BB81A24D27800EE80DA /* Images.xcassets */,
 				F7A321621E9E37960069AD1B /* Activity */,
 				F7A321621E9E37960069AD1B /* Activity */,
 				F7E0E1DA22327885006B0911 /* AudioRecorder */,
 				F7E0E1DA22327885006B0911 /* AudioRecorder */,
@@ -1478,7 +1474,6 @@
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
 				F72B60941A24F04E004EF66F /* Localizations */,
 				F72B60941A24F04E004EF66F /* Localizations */,
-				F7F67BAD1A24D27800EE80DA /* main.m */,
 				F7D154271E2392A300202FD9 /* Nextcloud-Bridging-Header.h */,
 				F7D154271E2392A300202FD9 /* Nextcloud-Bridging-Header.h */,
 			);
 			);
 			name = "Supporting Files";
 			name = "Supporting Files";
@@ -2058,6 +2053,7 @@
 				F72D1007210B6882009C96B7 /* NCPushNotificationEncryption.m in Sources */,
 				F72D1007210B6882009C96B7 /* NCPushNotificationEncryption.m in Sources */,
 				F769454222E9F0EE000A798A /* NCShareLinkMenuView.swift in Sources */,
 				F769454222E9F0EE000A798A /* NCShareLinkMenuView.swift in Sources */,
 				F785EE9D246196DF00B3F945 /* NCNetworkingE2EE.swift in Sources */,
 				F785EE9D246196DF00B3F945 /* NCNetworkingE2EE.swift in Sources */,
+				F7509BAA25DFC69C005370D1 /* AppDelegate.swift in Sources */,
 				F77B0E301D118A16002130FE /* CCHud.m in Sources */,
 				F77B0E301D118A16002130FE /* CCHud.m in Sources */,
 				F76673ED22C901F6007ED366 /* FileProviderDomain.swift in Sources */,
 				F76673ED22C901F6007ED366 /* FileProviderDomain.swift in Sources */,
 				F7A321AD1E9E6AD50069AD1B /* CCAdvanced.m in Sources */,
 				F7A321AD1E9E6AD50069AD1B /* CCAdvanced.m in Sources */,
@@ -2085,7 +2081,6 @@
 				F70BFC7420E0FA7D00C67599 /* NCUtility.swift in Sources */,
 				F70BFC7420E0FA7D00C67599 /* NCUtility.swift in Sources */,
 				F7C1EEA525053A9C00866ACC /* NCDataSource.swift in Sources */,
 				F7C1EEA525053A9C00866ACC /* NCDataSource.swift in Sources */,
 				F713FF002472764100214AF6 /* UIImage+animatedGIF.m in Sources */,
 				F713FF002472764100214AF6 /* UIImage+animatedGIF.m in Sources */,
-				F7B174C822FAC0A8000B7579 /* AppDelegate.m in Sources */,
 				F7A0D1462592256F008F8A13 /* UIImageView+Extensions.swift in Sources */,
 				F7A0D1462592256F008F8A13 /* UIImageView+Extensions.swift in Sources */,
 				F749C10B23C4A5340027D966 /* NCIntroCollectionViewCell.swift in Sources */,
 				F749C10B23C4A5340027D966 /* NCIntroCollectionViewCell.swift in Sources */,
 				F718C24E254D507B00C5C256 /* NCViewerImageDetailView.swift in Sources */,
 				F718C24E254D507B00C5C256 /* NCViewerImageDetailView.swift in Sources */,
@@ -2136,7 +2131,6 @@
 				F717402E24F699A5000C87D5 /* NCFavorite.swift in Sources */,
 				F717402E24F699A5000C87D5 /* NCFavorite.swift in Sources */,
 				F74DE14325135B6800917068 /* NCTransfers.swift in Sources */,
 				F74DE14325135B6800917068 /* NCTransfers.swift in Sources */,
 				F755E6462525946C008DAB45 /* NCCollectionViewCommon.swift in Sources */,
 				F755E6462525946C008DAB45 /* NCCollectionViewCommon.swift in Sources */,
-				F77B0ED91D118A16002130FE /* main.m in Sources */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		};

+ 0 - 105
iOSClient/AppDelegate.h

@@ -1,105 +0,0 @@
-//
-//  AppDelegate.h
-//  Nextcloud
-//
-//  Created by Marino Faggiana on 04/09/14.
-//  Copyright (c) 2014 Marino Faggiana. All rights reserved.
-//
-//  Author Marino Faggiana <marino.faggiana@nextcloud.com>
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-
-#import <Foundation/Foundation.h>
-#import <UserNotifications/UserNotifications.h>
-#import <AVKit/AVKit.h>
-#import <BackgroundTasks/BackgroundTasks.h>
-#import <LocalAuthentication/LocalAuthentication.h>
-#import <TOPasscodeViewController/TOPasscodeViewController.h>
-#import "CCLogin.h"
-
-@class NCFiles;
-@class NCFileViewInFolder;
-@class NCRecent;
-@class NCMore;
-@class NCMedia;
-@class NCOffline;
-@class NCTransfers;
-@class NCFavorite;
-@class NCShares;
-@class NCTrash;
-@class NCAppConfigView;
-@class IMImagemeterViewer;
-@class NCNetworkingAutoUpload;
-@class NCDocumentPickerViewController;
-@class FileProviderDomain;
-@class NCViewerVideo;
-
-@interface AppDelegate : UIResponder <UIApplicationDelegate, UNUserNotificationCenterDelegate>
-
-@property (nonatomic, strong) UIWindow *window;
-@property (nonatomic, copy) void (^backgroundSessionCompletionHandler)(void);
-
-// Parameter account
-@property (nonatomic, strong) NSString *account;
-@property (nonatomic, strong) NSString *urlBase;
-@property (nonatomic, strong) NSString *user;
-@property (nonatomic, strong) NSString *userID;
-@property (nonatomic, strong) NSString *password;
-
-@property (nonatomic, retain) NSString *activeServerUrl;
-@property (nonatomic, retain) UIViewController *activeViewController;
-
-@property (nonatomic, retain) NCFiles *activeFiles;
-@property (nonatomic, retain) NCFileViewInFolder *activeFileViewInFolder;
-@property (nonatomic, retain) NCFavorite *activeFavorite;
-@property (nonatomic, retain) NCRecent *activeRecent;
-@property (nonatomic, retain) NCShares *activeShares;
-@property (nonatomic, retain) NCMedia *activeMedia;
-@property (nonatomic, retain) NCTransfers *activeTransfers;
-@property (nonatomic, retain) CCLogin *activeLogin;
-@property (nonatomic, retain) NCLoginWeb *activeLoginWeb;
-@property (nonatomic, retain) NCMore *activeMore;
-@property (nonatomic, retain) NCOffline *activeOffline;
-@property (nonatomic, retain) NCTrash *activeTrash;
-@property (nonatomic, retain) NCAppConfigView *appConfigView;
-@property (nonatomic, retain) IMImagemeterViewer *activeImagemeterView;
-@property (nonatomic, retain) NCViewerVideo *activeViewerVideo;
-
-@property (nonatomic, strong) NSMutableDictionary *listFilesVC;
-@property (nonatomic, strong) NSMutableDictionary *listFavoriteVC;
-@property (nonatomic, strong) NSMutableDictionary *listOfflineVC;
-@property (nonatomic, strong) NSMutableDictionary *listProgressMetadata;
-
-@property (nonatomic, strong) NSTimer *timerErrorNetworking;
-@property (nonatomic, strong) NCDocumentPickerViewController *documentPickerViewController;
-@property (nonatomic) UIUserInterfaceStyle preferredUserInterfaceStyle API_AVAILABLE(ios(12.0));
-@property (nonatomic, strong) NSArray *shares;
-@property BOOL disableSharesView;
-@property (nonatomic, strong) NSUserDefaults *ncUserDefaults;
-@property (nonatomic, strong) NCNetworkingAutoUpload *networkingAutoUpload;
-@property (nonatomic, retain) TOPasscodeViewController *passcodeViewController;
-
-@property (nonatomic, strong) NSMutableArray *pasteboardOcIds;
-
-// Login
-- (void)startTimerErrorNetworking;
-- (void)openLoginView:(UIViewController *)viewController selector:(NSInteger)selector openLoginWeb:(BOOL)openLoginWeb;
-
-// Setting Account & Communication
-- (void)settingAccount:(NSString *)account urlBase:(NSString *)urlBase user:(NSString *)user userID:(NSString *)userID password:(NSString *)password;
-- (void)deleteAccount:(NSString *)account wipe:(BOOL)wipe;
-
-@end
-

+ 0 - 821
iOSClient/AppDelegate.m

@@ -1,821 +0,0 @@
-//
-//  AppDelegate.m
-//  Nextcloud
-//
-//  Created by Marino Faggiana on 04/09/14.
-//  Copyright (c) 2014 Marino Faggiana. All rights reserved.
-//
-//  Author Marino Faggiana <marino.faggiana@nextcloud.com>
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-
-#import "AppDelegate.h"
-#import "NCBridgeSwift.h"
-#import "NSNotificationCenter+MainThread.h"
-#import "NCPushNotification.h"
-#import <QuartzCore/QuartzCore.h>
-
-@import Firebase;
-
-@class NCViewerRichdocument;
-@class NCSettingsBundleHelper;
-
-@interface AppDelegate() <TOPasscodeViewControllerDelegate>
-@end
-
-@implementation AppDelegate
-
-+ (void)initialize
-{
-    [[NSUserDefaults standardUserDefaults] registerDefaults:@{@"UserAgent": [CCUtility getUserAgent]}];
-}
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
-{
-    BOOL isSimulatorOrTestFlight = [[NCUtility shared] isSimulatorOrTestFlight];
-    
-    if (![CCUtility getDisableCrashservice] && NCBrandOptions.shared.disable_crash_service == false) {
-        [FIRApp configure];
-    }
-    
-    [CCUtility createDirectoryStandard];
-    [CCUtility emptyTemporaryDirectory];
-    
-    // Networking
-    [[NCCommunicationCommon shared] setupWithDelegate:[NCNetworking shared]];
-    [[NCCommunicationCommon shared] setupWithUserAgent:[CCUtility getUserAgent]];
-    
-    // LOG
-    NSInteger levelLog = [CCUtility getLogLevel];
-    [[NCCommunicationCommon shared] setLevelLog:levelLog];
-    
-    NSString *pathDirectoryGroup = [[CCUtility getDirectoryGroup] path];
-    [[NCCommunicationCommon shared] setPathLog: pathDirectoryGroup];
-            
-    [[NCCommunicationCommon shared] setCopyLogToDocumentDirectory: true];
-    
-    NSString *versionNextcloudiOS = [NSString stringWithFormat:[NCBrandOptions shared].textCopyrightNextcloudiOS, NCUtility.shared.getVersionApp];
-    if (isSimulatorOrTestFlight) {
-        [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Start session with level %lu %@ (Simulator / TestFlight)", (unsigned long)levelLog, versionNextcloudiOS]];
-    } else {
-        [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Start session with level %lu %@", (unsigned long)levelLog, versionNextcloudiOS]];
-    }
-    
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(initializeMain:) name:NCBrandGlobal.shared.notificationCenterInitializeMain object:nil];
-    
-    // Set account, if no exists clear all
-    tableAccount *tableAccount = [[NCManageDatabase shared] getAccountActive];
-    if (tableAccount == nil) {
-        // remove all the keys Chain
-        [CCUtility deleteAllChainStore];
-        // remove all the App group key
-        [[NSUserDefaults standardUserDefaults] removePersistentDomainForName:[[NSBundle mainBundle] bundleIdentifier]];
-    } else {
-        // FIX 3.0.5 lost urlbase
-        if (tableAccount.urlBase.length == 0) {
-            NSString *user = [tableAccount.user stringByAppendingString:@" "];
-            NSString *urlBase = [tableAccount.account stringByReplacingOccurrencesOfString:user withString:@""];
-            tableAccount.urlBase = urlBase;
-            [[NCManageDatabase shared] updateAccount:tableAccount];
-            
-            tableAccount = [[NCManageDatabase shared] getAccountActive];
-        }
-        [self settingAccount:tableAccount.account urlBase:tableAccount.urlBase user:tableAccount.user userID:tableAccount.userID password:[CCUtility getPassword:tableAccount.account]];
-    }
-    
-    // UserDefaults
-    self.ncUserDefaults = [[NSUserDefaults alloc] initWithSuiteName:[NCBrandOptions shared].capabilitiesGroups];
-        
-    self.listProgressMetadata = [NSMutableDictionary new];
-    self.listFilesVC = [NSMutableDictionary new];
-    self.listFavoriteVC = [NSMutableDictionary new];
-    self.listOfflineVC = [NSMutableDictionary new];
-    
-    self.pasteboardOcIds = [NSMutableArray new];
-
-    // Push Notification
-    [application registerForRemoteNotifications];
-    
-    // Display notification
-    [UNUserNotificationCenter currentNotificationCenter].delegate = self;
-    UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge;
-    [[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions:authOptions completionHandler:^(BOOL granted, NSError * _Nullable error) { }];
-    
-    //AV Session
-    [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error:nil];
-    [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
-    
-    // Start Timer
-    [self startTimerErrorNetworking];
-
-    // Store review
-    if ([[NCUtility shared] isSimulatorOrTestFlight] == false) {
-        NCStoreReview *review = [NCStoreReview new];
-        [review incrementAppRuns];
-        [review showStoreReview];
-    }
-    
-    // Detect Dark mode
-    if (@available(iOS 13.0, *)) {
-        if ([CCUtility getDarkModeDetect]) {
-            if ([[UITraitCollection currentTraitCollection] userInterfaceStyle] == UIUserInterfaceStyleDark) {
-                [CCUtility setDarkMode:YES];
-            } else {
-                [CCUtility setDarkMode:NO];
-            }
-        }
-    }
-        
-    if ([NCBrandOptions shared].disable_intro) {
-        [CCUtility setIntro:YES];
-        
-        if (self.account == nil || self.account.length == 0) {
-            [self openLoginView:nil selector:NCBrandGlobal.shared.introLogin openLoginWeb:false];
-        }
-        
-    } else {
-        
-        if ([CCUtility getIntro] == NO) {
-            UIViewController *introViewController = [[UIStoryboard storyboardWithName:@"NCIntro" bundle:[NSBundle mainBundle]] instantiateInitialViewController];
-            
-            UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController: introViewController];
-            self.window.rootViewController = navController;
-            [self.window makeKeyAndVisible];
-        }
-    }
-
-    // init home
-    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:NCBrandGlobal.shared.notificationCenterInitializeMain object:nil userInfo:nil];
-
-    // Passcode
-    dispatch_async(dispatch_get_main_queue(), ^{
-        [self passcodeWithAutomaticallyPromptForBiometricValidation:true];
-    });
-    
-    // Auto upload
-    self.networkingAutoUpload = [NCNetworkingAutoUpload new];
-    
-    // Background task: register
-    if (@available(iOS 13.0, *)) {
-        [[BGTaskScheduler sharedScheduler] registerForTaskWithIdentifier:NCBrandGlobal.shared.refreshTask usingQueue:nil launchHandler:^(BGTask *task) {
-            [self handleRefreshTask:task];
-        }];
-        [[BGTaskScheduler sharedScheduler] registerForTaskWithIdentifier:NCBrandGlobal.shared.processingTask usingQueue:nil launchHandler:^(BGTask *task) {
-            [self handleProcessingTask:task];
-        }];
-    } else {
-        // Background Fetch
-        [application setMinimumBackgroundFetchInterval:UIApplicationBackgroundFetchIntervalMinimum];
-    }
-    
-    return YES;
-}
-
-//
-// L' applicazione si dimetterà dallo stato di attivo
-//
-- (void)applicationWillResignActive:(UIApplication *)application
-{
-    if (self.account == nil || self.account.length == 0) { return; }
-    
-    // Dismiss FileViewInFolder
-    if (self.activeFileViewInFolder != nil ) {
-        [self.activeFileViewInFolder dismissViewControllerAnimated:false completion:^{
-            self.activeFileViewInFolder = nil;
-        }];
-    }
-}
-
-//
-// L' applicazione entrerà in primo piano (attivo solo dopo il background)
-//
-- (void)applicationWillEnterForeground:(UIApplication *)application
-{
-    if (self.account == nil || self.account.length == 0) { return; }
-    
-    [[NCCommunicationCommon shared] writeLog:@"Application will enter in foreground"];
-    
-    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:NCBrandGlobal.shared.notificationCenterApplicationWillEnterForeground object:nil];
-    
-    // Request Passcode
-    [self passcodeWithAutomaticallyPromptForBiometricValidation:true];
-    
-    // Initialize Auto upload
-    [[NCAutoUpload shared] initAutoUploadWithViewController:nil completion:^(NSInteger items) { }];
-    
-    // Read active directory
-    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:NCBrandGlobal.shared.notificationCenterReloadDataSourceNetworkForced object:nil];
-    
-    // Required unsubscribing / subscribing
-    [[NCPushNotification shared] pushNotification];
-    
-    // RichDocument
-    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:NCBrandGlobal.shared.notificationCenterRichdocumentGrabFocus object:nil];
-    
-    // Request Service Server Nextcloud
-    [[NCService shared] startRequestServicesServer];
-}
-
-//
-// L' applicazione entrerà in primo piano (attivo sempre)
-//
-- (void)applicationDidBecomeActive:(UIApplication *)application
-{
-    [NCSettingsBundleHelper setVersionAndBuildNumber];
-
-    if (self.account == nil || self.account.length == 0) { return; }
-        
-    // Brand
-    #if defined(HC)
-    tableAccount *account = [[NCManageDatabase shared] getAccountActive];
-    if (account.hcIsTrial == true || account.hcTrialExpired == true || account.hcNextGroupExpirationGroupExpired == true) {
-        
-        HCTrial *vc = [[UIStoryboard storyboardWithName:@"HCTrial" bundle:nil] instantiateInitialViewController];
-        vc.account = account;
-        
-        [self.window.rootViewController presentViewController:vc animated:YES completion:nil];
-    }
-    #endif
-    
-    [[NCNetworking shared] verifyUploadZombie];
-}
-
-//
-// L' applicazione è entrata nello sfondo
-//
-- (void)applicationDidEnterBackground:(UIApplication *)application
-{
-    if (self.account == nil || self.account.length == 0) { return; }
-
-    [[NCCommunicationCommon shared] writeLog:@"Application did enter in background"];
-
-    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:NCBrandGlobal.shared.notificationCenterApplicationDidEnterBackground object:nil];
-    
-    [self passcodeWithAutomaticallyPromptForBiometricValidation:false];
-    
-    if (@available(iOS 13.0, *)) {
-        [self scheduleAppRefresh];
-        [self scheduleBackgroundProcessing];
-    }
-}
-
-//
-// L'applicazione terminerà
-//
-- (void)applicationWillTerminate:(UIApplication *)application
-{
-    [[NCCommunicationCommon shared] writeLog:@"bye bye"];
-}
-
-// NotificationCenter
-- (void)initializeMain:(NSNotification *)notification
-{
-    if (self.account == nil || self.account.length == 0) { return; }
-    
-    // Clear error certificate
-    [CCUtility setCertificateError:self.account error:NO];
-    
-    // Setting Theming
-    [[NCBrandColor shared] settingThemingColorWithAccount:self.account];
-    
-    // close detail
-    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:NCBrandGlobal.shared.notificationCenterMenuDetailClose object:nil];
-    
-    // Start Auto Upload
-    [[NCAutoUpload shared] initAutoUploadWithViewController:nil completion:^(NSInteger items) { }];
-    
-    // Start services
-    [[NCService shared] startRequestServicesServer];
-    
-    // Registeration push notification
-    [[NCPushNotification shared] pushNotification];
-    
-    // Registeration domain File Provider
-    //FileProviderDomain *fileProviderDomain = [FileProviderDomain new];
-    //[fileProviderDomain removeAllDomains];
-    //[fileProviderDomain registerDomains];
-    
-    [[NCCommunicationCommon shared] writeLog:@"initialize Main"];
-}
-
-#pragma mark Login / checkErrorNetworking
-
-- (void)checkErrorNetworking
-{
-    if (self.account == nil || self.account.length == 0) { return; }
-    
-    // check unauthorized server (401)
-    if ([CCUtility getPassword:self.account].length == 0) {
-        
-        [self openLoginView:self.window.rootViewController selector:NCBrandGlobal.shared.introLogin openLoginWeb:true];
-    }
-    
-    // check certificate untrusted (-1202)
-    if ([CCUtility getCertificateError:self.account]) {
-        
-        UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_ssl_certificate_untrusted_", nil) message:NSLocalizedString(@"_connect_server_anyway_", nil)  preferredStyle:UIAlertControllerStyleAlert];
-        [alertController addAction: [UIAlertAction actionWithTitle:NSLocalizedString(@"_yes_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
-            [[NCNetworking shared] wrtiteCertificateWithDirectoryCertificate:[CCUtility getDirectoryCerificates]];
-            [self startTimerErrorNetworking];
-        }]];
-                       
-        [alertController addAction: [UIAlertAction actionWithTitle:NSLocalizedString(@"_no_", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-            [self startTimerErrorNetworking];
-        }]];
-        [self.window.rootViewController presentViewController:alertController animated:YES completion:^{
-            // Stop timer error network
-            [self.timerErrorNetworking invalidate];
-        }];
-    }
-}
-
-- (void)openLoginView:(UIViewController *)viewController selector:(NSInteger)selector openLoginWeb:(BOOL)openLoginWeb
-{
-    // use appConfig [MDM]
-    if ([NCBrandOptions shared].use_configuration) {
-        
-        if (!(_appConfigView.isViewLoaded && _appConfigView.view.window)) {
-        
-            self.appConfigView = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"NCAppConfigView"];
-            
-            [self showLoginViewController:self.appConfigView forContext:viewController];
-        }
-    
-        return;
-    }
-    
-    // only for personalized LoginWeb [customer]
-    if ([NCBrandOptions shared].use_login_web_personalized) {
-        
-        if (!(_activeLoginWeb.isViewLoaded && _activeLoginWeb.view.window)) {
-            
-            self.activeLoginWeb = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"NCLoginWeb"];
-            self.activeLoginWeb.urlBase = [[NCBrandOptions shared] loginBaseUrl];
-
-            [self showLoginViewController:self.activeLoginWeb forContext:viewController];
-        }
-        
-        return;
-    }
-    
-    // normal login
-    if (selector == NCBrandGlobal.shared.introSignup) {
-        
-        if (!(_activeLoginWeb.isViewLoaded && _activeLoginWeb.view.window)) {
-            
-            self.activeLoginWeb = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"NCLoginWeb"];
-            
-            if (selector == NCBrandGlobal.shared.introSignup) {
-                self.activeLoginWeb.urlBase = [[NCBrandOptions shared] linkloginPreferredProviders];
-            } else {
-                self.activeLoginWeb.urlBase = self.urlBase;
-            }
-            
-           [self showLoginViewController:self.activeLoginWeb forContext:viewController];
-        }
-        
-    } else if ([NCBrandOptions shared].disable_intro && [NCBrandOptions shared].disable_request_login_url) {
-        
-        self.activeLoginWeb = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"NCLoginWeb"];
-        self.activeLoginWeb.urlBase = [[NCBrandOptions shared] loginBaseUrl];
-        
-        [self showLoginViewController:self.activeLoginWeb forContext:viewController];
-        
-    } else if (openLoginWeb) {
-        
-        if (!(_activeLoginWeb.isViewLoaded && _activeLoginWeb.view.window)) {
-            self.activeLoginWeb = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"NCLoginWeb"];
-            self.activeLoginWeb.urlBase = self.urlBase;
-
-            [self showLoginViewController:self.activeLoginWeb forContext:viewController];
-        }
-        
-    } else {
-        
-        if (!(_activeLogin.isViewLoaded && _activeLogin.view.window)) {
-            
-            _activeLogin = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"CCLoginNextcloud"];
-            
-            [self showLoginViewController:_activeLogin forContext:viewController];
-        }
-    }
-}
-
--(void)showLoginViewController:(UIViewController *)viewController forContext:(UIViewController *)contextViewController
-{
-    if (contextViewController == NULL) {
-        
-        UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
-        navigationController.navigationBar.barStyle =  UIBarStyleBlack;
-        navigationController.navigationBar.tintColor = NCBrandColor.shared.customerText;
-        navigationController.navigationBar.barTintColor = NCBrandColor.shared.customer;
-        [navigationController.navigationBar setTranslucent:false];
-        self.window.rootViewController = navigationController;
-        
-        [self.window makeKeyAndVisible];
-        
-    } else if ([contextViewController isKindOfClass:[UINavigationController class]]) {
-        
-        UINavigationController *navigationController = ((UINavigationController *)contextViewController);
-        [navigationController pushViewController:viewController animated:true];
-        
-    } else {
-        
-        UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
-        navigationController.modalPresentationStyle = UIModalPresentationFullScreen;
-        navigationController.navigationBar.barStyle =  UIBarStyleBlack;
-        navigationController.navigationBar.tintColor = NCBrandColor.shared.customerText;
-        navigationController.navigationBar.barTintColor = NCBrandColor.shared.customer;
-        [navigationController.navigationBar setTranslucent:false];
-        
-        [contextViewController presentViewController:navigationController animated:true completion:nil];
-    }
-}
-
-- (void)startTimerErrorNetworking
-{
-    self.timerErrorNetworking = [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(checkErrorNetworking) userInfo:nil repeats:YES];
-}
-
-#pragma mark Account & Communication
-
-- (void)settingAccount:(NSString *)account urlBase:(NSString *)urlBase user:(NSString *)user userID:(NSString *)userID password:(NSString *)password
-{
-    self.account = account;
-    self.urlBase = urlBase;
-    self.user = user;
-    self.userID = userID;
-    self.password = password;
-
-    (void)[NCNetworkingNotificationCenter shared];
-
-    [[NCCommunicationCommon shared] setupWithAccount:account user:user userId:userID password:password urlBase:urlBase];
-    
-    NSInteger serverVersionMajor = [[NCManageDatabase shared] getCapabilitiesServerIntWithAccount:account elements:NCElementsJSON.shared.capabilitiesVersionMajor];
-    if (serverVersionMajor > 0) {
-        [[NCCommunicationCommon shared] setupWithNextcloudVersion:serverVersionMajor];
-    }
-    
-    [[NCCommunicationCommon shared] setupWithWebDav:[[NCUtilityFileSystem shared] getWebDAVWithAccount:account]];
-    [[NCCommunicationCommon shared] setupWithDav:[[NCUtilityFileSystem shared] getDAV]];
-}
-
-- (void)deleteAccount:(NSString *)account wipe:(BOOL)wipe
-{
-    // Push Notification
-    tableAccount *accountPN = [[NCManageDatabase shared] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
-    [[NCPushNotification shared] unsubscribingNextcloudServerPushNotification:accountPN.account urlBase:accountPN.urlBase user:accountPN.user withSubscribing:false];
-
-    [self settingAccount:nil urlBase:nil user:nil userID:nil password:nil];
-    
-    /* DELETE ALL FILES LOCAL FS */
-    NSArray *results = [[NCManageDatabase shared] getTableLocalFilesWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account] sorted:@"ocId" ascending:NO];
-    for (tableLocalFile *result in results) {
-        [CCUtility removeFileAtPath:[CCUtility getDirectoryProviderStorageOcId:result.ocId]];
-    }
-    // Clear database
-    [[NCManageDatabase shared] clearDatabaseWithAccount:account removeAccount:true];
-
-    [CCUtility clearAllKeysEndToEnd:account];
-    [CCUtility clearAllKeysPushNotification:account];
-    [CCUtility setCertificateError:account error:false];
-    [CCUtility setPassword:account password:nil];
-       
-    if (wipe) {
-        NSArray *listAccount = [[NCManageDatabase shared] getAccounts];
-        if ([listAccount count] > 0) {
-            NSString *newAccount = listAccount[0];
-            tableAccount *tableAccount = [[NCManageDatabase shared] setAccountActive:newAccount];
-            [self settingAccount:newAccount urlBase:tableAccount.urlBase user:tableAccount.user userID:tableAccount.userID password:[CCUtility getPassword:tableAccount.account]];
-            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:NCBrandGlobal.shared.notificationCenterInitializeMain object:nil userInfo:nil];
-        } else {
-            [self openLoginView:self.window.rootViewController selector:NCBrandGlobal.shared.introLogin openLoginWeb:false];
-        }
-    }
-}
-
-#pragma mark Push Notifications
-
--(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
-{
-    completionHandler(UNNotificationPresentationOptionAlert);
-}
-
--(void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(nonnull UNNotificationResponse *)response withCompletionHandler:(nonnull void (^)(void))completionHandler
-{
-    completionHandler();
-}
-
-- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
-{
-    [[NCPushNotification shared] registerForRemoteNotificationsWithDeviceToken:deviceToken];
-}
-
-- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
-{
-    [[NCPushNotification shared] applicationdidReceiveRemoteNotification:userInfo fetchCompletionHandler:^(UIBackgroundFetchResult result) {
-        completionHandler(result);
-    }];
-}
-
-#pragma mark Background Task
-
--(void)scheduleAppRefresh API_AVAILABLE(ios(13.0))
-{
-    NSError *error = NULL;
-    BGAppRefreshTaskRequest *request = [[BGAppRefreshTaskRequest alloc] initWithIdentifier:NCBrandGlobal.shared.refreshTask];
-    request.earliestBeginDate = [NSDate dateWithTimeIntervalSinceNow:5*60]; // after 5 minutes
-    BOOL success = [[BGTaskScheduler sharedScheduler] submitTaskRequest:request error:&error];
-    if (success) {
-        [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Refresh task success submit request %@", request]];
-    } else {
-        [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Refresh task failed to submit request: %@", error]];
-    }
-}
-
--(void)scheduleBackgroundProcessing API_AVAILABLE(ios(13.0))
-{
-    NSError *error = NULL;
-    BGProcessingTaskRequest *request = [[BGProcessingTaskRequest alloc] initWithIdentifier:NCBrandGlobal.shared.processingTask];
-    request.earliestBeginDate = [NSDate dateWithTimeIntervalSinceNow:5*60]; // after 5 minutes
-    request.requiresNetworkConnectivity = YES;
-    request.requiresExternalPower = NO;
-    BOOL success = [[BGTaskScheduler sharedScheduler] submitTaskRequest:request error:&error];
-    if (success) {
-        [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Background Processing task success submit request %@", request]];
-    } else {
-        [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Background Processing task failed to submit request: %@", error]];
-    }
-}
-
--(void)handleRefreshTask:(BGTask *)task API_AVAILABLE(ios(13.0))
-{
-    if (self.account == nil || self.account.length == 0) {
-        [task setTaskCompletedWithSuccess:true];
-        return;
-    }
-    
-    [[NCCommunicationCommon shared] writeLog:@"Start handler refresh task [Auto upload]"];
-    
-    [[NCAutoUpload shared] initAutoUploadWithViewController:nil completion:^(NSInteger items) {
-        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
-            [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Completition handler refresh task with %lu uploads [Auto upload]", (unsigned long)items]];
-            [task setTaskCompletedWithSuccess:true];
-        });
-    }];
-}
-
--(void)handleProcessingTask:(BGTask *)task API_AVAILABLE(ios(13.0))
-{
-    if (self.account == nil || self.account.length == 0) {
-        [task setTaskCompletedWithSuccess:true];
-        return;
-    }
-    
-    [[NCCommunicationCommon shared] writeLog:@"Start handler processing task [Synchronize Favorite & Offline]"];
-    
-    [[NCNetworking shared] listingFavoritescompletionWithSelector:NCBrandGlobal.shared.selectorReadFile completion:^(NSString *account, NSArray<tableMetadata *> *metadatas, NSInteger errorCode, NSString * errorDescription) {
-        [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Completition listing favorite with error %lu", (unsigned long)errorCode]];
-    }];
-    
-    [[NCService shared] synchronizeOfflineWithAccount:self.account];
-    
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 25 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
-        [[NCCommunicationCommon shared] writeLog:@"Completition handler processing task [Synchronize Favorite & Offline]"];
-        [task setTaskCompletedWithSuccess:true];
-    });
-}
-
-#pragma mark Fetch
-
-- (void)application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
-{
-    if (@available(iOS 13.0, *)) {
-        
-        [[NCCommunicationCommon shared] writeLog:@"Start perform Fetch on iOS >= 13 denied"];
-        
-    } else {
-        
-        if (self.account == nil || self.account.length == 0) {
-            completionHandler(UIBackgroundFetchResultNoData);
-            return;
-        }
-        
-        [[NCCommunicationCommon shared] writeLog:@"Start perform Fetch [Auto upload]"];
-        
-        [[NCAutoUpload shared] initAutoUploadWithViewController:nil completion:^(NSInteger items) {
-            [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Completition perform Fetch with %lu uploads [Auto upload]", (unsigned long)items]];
-            if (items == 0) {
-                completionHandler(UIBackgroundFetchResultNoData);
-            } else {
-                completionHandler(UIBackgroundFetchResultNewData);
-            }
-        }];
-    }
-}
-
-#pragma mark Operation Networking & Session
-
-//
-// Method called by the system when all the background task has end
-//
-- (void)application:(UIApplication *)application handleEventsForBackgroundURLSession:(NSString *)identifier completionHandler:(void (^)(void))completionHandler
-{
-    [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Start handle Events For Background URLSession: %@", identifier]];
-        
-    self.backgroundSessionCompletionHandler = completionHandler;
-}
-
-#pragma mark OpenURL
-
-- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options
-{
-    if (self.account == nil || self.account.length == 0) { return YES; }
-    
-    NSString *scheme = url.scheme;
-    NSString *fileName;
-    NSString *serverUrl;
-
-    if ([scheme isEqualToString:@"nextcloud"]) {
-                
-        NSString *action = url.host;
-        if ([action isEqualToString:@"open-file"]) {
-            NSURLComponents *urlComponents = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO];
-            NSArray *queryItems = urlComponents.queryItems;
-            NSString *user = [CCUtility valueForKey:@"user" fromQueryItems:queryItems];
-            NSString *path = [CCUtility valueForKey:@"path" fromQueryItems:queryItems];
-            NSString *link = [CCUtility valueForKey:@"link" fromQueryItems:queryItems];
-            tableAccount *matchedAccount = nil;
-
-            // verify parameter
-            if (user.length == 0 || path.length == 0 || [[NSURL URLWithString:link] host].length == 0) {
-                
-                UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_error_", nil) message:NSLocalizedString(@"_error_parameter_schema_", nil) preferredStyle:UIAlertControllerStyleAlert];
-                UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {}];
-                
-                [alertController addAction:okAction];
-                [self.window.rootViewController presentViewController:alertController animated:YES completion:nil];
-                
-            } else {
-            
-                tableAccount *account = [[NCManageDatabase shared] getAccountActive];
-                if (account) {
-                    NSURL *accountURL = [NSURL URLWithString:account.urlBase];
-                    NSString *accountUser = account.user;
-                    if ([link containsString:accountURL.host] && [user isEqualToString:accountUser]) {
-                        matchedAccount = account;
-                    } else {
-                        NSArray *accounts = [[NCManageDatabase shared] getAllAccount];
-                        for (tableAccount *account in accounts) {
-                            NSURL *accountURL = [NSURL URLWithString:account.urlBase];
-                            NSString *accountUser = account.user;
-                            if ([link containsString:accountURL.host] && [user isEqualToString:accountUser]) {
-                                matchedAccount = [[NCManageDatabase shared] setAccountActive:account.account];
-                                [self settingAccount:matchedAccount.account urlBase:matchedAccount.urlBase user:matchedAccount.user userID:matchedAccount.userID password:[CCUtility getPassword:matchedAccount.account]];
-                                [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:NCBrandGlobal.shared.notificationCenterInitializeMain object:nil userInfo:nil];
-                            }
-                        }
-                    }
-                    
-                    if (matchedAccount) {
-                        
-                        NSString *webDAV = [[NCUtilityFileSystem shared] getWebDAVWithAccount:self.account];
-
-                        if ([path containsString:@"/"]) {
-
-                            fileName = [path lastPathComponent];
-                            serverUrl = [NSString stringWithFormat:@"%@/%@/%@", matchedAccount.urlBase, webDAV, [path stringByDeletingLastPathComponent]];
-                            
-                        } else {
-                            
-                            fileName = path;
-                            serverUrl = [NSString stringWithFormat:@"%@/%@", matchedAccount.urlBase, webDAV];
-                        }
-                        
-                        [[NCCollectionCommon shared] openFileViewInFolderWithServerUrl:serverUrl fileName:fileName];
-                   
-                    } else {
-                        
-                        NSString *domain = [[NSURL URLWithString:link] host];
-                        NSString *fileName = [path lastPathComponent];
-                        NSString *message = [NSString stringWithFormat:NSLocalizedString(@"_account_not_available_", nil), user, domain, fileName];
-                        
-                        UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_info_", nil) message:message preferredStyle:UIAlertControllerStyleAlert];
-                        UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {}];
-                        
-                        [alertController addAction:okAction];
-                        [self.window.rootViewController presentViewController:alertController animated:YES completion:nil];
-                    }
-                }
-            }
-        }
-        return YES;
-    }
-    
-    return YES;
-}
-
-#pragma mark Passcode + Delegate
-
-- (void)passcodeWithAutomaticallyPromptForBiometricValidation:(BOOL)automaticallyPromptForBiometricValidation
-{
-    LAContext *laContext = [LAContext new];
-    NSError *error;
-    BOOL isBiometryAvailable = false;
-    
-    if ([[CCUtility getPasscode] length] == 0 || [self.account length] == 0 || [CCUtility getNotPasscodeAtStart]) return;
-    
-    if (self.passcodeViewController == nil) {
-           
-        self.passcodeViewController = [[TOPasscodeViewController alloc] initWithStyle:TOPasscodeViewStyleTranslucentLight passcodeType:TOPasscodeTypeSixDigits];
-        if (@available(iOS 13.0, *)) {
-            if ([[UITraitCollection currentTraitCollection] userInterfaceStyle] == UIUserInterfaceStyleDark) {
-                self.passcodeViewController.style = TOPasscodeViewStyleTranslucentDark;
-            }
-        }
-
-        self.passcodeViewController.delegate = self;
-        self.passcodeViewController.keypadButtonShowLettering = false;
-        
-        if (CCUtility.getEnableTouchFaceID && [laContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) {
-            if (error == NULL) {
-                if (laContext.biometryType == LABiometryTypeFaceID) {
-                    self.passcodeViewController.biometryType = TOPasscodeBiometryTypeFaceID;
-                    self.passcodeViewController.allowBiometricValidation = true;
-                    isBiometryAvailable = true;
-                } else if (laContext.biometryType == LABiometryTypeTouchID) {
-                    self.passcodeViewController.biometryType = TOPasscodeBiometryTypeTouchID;
-                    self.passcodeViewController.allowBiometricValidation = true;
-                    isBiometryAvailable = true;
-                } else {
-                    isBiometryAvailable = false;
-                    NSLog(@"No Biometric support");
-                }
-            }
-        }
-    
-        [self.window.rootViewController presentViewController:self.passcodeViewController animated:YES completion:^{
-            [self enableTouchFaceID:automaticallyPromptForBiometricValidation];
-        }];
-        
-    } else {
-    
-        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
-            [self enableTouchFaceID:automaticallyPromptForBiometricValidation];
-        });
-    }
-}
-
-- (void)didInputCorrectPasscodeInPasscodeViewController:(TOPasscodeViewController *)passcodeViewController
-{
-    [passcodeViewController dismissViewControllerAnimated:YES completion:^{
-        self.passcodeViewController = nil;
-    }];
-}
-
-- (BOOL)passcodeViewController:(TOPasscodeViewController *)passcodeViewController isCorrectCode:(NSString *)code
-{
-    return [code isEqualToString:[CCUtility getPasscode]];
-}
-
-- (void)didPerformBiometricValidationRequestInPasscodeViewController:(TOPasscodeViewController *)passcodeViewController
-{
-    [[LAContext new] evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:[[NCBrandOptions shared] brand] reply:^(BOOL success, NSError * _Nullable error) {
-        if (success) {
-            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
-                [passcodeViewController dismissViewControllerAnimated:YES completion:^{
-                    self.passcodeViewController = nil;
-                }];
-            });
-        }
-    }];
-}
-
-- (void)enableTouchFaceID:(BOOL)automaticallyPromptForBiometricValidation
-{
-    if (CCUtility.getEnableTouchFaceID && automaticallyPromptForBiometricValidation && self.passcodeViewController.view.window) {
-        [[LAContext new] evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:[[NCBrandOptions shared] brand] reply:^(BOOL success, NSError * _Nullable error) {
-            if (success) {
-                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
-                    [self.passcodeViewController dismissViewControllerAnimated:YES completion:^{
-                        self.passcodeViewController = nil;
-                    }];
-                });
-            }
-        }];
-    }
-}
-
-@end

+ 110 - 0
iOSClient/AppDelegate.swift

@@ -0,0 +1,110 @@
+//
+//  AppDelegate.swift
+//
+
+import UIKit
+import NCCommunication
+
+@UIApplicationMain
+class AppDelegate: UIResponder, UIApplicationDelegate {
+
+    var window: UIWindow!
+    
+    var account: String = ""
+    var urlBase: String = ""
+    var user: String = ""
+    var userID: String = ""
+    var password: String = ""
+    
+    var activeServerUrl: String = ""
+    
+    var activeFavorite: NCFavorite?
+    var activeFiles: NCFiles?
+    var activeFileViewInFolder: NCFileViewInFolder?
+    var activeLogin: CCLogin?
+    var activeLoginWeb: NCLoginWeb?
+    var activeMedia: NCMedia?
+    var activeMore: NCMore?
+    var activeOffline: NCOffline?
+    var activeRecent: NCRecent?
+    var activeShares: NCShares?
+    var activeTransfers: NCTransfers?
+    var activeTrash: NCTrash?
+    var activeViewController: UIViewController?
+    var activeViewerVideo: NCViewerVideo?
+    
+    var timerErrorNetworking: Timer?
+    var documentPickerViewController: NCDocumentPickerViewController?
+    var shares: [String] = []
+
+    
+    /*
+    //@property (nonatomic) UIUserInterfaceStyle preferredUserInterfaceStyle API_AVAILABLE(ios(12.0));
+    @property (nonatomic, strong) NSArray *shares;
+    @property BOOL disableSharesView;
+    @property (nonatomic, strong) NSUserDefaults *ncUserDefaults;
+    @property (nonatomic, strong) NCNetworkingAutoUpload *networkingAutoUpload;
+    @property (nonatomic, retain) TOPasscodeViewController *passcodeViewController;
+
+    @property (nonatomic, strong) NSMutableArray *pasteboardOcIds;
+*/
+    
+    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
+        // Override point for customization after application launch.
+        return true
+    }
+
+    func applicationWillResignActive(_ application: UIApplication) {
+        // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+        // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+    }
+
+    func applicationDidEnterBackground(_ application: UIApplication) {
+        // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+        // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+    }
+
+    func applicationWillEnterForeground(_ application: UIApplication) {
+        // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+    }
+
+    func applicationDidBecomeActive(_ application: UIApplication) {
+        // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+    }
+
+    func applicationWillTerminate(_ application: UIApplication) {
+        // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+    }
+    
+    // MARK: -
+
+    @objc func checkErrorNetworking() {
+        
+    }
+
+    func startTimerErrorNetworking() {
+        timerErrorNetworking = Timer.scheduledTimer(timeInterval: 3, target: self, selector: #selector(checkErrorNetworking), userInfo: nil, repeats: true)
+    }
+    
+    // MARK: -
+    
+    func settingAccount(_ account: String, urlBase: String, user: String, userID: String, password: String) {
+        
+        self.account = account
+        self.urlBase = urlBase
+        self.user = user
+        self.userID = userID
+        self.password = password
+        
+        _ = NCNetworkingNotificationCenter.shared
+        
+        NCCommunicationCommon.shared.setup(account: account, user: user, userId: userID, password: password, urlBase: urlBase)
+        NCCommunicationCommon.shared.setup(webDav: NCUtilityFileSystem.shared.getWebDAV(account: account))
+        NCCommunicationCommon.shared.setup(dav: NCUtilityFileSystem.shared.getDAV())
+        let serverVersionMajor = NCManageDatabase.shared.getCapabilitiesServerInt(account: account, elements: NCElementsJSON.shared.capabilitiesVersionMajor)
+        if serverVersionMajor > 0 {
+            NCCommunicationCommon.shared.setup(nextcloudVersion: serverVersionMajor)
+        }
+    }
+}
+

+ 1 - 1
iOSClient/Login/NCAppConfigView.swift

@@ -58,7 +58,7 @@ class NCAppConfigView: UIViewController {
         super.viewDidAppear(animated)
         super.viewDidAppear(animated)
         
         
         // Stop timer error network
         // Stop timer error network
-        appDelegate.timerErrorNetworking.invalidate()
+        appDelegate.timerErrorNetworking?.invalidate()
         
         
         guard let serverUrl = self.serverUrl else {
         guard let serverUrl = self.serverUrl else {
             NCContentPresenter.shared.messageNotification("_error_", description: "User Default, serverUrl not found", delay: NCBrandGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, errorCode: NCBrandGlobal.shared.ErrorInternalError, forced: true)
             NCContentPresenter.shared.messageNotification("_error_", description: "User Default, serverUrl not found", delay: NCBrandGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, errorCode: NCBrandGlobal.shared.ErrorInternalError, forced: true)

+ 6 - 2
iOSClient/Main/Create cloud/NCCreateFormUploadDocuments.swift

@@ -333,7 +333,9 @@ import NCCommunication
                         self.dismiss(animated: true, completion: {
                         self.dismiss(animated: true, completion: {
                             let metadata = NCManageDatabase.shared.createMetadata(account: self.appDelegate.account, fileName: fileName, ocId: CCUtility.createRandomString(12), serverUrl: self.serverUrl, urlBase: self.appDelegate.urlBase, url: url ?? "", contentType: results.mimeType, livePhoto: false)
                             let metadata = NCManageDatabase.shared.createMetadata(account: self.appDelegate.account, fileName: fileName, ocId: CCUtility.createRandomString(12), serverUrl: self.serverUrl, urlBase: self.appDelegate.urlBase, url: url ?? "", contentType: results.mimeType, livePhoto: false)
                             
                             
-                            NCViewer.shared.view(viewController: self.appDelegate.activeViewController, metadata: metadata, metadatas: [metadata])
+                            if let viewController = self.appDelegate.activeViewController {
+                                NCViewer.shared.view(viewController: viewController, metadata: metadata, metadatas: [metadata])
+                            }
                         })
                         })
                     }
                     }
                     
                     
@@ -355,7 +357,9 @@ import NCCommunication
                     
                     
                         let metadata = NCManageDatabase.shared.createMetadata(account: self.appDelegate.account, fileName: (fileName as NSString).deletingPathExtension + "." + self.fileNameExtension, ocId: CCUtility.createRandomString(12), serverUrl: self.serverUrl, urlBase: self.appDelegate.urlBase, url: url!, contentType: "", livePhoto: false)
                         let metadata = NCManageDatabase.shared.createMetadata(account: self.appDelegate.account, fileName: (fileName as NSString).deletingPathExtension + "." + self.fileNameExtension, ocId: CCUtility.createRandomString(12), serverUrl: self.serverUrl, urlBase: self.appDelegate.urlBase, url: url!, contentType: "", livePhoto: false)
                     
                     
-                        NCViewer.shared.view(viewController: self.appDelegate.activeViewController, metadata: metadata, metadatas: [metadata])
+                        if let viewController = self.appDelegate.activeViewController {
+                            NCViewer.shared.view(viewController: viewController, metadata: metadata, metadatas: [metadata])
+                        }
                    })
                    })
                    
                    
                     
                     

+ 19 - 18
iOSClient/Main/Menu/AppDelegate+Menu.swift

@@ -139,29 +139,30 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
             NCMenuAction(title: NSLocalizedString("_create_folder_", comment: ""),
             NCMenuAction(title: NSLocalizedString("_create_folder_", comment: ""),
                 icon: UIImage(named: "folder")!.image(color: NCBrandColor.shared.brandElement, size: 50), action: { menuAction in
                 icon: UIImage(named: "folder")!.image(color: NCBrandColor.shared.brandElement, size: 50), action: { menuAction in
                     
                     
-                     guard let serverUrl = appDelegate.activeServerUrl else { return }
+                    if appDelegate.activeServerUrl == "" { return }
+                     //guard let serverUrl = appDelegate.activeServerUrl else { return }
                     
                     
-                     let alertController = UIAlertController(title: NSLocalizedString("_create_folder_on_", comment: ""), message: nil, preferredStyle: .alert)
+                    let alertController = UIAlertController(title: NSLocalizedString("_create_folder_on_", comment: ""), message: nil, preferredStyle: .alert)
                     
                     
-                     alertController.addTextField { (textField) in
-                         textField.autocapitalizationType = UITextAutocapitalizationType.sentences
-                     }
+                    alertController.addTextField { (textField) in
+                        textField.autocapitalizationType = UITextAutocapitalizationType.sentences
+                    }
                     
                     
-                     let cancelAction = UIAlertAction(title: NSLocalizedString("_cancel_", comment: ""), style: .cancel, handler: nil)
-                     let okAction = UIAlertAction(title: NSLocalizedString("_ok_", comment: ""), style: .default, handler: { action in
-                         if let fileNameFolder = alertController.textFields?.first?.text {
-                             NCNetworking.shared.createFolder(fileName: fileNameFolder, serverUrl: serverUrl, account: appDelegate.account, urlBase: appDelegate.urlBase, overwrite: false) { (errorCode, errorDescription) in
-                                 if errorCode != 0 {
-                                    NCContentPresenter.shared.messageNotification("_error_", description: errorDescription, delay: NCBrandGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, errorCode: errorCode)
-                                 }
-                             }
-                         }
-                     })
+                    let cancelAction = UIAlertAction(title: NSLocalizedString("_cancel_", comment: ""), style: .cancel, handler: nil)
+                    let okAction = UIAlertAction(title: NSLocalizedString("_ok_", comment: ""), style: .default, handler: { action in
+                        if let fileNameFolder = alertController.textFields?.first?.text {
+                            NCNetworking.shared.createFolder(fileName: fileNameFolder, serverUrl: appDelegate.activeServerUrl, account: appDelegate.account, urlBase: appDelegate.urlBase, overwrite: false) { (errorCode, errorDescription) in
+                                if errorCode != 0 {
+                                NCContentPresenter.shared.messageNotification("_error_", description: errorDescription, delay: NCBrandGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, errorCode: errorCode)
+                                }
+                            }
+                        }
+                    })
                     
                     
-                     alertController.addAction(cancelAction)
-                     alertController.addAction(okAction)
+                    alertController.addAction(cancelAction)
+                    alertController.addAction(okAction)
 
 
-                     appDelegate.window.rootViewController?.present(alertController, animated: true, completion: nil)
+                    appDelegate.window.rootViewController?.present(alertController, animated: true, completion: nil)
                 }
                 }
             )
             )
         )
         )

+ 1 - 1
iOSClient/Networking/NCService.swift

@@ -74,7 +74,7 @@ class NCService: NSObject {
                     self.synchronizeOffline(account: tableAccount.account)
                     self.synchronizeOffline(account: tableAccount.account)
                     
                     
                     // Get Avatar
                     // Get Avatar
-                    let avatarUrl = "\(self.appDelegate.urlBase!)/index.php/avatar/\(self.appDelegate.user!)/\(NCBrandGlobal.shared.avatarSize)".addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!
+                    let avatarUrl = "\(self.appDelegate.urlBase)/index.php/avatar/\(self.appDelegate.user!)/\(NCBrandGlobal.shared.avatarSize)".addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!
                     let fileNamePath = CCUtility.getDirectoryUserData() + "/" + stringUser + "-" + self.appDelegate.user + ".png"
                     let fileNamePath = CCUtility.getDirectoryUserData() + "/" + stringUser + "-" + self.appDelegate.user + ".png"
                     NCCommunication.shared.downloadContent(serverUrl: avatarUrl) { (account, data, errorCode, errorMessage) in
                     NCCommunication.shared.downloadContent(serverUrl: avatarUrl) { (account, data, errorCode, errorMessage) in
                         
                         

+ 0 - 1
iOSClient/Nextcloud-Bridging-Header.h

@@ -2,7 +2,6 @@
 //  Use this file to import your target's public headers that you would like to expose to Swift.
 //  Use this file to import your target's public headers that you would like to expose to Swift.
 //
 //
 
 
-#import "AppDelegate.h"
 #import "CCManageAccount.h"
 #import "CCManageAccount.h"
 #import "NCEndToEndEncryption.h"
 #import "NCEndToEndEncryption.h"
 #import "NYMnemonic.h"
 #import "NYMnemonic.h"

+ 2 - 2
iOSClient/Viewer/NCViewerVideo/NCViewerVideo.swift

@@ -21,14 +21,14 @@
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //
 //
 
 
-import Foundation
+import UIKit
 
 
 protocol NCViewerVideoDelegate {
 protocol NCViewerVideoDelegate {
     func startPictureInPicture(metadata: tableMetadata)
     func startPictureInPicture(metadata: tableMetadata)
     func stopPictureInPicture(metadata: tableMetadata, playing: Bool)
     func stopPictureInPicture(metadata: tableMetadata, playing: Bool)
 }
 }
 
 
-@objc class NCViewerVideo: AVPlayerViewController {
+class NCViewerVideo: AVPlayerViewController {
     
     
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
     var metadata = tableMetadata()
     var metadata = tableMetadata()

+ 0 - 31
iOSClient/main.m

@@ -1,31 +0,0 @@
-//
-//  main.m
-//  Nextcloud iOS
-//
-//  Created by Marino Faggiana on 25/11/14.
-//  Copyright (c) 2014 Marino Faggiana. All rights reserved.
-//
-//  Author Marino Faggiana <marino.faggiana@nextcloud.com>
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-
-#import <UIKit/UIKit.h>
-#import "AppDelegate.h"
-
-int main(int argc, char * argv[]) {
-    @autoreleasepool {
-        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
-    }
-}