Marino Faggiana 7 жил өмнө
parent
commit
0fd3e71ec2
100 өөрчлөгдсөн 1811 нэмэгдсэн , 1560 устгасан
  1. 1 0
      .gitignore
  2. 207 207
      Libraries external/Realm/Realm.framework/4196F5D9-6B9F-3880-BB5D-042728894111.bcsymbolmap
  3. 207 207
      Libraries external/Realm/Realm.framework/AFB4FFFD-AC83-329A-877B-BF56D5B8DD4C.bcsymbolmap
  4. 11 0
      Libraries external/Realm/Realm.framework/CHANGELOG.md
  5. BIN
      Libraries external/Realm/Realm.framework/Info.plist
  6. BIN
      Libraries external/Realm/Realm.framework/Realm
  7. 0 0
      Libraries external/Realm/RealmSwift.framework/11C55770-670E-33A5-9012-2BE0F98B215F.bcsymbolmap
  8. 207 207
      Libraries external/Realm/RealmSwift.framework/4196F5D9-6B9F-3880-BB5D-042728894111.bcsymbolmap
  9. 0 0
      Libraries external/Realm/RealmSwift.framework/813B928D-F2D0-35F4-8593-B149D596DCA2.bcsymbolmap
  10. 207 207
      Libraries external/Realm/RealmSwift.framework/AFB4FFFD-AC83-329A-877B-BF56D5B8DD4C.bcsymbolmap
  11. BIN
      Libraries external/Realm/RealmSwift.framework/Info.plist
  12. BIN
      Libraries external/Realm/RealmSwift.framework/Modules/RealmSwift.swiftmodule/arm.swiftmodule
  13. BIN
      Libraries external/Realm/RealmSwift.framework/Modules/RealmSwift.swiftmodule/arm64.swiftmodule
  14. BIN
      Libraries external/Realm/RealmSwift.framework/Modules/RealmSwift.swiftmodule/i386.swiftmodule
  15. BIN
      Libraries external/Realm/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftmodule
  16. BIN
      Libraries external/Realm/RealmSwift.framework/RealmSwift
  17. 311 4
      Nextcloud.xcodeproj/project.pbxproj
  18. 114 93
      Picker/DocumentPickerViewController.swift
  19. 1 0
      Picker/Picker-Bridging-Header.h
  20. 1 0
      PickerFileProvider/PickerFileProvider-Bridging-Header.h
  21. 1 0
      Share/Share-Bridging-Header.h
  22. 44 39
      Share/ShareViewController.m
  23. 7 7
      iOSClient/.tx/config
  24. 48 42
      iOSClient/Actions/CCActions.swift
  25. 23 20
      iOSClient/Activity/CCActivity.m
  26. 1 0
      iOSClient/AppDelegate.h
  27. 54 104
      iOSClient/AppDelegate.m
  28. 51 74
      iOSClient/AutoUpload/NCAutoUpload.m
  29. 25 25
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Contents.json
  30. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
  31. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png
  32. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
  33. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
  34. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-29x29@1x-1.png
  35. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
  36. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png
  37. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
  38. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
  39. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
  40. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png
  41. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
  42. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
  43. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png
  44. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png
  45. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
  46. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
  47. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png
  48. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png
  49. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
  50. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
  51. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
  52. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png
  53. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png
  54. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png
  55. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud100@2x.png
  56. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud1024.png
  57. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud114@2x.png
  58. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud120@2x.png
  59. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud120@3x.png
  60. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud144@2x.png
  61. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud152@2x.png
  62. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud167@2x.png
  63. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud180@3x.png
  64. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud20.png
  65. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud29@1x-1.png
  66. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud29@1x.png
  67. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud40@1x-1.png
  68. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud40@1x.png
  69. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud40@2x.png
  70. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud50@1x.png
  71. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud57@1x.png
  72. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud58@2x-1.png
  73. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud58@2x.png
  74. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud60@3x.png
  75. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud72@1x.png
  76. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud76@1x.png
  77. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud80@2x-1.png
  78. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud80@2x.png
  79. BIN
      iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud87@3x.png
  80. 3 3
      iOSClient/Brand/Custom.xcassets/launchscreen.imageset/Contents.json
  81. 0 0
      iOSClient/Brand/Custom.xcassets/launchscreen.imageset/launchscreen.png
  82. 0 0
      iOSClient/Brand/Custom.xcassets/launchscreen.imageset/launchscreen@2x.png
  83. 0 0
      iOSClient/Brand/Custom.xcassets/launchscreen.imageset/launchscreen@3x.png
  84. 2 0
      iOSClient/Brand/Custom.xcassets/themingBackground.imageset/Contents.json
  85. BIN
      iOSClient/Brand/Custom.xcassets/themingBackground.imageset/themingBackground.png
  86. BIN
      iOSClient/Brand/Custom.xcassets/themingBackground.imageset/themingBackground@2x.png
  87. BIN
      iOSClient/Brand/Custom.xcassets/themingBackground.imageset/themingBackground@3x.png
  88. 3 0
      iOSClient/Brand/CustomSwift.h
  89. 4 4
      iOSClient/Brand/LaunchScreen.xib
  90. 23 18
      iOSClient/Brand/NCBrand.swift
  91. 0 0
      iOSClient/Brand/NCBridgeSwift.h
  92. 4 11
      iOSClient/CCGlobal.h
  93. 26 73
      iOSClient/Create/CCCreateCloud.swift
  94. 11 7
      iOSClient/Database/NCDatabase.swift
  95. 134 121
      iOSClient/Database/NCManageDatabase.swift
  96. 80 64
      iOSClient/Favorites/CCFavorites.m
  97. 0 23
      iOSClient/Images.xcassets/actionSheetLocal.imageset/Contents.json
  98. BIN
      iOSClient/Images.xcassets/actionSheetLocal.imageset/actionSheetLocal.png
  99. BIN
      iOSClient/Images.xcassets/actionSheetLocal.imageset/actionSheetLocal@2x.png
  100. BIN
      iOSClient/Images.xcassets/actionSheetLocal.imageset/actionSheetLocal@3x.png

+ 1 - 0
.gitignore

@@ -9,6 +9,7 @@
 
 ## Nextcloud
 .DS_Store
+.github
 *.xcodeproj
 !Nextcloud.xcodeproj
 README.md

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 207 - 207
Libraries external/Realm/Realm.framework/4196F5D9-6B9F-3880-BB5D-042728894111.bcsymbolmap


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 207 - 207
Libraries external/Realm/Realm.framework/AFB4FFFD-AC83-329A-877B-BF56D5B8DD4C.bcsymbolmap


+ 11 - 0
Libraries external/Realm/Realm.framework/CHANGELOG.md

@@ -1,3 +1,14 @@
+3.0.2 Release notes (2017-11-08)
+=============================================================
+
+Prebuilt frameworks are now included for Swift 3.2.2 and 4.0.2.
+
+### Bugfixes
+
+* Fix a crash when a linking objects property is retrieved from a model object instance via
+  Swift subscripting.
+* Fix incorrect behavior if a call to `posix_fallocate` is interrupted.
+
 3.0.1 Release notes (2017-10-26)
 =============================================================
 

BIN
Libraries external/Realm/Realm.framework/Info.plist


BIN
Libraries external/Realm/Realm.framework/Realm


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
Libraries external/Realm/RealmSwift.framework/11C55770-670E-33A5-9012-2BE0F98B215F.bcsymbolmap


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 207 - 207
Libraries external/Realm/RealmSwift.framework/4196F5D9-6B9F-3880-BB5D-042728894111.bcsymbolmap


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
Libraries external/Realm/RealmSwift.framework/813B928D-F2D0-35F4-8593-B149D596DCA2.bcsymbolmap


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 207 - 207
Libraries external/Realm/RealmSwift.framework/AFB4FFFD-AC83-329A-877B-BF56D5B8DD4C.bcsymbolmap


BIN
Libraries external/Realm/RealmSwift.framework/Info.plist


BIN
Libraries external/Realm/RealmSwift.framework/Modules/RealmSwift.swiftmodule/arm.swiftmodule


BIN
Libraries external/Realm/RealmSwift.framework/Modules/RealmSwift.swiftmodule/arm64.swiftmodule


BIN
Libraries external/Realm/RealmSwift.framework/Modules/RealmSwift.swiftmodule/i386.swiftmodule


BIN
Libraries external/Realm/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftmodule


BIN
Libraries external/Realm/RealmSwift.framework/RealmSwift


+ 311 - 4
Nextcloud.xcodeproj/project.pbxproj

@@ -298,6 +298,9 @@
 		F76B3CD01EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
 		F76B3CD11EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
 		F76F23341ED4603700C40023 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = F76F23331ED4603700C40023 /* LaunchScreen.xib */; };
+		F774DF0F1FCC26BE002AF9FC /* iTunesArtwork@1x.png in Resources */ = {isa = PBXBuildFile; fileRef = F774DF0C1FCC26BD002AF9FC /* iTunesArtwork@1x.png */; };
+		F774DF101FCC26BE002AF9FC /* iTunesArtwork@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F774DF0D1FCC26BD002AF9FC /* iTunesArtwork@2x.png */; };
+		F774DF111FCC26BE002AF9FC /* iTunesArtwork@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = F774DF0E1FCC26BE002AF9FC /* iTunesArtwork@3x.png */; };
 		F77B0DF21D118A16002130FE /* CCUploadFromOtherUpp.m in Sources */ = {isa = PBXBuildFile; fileRef = F7956FCA1B4886E60085DEA3 /* CCUploadFromOtherUpp.m */; };
 		F77B0DF41D118A16002130FE /* CCMain.m in Sources */ = {isa = PBXBuildFile; fileRef = F70211FB1BAC56E9003FC03E /* CCMain.m */; };
 		F77B0DF51D118A16002130FE /* CCUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = F7053E3D1C639DF500741EA5 /* CCUtility.m */; };
@@ -597,6 +600,10 @@
 		F7F54D0D1E5B14C800E19C62 /* MWZoomingScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = F7F54CE21E5B14C700E19C62 /* MWZoomingScrollView.m */; };
 		F7F54D0E1E5B14C800E19C62 /* UIImage+MWPhotoBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = F7F54CE41E5B14C700E19C62 /* UIImage+MWPhotoBrowser.m */; };
 		F7F801031D98205A007537BC /* CCCertificate.m in Sources */ = {isa = PBXBuildFile; fileRef = F7F801011D98205A007537BC /* CCCertificate.m */; };
+		F7F878AE1FB9E3B900599E4F /* NCEndToEndMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F878AD1FB9E3B900599E4F /* NCEndToEndMetadata.swift */; };
+		F7F878AF1FB9E3B900599E4F /* NCEndToEndMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F878AD1FB9E3B900599E4F /* NCEndToEndMetadata.swift */; };
+		F7F878B01FB9E3B900599E4F /* NCEndToEndMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F878AD1FB9E3B900599E4F /* NCEndToEndMetadata.swift */; };
+		F7F878B11FB9E3B900599E4F /* NCEndToEndMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F878AD1FB9E3B900599E4F /* NCEndToEndMetadata.swift */; };
 		F7F8D71C1ED6183000E711F3 /* CCCellShareExt.m in Sources */ = {isa = PBXBuildFile; fileRef = F7F8D71A1ED6183000E711F3 /* CCCellShareExt.m */; };
 		F7F8D71D1ED6183000E711F3 /* CCCellShareExt.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7F8D71B1ED6183000E711F3 /* CCCellShareExt.xib */; };
 		F7FC7D561DC1F93800BB2C6A /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = F7FC7D551DC1F93800BB2C6A /* libz.tbd */; };
@@ -977,6 +984,7 @@
 		F7540F2A1D5B238600C3FFA8 /* x509.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = x509.h; sourceTree = "<group>"; };
 		F7540F2B1D5B238600C3FFA8 /* x509_vfy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = x509_vfy.h; sourceTree = "<group>"; };
 		F7540F2C1D5B238600C3FFA8 /* x509v3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = x509v3.h; sourceTree = "<group>"; };
+		F755D43C1FC44E7B00801AE4 /* CustomSwift.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomSwift.h; sourceTree = "<group>"; };
 		F75797AD1E81356C00187A1B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/CTAssetsPicker.strings; sourceTree = "<group>"; };
 		F75AC2421F1F62450073EC19 /* NCManageAutoUploadFileName.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCManageAutoUploadFileName.swift; sourceTree = "<group>"; };
 		F75ADF441DC75FFE008A7347 /* CCLogin.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = CCLogin.storyboard; sourceTree = "<group>"; };
@@ -1122,6 +1130,135 @@
 		F76C3B881C638A4C00DC4301 /* CCError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCError.m; sourceTree = "<group>"; };
 		F76F23321ED4600700C40023 /* Share-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Share-Bridging-Header.h"; sourceTree = "<group>"; };
 		F76F23331ED4603700C40023 /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = "<group>"; };
+		F77438E81FCD694900662C46 /* ka-GE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "ka-GE"; path = "ka-GE.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F77438E91FCD694900662C46 /* ka-GE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "ka-GE"; path = "ka-GE.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F77438EA1FCD694900662C46 /* ka-GE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "ka-GE"; path = "ka-GE.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F77438EB1FCD694900662C46 /* ka-GE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "ka-GE"; path = "ka-GE.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F77438EC1FCD694900662C46 /* ka-GE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "ka-GE"; path = "ka-GE.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F77438ED1FCD694900662C46 /* ka-GE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "ka-GE"; path = "ka-GE.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F77438EE1FCD694900662C46 /* ka-GE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "ka-GE"; path = "ka-GE.lproj/Error.strings"; sourceTree = "<group>"; };
+		F77438EF1FCD69D200662C46 /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/CTAssetsPicker.strings; sourceTree = "<group>"; };
+		F77438F01FCD69D200662C46 /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/SwiftWebVC.strings; sourceTree = "<group>"; };
+		F77438F11FCD69D200662C46 /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/BKPasscodeView.strings; sourceTree = "<group>"; };
+		F77438F21FCD69D300662C46 /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Localizable.strings; sourceTree = "<group>"; };
+		F77438F31FCD69D300662C46 /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		F77438F41FCD69D300662C46 /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Intro.strings; sourceTree = "<group>"; };
+		F77438F51FCD69D300662C46 /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Error.strings; sourceTree = "<group>"; };
+		F77438F61FCD6A0D00662C46 /* zh-Hant-TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant-TW"; path = "zh-Hant-TW.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F77438F71FCD6A0D00662C46 /* zh-Hant-TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant-TW"; path = "zh-Hant-TW.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F77438F81FCD6A0D00662C46 /* zh-Hant-TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant-TW"; path = "zh-Hant-TW.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F77438F91FCD6A0D00662C46 /* zh-Hant-TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant-TW"; path = "zh-Hant-TW.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F77438FA1FCD6A0E00662C46 /* zh-Hant-TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant-TW"; path = "zh-Hant-TW.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F77438FB1FCD6A0E00662C46 /* zh-Hant-TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant-TW"; path = "zh-Hant-TW.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F77438FC1FCD6A0E00662C46 /* zh-Hant-TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant-TW"; path = "zh-Hant-TW.lproj/Error.strings"; sourceTree = "<group>"; };
+		F77438FD1FCD6B7E00662C46 /* sr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sr; path = sr.lproj/CTAssetsPicker.strings; sourceTree = "<group>"; };
+		F77438FE1FCD6B7E00662C46 /* sr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sr; path = sr.lproj/SwiftWebVC.strings; sourceTree = "<group>"; };
+		F77438FF1FCD6B7F00662C46 /* sr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sr; path = sr.lproj/BKPasscodeView.strings; sourceTree = "<group>"; };
+		F77439001FCD6B7F00662C46 /* sr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sr; path = sr.lproj/Localizable.strings; sourceTree = "<group>"; };
+		F77439011FCD6B7F00662C46 /* sr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sr; path = sr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		F77439021FCD6B7F00662C46 /* sr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sr; path = sr.lproj/Intro.strings; sourceTree = "<group>"; };
+		F77439031FCD6B7F00662C46 /* sr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sr; path = sr.lproj/Error.strings; sourceTree = "<group>"; };
+		F77439041FCD6BEF00662C46 /* es-CL */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CL"; path = "es-CL.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F77439051FCD6BEF00662C46 /* es-CL */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CL"; path = "es-CL.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F77439061FCD6BEF00662C46 /* es-CL */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CL"; path = "es-CL.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F77439071FCD6BF000662C46 /* es-CL */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CL"; path = "es-CL.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F77439081FCD6BF000662C46 /* es-CL */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CL"; path = "es-CL.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F77439091FCD6BF000662C46 /* es-CL */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CL"; path = "es-CL.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F774390A1FCD6BF000662C46 /* es-CL */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CL"; path = "es-CL.lproj/Error.strings"; sourceTree = "<group>"; };
+		F774390B1FCD6C0C00662C46 /* es-CO */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CO"; path = "es-CO.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F774390C1FCD6C0C00662C46 /* es-CO */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CO"; path = "es-CO.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F774390D1FCD6C0C00662C46 /* es-CO */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CO"; path = "es-CO.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F774390E1FCD6C0C00662C46 /* es-CO */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CO"; path = "es-CO.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F774390F1FCD6C0D00662C46 /* es-CO */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CO"; path = "es-CO.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F77439101FCD6C0D00662C46 /* es-CO */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CO"; path = "es-CO.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F77439111FCD6C0D00662C46 /* es-CO */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CO"; path = "es-CO.lproj/Error.strings"; sourceTree = "<group>"; };
+		F77439121FCD6C4900662C46 /* es-CR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CR"; path = "es-CR.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F77439131FCD6C4A00662C46 /* es-CR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CR"; path = "es-CR.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F77439141FCD6C4A00662C46 /* es-CR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CR"; path = "es-CR.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F77439151FCD6C4A00662C46 /* es-CR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CR"; path = "es-CR.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F77439161FCD6C4A00662C46 /* es-CR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CR"; path = "es-CR.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F77439171FCD6C4A00662C46 /* es-CR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CR"; path = "es-CR.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F77439181FCD6C4A00662C46 /* es-CR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-CR"; path = "es-CR.lproj/Error.strings"; sourceTree = "<group>"; };
+		F77439191FCD6C6700662C46 /* es-DO */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-DO"; path = "es-DO.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F774391A1FCD6C6700662C46 /* es-DO */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-DO"; path = "es-DO.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F774391B1FCD6C6700662C46 /* es-DO */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-DO"; path = "es-DO.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F774391C1FCD6C6700662C46 /* es-DO */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-DO"; path = "es-DO.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F774391D1FCD6C6700662C46 /* es-DO */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-DO"; path = "es-DO.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F774391E1FCD6C6700662C46 /* es-DO */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-DO"; path = "es-DO.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F774391F1FCD6C6800662C46 /* es-DO */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-DO"; path = "es-DO.lproj/Error.strings"; sourceTree = "<group>"; };
+		F77439201FCD6C8600662C46 /* es-EC */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-EC"; path = "es-EC.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F77439211FCD6C8600662C46 /* es-EC */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-EC"; path = "es-EC.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F77439221FCD6C8600662C46 /* es-EC */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-EC"; path = "es-EC.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F77439231FCD6C8700662C46 /* es-EC */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-EC"; path = "es-EC.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F77439241FCD6C8700662C46 /* es-EC */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-EC"; path = "es-EC.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F77439251FCD6C8700662C46 /* es-EC */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-EC"; path = "es-EC.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F77439261FCD6C8700662C46 /* es-EC */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-EC"; path = "es-EC.lproj/Error.strings"; sourceTree = "<group>"; };
+		F77439271FCD6CAA00662C46 /* es-GT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-GT"; path = "es-GT.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F77439281FCD6CAA00662C46 /* es-GT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-GT"; path = "es-GT.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F77439291FCD6CAA00662C46 /* es-GT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-GT"; path = "es-GT.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F774392A1FCD6CAA00662C46 /* es-GT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-GT"; path = "es-GT.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F774392B1FCD6CAA00662C46 /* es-GT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-GT"; path = "es-GT.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F774392C1FCD6CAA00662C46 /* es-GT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-GT"; path = "es-GT.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F774392D1FCD6CAA00662C46 /* es-GT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-GT"; path = "es-GT.lproj/Error.strings"; sourceTree = "<group>"; };
+		F774392E1FCD6CC400662C46 /* es-HN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-HN"; path = "es-HN.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F774392F1FCD6CC400662C46 /* es-HN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-HN"; path = "es-HN.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F77439301FCD6CC400662C46 /* es-HN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-HN"; path = "es-HN.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F77439311FCD6CC400662C46 /* es-HN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-HN"; path = "es-HN.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F77439321FCD6CC400662C46 /* es-HN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-HN"; path = "es-HN.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F77439331FCD6CC500662C46 /* es-HN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-HN"; path = "es-HN.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F77439341FCD6CC500662C46 /* es-HN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-HN"; path = "es-HN.lproj/Error.strings"; sourceTree = "<group>"; };
+		F77439351FCD6CDD00662C46 /* es-NI */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-NI"; path = "es-NI.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F77439361FCD6CDD00662C46 /* es-NI */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-NI"; path = "es-NI.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F77439371FCD6CDE00662C46 /* es-NI */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-NI"; path = "es-NI.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F77439381FCD6CDE00662C46 /* es-NI */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-NI"; path = "es-NI.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F77439391FCD6CDE00662C46 /* es-NI */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-NI"; path = "es-NI.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F774393A1FCD6CDE00662C46 /* es-NI */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-NI"; path = "es-NI.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F774393B1FCD6CDE00662C46 /* es-NI */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-NI"; path = "es-NI.lproj/Error.strings"; sourceTree = "<group>"; };
+		F774393C1FCD6D0A00662C46 /* es-PA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PA"; path = "es-PA.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F774393D1FCD6D0A00662C46 /* es-PA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PA"; path = "es-PA.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F774393E1FCD6D0B00662C46 /* es-PA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PA"; path = "es-PA.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F774393F1FCD6D0B00662C46 /* es-PA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PA"; path = "es-PA.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F77439401FCD6D0B00662C46 /* es-PA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PA"; path = "es-PA.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F77439411FCD6D0B00662C46 /* es-PA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PA"; path = "es-PA.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F77439421FCD6D0B00662C46 /* es-PA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PA"; path = "es-PA.lproj/Error.strings"; sourceTree = "<group>"; };
+		F77439431FCD6D2200662C46 /* es-PE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PE"; path = "es-PE.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F77439441FCD6D2200662C46 /* es-PE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PE"; path = "es-PE.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F77439451FCD6D2300662C46 /* es-PE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PE"; path = "es-PE.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F77439461FCD6D2300662C46 /* es-PE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PE"; path = "es-PE.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F77439471FCD6D2300662C46 /* es-PE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PE"; path = "es-PE.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F77439481FCD6D2300662C46 /* es-PE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PE"; path = "es-PE.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F77439491FCD6D2300662C46 /* es-PE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PE"; path = "es-PE.lproj/Error.strings"; sourceTree = "<group>"; };
+		F774394A1FCD6D3D00662C46 /* es-PR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PR"; path = "es-PR.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F774394B1FCD6D3D00662C46 /* es-PR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PR"; path = "es-PR.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F774394C1FCD6D3E00662C46 /* es-PR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PR"; path = "es-PR.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F774394D1FCD6D3E00662C46 /* es-PR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PR"; path = "es-PR.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F774394E1FCD6D3E00662C46 /* es-PR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PR"; path = "es-PR.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F774394F1FCD6D3E00662C46 /* es-PR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PR"; path = "es-PR.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F77439501FCD6D3E00662C46 /* es-PR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PR"; path = "es-PR.lproj/Error.strings"; sourceTree = "<group>"; };
+		F77439511FCD6D6100662C46 /* es-PY */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PY"; path = "es-PY.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F77439521FCD6D6100662C46 /* es-PY */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PY"; path = "es-PY.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F77439531FCD6D6100662C46 /* es-PY */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PY"; path = "es-PY.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F77439541FCD6D6100662C46 /* es-PY */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PY"; path = "es-PY.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F77439551FCD6D6100662C46 /* es-PY */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PY"; path = "es-PY.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F77439561FCD6D6200662C46 /* es-PY */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PY"; path = "es-PY.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F77439571FCD6D6200662C46 /* es-PY */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-PY"; path = "es-PY.lproj/Error.strings"; sourceTree = "<group>"; };
+		F77439581FCD6D8100662C46 /* es-SV */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-SV"; path = "es-SV.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F77439591FCD6D8100662C46 /* es-SV */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-SV"; path = "es-SV.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F774395A1FCD6D8200662C46 /* es-SV */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-SV"; path = "es-SV.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F774395B1FCD6D8200662C46 /* es-SV */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-SV"; path = "es-SV.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F774395C1FCD6D8200662C46 /* es-SV */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-SV"; path = "es-SV.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F774395D1FCD6D8200662C46 /* es-SV */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-SV"; path = "es-SV.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F774395E1FCD6D8200662C46 /* es-SV */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-SV"; path = "es-SV.lproj/Error.strings"; sourceTree = "<group>"; };
+		F774395F1FCD6D9C00662C46 /* es-UY */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-UY"; path = "es-UY.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F77439601FCD6D9C00662C46 /* es-UY */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-UY"; path = "es-UY.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F77439611FCD6D9C00662C46 /* es-UY */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-UY"; path = "es-UY.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F77439621FCD6D9C00662C46 /* es-UY */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-UY"; path = "es-UY.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F77439631FCD6D9C00662C46 /* es-UY */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-UY"; path = "es-UY.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F77439641FCD6D9D00662C46 /* es-UY */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-UY"; path = "es-UY.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F77439651FCD6D9D00662C46 /* es-UY */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-UY"; path = "es-UY.lproj/Error.strings"; sourceTree = "<group>"; };
+		F774DF0C1FCC26BD002AF9FC /* iTunesArtwork@1x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "iTunesArtwork@1x.png"; sourceTree = "<group>"; };
+		F774DF0D1FCC26BD002AF9FC /* iTunesArtwork@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "iTunesArtwork@2x.png"; sourceTree = "<group>"; };
+		F774DF0E1FCC26BE002AF9FC /* iTunesArtwork@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "iTunesArtwork@3x.png"; sourceTree = "<group>"; };
 		F777F0301C29717F00CE81CB /* PHAsset+Utility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PHAsset+Utility.h"; sourceTree = "<group>"; };
 		F777F0311C29717F00CE81CB /* PHAsset+Utility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "PHAsset+Utility.m"; sourceTree = "<group>"; };
 		F77D49A71DC238E500CDC568 /* loading@2x.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "loading@2x.gif"; sourceTree = "<group>"; };
@@ -1223,6 +1360,13 @@
 		F7BAADB41ED5A87C00B7EAD4 /* NCDatabase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCDatabase.swift; sourceTree = "<group>"; };
 		F7BAADB51ED5A87C00B7EAD4 /* NCManageDatabase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCManageDatabase.swift; sourceTree = "<group>"; };
 		F7BAADF51ED5A99300B7EAD4 /* Picker-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Picker-Bridging-Header.h"; sourceTree = "<group>"; };
+		F7BB04821FD58ACA00BBFD2A /* cs-CZ */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "cs-CZ"; path = "cs-CZ.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F7BB04831FD58ACA00BBFD2A /* cs-CZ */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "cs-CZ"; path = "cs-CZ.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F7BB04841FD58ACB00BBFD2A /* cs-CZ */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "cs-CZ"; path = "cs-CZ.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F7BB04851FD58ACB00BBFD2A /* cs-CZ */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "cs-CZ"; path = "cs-CZ.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F7BB04861FD58ACB00BBFD2A /* cs-CZ */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "cs-CZ"; path = "cs-CZ.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F7BB04871FD58ACB00BBFD2A /* cs-CZ */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "cs-CZ"; path = "cs-CZ.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F7BB04881FD58ACB00BBFD2A /* cs-CZ */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "cs-CZ"; path = "cs-CZ.lproj/Error.strings"; sourceTree = "<group>"; };
 		F7BE6E2B1D2D5C3B00106933 /* CCQuickActions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCQuickActions.h; sourceTree = "<group>"; };
 		F7BE6E2C1D2D5C3B00106933 /* CCQuickActions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCQuickActions.m; sourceTree = "<group>"; };
 		F7BF1B3F1D51E893000854F6 /* CCLogin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLogin.h; sourceTree = "<group>"; };
@@ -1500,6 +1644,7 @@
 		F7F67BB81A24D27800EE80DA /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
 		F7F801001D98205A007537BC /* CCCertificate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCCertificate.h; sourceTree = "<group>"; };
 		F7F801011D98205A007537BC /* CCCertificate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCCertificate.m; 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>"; };
 		F7F8D71A1ED6183000E711F3 /* CCCellShareExt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCCellShareExt.m; sourceTree = "<group>"; };
 		F7F8D71B1ED6183000E711F3 /* CCCellShareExt.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CCCellShareExt.xib; sourceTree = "<group>"; };
@@ -1509,7 +1654,6 @@
 		F7FCFFDE1D707B83000E6E29 /* CCPeekPop.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCPeekPop.m; sourceTree = "<group>"; };
 		F7FE125C1BAC03FB0041924B /* CCBKPasscode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBKPasscode.h; sourceTree = "<group>"; };
 		F7FE125D1BAC03FB0041924B /* CCBKPasscode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCBKPasscode.m; sourceTree = "<group>"; };
-		F7FFEACD1F82BB1C005E5C17 /* CCCellMain.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCCellMain.h; path = Main/CCCellMain.h; sourceTree = "<group>"; };
 		F7FFEACE1F82BB23005E5C17 /* CCCellMain.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCCellMain.h; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
@@ -2565,8 +2709,10 @@
 				F7C742D31E7BD36600D9C973 /* Supporting Files */,
 				F710E80C1EF95C9C00DC2427 /* Intro */,
 				F700222B1EC479840080073F /* Custom.xcassets */,
-				F76F23331ED4603700C40023 /* LaunchScreen.xib */,
+				F73CB5771ED46807005F2A5A /* NCBridgeSwift.h */,
+				F755D43C1FC44E7B00801AE4 /* CustomSwift.h */,
 				F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */,
+				F76F23331ED4603700C40023 /* LaunchScreen.xib */,
 			);
 			path = Brand;
 			sourceTree = "<group>";
@@ -2890,10 +3036,8 @@
 				F70022561EC4C9100080073F /* OCCommunicationLib */,
 				F7A582D71A24DAB500E903D7 /* AppDelegate.h */,
 				F7A582D61A24DAB500E903D7 /* AppDelegate.m */,
-				F7FFEACD1F82BB1C005E5C17 /* CCCellMain.h */,
 				F7C8C1901B482CEA0048180E /* CCGlobal.h */,
 				F7C8C1911B482CEA0048180E /* CCGlobal.m */,
-				F73CB5771ED46807005F2A5A /* NCBridgeSwift.h */,
 				F7F67BB81A24D27800EE80DA /* Images.xcassets */,
 				F70211F31BAC56E9003FC03E /* Main */,
 				F7C1CDD91E6DFC6F005D92BE /* Brand */,
@@ -2931,6 +3075,9 @@
 			children = (
 				F72B60941A24F04E004EF66F /* Localizations */,
 				F75CDBF51DF063AD00116AD0 /* .gitignore */,
+				F774DF0C1FCC26BD002AF9FC /* iTunesArtwork@1x.png */,
+				F774DF0D1FCC26BD002AF9FC /* iTunesArtwork@2x.png */,
+				F774DF0E1FCC26BE002AF9FC /* iTunesArtwork@3x.png */,
 				F7229B491DF71BB300E8C4E7 /* AUTHORS */,
 				F7F0617A1BAACDD300846525 /* CryptoCloud.pch */,
 				F77D49A71DC238E500CDC568 /* loading@2x.gif */,
@@ -2997,6 +3144,7 @@
 				F7F801001D98205A007537BC /* CCCertificate.h */,
 				F7F801011D98205A007537BC /* CCCertificate.m */,
 				F717EFFF1F96661400A324A5 /* NCEntoToEndInterface.swift */,
+				F7F878AD1FB9E3B900599E4F /* NCEndToEndMetadata.swift */,
 				F70CAE381F8CF31A008125FD /* NCEndToEndEncryption.h */,
 				F70CAE391F8CF31A008125FD /* NCEndToEndEncryption.m */,
 			);
@@ -3168,6 +3316,25 @@
 				"en-GB",
 				"zh-Hans",
 				"fi-FI",
+				"ka-GE",
+				hu,
+				"zh-Hant-TW",
+				sr,
+				"es-CL",
+				"es-CO",
+				"es-CR",
+				"es-DO",
+				"es-EC",
+				"es-GT",
+				"es-HN",
+				"es-NI",
+				"es-PA",
+				"es-PE",
+				"es-PR",
+				"es-PY",
+				"es-SV",
+				"es-UY",
+				"cs-CZ",
 			);
 			mainGroup = F7F67B9F1A24D27800EE80DA;
 			productRefGroup = F7F67B9F1A24D27800EE80DA;
@@ -3298,6 +3465,7 @@
 				F7F54CE61E5B14C700E19C62 /* ImageError@2x.png in Resources */,
 				F7F54CEF1E5B14C700E19C62 /* ImageSelectedSmallOff@2x.png in Resources */,
 				F7F54CFF1E5B14C700E19C62 /* UIBarButtonItemArrowRight@3x.png in Resources */,
+				F774DF0F1FCC26BE002AF9FC /* iTunesArtwork@1x.png in Resources */,
 				F77B0F611D118A16002130FE /* Acknowledgements.rtf in Resources */,
 				F77B0F631D118A16002130FE /* Localizable.strings in Resources */,
 				F7D4234C1F0596AC009C9782 /* Reader-Print@3x.png in Resources */,
@@ -3327,10 +3495,12 @@
 				F77B0F8C1D118A16002130FE /* CCCellMainTransfer.xib in Resources */,
 				F73B4EF41F470D9100BBEE4B /* JISFreq.tab in Resources */,
 				F7D423451F0596AC009C9782 /* Reader-Mark-N@2x.png in Resources */,
+				F774DF101FCC26BE002AF9FC /* iTunesArtwork@2x.png in Resources */,
 				F7D423481F0596AC009C9782 /* Reader-Mark-Y@2x.png in Resources */,
 				F7D4233F1F0596AC009C9782 /* Reader-Email@2x.png in Resources */,
 				F73B4EF11F470D9100BBEE4B /* EUCKRFreq.tab in Resources */,
 				F75797AE1E81356C00187A1B /* CTAssetsPicker.strings in Resources */,
+				F774DF111FCC26BE002AF9FC /* iTunesArtwork@3x.png in Resources */,
 				F762CB961EACB84400B38484 /* icon-error@2x.png in Resources */,
 				F7D4234A1F0596AC009C9782 /* Reader-Print.png in Resources */,
 				F7D423331F0596AC009C9782 /* AppIcon-076.png in Resources */,
@@ -3409,6 +3579,7 @@
 				F70022ED1EC4C9100080073F /* OCXMLSharedParser.m in Sources */,
 				F70022D51EC4C9100080073F /* NSDate+ISO8601.m in Sources */,
 				F70022FC1EC4C9100080073F /* NSString+Encode.m in Sources */,
+				F7F878AF1FB9E3B900599E4F /* NCEndToEndMetadata.swift in Sources */,
 				F70022E41EC4C9100080073F /* OCXMLParser.m in Sources */,
 				F71459C91D12E3B700CAFEEC /* OCNetworking.m in Sources */,
 				F71459CD1D12E3B700CAFEEC /* AFViewShaker.m in Sources */,
@@ -3473,6 +3644,7 @@
 				F70022E21EC4C9100080073F /* OCXMLListParser.m in Sources */,
 				F70022A61EC4C9100080073F /* AFNetworkReachabilityManager.m in Sources */,
 				F70022E51EC4C9100080073F /* OCXMLParser.m in Sources */,
+				F7F878B01FB9E3B900599E4F /* NCEndToEndMetadata.swift in Sources */,
 				F70022B21EC4C9100080073F /* AFURLSessionManager.m in Sources */,
 				F70022BB1EC4C9100080073F /* OCCommunication.m in Sources */,
 				F70022A31EC4C9100080073F /* AFHTTPSessionManager.m in Sources */,
@@ -3534,6 +3706,7 @@
 				F7BB50CE1F22388000C47094 /* OCNotifications.m in Sources */,
 				F7BB50CC1F22387900C47094 /* OCExternalSites.m in Sources */,
 				F7BB50EA1F2238FB00C47094 /* UIScrollView+EmptyDataSet.m in Sources */,
+				F7F878B11FB9E3B900599E4F /* NCEndToEndMetadata.swift in Sources */,
 				F7BB50F71F2239BF00C47094 /* BKPasscodeLockScreenManager.m in Sources */,
 				F7BB50DB1F2238A900C47094 /* OCXMLShareByLinkParser.m in Sources */,
 				F7BB50E21F2238D000C47094 /* AFURLRequestSerialization.m in Sources */,
@@ -3732,6 +3905,7 @@
 				F7D424581F063B82009C9782 /* PHAssetCollection+CTAssetsPickerController.m in Sources */,
 				F73CC07E1E813DFF006E3047 /* BKTouchIDSwitchView.m in Sources */,
 				F77B0E5F1D118A16002130FE /* CCSettings.m in Sources */,
+				F7F878AE1FB9E3B900599E4F /* NCEndToEndMetadata.swift in Sources */,
 				F7D424611F063B82009C9782 /* CTAssetScrollView.m in Sources */,
 				F762CB141EACB66200B38484 /* XLFormRightImageButton.m in Sources */,
 				F7B3A4EE1E97818A000DACE8 /* CCLoginWeb.swift in Sources */,
@@ -3898,6 +4072,25 @@
 				F7D5328E1F5D443B006568B1 /* en-GB */,
 				F7D532A31F5D4461006568B1 /* zh-Hans */,
 				F74C5D921F923E4700B7CC01 /* fi-FI */,
+				F77438EA1FCD694900662C46 /* ka-GE */,
+				F77438F11FCD69D200662C46 /* hu */,
+				F77438F81FCD6A0D00662C46 /* zh-Hant-TW */,
+				F77438FF1FCD6B7F00662C46 /* sr */,
+				F77439061FCD6BEF00662C46 /* es-CL */,
+				F774390D1FCD6C0C00662C46 /* es-CO */,
+				F77439141FCD6C4A00662C46 /* es-CR */,
+				F774391B1FCD6C6700662C46 /* es-DO */,
+				F77439221FCD6C8600662C46 /* es-EC */,
+				F77439291FCD6CAA00662C46 /* es-GT */,
+				F77439301FCD6CC400662C46 /* es-HN */,
+				F77439371FCD6CDE00662C46 /* es-NI */,
+				F774393E1FCD6D0B00662C46 /* es-PA */,
+				F77439451FCD6D2300662C46 /* es-PE */,
+				F774394C1FCD6D3E00662C46 /* es-PR */,
+				F77439531FCD6D6100662C46 /* es-PY */,
+				F774395A1FCD6D8200662C46 /* es-SV */,
+				F77439611FCD6D9C00662C46 /* es-UY */,
+				F7BB04841FD58ACB00BBFD2A /* cs-CZ */,
 			);
 			name = BKPasscodeView.strings;
 			path = "Supporting Files";
@@ -3924,6 +4117,25 @@
 				F7D5328D1F5D443B006568B1 /* en-GB */,
 				F7D532A21F5D4461006568B1 /* zh-Hans */,
 				F74C5D911F923E4700B7CC01 /* fi-FI */,
+				F77438E91FCD694900662C46 /* ka-GE */,
+				F77438F01FCD69D200662C46 /* hu */,
+				F77438F71FCD6A0D00662C46 /* zh-Hant-TW */,
+				F77438FE1FCD6B7E00662C46 /* sr */,
+				F77439051FCD6BEF00662C46 /* es-CL */,
+				F774390C1FCD6C0C00662C46 /* es-CO */,
+				F77439131FCD6C4A00662C46 /* es-CR */,
+				F774391A1FCD6C6700662C46 /* es-DO */,
+				F77439211FCD6C8600662C46 /* es-EC */,
+				F77439281FCD6CAA00662C46 /* es-GT */,
+				F774392F1FCD6CC400662C46 /* es-HN */,
+				F77439361FCD6CDD00662C46 /* es-NI */,
+				F774393D1FCD6D0A00662C46 /* es-PA */,
+				F77439441FCD6D2200662C46 /* es-PE */,
+				F774394B1FCD6D3D00662C46 /* es-PR */,
+				F77439521FCD6D6100662C46 /* es-PY */,
+				F77439591FCD6D8100662C46 /* es-SV */,
+				F77439601FCD6D9C00662C46 /* es-UY */,
+				F7BB04831FD58ACA00BBFD2A /* cs-CZ */,
 			);
 			name = SwiftWebVC.strings;
 			path = "Supporting Files";
@@ -3950,6 +4162,25 @@
 				F7D532911F5D443B006568B1 /* en-GB */,
 				F7D532A61F5D4462006568B1 /* zh-Hans */,
 				F74C5D951F923E4800B7CC01 /* fi-FI */,
+				F77438ED1FCD694900662C46 /* ka-GE */,
+				F77438F41FCD69D300662C46 /* hu */,
+				F77438FB1FCD6A0E00662C46 /* zh-Hant-TW */,
+				F77439021FCD6B7F00662C46 /* sr */,
+				F77439091FCD6BF000662C46 /* es-CL */,
+				F77439101FCD6C0D00662C46 /* es-CO */,
+				F77439171FCD6C4A00662C46 /* es-CR */,
+				F774391E1FCD6C6700662C46 /* es-DO */,
+				F77439251FCD6C8700662C46 /* es-EC */,
+				F774392C1FCD6CAA00662C46 /* es-GT */,
+				F77439331FCD6CC500662C46 /* es-HN */,
+				F774393A1FCD6CDE00662C46 /* es-NI */,
+				F77439411FCD6D0B00662C46 /* es-PA */,
+				F77439481FCD6D2300662C46 /* es-PE */,
+				F774394F1FCD6D3E00662C46 /* es-PR */,
+				F77439561FCD6D6200662C46 /* es-PY */,
+				F774395D1FCD6D8200662C46 /* es-SV */,
+				F77439641FCD6D9D00662C46 /* es-UY */,
+				F7BB04871FD58ACB00BBFD2A /* cs-CZ */,
 			);
 			name = Intro.strings;
 			path = "Supporting Files";
@@ -3976,6 +4207,25 @@
 				F7D5328C1F5D443B006568B1 /* en-GB */,
 				F7D532A11F5D4461006568B1 /* zh-Hans */,
 				F74C5D901F923E4700B7CC01 /* fi-FI */,
+				F77438E81FCD694900662C46 /* ka-GE */,
+				F77438EF1FCD69D200662C46 /* hu */,
+				F77438F61FCD6A0D00662C46 /* zh-Hant-TW */,
+				F77438FD1FCD6B7E00662C46 /* sr */,
+				F77439041FCD6BEF00662C46 /* es-CL */,
+				F774390B1FCD6C0C00662C46 /* es-CO */,
+				F77439121FCD6C4900662C46 /* es-CR */,
+				F77439191FCD6C6700662C46 /* es-DO */,
+				F77439201FCD6C8600662C46 /* es-EC */,
+				F77439271FCD6CAA00662C46 /* es-GT */,
+				F774392E1FCD6CC400662C46 /* es-HN */,
+				F77439351FCD6CDD00662C46 /* es-NI */,
+				F774393C1FCD6D0A00662C46 /* es-PA */,
+				F77439431FCD6D2200662C46 /* es-PE */,
+				F774394A1FCD6D3D00662C46 /* es-PR */,
+				F77439511FCD6D6100662C46 /* es-PY */,
+				F77439581FCD6D8100662C46 /* es-SV */,
+				F774395F1FCD6D9C00662C46 /* es-UY */,
+				F7BB04821FD58ACA00BBFD2A /* cs-CZ */,
 			);
 			name = CTAssetsPicker.strings;
 			path = "Supporting Files";
@@ -4002,6 +4252,25 @@
 				F7D532921F5D443B006568B1 /* en-GB */,
 				F7D532A71F5D4462006568B1 /* zh-Hans */,
 				F74C5D961F923E4800B7CC01 /* fi-FI */,
+				F77438EE1FCD694900662C46 /* ka-GE */,
+				F77438F51FCD69D300662C46 /* hu */,
+				F77438FC1FCD6A0E00662C46 /* zh-Hant-TW */,
+				F77439031FCD6B7F00662C46 /* sr */,
+				F774390A1FCD6BF000662C46 /* es-CL */,
+				F77439111FCD6C0D00662C46 /* es-CO */,
+				F77439181FCD6C4A00662C46 /* es-CR */,
+				F774391F1FCD6C6800662C46 /* es-DO */,
+				F77439261FCD6C8700662C46 /* es-EC */,
+				F774392D1FCD6CAA00662C46 /* es-GT */,
+				F77439341FCD6CC500662C46 /* es-HN */,
+				F774393B1FCD6CDE00662C46 /* es-NI */,
+				F77439421FCD6D0B00662C46 /* es-PA */,
+				F77439491FCD6D2300662C46 /* es-PE */,
+				F77439501FCD6D3E00662C46 /* es-PR */,
+				F77439571FCD6D6200662C46 /* es-PY */,
+				F774395E1FCD6D8200662C46 /* es-SV */,
+				F77439651FCD6D9D00662C46 /* es-UY */,
+				F7BB04881FD58ACB00BBFD2A /* cs-CZ */,
 			);
 			name = Error.strings;
 			path = "Supporting Files";
@@ -4028,6 +4297,25 @@
 				F7D532901F5D443B006568B1 /* en-GB */,
 				F7D532A51F5D4461006568B1 /* zh-Hans */,
 				F74C5D941F923E4800B7CC01 /* fi-FI */,
+				F77438EC1FCD694900662C46 /* ka-GE */,
+				F77438F31FCD69D300662C46 /* hu */,
+				F77438FA1FCD6A0E00662C46 /* zh-Hant-TW */,
+				F77439011FCD6B7F00662C46 /* sr */,
+				F77439081FCD6BF000662C46 /* es-CL */,
+				F774390F1FCD6C0D00662C46 /* es-CO */,
+				F77439161FCD6C4A00662C46 /* es-CR */,
+				F774391D1FCD6C6700662C46 /* es-DO */,
+				F77439241FCD6C8700662C46 /* es-EC */,
+				F774392B1FCD6CAA00662C46 /* es-GT */,
+				F77439321FCD6CC400662C46 /* es-HN */,
+				F77439391FCD6CDE00662C46 /* es-NI */,
+				F77439401FCD6D0B00662C46 /* es-PA */,
+				F77439471FCD6D2300662C46 /* es-PE */,
+				F774394E1FCD6D3E00662C46 /* es-PR */,
+				F77439551FCD6D6100662C46 /* es-PY */,
+				F774395C1FCD6D8200662C46 /* es-SV */,
+				F77439631FCD6D9C00662C46 /* es-UY */,
+				F7BB04861FD58ACB00BBFD2A /* cs-CZ */,
 			);
 			name = InfoPlist.strings;
 			path = "Supporting Files";
@@ -4054,6 +4342,25 @@
 				F7D5328F1F5D443B006568B1 /* en-GB */,
 				F7D532A41F5D4461006568B1 /* zh-Hans */,
 				F74C5D931F923E4700B7CC01 /* fi-FI */,
+				F77438EB1FCD694900662C46 /* ka-GE */,
+				F77438F21FCD69D300662C46 /* hu */,
+				F77438F91FCD6A0D00662C46 /* zh-Hant-TW */,
+				F77439001FCD6B7F00662C46 /* sr */,
+				F77439071FCD6BF000662C46 /* es-CL */,
+				F774390E1FCD6C0C00662C46 /* es-CO */,
+				F77439151FCD6C4A00662C46 /* es-CR */,
+				F774391C1FCD6C6700662C46 /* es-DO */,
+				F77439231FCD6C8700662C46 /* es-EC */,
+				F774392A1FCD6CAA00662C46 /* es-GT */,
+				F77439311FCD6CC400662C46 /* es-HN */,
+				F77439381FCD6CDE00662C46 /* es-NI */,
+				F774393F1FCD6D0B00662C46 /* es-PA */,
+				F77439461FCD6D2300662C46 /* es-PE */,
+				F774394D1FCD6D3E00662C46 /* es-PR */,
+				F77439541FCD6D6100662C46 /* es-PY */,
+				F774395B1FCD6D8200662C46 /* es-SV */,
+				F77439621FCD6D9C00662C46 /* es-UY */,
+				F7BB04851FD58ACB00BBFD2A /* cs-CZ */,
 			);
 			name = Localizable.strings;
 			path = "Supporting Files";

+ 114 - 93
Picker/DocumentPickerViewController.swift

@@ -61,6 +61,8 @@ class DocumentPickerViewController: UIDocumentPickerExtensionViewController, CCN
     var passcodeIsPush: Bool = false
     var serverUrlPush: String = ""
     
+    var autoUploadFileName = ""
+    var autoUploadDirectory = ""
     
     lazy var networkingOperationQueue: OperationQueue = {
         
@@ -123,17 +125,17 @@ class DocumentPickerViewController: UIDocumentPickerExtensionViewController, CCN
         hud = CCHud.init(view: self.navigationController?.view)
         
         // Theming
-        let tableCapabilities = NCManageDatabase.sharedInstance.getCapabilites()
-        if (tableCapabilities != nil && NCBrandOptions.sharedInstance.use_themingColor == true) {
-            if ((tableCapabilities?.themingColor.count)! > 0) {
-                NCBrandColor.sharedInstance.brand = CCGraphics.color(fromHexString: tableCapabilities?.themingColor)
+        if (NCBrandOptions.sharedInstance.use_themingColor == true) {
+            let tableCapabilities = NCManageDatabase.sharedInstance.getCapabilites()
+            if (tableCapabilities != nil) {
+                CCGraphics.settingThemingColor(tableCapabilities?.themingColor, themingColorElement: tableCapabilities?.themingColorElement, themingColorText: tableCapabilities?.themingColorText)
             }
         }
         
         // COLOR
         self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
-        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
-        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.navigationBarText]
+        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
+        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.brandText]
         self.navigationController?.navigationBar.isTranslucent = false
         
         self.tableView.separatorColor = NCBrandColor.sharedInstance.seperator
@@ -265,6 +267,12 @@ class DocumentPickerViewController: UIDocumentPickerExtensionViewController, CCN
         predicate = NSPredicate(format: "account = %@ AND directoryID = %@", activeAccount, metadataNet.directoryID!)
         recordsTableMetadata = NCManageDatabase.sharedInstance.getMetadatas(predicate: predicate, sorted: "fileName", ascending: true)
         
+        autoUploadFileName = NCManageDatabase.sharedInstance.getAccountAutoUploadFileName()
+        autoUploadDirectory = NCManageDatabase.sharedInstance.getAccountAutoUploadDirectory(activeUrl)
+        
+        if (CCUtility.isEnd(toEndEnabled: activeAccount)) {
+        }
+        
         tableView.reloadData()
         
         hud.hideHud()
@@ -318,96 +326,96 @@ class DocumentPickerViewController: UIDocumentPickerExtensionViewController, CCN
     
     //  MARK: - Download
 
-    func downloadFileFailure(_ fileID: String!, serverUrl: String!, selector: String!, message: String!, errorCode: Int) {
+    func downloadFileSuccessFailure(_ fileName: String!, fileID: String!, serverUrl: String!, selector: String!, selectorPost: String!, errorMessage: String!, errorCode: Int) {
         
         hud.hideHud()
         
-        if selector == selectorLoadFileView && errorCode != -999 {
-            
-            let alert = UIAlertController(title: NSLocalizedString("_error_", comment: ""), message: message, preferredStyle: .alert)
-            alert.addAction(UIAlertAction(title: NSLocalizedString("_ok_", comment: ""), style: .default) { action in
-                NSLog("[LOG] Download Error \(fileID) \(message) (error \(errorCode))");
-            })
+        if (errorCode == 0) {
             
-            self.present(alert, animated: true, completion: nil)
-        }
-    }
-
-    func downloadFileSuccess(_ fileID: String!, serverUrl: String!, selector: String!, selectorPost: String!) {
-        
-        hud.hideHud()
-    
-        guard let metadata = NCManageDatabase.sharedInstance.getMetadata(predicate: NSPredicate(format: "account = %@ AND fileID == %@", activeAccount, fileID!)) else {
-            self.dismissGrantingAccess(to: nil)
-            return
-        }
-        
-        recordMetadata = metadata
-        
-        // Save for PickerFileProvide
-        CCUtility.setFileNameExt(metadata.fileName)
-        CCUtility.setServerUrlExt(serverUrl)
-        
-        switch selector {
+            guard let metadata = NCManageDatabase.sharedInstance.getMetadata(predicate: NSPredicate(format: "account = %@ AND fileID == %@", activeAccount, fileID!)) else {
+                self.dismissGrantingAccess(to: nil)
+                return
+            }
             
-        case selectorLoadFileView :
+            recordMetadata = metadata
             
-            let sourceFileNamePath = "\(directoryUser)/\(fileID!)"
-            let destinationFileNameUrl : URL! = appGroupContainerURL()?.appendingPathComponent(recordMetadata.fileName)
-            let destinationFileNamePath = destinationFileNameUrl.path
+            // Save for PickerFileProvide
+            CCUtility.setFileNameExt(metadata.fileName)
+            CCUtility.setServerUrlExt(serverUrl)
             
-            // Destination Provider
-
-            do {
-                try FileManager.default.removeItem(at: destinationFileNameUrl)
-            } catch _ {
-                print("file do not exists")
-            }
-
-            do {
-                try FileManager.default.copyItem(atPath: sourceFileNamePath, toPath: destinationFileNamePath)
-            } catch let error as NSError {
-                print(error)
+            switch selector {
+                
+            case selectorLoadFileView :
+                
+                let sourceFileNamePath = "\(directoryUser)/\(fileID!)"
+                let destinationFileNameUrl : URL! = appGroupContainerURL()?.appendingPathComponent(recordMetadata.fileName)
+                let destinationFileNamePath = destinationFileNameUrl.path
+                
+                // Destination Provider
+                
+                do {
+                    try FileManager.default.removeItem(at: destinationFileNameUrl)
+                } catch _ {
+                    print("file do not exists")
+                }
+                
+                do {
+                    try FileManager.default.copyItem(atPath: sourceFileNamePath, toPath: destinationFileNamePath)
+                } catch let error as NSError {
+                    print(error)
+                }
+                
+                // Dismiss
+                
+                self.dismissGrantingAccess(to: destinationFileNameUrl)
+                
+            default :
+                
+                print("selector : \(selector!)")
+                tableView.reloadData()
             }
             
-            // Dismiss
-            
-            self.dismissGrantingAccess(to: destinationFileNameUrl)
-            
-        default :
+        } else {
             
-            print("selector : \(selector!)")
-            tableView.reloadData()
+            if selector == selectorLoadFileView && errorCode != -999 {
+                
+                let alert = UIAlertController(title: NSLocalizedString("_error_", comment: ""), message: errorMessage, preferredStyle: .alert)
+                alert.addAction(UIAlertAction(title: NSLocalizedString("_ok_", comment: ""), style: .default) { action in
+                    NSLog("[LOG] Download Error \(fileID) \(errorMessage) (error \(errorCode))");
+                })
+                
+                self.present(alert, animated: true, completion: nil)
+            }
         }
     }
  
-    //  MARK: - Upload
+    //  MARK: - Upload 
     
-    func uploadFileFailure(_ metadataNet: CCMetadataNet, fileID: String, serverUrl: String, selector: String, message: String, errorCode: NSInteger){
+    func uploadFileSuccessFailure(_ fileName: String!, fileID: String!, assetLocalIdentifier: String!, serverUrl: String!, selector: String!, selectorPost: String!, errorMessage: String!, errorCode: Int) {
         
         hud.hideHud()
         
-        // remove file
-        let predicate = NSPredicate(format: "account = %@ AND fileID == %@", activeAccount, fileID)
-        NCManageDatabase.sharedInstance.deleteMetadata(predicate: predicate, clearDateReadDirectoryID: nil)
-        
-        if errorCode != -999 {
+        if (errorCode == 0) {
             
-            let alert = UIAlertController(title: NSLocalizedString("_error_", comment: ""), message: message, preferredStyle: .alert)
-            alert.addAction(UIAlertAction(title: NSLocalizedString("_ok_", comment: ""), style: .default) { action in
-                //self.dismissGrantingAccess(to: nil)
-                NSLog("[LOG] Download Error \(fileID) \(message) (error \(errorCode))");
-            })
+            dismissGrantingAccess(to: self.destinationURL)
             
-            self.present(alert, animated: true, completion: nil)
-        }
-    }
-    
-    func uploadFileSuccess(_ metadataNet: CCMetadataNet, fileID: String, serverUrl: String, selector: String, selectorPost: String) {
-        
-        hud.hideHud()
+        } else {
+           
+            // remove file
+            let predicate = NSPredicate(format: "account = %@ AND fileID == %@", activeAccount, fileID)
+            NCManageDatabase.sharedInstance.deleteMetadata(predicate: predicate, clearDateReadDirectoryID: nil)
+            
+            if errorCode != -999 {
                 
-        dismissGrantingAccess(to: self.destinationURL)
+                let alert = UIAlertController(title: NSLocalizedString("_error_", comment: ""), message: errorMessage, preferredStyle: .alert)
+                alert.addAction(UIAlertAction(title: NSLocalizedString("_ok_", comment: ""), style: .default) { action in
+                    //self.dismissGrantingAccess(to: nil)
+                    NSLog("[LOG] Download Error \(fileID) \(errorMessage) (error \(errorCode))");
+                })
+                
+                self.present(alert, animated: true, completion: nil)
+            }
+        }
     }
 }
 
@@ -470,7 +478,7 @@ extension DocumentPickerViewController {
                     
                         CCNetworking.shared().uploadFile(fileName, serverUrl: self!.serverUrl, session: k_upload_session_foreground, taskStatus: Int(k_taskStatusResume), selector: "", selectorPost: "", errorCode: 0, delegate: self)
                         
-                        self!.hud.visibleHudTitle(NSLocalizedString("_uploading_", comment: ""), mode: MBProgressHUDMode.determinate, color: NCBrandColor.sharedInstance.brand)
+                        self!.hud.visibleHudTitle(NSLocalizedString("_uploading_", comment: ""), mode: MBProgressHUDMode.determinate, color: NCBrandColor.sharedInstance.brandElement)
                     }
                 } catch _ {
                     self?.dismissGrantingAccess(to: self?.destinationURL)
@@ -625,10 +633,12 @@ extension DocumentPickerViewController: UITableViewDataSource {
         
         cell.separatorInset = UIEdgeInsetsMake(0, 60, 0, 0)
         
-        let metadata = recordsTableMetadata?[(indexPath as NSIndexPath).row]
+        guard let metadata = recordsTableMetadata?[(indexPath as NSIndexPath).row] else {
+            return cell
+        }
         
         // File Image View
-        let fileNamePath = "\(directoryUser)/\(metadata!.fileID)).ico"
+        let fileNamePath = "\(directoryUser)/\(metadata.fileID)).ico"
         
         if FileManager.default.fileExists(atPath: fileNamePath) {
             
@@ -636,30 +646,36 @@ extension DocumentPickerViewController: UITableViewDataSource {
             
         } else {
             
-            if metadata!.directory {
+            if metadata.directory {
                 
-                cell.fileImageView.image = CCGraphics.changeThemingColorImage(UIImage(named: metadata!.iconName), color: NCBrandColor.sharedInstance.brand)
+                if (metadata.e2eEncrypted) {
+                    cell.fileImageView.image = CCGraphics.changeThemingColorImage(UIImage(named: "folderEncrypted"), color: NCBrandColor.sharedInstance.brandElement)
+                } else if (metadata.fileName == autoUploadFileName && serverUrl == autoUploadDirectory) {
+                    cell.fileImageView.image = CCGraphics.changeThemingColorImage(UIImage(named: "folderphotocamera"), color: NCBrandColor.sharedInstance.brandElement)
+                } else {
+                    cell.fileImageView.image = CCGraphics.changeThemingColorImage(UIImage(named: "folder"), color: NCBrandColor.sharedInstance.brandElement)
+                }
                 
             } else {
                 
-                cell.fileImageView.image = UIImage(named: (metadata?.iconName)!)
-                if (metadata?.thumbnailExists)! {
+                cell.fileImageView.image = UIImage(named: (metadata.iconName))
+                if (metadata.thumbnailExists) {
                     
-                    downloadThumbnail(metadata!)
-                    thumbnailInLoading[metadata!.fileID] = indexPath
+                    downloadThumbnail(metadata)
+                    thumbnailInLoading[metadata.fileID] = indexPath
                 }
             }
         }
         
         // File Name
-        cell.fileName.text = metadata!.fileName
+        cell.fileName.text = metadata.fileNameView
         
         // Status Image View
-        let lockServerUrl = CCUtility.stringAppendServerUrl(self.serverUrl!, addFileName: metadata!.fileName)
+        let lockServerUrl = CCUtility.stringAppendServerUrl(self.serverUrl!, addFileName: metadata.fileName)
                 
         let tableDirectory = NCManageDatabase.sharedInstance.getTableDirectory(predicate:NSPredicate(format: "account = %@ AND serverUrl = %@", activeAccount, lockServerUrl!))
         if tableDirectory != nil {
-            if metadata!.directory &&  (tableDirectory?.lock)! && (CCUtility.getBlockCode() != nil) {
+            if metadata.directory &&  (tableDirectory?.lock)! && (CCUtility.getBlockCode() != nil) {
                 cell.StatusImageView.image = UIImage(named: "passcode")
             } else {
                 cell.StatusImageView.image = nil
@@ -689,21 +705,26 @@ extension DocumentPickerViewController: UITableViewDataSource {
             } catch {
             }
             
-            CCNetworking.shared().downloadFile(metadata?.fileID, serverUrl: self.serverUrl, selector: selectorLoadFileView, selectorPost: nil, session: k_download_session_foreground, taskStatus: Int(k_taskStatusResume), delegate: self)
+            CCNetworking.shared().downloadFile(metadata?.fileName, fileID: metadata?.fileID, serverUrl: self.serverUrl, selector: selectorLoadFileView, selectorPost: nil, session: k_download_session_foreground, taskStatus: Int(k_taskStatusResume), delegate: self)
 
-            hud.visibleHudTitle(NSLocalizedString("_loading_", comment: ""), mode: MBProgressHUDMode.determinate, color: NCBrandColor.sharedInstance.brand)
+            hud.visibleHudTitle(NSLocalizedString("_loading_", comment: ""), mode: MBProgressHUDMode.determinate, color: NCBrandColor.sharedInstance.brandElement)
             
         } else {
-                        
+            
+            // e2e DENIED
+            if (metadata?.e2eEncrypted == true) {
+                return
+            }
+        
             serverUrlPush = CCUtility.stringAppendServerUrl(self.serverUrl!, addFileName: recordMetadata.fileName)
 
             var passcode: String? = CCUtility.getBlockCode()
             if passcode == nil {
                 passcode = ""
             }
-            
+        
             let tableDirectory = NCManageDatabase.sharedInstance.getTableDirectory(predicate:NSPredicate(format: "account = %@ AND serverUrl = %@", activeAccount, serverUrlPush))
-
+            
             if tableDirectory != nil {
                 
                 if (tableDirectory?.lock)! && (passcode?.count)! > 0 {

+ 1 - 0
Picker/Picker-Bridging-Header.h

@@ -13,6 +13,7 @@
 #import "CCUtility.h"
 #import "BKPasscodeViewController.h"
 #import "CCBKPasscode.h"
+#import "NCEndToEndEncryption.h"
 
 #import "OCActivity.h"
 #import "OCUserProfile.h"

+ 1 - 0
PickerFileProvider/PickerFileProvider-Bridging-Header.h

@@ -13,6 +13,7 @@
 #import "BKPasscodeViewController.h"
 #import "CCBKPasscode.h"
 #import "CCUtility.h"
+#import "NCEndToEndEncryption.h"
 
 #import "OCActivity.h"
 #import "OCUserProfile.h"

+ 1 - 0
Share/Share-Bridging-Header.h

@@ -4,6 +4,7 @@
 
 #import "CCHud.h"
 #import "ShareViewController.h"
+#import "NCEndToEndEncryption.h"
 
 #import "OCActivity.h"
 #import "OCUserProfile.h"

+ 44 - 39
Share/ShareViewController.m

@@ -144,17 +144,15 @@
     UIBarButtonItem *rightButtonUpload, *leftButtonCancel;
 
     // Theming
-    tableCapabilities *capabilities = [[NCManageDatabase sharedInstance] getCapabilites];
-    if ([NCBrandOptions sharedInstance].use_themingColor && capabilities.themingColor.length > 0) {
-        UIColor *newColor = [CCGraphics colorFromHexString:capabilities.themingColor];
-        if (newColor)
-            [NCBrandColor sharedInstance].brand = newColor;
+    if ([NCBrandOptions sharedInstance].use_themingColor) {
+        tableCapabilities *capabilities = [[NCManageDatabase sharedInstance] getCapabilites];
+        [CCGraphics settingThemingColor:capabilities.themingColor themingColorElement:capabilities.themingColorElement themingColorText:capabilities.themingColorText];
     }
     self.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].brand;
-    self.navigationController.navigationBar.tintColor = [NCBrandColor sharedInstance].navigationBarText;
+    self.navigationController.navigationBar.tintColor = [NCBrandColor sharedInstance].brandText;
     
     self.toolBar.barTintColor = [NCBrandColor sharedInstance].tabBar;
-    self.toolBar.tintColor = [NCBrandColor sharedInstance].brand;
+    self.toolBar.tintColor = [NCBrandColor sharedInstance].brandElement;
     
     // Upload
     rightButtonUpload = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"_save_", nil) style:UIBarButtonItemStylePlain target:self action:@selector(selectPost)];
@@ -173,6 +171,11 @@
 
 - (void)moveServerUrlTo:(NSString *)serverUrlTo title:(NSString *)title
 {
+    // DENIED e2e
+    if ([CCUtility isFolderEncrypted:serverUrlTo account:self.activeAccount]) {
+        return;
+    }
+    
     if (serverUrlTo)
         _serverUrl = serverUrlTo;
     
@@ -200,6 +203,8 @@
     viewController.barTintColor = barTintColor;
     viewController.tintColorTitle = tintColor;
     viewController.networkingOperationQueue = _networkingOperationQueue;
+    // E2E
+    viewController.includeDirectoryE2EEncryption = NO;
 
     [navigationController setModalPresentationStyle:UIModalPresentationFormSheet];
     [self presentViewController:navigationController animated:YES completion:nil];
@@ -213,7 +218,7 @@
         
         [[CCNetworking sharedNetworking] uploadFile:fileName serverUrl:_serverUrl session:k_upload_session_foreground taskStatus:k_taskStatusResume selector:@"" selectorPost:@"" errorCode:0 delegate:self];
         
-        [self.hud visibleHudTitle:NSLocalizedString(@"_uploading_", nil) mode:MBProgressHUDModeDeterminate color:[NCBrandColor sharedInstance].brand];
+        [self.hud visibleHudTitle:NSLocalizedString(@"_uploading_", nil) mode:MBProgressHUDModeDeterminate color:[NCBrandColor sharedInstance].brandElement];
     }
     else
         [self closeShareViewController];
@@ -243,42 +248,42 @@
     [self.hud progress:progress];
 }
 
-- (void)uploadFileFailure:(CCMetadataNet *)metadataNet fileID:(NSString *)fileID serverUrl:(NSString *)serverUrl selector:(NSString *)selector message:(NSString *)message errorCode:(NSInteger)errorCode
+- (void)uploadFileSuccessFailure:(NSString *)fileName fileID:(NSString *)fileID assetLocalIdentifier:(NSString *)assetLocalIdentifier serverUrl:(NSString *)serverUrl selector:(NSString *)selector selectorPost:(NSString *)selectorPost errorMessage:(NSString *)errorMessage errorCode:(NSInteger)errorCode
 {
     [self.hud hideHud];
-    
-    // remove file
-    [[NCManageDatabase sharedInstance] deleteMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID = %@", fileID] clearDateReadDirectoryID:nil];
-    
-    [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/%@", _directoryUser, fileID] error:nil];
-    [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/%@.ico", _directoryUser, fileID] error:nil];
 
-    // message error
-    if (errorCode != kCFURLErrorCancelled) {
+    if (errorCode == 0) {
+        
+        tableMetadata *metadata = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID = %@", fileID]];
+        
+        [self.filesName removeObject:metadata.fileName];
+        [self.shareTable performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:NO];
+        
+        [self performSelector:@selector(selectPost) withObject:nil afterDelay:0.1];
+        
+    } else {
+        
+        // remove file
+        [[NCManageDatabase sharedInstance] deleteMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID = %@", fileID] clearDateReadDirectoryID:nil];
+        
+        [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/%@", _directoryUser, fileID] error:nil];
+        [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/%@.ico", _directoryUser, fileID] error:nil];
         
-        UIAlertController * alert= [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_error_", nil) message:message preferredStyle:UIAlertControllerStyleAlert];
-        UIAlertAction* ok = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault
-                                                   handler:^(UIAlertAction * action) {
-                                                       [alert dismissViewControllerAnimated:YES completion:nil];
-                                                       [self closeShareViewController];
-                                                   }];
-        [alert addAction:ok];
-        [self presentViewController:alert animated:YES completion:nil];
+        // message error
+        if (errorCode != kCFURLErrorCancelled) {
+            
+            UIAlertController * alert= [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_error_", nil) message:errorMessage preferredStyle:UIAlertControllerStyleAlert];
+            UIAlertAction* ok = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault
+                                                       handler:^(UIAlertAction * action) {
+                                                           [alert dismissViewControllerAnimated:YES completion:nil];
+                                                           [self closeShareViewController];
+                                                       }];
+            [alert addAction:ok];
+            [self presentViewController:alert animated:YES completion:nil];
+        }
+        else
+            [self closeShareViewController];
     }
-    else
-        [self closeShareViewController];
-}
-
-- (void)uploadFileSuccess:(CCMetadataNet *)metadataNet fileID:(NSString *)fileID serverUrl:(NSString *)serverUrl selector:(NSString *)selector selectorPost:(NSString *)selectorPost
-{
-    [self.hud hideHud];
-    
-    tableMetadata *metadata = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID = %@", fileID]];
-    
-    [self.filesName removeObject:metadata.fileName];
-    [self.shareTable performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:NO];
-    
-    [self performSelector:@selector(selectPost) withObject:nil afterDelay:0.1];
 }
 
 - (void)addNetworkingQueue:(CCMetadataNet *)metadataNet

+ 7 - 7
iOSClient/.tx/config

@@ -6,46 +6,46 @@ file_filter = Supporting Files/<lang>.lproj/BKPasscodeView.strings
 source_file = Supporting Files/en.lproj/BKPasscodeView.strings
 source_lang = en
 type = STRINGS
-lang_map = pt_BR: pt-BR, zh_CN: zh-Hans, fi_FI: fi-FI, es_MX: es-MX, nb_NO: nb-NO, cs_CZ: cs-CZ, en_GB: en-GB, es_AR: es-AR, sk_SK: sk-SK
+lang_map = pt_BR:pt-BR,zh_CN:zh-Hans,fi_FI:fi-FI,es_MX:es-MX,nb_NO:nb-NO,cs_CZ:cs-CZ,en_GB:en-GB,es_AR:es-AR,sk_SK:sk-SK,hu_HU:hu,ka_GE:ka-GE,zh_TW:zh-Hant-TW,es_CL:es-CL,es_CO:es-CO,es_CR:es-CR,es_DO:es-DO,es_EC:es-EC,es_GT:es-GT,es_HN:es-HN,es_NI:es-NI,es_PA:es-PA,es_PE:es-PE,es_PR:es-PR,es_PY:es-PY,es_SV:es-SV,es_UY:es-UY
 
 [nextcloud.ios-assetspicker]
 file_filter = Supporting Files/<lang>.lproj/CTAssetsPicker.strings
 source_file = Supporting Files/en.lproj/CTAssetsPicker.strings
 source_lang = en
 type = STRINGS
-lang_map = pt_BR: pt-BR, zh_CN: zh-Hans, fi_FI: fi-FI, es_MX: es-MX, nb_NO: nb-NO, cs_CZ: cs-CZ, en_GB: en-GB, es_AR: es-AR, sk_SK: sk-SK
+lang_map = pt_BR:pt-BR,zh_CN:zh-Hans,fi_FI:fi-FI,es_MX:es-MX,nb_NO:nb-NO,cs_CZ:cs-CZ,en_GB:en-GB,es_AR:es-AR,sk_SK:sk-SK,hu_HU:hu,ka_GE:ka-GE,zh_TW:zh-Hant-TW,es_CL:es-CL,es_CO:es-CO,es_CR:es-CR,es_DO:es-DO,es_EC:es-EC,es_GT:es-GT,es_HN:es-HN,es_NI:es-NI,es_PA:es-PA,es_PE:es-PE,es_PR:es-PR,es_PY:es-PY,es_SV:es-SV,es_UY:es-UY
 
 [nextcloud.ios-error]
 file_filter = Supporting Files/<lang>.lproj/Error.strings
 source_file = Supporting Files/en.lproj/Error.strings
 source_lang = en
 type = STRINGS
-lang_map = pt_BR: pt-BR, zh_CN: zh-Hans, fi_FI: fi-FI, es_MX: es-MX, nb_NO: nb-NO, cs_CZ: cs-CZ, en_GB: en-GB, es_AR: es-AR, sk_SK: sk-SK
+lang_map = pt_BR:pt-BR,zh_CN:zh-Hans,fi_FI:fi-FI,es_MX:es-MX,nb_NO:nb-NO,cs_CZ:cs-CZ,en_GB:en-GB,es_AR:es-AR,sk_SK:sk-SK,hu_HU:hu,ka_GE:ka-GE,zh_TW:zh-Hant-TW,es_CL:es-CL,es_CO:es-CO,es_CR:es-CR,es_DO:es-DO,es_EC:es-EC,es_GT:es-GT,es_HN:es-HN,es_NI:es-NI,es_PA:es-PA,es_PE:es-PE,es_PR:es-PR,es_PY:es-PY,es_SV:es-SV,es_UY:es-UY
 
 [nextcloud.ios-infoplist]
 file_filter = Supporting Files/<lang>.lproj/InfoPlist.strings
 source_file = Supporting Files/en.lproj/InfoPlist.strings
 source_lang = en
 type = STRINGS
-lang_map = pt_BR: pt-BR, zh_CN: zh-Hans, fi_FI: fi-FI, es_MX: es-MX, nb_NO: nb-NO, cs_CZ: cs-CZ, en_GB: en-GB, es_AR: es-AR, sk_SK: sk-SK
+lang_map = pt_BR:pt-BR,zh_CN:zh-Hans,fi_FI:fi-FI,es_MX:es-MX,nb_NO:nb-NO,cs_CZ:cs-CZ,en_GB:en-GB,es_AR:es-AR,sk_SK:sk-SK,hu_HU:hu,ka_GE:ka-GE,zh_TW:zh-Hant-TW,es_CL:es-CL,es_CO:es-CO,es_CR:es-CR,es_DO:es-DO,es_EC:es-EC,es_GT:es-GT,es_HN:es-HN,es_NI:es-NI,es_PA:es-PA,es_PE:es-PE,es_PR:es-PR,es_PY:es-PY,es_SV:es-SV,es_UY:es-UY
 
 [nextcloud.ios-intro]
 file_filter = Supporting Files/<lang>.lproj/Intro.strings
 source_file = Supporting Files/en.lproj/Intro.strings
 source_lang = en
 type = STRINGS
-lang_map = pt_BR: pt-BR, zh_CN: zh-Hans, fi_FI: fi-FI, es_MX: es-MX, nb_NO: nb-NO, cs_CZ: cs-CZ, en_GB: en-GB, es_AR: es-AR, sk_SK: sk-SK
+lang_map = pt_BR:pt-BR,zh_CN:zh-Hans,fi_FI:fi-FI,es_MX:es-MX,nb_NO:nb-NO,cs_CZ:cs-CZ,en_GB:en-GB,es_AR:es-AR,sk_SK:sk-SK,hu_HU:hu,ka_GE:ka-GE,zh_TW:zh-Hant-TW,es_CL:es-CL,es_CO:es-CO,es_CR:es-CR,es_DO:es-DO,es_EC:es-EC,es_GT:es-GT,es_HN:es-HN,es_NI:es-NI,es_PA:es-PA,es_PE:es-PE,es_PR:es-PR,es_PY:es-PY,es_SV:es-SV,es_UY:es-UY
 
 [nextcloud.ios-localizable]
 file_filter = Supporting Files/<lang>.lproj/Localizable.strings
 source_file = Supporting Files/en.lproj/Localizable.strings
 source_lang = en
 type = STRINGS
-lang_map = pt_BR: pt-BR, zh_CN: zh-Hans, fi_FI: fi-FI, es_MX: es-MX, nb_NO: nb-NO, cs_CZ: cs-CZ, en_GB: en-GB, es_AR: es-AR, sk_SK: sk-SK
+lang_map = pt_BR:pt-BR,zh_CN:zh-Hans,fi_FI:fi-FI,es_MX:es-MX,nb_NO:nb-NO,cs_CZ:cs-CZ,en_GB:en-GB,es_AR:es-AR,sk_SK:sk-SK,hu_HU:hu,ka_GE:ka-GE,zh_TW:zh-Hant-TW,es_CL:es-CL,es_CO:es-CO,es_CR:es-CR,es_DO:es-DO,es_EC:es-EC,es_GT:es-GT,es_HN:es-HN,es_NI:es-NI,es_PA:es-PA,es_PE:es-PE,es_PR:es-PR,es_PY:es-PY,es_SV:es-SV,es_UY:es-UY
 
 [nextcloud.ios-swiftwebvc]
 file_filter = Supporting Files/<lang>.lproj/SwiftWebVC.strings
 source_file = Supporting Files/en.lproj/SwiftWebVC.strings
 source_lang = en
 type = STRINGS
-lang_map = pt_BR: pt-BR, zh_CN: zh-Hans, fi_FI: fi-FI, es_MX: es-MX, nb_NO: nb-NO, cs_CZ: cs-CZ, en_GB: en-GB, es_AR: es-AR, sk_SK: sk-SK
+lang_map = pt_BR:pt-BR,zh_CN:zh-Hans,fi_FI:fi-FI,es_MX:es-MX,nb_NO:nb-NO,cs_CZ:cs-CZ,en_GB:en-GB,es_AR:es-AR,sk_SK:sk-SK,hu_HU:hu,ka_GE:ka-GE,zh_TW:zh-Hant-TW,es_CL:es-CL,es_CO:es-CO,es_CR:es-CR,es_DO:es-DO,es_EC:es-EC,es_GT:es-GT,es_HN:es-HN,es_NI:es-NI,es_PA:es-PA,es_PE:es-PE,es_PR:es-PR,es_PY:es-PY,es_SV:es-SV,es_UY:es-UY

+ 48 - 42
iOSClient/Actions/CCActions.swift

@@ -33,9 +33,6 @@ import Foundation
 
     func renameSuccess(_ metadataNet: CCMetadataNet)
     func renameMoveFileOrFolderFailure(_ metadataNet: CCMetadataNet, message: NSString, errorCode: NSInteger)
-    
-    func uploadFileSuccess(_ metadataNet: CCMetadataNet, fileID: String, serverUrl: String, selector: String, selectorPost: String)
-    func uploadFileFailure(_ metadataNet: CCMetadataNet, fileID: String, serverUrl: String, selector: String, message: String, errorCode: NSInteger)
 }
 
 @objc protocol CCActionsSearchDelegate {
@@ -103,9 +100,12 @@ class CCActions: NSObject {
         
         metadataNet.action = actionDeleteFileDirectory
         metadataNet.delegate = delegate
+        metadataNet.directory = metadata.directory
         metadataNet.directoryID = metadata.directoryID
+        metadataNet.e2eEncrypted = metadata.e2eEncrypted
         metadataNet.fileID = metadata.fileID
         metadataNet.fileName = metadata.fileName
+        metadataNet.fileNameView = metadata.fileNameView
         metadataNet.selector = selectorDelete
         metadataNet.serverUrl = serverUrl
 
@@ -160,40 +160,45 @@ class CCActions: NSObject {
             return
         }
         
-        if metadata.fileName == fileName {
+        if metadata.fileNameView == fileName {
             return
         }
         
-        let ocNetworking = OCnetworking.init(delegate: nil, metadataNet: nil, withUser: appDelegate.activeUser, withUserID: appDelegate.activeUserID, withPassword: appDelegate.activePassword, withUrl: appDelegate.activeUrl);
-
-        // Verify if exists the fileName TO
-        guard (ocNetworking?.readFileSync("\(String(describing: serverUrl))/\(fileName)")) != nil else {
+        DispatchQueue.global(qos: .userInitiated).async {
+        
+            // Verify if exists the fileName TO
+            var items: NSArray?
+        
+            guard NCNetworkingSync.sharedManager().readFile("\(String(describing: serverUrl))/\(fileName)", user: self.appDelegate.activeUser, userID: self.appDelegate.activeUserID, password: self.appDelegate.activePassword, items: &items) != nil else {
                 
-            let alertController = UIAlertController(title: NSLocalizedString("_error_", comment: ""), message: NSLocalizedString("_file_already_exists_", comment: ""), preferredStyle: UIAlertControllerStyle.alert)
+                DispatchQueue.main.async {
+                    
+                    let alertController = UIAlertController(title: NSLocalizedString("_error_", comment: ""), message: NSLocalizedString("_file_already_exists_", comment: ""), preferredStyle: UIAlertControllerStyle.alert)
                 
-            let okAction = UIAlertAction(title: "OK", style: UIAlertActionStyle.default) {
-                (result : UIAlertAction) -> Void in
-            }
+                    let okAction = UIAlertAction(title: "OK", style: UIAlertActionStyle.default) {
+                        (result : UIAlertAction) -> Void in
+                    }
                 
-            alertController.addAction(okAction)
+                    alertController.addAction(okAction)
                 
-            delegate.present(alertController, animated: true, completion: nil)
+                    delegate.present(alertController, animated: true, completion: nil)
+                }
                 
-            return;
-        }
-
-        // Plain
-            
-        metadataNet.action = actionMoveFileOrFolder
-        metadataNet.delegate = delegate
-        metadataNet.fileID = metadata.fileID
-        metadataNet.fileName = metadata.fileName
-        metadataNet.fileNameTo = fileName
-        metadataNet.selector = selectorRename
-        metadataNet.serverUrl = serverUrl
-        metadataNet.serverUrlTo = serverUrl
+                return;
+            }
+        
+            metadataNet.action = actionMoveFileOrFolder
+            metadataNet.delegate = delegate
+            metadataNet.fileID = metadata.fileID
+            metadataNet.fileName = metadata.fileName
+            metadataNet.fileNameTo = fileName
+            metadataNet.fileNameView = metadata.fileNameView
+            metadataNet.selector = selectorRename
+            metadataNet.serverUrl = serverUrl
+            metadataNet.serverUrlTo = serverUrl
             
-        appDelegate.addNetworkingOperationQueue(appDelegate.netQueue, delegate: self, metadataNet: metadataNet)
+            self.appDelegate.addNetworkingOperationQueue(self.appDelegate.netQueue, delegate: self, metadataNet: metadataNet)
+        }
     }
     
     @objc func renameSuccess(_ metadataNet: CCMetadataNet) {
@@ -204,8 +209,14 @@ class CCActions: NSObject {
             
             let directory = CCUtility.stringAppendServerUrl(metadataNet.serverUrl, addFileName: metadataNet.fileName)
             let directoryTo = CCUtility.stringAppendServerUrl(metadataNet.serverUrl, addFileName: metadataNet.fileNameTo)
-
-            NCManageDatabase.sharedInstance.setDirectory(serverUrl: directory!, serverUrlTo: directoryTo!, etag: nil, fileID: nil)
+            
+            guard let directoryTable = NCManageDatabase.sharedInstance.getTableDirectory(predicate: NSPredicate(format: "serverUrl = %@", directory!)) else {
+                
+                metadataNet.delegate?.renameMoveFileOrFolderFailure(metadataNet, message: "Internal error, ServerUrl not found" as NSString, errorCode: 0)
+                return
+            }
+            
+            NCManageDatabase.sharedInstance.setDirectory(serverUrl: directory!, serverUrlTo: directoryTo!, etag: nil, fileID: nil, encrypted: directoryTable.e2eEncrypted)
             
         } else {
             
@@ -237,16 +248,6 @@ class CCActions: NSObject {
         metadataNet.delegate?.renameMoveFileOrFolderFailure(metadataNet, message: message as NSString, errorCode: errorCode)
     }
     
-    @objc func uploadFileSuccess(_ metadataNet: CCMetadataNet, fileID: String, serverUrl: String, selector: String, selectorPost: String) {
-        
-        metadataNet.delegate?.uploadFileSuccess(metadataNet, fileID:fileID, serverUrl: serverUrl, selector: selector, selectorPost: selectorPost)
-    }
-    
-    @objc func uploadFileFailure(_ metadataNet: CCMetadataNet, fileID: String, serverUrl: String, selector: String, message: String, errorCode: NSInteger) {
-        
-        metadataNet.delegate?.uploadFileFailure(metadataNet, fileID:fileID, serverUrl: serverUrl, selector: selector, message: message, errorCode: errorCode)
-    }
-    
     // --------------------------------------------------------------------------------------------
     // MARK: Search
     // --------------------------------------------------------------------------------------------
@@ -300,6 +301,7 @@ class CCActions: NSObject {
         metadataNet.delegate = delegate
         metadataNet.fileID = metadata.fileID
         metadataNet.fileName = CCUtility.returnFileNamePath(fromFileName: metadata.fileName, serverUrl: serverUrl, activeUrl: appDelegate.activeUrl)
+        metadataNet.fileNameView = metadata.fileNameView
         metadataNet.options = "m"
         metadataNet.priority = Operation.QueuePriority.low.rawValue
         metadataNet.selector = selectorDownloadThumbnail;
@@ -384,13 +386,15 @@ class CCActions: NSObject {
     
     @objc func deleteFile(metadata: tableMetadata, serverUrl: String) {
         
+        let fileNamePath = appDelegate.directoryUser + "/" + metadata.fileID
+        
         do {
-            try FileManager.default.removeItem(atPath: "\(appDelegate.directoryUser)/\(metadata.fileID)")
+            try FileManager.default.removeItem(atPath: fileNamePath)
         } catch {
             // handle error
         }
         do {
-            try FileManager.default.removeItem(atPath: "\(appDelegate.directoryUser)/\(metadata.fileID).ico")
+            try FileManager.default.removeItem(atPath: fileNamePath + ".ico")
         } catch {
             // handle error
         }
@@ -402,6 +406,8 @@ class CCActions: NSObject {
         
         NCManageDatabase.sharedInstance.deleteLocalFile(predicate: NSPredicate(format: "fileID == %@", metadata.fileID))
         NCManageDatabase.sharedInstance.deleteMetadata(predicate: NSPredicate(format: "fileID == %@", metadata.fileID), clearDateReadDirectoryID: nil)
+        // E2E (if exists the record)
+        NCManageDatabase.sharedInstance.deleteE2eEncryption(predicate: NSPredicate(format: "account = %@ AND serverUrl = %@ AND fileNameIdentifier = %@", metadata.account, serverUrl, metadata.fileName))
     }
 }
 

+ 23 - 20
iOSClient/Activity/CCActivity.m

@@ -32,6 +32,7 @@
 
 @interface CCActivity ()
 {
+    AppDelegate *appDelegate;
     BOOL _verbose;
 
     // Datasource
@@ -49,17 +50,19 @@
 {
     if (self = [super initWithCoder:aDecoder])  {
         
-        app.activeActivity = self;
+        appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+
+        appDelegate.activeActivity = self;
         
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
     }
     return self;
 }
 
-- (void)viewDidLoad {
-    
+- (void)viewDidLoad
+{
     [super viewDidLoad];
-    
+ 
     self.collectionView.emptyDataSetSource = self;
     self.collectionView.emptyDataSetDelegate = self;
     self.collectionView.delegate = self;
@@ -81,11 +84,11 @@
     _verbose = [CCUtility getActivityVerboseHigh];
     
     // Color
-    [app aspectNavigationControllerBar:self.navigationController.navigationBar online:[app.reachability isReachable] hidden:NO];
-    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
     
     // Plus Button
-    [app plusButtonVisibile:true];
+    [appDelegate plusButtonVisibile:true];
 }
 
 // E' arrivato
@@ -99,7 +102,7 @@
 - (void)changeTheming
 {
     if (self.isViewLoaded && self.view.window)
-        [app changeTheming:self];
+        [appDelegate changeTheming:self];
 }
 
 - (void)didReceiveMemoryWarning {
@@ -121,12 +124,12 @@
 
 - (UIColor *)backgroundColorForEmptyDataSet:(UIScrollView *)scrollView
 {
-    return [UIColor whiteColor];
+    return [NCBrandColor sharedInstance].backgroundView;
 }
 
 - (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
 {
-    return [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"activityNoRecord"] color:[NCBrandColor sharedInstance].brand];
+    return [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"activityNoRecord"] color:[NCBrandColor sharedInstance].brandElement];
 }
 
 - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView
@@ -145,7 +148,7 @@
 - (void)reloadDatasource
 {
     // test
-    if (app.activeAccount.length == 0)
+    if (appDelegate.activeAccount.length == 0)
         return;
     
     NSPredicate *predicate;
@@ -153,9 +156,9 @@
     NSDate *sixDaysAgo = [[NSCalendar currentCalendar] dateByAddingUnit:NSCalendarUnitDay value:-k_daysOfActivity toDate:[NSDate date] options:0];
         
     if (_verbose)
-        predicate = [NSPredicate predicateWithFormat:@"account = %@ AND date > %@", app.activeAccount, sixDaysAgo];
+        predicate = [NSPredicate predicateWithFormat:@"account = %@ AND date > %@", appDelegate.activeAccount, sixDaysAgo];
     else
-        predicate = [NSPredicate predicateWithFormat:@"account = %@ AND verbose = %lu AND date > %@", app.activeAccount, k_activityVerboseDefault, sixDaysAgo];
+        predicate = [NSPredicate predicateWithFormat:@"account = %@ AND verbose = %lu AND date > %@", appDelegate.activeAccount, k_activityVerboseDefault, sixDaysAgo];
 
     _sectionDataSource = [[NCManageDatabase sharedInstance] getActivityWithPredicate:predicate];
         
@@ -326,9 +329,9 @@
         
         if (metadata && ([activity.action isEqual: k_activityDebugActionDownload] || [activity.action isEqual: k_activityDebugActionUpload])) {
             
-             if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, activity.fileID]]) {
+             if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@.ico", appDelegate.directoryUser, activity.fileID]]) {
              
-                 imageView.image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, activity.fileID]];
+                 imageView.image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.ico", appDelegate.directoryUser, activity.fileID]];
                  
              } else {
                  
@@ -348,21 +351,21 @@
     tableActivity *activity = [_sectionDataSource objectAtIndex:indexPath.section];
     tableMetadata *metadata = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID = %@", activity.fileID]];
     
-    BOOL existsFile = [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@", app.directoryUser, activity.fileID]];
+    BOOL existsFile = [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@", appDelegate.directoryUser, activity.fileID]];
     
     if (metadata && existsFile) {
         
-        if (!self.splitViewController.isCollapsed && app.activeMain.detailViewController.isViewLoaded && app.activeMain.detailViewController.view.window)
-            [app.activeMain.navigationController popToRootViewControllerAnimated:NO];
+        if (!self.splitViewController.isCollapsed && appDelegate.activeMain.detailViewController.isViewLoaded && appDelegate.activeMain.detailViewController.view.window)
+            [appDelegate.activeMain.navigationController popToRootViewControllerAnimated:NO];
         
         dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
             
-            [app.activeMain performSegueWithIdentifier:@"segueDetail" sender:metadata];            
+            [appDelegate.activeMain performSegueWithIdentifier:@"segueDetail" sender:metadata];
         });
         
     } else {
         
-        [app messageNotification:@"_info_" description:@"_activity_file_not_present_" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeInfo errorCode:0];
+        [appDelegate messageNotification:@"_info_" description:@"_activity_file_not_present_" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeInfo errorCode:0];
     }
 }
 

+ 1 - 0
iOSClient/AppDelegate.h

@@ -145,6 +145,7 @@
 - (void)updateApplicationIconBadgeNumber;
 
 // TabBarController
+- (void)createTabBarController:(UITabBarController *)tabBarController;
 - (void)aspectNavigationControllerBar:(UINavigationBar *)nav online:(BOOL)online hidden:(BOOL)hidden;
 - (void)aspectTabBar:(UITabBar *)tab hidden:(BOOL)hidden;
 - (void)plusButtonVisibile:(BOOL)visible;

+ 54 - 104
iOSClient/AppDelegate.m

@@ -186,16 +186,9 @@
     //[[AVAudioSession sharedInstance] setActive:YES error:nil];
     [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
     
-    UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
-    //UITabBarController *tabBarController = [splitViewController.viewControllers firstObject];
-    UINavigationController *navigationController = [splitViewController.viewControllers lastObject];
-
-    navigationController.topViewController.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem;
-    splitViewController.preferredDisplayMode = UISplitViewControllerDisplayModeAllVisible;
-    [app aspectNavigationControllerBar:navigationController.navigationBar online:YES hidden:NO];
-    
-    // Settings TabBar
-    [self createTabBarController];
+    // How to hide UINavigationBar 1px bottom line < iOS 11
+    [[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];
+    [[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
     
     // passcode
     [[BKPasscodeLockScreenManager sharedManager] setDelegate:self];
@@ -217,7 +210,6 @@
     
     // Start Timer
     self.timerProcessAutoDownloadUpload = [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(processAutoDownloadUpload) userInfo:nil repeats:YES];
-    
     self.timerUpdateApplicationIconBadgeNumber = [NSTimer scheduledTimerWithTimeInterval:k_timerUpdateApplicationIconBadgeNumber target:self selector:@selector(updateApplicationIconBadgeNumber) userInfo:nil repeats:YES];
 
     // Registration Push Notification
@@ -840,21 +832,18 @@
 #pragma mark ===== TabBarController =====
 #pragma --------------------------------------------------------------------------------------------
 
-- (void)createTabBarController
+- (void)createTabBarController:(UITabBarController *)tabBarController
 {
     UITabBarItem *item;
     NSLayoutConstraint *constraint;
     CGFloat multiplier = 0;
     CGFloat safeAreaBottom = 0;
     
-    UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
-    UITabBarController *tabBarController = [splitViewController.viewControllers firstObject];
-    
     if (@available(iOS 11, *)) {
         safeAreaBottom = [UIApplication sharedApplication].delegate.window.safeAreaInsets.bottom/2;
     }
     
-    [app aspectTabBar:tabBarController.tabBar hidden:NO];
+    [self aspectTabBar:tabBarController.tabBar hidden:NO];
     
     // File
     item = [tabBarController.tabBar.items objectAtIndex: k_tabBarApplicationIndexFile];
@@ -870,8 +859,8 @@
     
     // (PLUS)
     item = [tabBarController.tabBar.items objectAtIndex: k_tabBarApplicationIndexPlusHide];
-    item.title = nil;
-    item.image = nil;
+    item.title = @"";
+    item.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"tabBarPlus"] color:[UIColor clearColor]];
     item.enabled = false;
     
     // Photos
@@ -887,7 +876,7 @@
     item.selectedImage = [UIImage imageNamed:@"tabBarMore"];
     
     // Plus Button
-    UIImage *buttonImage = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"tabBarPlus"] color:[NCBrandColor sharedInstance].brand];
+    UIImage *buttonImage = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"tabBarPlus"] color:[NCBrandColor sharedInstance].brandElement];
     UIButton *buttonPlus = [UIButton buttonWithType:UIButtonTypeCustom];
     buttonPlus.tag = 99;
     [buttonPlus setBackgroundImage:buttonImage forState:UIControlStateNormal];
@@ -917,8 +906,10 @@
 {
     nav.translucent = NO;
     nav.barTintColor = [NCBrandColor sharedInstance].brand;
-    nav.tintColor = [NCBrandColor sharedInstance].navigationBarText;
-    [nav setTitleTextAttributes:@{NSForegroundColorAttributeName : [NCBrandColor sharedInstance].navigationBarText}];
+    nav.tintColor = [NCBrandColor sharedInstance].brandText;
+    [nav setTitleTextAttributes:@{NSForegroundColorAttributeName : [NCBrandColor sharedInstance].brandText}];
+    // Change bar bottom line shadow
+    nav.shadowImage = [CCGraphics generateSinglePixelImageWithColor:[NCBrandColor sharedInstance].brand];
     
     if (!online)
         [nav setTitleTextAttributes:@{NSForegroundColorAttributeName : [NCBrandColor sharedInstance].connectionNo}];
@@ -932,7 +923,7 @@
 {
     tab.translucent = NO;
     tab.barTintColor = [NCBrandColor sharedInstance].tabBar;
-    tab.tintColor = [NCBrandColor sharedInstance].brand;
+    tab.tintColor = [NCBrandColor sharedInstance].brandElement;
     
     tab.hidden = hidden;
     
@@ -946,7 +937,7 @@
     
     UIButton *buttonPlus = [tabBarController.view viewWithTag:99];
     
-    UIImage *buttonImage = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"tabBarPlus"] color:[NCBrandColor sharedInstance].brand];
+    UIImage *buttonImage = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"tabBarPlus"] color:[NCBrandColor sharedInstance].brandElement];
     [buttonPlus setBackgroundImage:buttonImage forState:UIControlStateNormal];
     [buttonPlus setBackgroundImage:buttonImage forState:UIControlStateHighlighted];
     
@@ -971,12 +962,8 @@
     
     UIView *view = [[(UIButton *)sender superview] superview];
     
-    CreateMenuAdd *menuAdd = [[CreateMenuAdd alloc] initWithThemingColor:[NCBrandColor sharedInstance].brand];
-    
-    if ([CCUtility getCreateMenuEncrypted])
-        [menuAdd createMenuEncryptedWithView:view];
-    else
-        [menuAdd createMenuPlainWithView:view];
+    CreateMenuAdd *menuAdd = [[CreateMenuAdd alloc] initWithThemingColor:[NCBrandColor sharedInstance].brandElement];
+    [menuAdd createMenuWithView:view];
 }
 
 - (void)selectedTabBarController:(NSInteger)index
@@ -1009,17 +996,17 @@
     UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
     UITabBarController *tabBarController = [splitViewController.viewControllers firstObject];
 
-    NSString *serverUrl = [CCUtility getHomeServerUrlActiveUrl:app.activeUrl];
+    NSString *serverUrl = [CCUtility getHomeServerUrlActiveUrl:self.activeUrl];
     NSInteger index = tabBarController.selectedIndex;
     
     // select active serverUrl
     if (index == k_tabBarApplicationIndexFile) {
-        serverUrl = app.activeMain.serverUrl;
+        serverUrl = self.activeMain.serverUrl;
     } else if (index == k_tabBarApplicationIndexFavorite) {
-        if (app.activeFavorites.serverUrl)
-            serverUrl = app.activeFavorites.serverUrl;
+        if (self.activeFavorites.serverUrl)
+            serverUrl = self.activeFavorites.serverUrl;
     } else if (index == k_tabBarApplicationIndexPhotos) {
-        serverUrl = [[NCManageDatabase sharedInstance] getAccountAutoUploadPath:app.activeUrl];
+        serverUrl = [[NCManageDatabase sharedInstance] getAccountAutoUploadPath:self.activeUrl];
     }
     
     return serverUrl;
@@ -1031,65 +1018,45 @@
 
 - (void)settingThemingColorBrand
 {
-    UIColor* newColor;
-    
-    if (self.activeAccount.length > 0) {
-    
-        tableCapabilities *capabilities = [[NCManageDatabase sharedInstance] getCapabilites];
+    if (self.activeAccount.length == 0 || self.maintenanceMode)
+        return;
     
-        if ([NCBrandOptions sharedInstance].use_themingColor && capabilities.themingColor.length == 7) {
+    if ([NCBrandOptions sharedInstance].use_themingColor) {
         
-            BOOL isLight = [CCGraphics isLight:[CCGraphics colorFromHexString:capabilities.themingColor]];
-            
-            if (isLight) {
-                
-                // Activity
-                [[NCManageDatabase sharedInstance] addActivityClient:@"" fileID:@"" action:k_activityDebugActionCapabilities selector:@"Server Theming" note:NSLocalizedString(@"_theming_is_light_", nil) type:k_activityTypeFailure verbose:k_activityVerboseDefault activeUrl:_activeUrl];
-                
-                newColor = [NCBrandColor sharedInstance].customer;
-                
-            } else {
-                
-                newColor = [CCGraphics colorFromHexString:capabilities.themingColor];
-            }
-            
-        } else {
+        tableCapabilities *capabilities = [[NCManageDatabase sharedInstance] getCapabilites];
+
+        [CCGraphics settingThemingColor:capabilities.themingColor themingColorElement:capabilities.themingColorElement themingColorText:capabilities.themingColorText];
             
-            newColor = [NCBrandColor sharedInstance].customer;
-        }
-        
     } else {
-        
-        newColor = [NCBrandColor sharedInstance].customer;
-    }
     
-    if (self.activeAccount.length > 0 && ![newColor isEqual:[NCBrandColor sharedInstance].brand] && newColor) {
-        
-        [NCBrandColor sharedInstance].brand = newColor;
-        [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"changeTheming" object:nil];
+        [NCBrandColor sharedInstance].brand = [NCBrandColor sharedInstance].customer;
+        [NCBrandColor sharedInstance].brandElement = [NCBrandColor sharedInstance].customer;
+        [NCBrandColor sharedInstance].brandText = [NCBrandColor sharedInstance].customerText;
     }
+    
+    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"changeTheming" object:nil];
 }
 
 - (void)changeTheming:(UIViewController *)vc
 {
-    UIColor *color = [NCBrandColor sharedInstance].brand;
-    
     // Change Navigation & TabBar color
-    vc.navigationController.navigationBar.barTintColor = color;
-    vc.tabBarController.tabBar.tintColor = color;
+    vc.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].brand;
+    vc.tabBarController.tabBar.tintColor = [NCBrandColor sharedInstance].brandElement;
+    // Change bar bottom line shadow
+    vc.navigationController.navigationBar.shadowImage = [CCGraphics generateSinglePixelImageWithColor:[NCBrandColor sharedInstance].brand];
     
     // Change button Plus
     UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
     UITabBarController *tabBarController = [splitViewController.viewControllers firstObject];
     
     UIButton *button = [tabBarController.view viewWithTag:99];
-    UIImage *buttonImage = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"tabBarPlus"] color:color];
+    UIImage *buttonImage = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"tabBarPlus"] color:[NCBrandColor sharedInstance].brandElement];
     
     [button setBackgroundImage:buttonImage forState:UIControlStateNormal];
     [button setBackgroundImage:buttonImage forState:UIControlStateHighlighted];
     
     // Tint Color GLOBAL WINDOW
-    [self.window setTintColor:[NCBrandColor sharedInstance].brand];
+    [self.window setTintColor:[NCBrandColor sharedInstance].textView];
 }
 
 #pragma --------------------------------------------------------------------------------------------
@@ -1365,15 +1332,15 @@
     else if ([[_listChangeTask objectForKey:fileID] isEqualToString:@"reloadDownload"]) {
         
         dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
-            [[CCNetworking sharedNetworking] downloadFile:fileID serverUrl:serverUrl selector:metadata.sessionSelector selectorPost:metadata.sessionSelectorPost session:k_download_session taskStatus:k_taskStatusResume delegate:self.activeMain];
+            [[CCNetworking sharedNetworking] downloadFile:metadata.fileName fileID:fileID serverUrl:serverUrl selector:metadata.sessionSelector selectorPost:metadata.sessionSelectorPost session:k_download_session taskStatus:k_taskStatusResume delegate:self.activeMain];
         });
     }
     else if ([[_listChangeTask objectForKey:metadata.fileID] isEqualToString:@"cancelUpload"]) {
         
         // remove the file
         
-        [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/%@", app.directoryUser, fileID] error:nil];
-        [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, fileID] error:nil];
+        [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/%@", self.directoryUser, fileID] error:nil];
+        [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/%@.ico", self.directoryUser, fileID] error:nil];
         
         [[NCManageDatabase sharedInstance] deleteMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID = %@", fileID] clearDateReadDirectoryID:nil];
     }
@@ -1435,7 +1402,8 @@
     
     NSInteger counterDownloadInSession = [[[NCManageDatabase sharedInstance] getTableMetadataDownload] count] + [[[NCManageDatabase sharedInstance] getTableMetadataDownloadWWan] count];
     NSInteger counterUploadInSessionAndInLock = [[[NCManageDatabase sharedInstance] getTableMetadataUpload] count] + [[[NCManageDatabase sharedInstance] getTableMetadataUploadWWan] count] + [[[NCManageDatabase sharedInstance] getLockQueueUpload] count];
-    
+    NSInteger counterUploadInLock = [[[NCManageDatabase sharedInstance] getQueueUploadWithPredicate:[NSPredicate predicateWithFormat:@"account = %@ AND lock = true", self.activeAccount]] count];
+
     NSInteger counterNewUpload = 0;
     
     // ------------------------- <selector Auto Download> -------------------------
@@ -1445,7 +1413,7 @@
         metadataNet = [[NCManageDatabase sharedInstance] getQueueDownload];
         if (metadataNet) {
             
-            [[CCNetworking sharedNetworking] downloadFile:metadataNet.fileID serverUrl:metadataNet.serverUrl selector:metadataNet.selector selectorPost:metadataNet.selectorPost session:metadataNet.session taskStatus:metadataNet.taskStatus delegate:app.activeMain];
+            [[CCNetworking sharedNetworking] downloadFile:metadataNet.fileName fileID:metadataNet.fileID serverUrl:metadataNet.serverUrl selector:metadataNet.selector selectorPost:metadataNet.selectorPost session:metadataNet.session taskStatus:metadataNet.taskStatus delegate:self.activeMain];
             
         } else
             break;
@@ -1455,21 +1423,15 @@
     
     // ------------------------- <selector Auto Upload> -------------------------
     
-    while (counterUploadInSessionAndInLock < maxConcurrentDownloadUpload) {
+    if (counterUploadInSessionAndInLock < maxConcurrentDownloadUpload && counterUploadInLock < 1) {
         
-        metadataNet = [[NCManageDatabase sharedInstance] getQueueUploadWithSelector:selectorUploadAutoUpload];
+        metadataNet = [[NCManageDatabase sharedInstance] getQueueUploadLockWithSelector:selectorUploadAutoUpload];
         if (metadataNet) {
             
-            // Priority Error only in Foreground
-            if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground && metadataNet.priority <= k_priorityAutoUploadError)
-                continue;
-            
             [[CCNetworking sharedNetworking] uploadFileFromAssetLocalIdentifier:metadataNet delegate:_activeMain];
             
             counterNewUpload++;
-            
-        } else
-            break;
+        }
         
         counterUploadInSessionAndInLock = [[[NCManageDatabase sharedInstance] getTableMetadataUpload] count] + [[[NCManageDatabase sharedInstance] getTableMetadataUploadWWan] count] + [[[NCManageDatabase sharedInstance] getLockQueueUpload] count];
     }
@@ -1487,21 +1449,15 @@
         
     } else {
         
-        while (counterUploadInSessionAndInLock < maxConcurrentDownloadUpload) {
+        if (counterUploadInSessionAndInLock < maxConcurrentDownloadUpload && counterUploadInLock < 1) {
             
-            metadataNet =  [[NCManageDatabase sharedInstance] getQueueUploadWithSelector:selectorUploadAutoUploadAll];
+            metadataNet = [[NCManageDatabase sharedInstance] getQueueUploadLockWithSelector:selectorUploadAutoUploadAll];
             if (metadataNet) {
                 
-                // Priority Error only in Foreground
-                if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground && metadataNet.priority <= k_priorityAutoUploadError)
-                    continue;
-                
                 [[CCNetworking sharedNetworking] uploadFileFromAssetLocalIdentifier:metadataNet delegate:_activeMain];
                 
                 counterNewUpload++;
-                
-            } else
-                break;
+            }
             
             counterUploadInSessionAndInLock = [[[NCManageDatabase sharedInstance] getTableMetadataUpload] count] + [[[NCManageDatabase sharedInstance] getTableMetadataUploadWWan] count] + [[[NCManageDatabase sharedInstance] getLockQueueUpload] count];
         }
@@ -1509,21 +1465,15 @@
     
     // ------------------------- <selector Upload File> -------------------------
     
-    while (counterUploadInSessionAndInLock < maxConcurrentDownloadUpload) {
+    if (counterUploadInSessionAndInLock < maxConcurrentDownloadUpload && counterUploadInLock < 1) {
         
-        metadataNet = [[NCManageDatabase sharedInstance] getQueueUploadWithSelector:selectorUploadFile];
+        metadataNet = [[NCManageDatabase sharedInstance] getQueueUploadLockWithSelector:selectorUploadFile];
         if (metadataNet) {
             
-            // Priority Error only in Foreground
-            if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground && metadataNet.priority <= k_priorityAutoUploadError)
-                continue;
-            
             [[CCNetworking sharedNetworking] uploadFileFromAssetLocalIdentifier:metadataNet delegate:_activeMain];
             
             counterNewUpload++;
-            
-        } else
-            break;
+        }
         
         counterUploadInSessionAndInLock = [[[NCManageDatabase sharedInstance] getTableMetadataUpload] count] + [[[NCManageDatabase sharedInstance] getTableMetadataUploadWWan] count] + [[[NCManageDatabase sharedInstance] getLockQueueUpload] count];
     }
@@ -1548,7 +1498,7 @@
     }
     
     // Start Timer
-    _timerProcessAutoDownloadUpload = [NSTimer scheduledTimerWithTimeInterval:k_timerProcessAutoDownloadUpload target:app selector:@selector(processAutoDownloadUpload) userInfo:nil repeats:YES];
+    _timerProcessAutoDownloadUpload = [NSTimer scheduledTimerWithTimeInterval:k_timerProcessAutoDownloadUpload target:self selector:@selector(processAutoDownloadUpload) userInfo:nil repeats:YES];
 }
 
 #pragma --------------------------------------------------------------------------------------------

+ 51 - 74
iOSClient/AutoUpload/NCAutoUpload.m

@@ -29,6 +29,7 @@
 
 @interface NCAutoUpload ()
 {
+    AppDelegate *appDelegate;
     CCHud *_hud;
 }
 @end
@@ -44,6 +45,7 @@
         if (!sharedInstance) {
             
             sharedInstance = [NCAutoUpload new];
+            sharedInstance->appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
         }
         return sharedInstance;
     }
@@ -318,26 +320,28 @@
 - (void)uploadNewAssets
 {
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
-        [self uploadAssetsNewAndFull:NO];
+        [self uploadAssetsNewAndFull:selectorUploadAutoUpload];
     });
 }
 
 - (void)uploadFullAssets
 {
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
-        [self uploadAssetsNewAndFull:YES];
+        [self uploadAssetsNewAndFull:selectorUploadAutoUploadAll];
     });
 }
 
-- (void)uploadAssetsNewAndFull:(BOOL)assetsFull
+- (void)uploadAssetsNewAndFull:(NSString *)selector
 {
-     if (!app.activeAccount || app.maintenanceMode)
+     if (!appDelegate.activeAccount || appDelegate.maintenanceMode)
          return;
     
-    tableAccount *account = [[NCManageDatabase sharedInstance] getAccountActive];
-    
+    tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountActive];
+    NSMutableArray *metadataNetFull = [NSMutableArray new];
+    NSString *autoUploadPath = [[NCManageDatabase sharedInstance] getAccountAutoUploadPath:appDelegate.activeUrl];
+
     // Check Asset : NEW or FULL
-    PHFetchResult *newAssetToUpload = [self getCameraRollAssets:account assetsFull:assetsFull alignPhotoLibrary:NO];
+    PHFetchResult *newAssetToUpload = [self getCameraRollAssets:tableAccount selector:selector alignPhotoLibrary:NO];
     
     // News Assets ? if no verify if blocked Table Auto Upload -> Autostart
     if ([newAssetToUpload count] == 0) {
@@ -351,8 +355,7 @@
     }
     
     dispatch_async(dispatch_get_main_queue(), ^{
-        if (assetsFull) {
-        
+        if ([selector isEqualToString:selectorUploadAutoUploadAll]) {
             if (!_hud)
                 _hud = [[CCHud alloc] initWithView:[[[UIApplication sharedApplication] delegate] window]];
         
@@ -360,38 +363,12 @@
         }
     });
     
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.01 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
-        if (assetsFull)
-            [self performSelectorOnMainThread:@selector(uploadFullAssetsToNetwork:) withObject:newAssetToUpload waitUntilDone:NO];
-        else
-            [self performSelectorOnMainThread:@selector(uploadNewAssetsToNetwork:) withObject:newAssetToUpload waitUntilDone:NO];
-    });
-}
-
-- (void)uploadNewAssetsToNetwork:(PHFetchResult *)newAssetToUpload
-{
-    [self uploadAssetsToNetwork:newAssetToUpload assetsFull:NO];
-}
-
-- (void)uploadFullAssetsToNetwork:(PHFetchResult *)newAssetToUpload
-{
-    [self uploadAssetsToNetwork:newAssetToUpload assetsFull:YES];
-}
-
-- (void)uploadAssetsToNetwork:(PHFetchResult *)newAssetToUpload assetsFull:(BOOL)assetsFull
-{
-    tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountActive];
-    NSMutableArray *metadataNetFull = [NSMutableArray new];
-  
-    NSString *autoUploadPath = [[NCManageDatabase sharedInstance] getAccountAutoUploadPath:app.activeUrl];
-    BOOL useSubFolder = tableAccount.autoUploadCreateSubfolder;
-    
     // Create the folder for Photos & if request the subfolders
-    if(![[NCAutoUpload sharedInstance] createFolderSubFolderAutoUploadFolderPhotos:autoUploadPath useSubFolder:useSubFolder assets:newAssetToUpload selector:selectorUploadAutoUploadAll]) {
-        
-        // end loading
-        [_hud hideHud];
-        
+    if(![[NCAutoUpload sharedInstance] createFolderSubFolderAutoUploadFolderPhotos:autoUploadPath useSubFolder:tableAccount.autoUploadCreateSubfolder assets:newAssetToUpload selector:selector]) {
+        dispatch_async(dispatch_get_main_queue(), ^{
+            // end loading
+            [_hud hideHud];
+        });
         return;
     }
     
@@ -418,56 +395,52 @@
         [formatter setDateFormat:@"MM"];
         NSString *monthString = [formatter stringFromDate:assetDate];
         
-        if (useSubFolder)
+        if (tableAccount.autoUploadCreateSubfolder)
             serverUrl = [NSString stringWithFormat:@"%@/%@/%@", autoUploadPath, yearString, monthString];
         else
             serverUrl = autoUploadPath;
         
-        CCMetadataNet *metadataNet = [[CCMetadataNet alloc] initWithAccount:app.activeAccount];
+        CCMetadataNet *metadataNet = [[CCMetadataNet alloc] initWithAccount:appDelegate.activeAccount];
         
         metadataNet.assetLocalIdentifier = asset.localIdentifier;
-        if (assetsFull) {
-            metadataNet.selector = selectorUploadAutoUploadAll;
-            
+        if ([selector isEqualToString:selectorUploadAutoUploadAll]) {
             // Option 
             if ([[NCBrandOptions sharedInstance] use_storeLocalAutoUploadAll] == true)
                 metadataNet.selectorPost = nil;
             else
                 metadataNet.selectorPost = selectorUploadRemovePhoto;
-            
         } else {
-            metadataNet.selector = selectorUploadAutoUpload;
             metadataNet.selectorPost = nil;
         }
         
-        if (assetMediaType == PHAssetMediaTypeImage)
-            metadataNet.priority = k_priorityAutoUploadImage;
-        else
-            metadataNet.priority = k_priorityAutoUploadVideo;
-
         metadataNet.fileName = fileName;
+        metadataNet.selector = selector;
         metadataNet.serverUrl = serverUrl;
         metadataNet.session = session;
         metadataNet.taskStatus = k_taskStatusResume;
         
         [metadataNetFull addObject:metadataNet];
         
-        // Update database
-        if (!assetsFull)
+        // Update database Auto Upload
+        if ([selector isEqualToString:selectorUploadAutoUpload])
             [self addQueueUploadAndPhotoLibrary:metadataNet asset:asset];
     }
     
     // Insert all assets (Full) in tableQueueUpload
-    if (assetsFull && [metadataNetFull count] > 0) {
+    if ([selector isEqualToString:selectorUploadAutoUploadAll] && [metadataNetFull count] > 0) {
     
         [[NCManageDatabase sharedInstance] addQueueUploadWithMetadatasNet:metadataNetFull];
         
         // Update icon badge number
-        [app updateApplicationIconBadgeNumber];
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [appDelegate updateApplicationIconBadgeNumber];
+        });
     }
     
     // end loading
-    [_hud hideHud];
+    dispatch_async(dispatch_get_main_queue(), ^{
+        [_hud hideHud];
+    });
 }
 
 - (void)addQueueUploadAndPhotoLibrary:(CCMetadataNet *)metadataNet asset:(PHAsset *)asset
@@ -476,23 +449,23 @@
         
         if ([[NCManageDatabase sharedInstance] addQueueUploadWithMetadataNet:metadataNet]) {
         
-            [[NCManageDatabase sharedInstance] addActivityClient:metadataNet.fileName fileID:metadataNet.assetLocalIdentifier action:k_activityDebugActionAutoUpload selector:metadataNet.selector note:@"Add Auto Upload, add new asset" type:k_activityTypeInfo verbose:k_activityVerboseHigh activeUrl:app.activeUrl];
+            [[NCManageDatabase sharedInstance] addActivityClient:metadataNet.fileName fileID:metadataNet.assetLocalIdentifier action:k_activityDebugActionAutoUpload selector:metadataNet.selector note:@"Add Auto Upload, add new asset" type:k_activityTypeInfo verbose:k_activityVerboseHigh activeUrl:appDelegate.activeUrl];
         
         } else {
     
-            [[NCManageDatabase sharedInstance] addActivityClient:metadataNet.fileName fileID:metadataNet.assetLocalIdentifier action:k_activityDebugActionAutoUpload selector:metadataNet.selector note:@"Add Auto Upload, asset already present or db in write transaction" type:k_activityTypeInfo verbose:k_activityVerboseHigh activeUrl:app.activeUrl];
+            [[NCManageDatabase sharedInstance] addActivityClient:metadataNet.fileName fileID:metadataNet.assetLocalIdentifier action:k_activityDebugActionAutoUpload selector:metadataNet.selector note:@"Add Auto Upload, asset already present or db in write transaction" type:k_activityTypeInfo verbose:k_activityVerboseHigh activeUrl:appDelegate.activeUrl];
         }
     
         // Add asset in table Photo Library
         if ([metadataNet.selector isEqualToString:selectorUploadAutoUpload]) {
             if (![[NCManageDatabase sharedInstance] addPhotoLibrary:@[asset]]) {
-                [[NCManageDatabase sharedInstance] addActivityClient:metadataNet.fileName fileID:metadataNet.assetLocalIdentifier action:k_activityDebugActionAutoUpload selector:metadataNet.selector note:@"Add Photo Library, db in write transaction" type:k_activityTypeInfo verbose:k_activityVerboseHigh activeUrl:app.activeUrl];
+                [[NCManageDatabase sharedInstance] addActivityClient:metadataNet.fileName fileID:metadataNet.assetLocalIdentifier action:k_activityDebugActionAutoUpload selector:metadataNet.selector note:@"Add Photo Library, db in write transaction" type:k_activityTypeInfo verbose:k_activityVerboseHigh activeUrl:appDelegate.activeUrl];
             }
         }
         
         dispatch_async(dispatch_get_main_queue(), ^{
             // Update icon badge number
-            [app updateApplicationIconBadgeNumber];
+            [appDelegate updateApplicationIconBadgeNumber];
         });
     }
 }
@@ -503,19 +476,21 @@
 
 - (BOOL)createFolderSubFolderAutoUploadFolderPhotos:(NSString *)folderPhotos useSubFolder:(BOOL)useSubFolder assets:(PHFetchResult *)assets selector:(NSString *)selector
 {
-    OCnetworking *ocNetworking = [[OCnetworking alloc] initWithDelegate:nil metadataNet:nil withUser:app.activeUser withUserID:app.activeUserID withPassword:app.activePassword withUrl:app.activeUrl];
+    NSError *error;
     
-    if ([ocNetworking automaticCreateFolderSync:folderPhotos]) {
+    error = [[NCNetworkingSync sharedManager] createFolderAutomaticUpload:folderPhotos user:appDelegate.activeUser userID:appDelegate.activeUserID password:appDelegate.activePassword];
+    
+    if (error == nil) {
         
-        (void)[[NCManageDatabase sharedInstance] addDirectoryWithServerUrl:folderPhotos permissions:nil];
+        (void)[[NCManageDatabase sharedInstance] addDirectoryWithServerUrl:folderPhotos permissions:nil encrypted:false];
         
     } else {
         
         // Activity
-        [[NCManageDatabase sharedInstance] addActivityClient:folderPhotos fileID:@"" action:k_activityDebugActionAutoUpload selector:selector note:NSLocalizedStringFromTable(@"_not_possible_create_folder_", @"Error", nil) type:k_activityTypeFailure verbose:k_activityVerboseDefault activeUrl:app.activeUrl];
+        [[NCManageDatabase sharedInstance] addActivityClient:folderPhotos fileID:@"" action:k_activityDebugActionAutoUpload selector:selector note:NSLocalizedStringFromTable(@"_not_possible_create_folder_", @"Error", nil) type:k_activityTypeFailure verbose:k_activityVerboseDefault activeUrl:appDelegate.activeUrl];
         
         if ([selector isEqualToString:selectorUploadAutoUploadAll])
-            [app messageNotification:@"_error_" description:@"_error_createsubfolders_upload_" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeError errorCode:0];
+            [appDelegate messageNotification:@"_error_" description:@"_error_createsubfolders_upload_" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeError errorCode:0];
 
         return false;
     }
@@ -525,17 +500,19 @@
         
         for (NSString *dateSubFolder in [CCUtility createNameSubFolder:assets]) {
             
-            if ([ocNetworking automaticCreateFolderSync:[NSString stringWithFormat:@"%@/%@", folderPhotos, dateSubFolder]]) {
+            error = [[NCNetworkingSync sharedManager] createFolderAutomaticUpload:[NSString stringWithFormat:@"%@/%@", folderPhotos, dateSubFolder] user:appDelegate.activeUser userID:appDelegate.activeUserID password:appDelegate.activePassword];
+            
+            if ( error == nil) {
                 
-                (void)[[NCManageDatabase sharedInstance] addDirectoryWithServerUrl:[NSString stringWithFormat:@"%@/%@", folderPhotos, dateSubFolder] permissions:nil];
+                (void)[[NCManageDatabase sharedInstance] addDirectoryWithServerUrl:[NSString stringWithFormat:@"%@/%@", folderPhotos, dateSubFolder] permissions:nil encrypted:false];
                 
             } else {
                 
                 // Activity
-                [[NCManageDatabase sharedInstance] addActivityClient:[NSString stringWithFormat:@"%@/%@", folderPhotos, dateSubFolder] fileID:@"" action:k_activityDebugActionAutoUpload selector:selector note:NSLocalizedString(@"_error_createsubfolders_upload_",nil) type:k_activityTypeFailure verbose:k_activityVerboseDefault activeUrl:app.activeUrl];
+                [[NCManageDatabase sharedInstance] addActivityClient:[NSString stringWithFormat:@"%@/%@", folderPhotos, dateSubFolder] fileID:@"" action:k_activityDebugActionAutoUpload selector:selector note:NSLocalizedString(@"_error_createsubfolders_upload_",nil) type:k_activityTypeFailure verbose:k_activityVerboseDefault activeUrl:appDelegate.activeUrl];
                 
                 if ([selector isEqualToString:selectorUploadAutoUploadAll])
-                    [app messageNotification:@"_error_" description:@"_error_createsubfolders_upload_" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeError errorCode:0];
+                    [appDelegate messageNotification:@"_error_" description:@"_error_createsubfolders_upload_" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeError errorCode:0];
 
                 return false;
             }
@@ -549,7 +526,7 @@
 #pragma mark ===== get Camera Roll new Asset ====
 #pragma --------------------------------------------------------------------------------------------
 
-- (PHFetchResult *)getCameraRollAssets:(tableAccount *)account assetsFull:(BOOL)assetsFull alignPhotoLibrary:(BOOL)alignPhotoLibrary
+- (PHFetchResult *)getCameraRollAssets:(tableAccount *)account selector:(NSString *)selector alignPhotoLibrary:(BOOL)alignPhotoLibrary
 {
     @synchronized(self) {
         
@@ -587,7 +564,7 @@
             
             PHFetchResult *assets = [PHAsset fetchAssetsInAssetCollection:collection options:fetchOptions];
             
-            if (assetsFull == NO) {
+            if ([selector isEqualToString:selectorUploadAutoUpload]) {
             
                 NSString *creationDate;
                 NSString *idAsset;
@@ -624,9 +601,9 @@
 {
     tableAccount *account = [[NCManageDatabase sharedInstance] getAccountActive];
 
-    PHFetchResult *assets = [self getCameraRollAssets:account assetsFull:YES alignPhotoLibrary:YES];
+    PHFetchResult *assets = [self getCameraRollAssets:account selector:selectorUploadAutoUploadAll alignPhotoLibrary:YES];
         
-    [[NCManageDatabase sharedInstance] clearTable:[tablePhotoLibrary class] account:app.activeAccount];
+    [[NCManageDatabase sharedInstance] clearTable:[tablePhotoLibrary class] account:appDelegate.activeAccount];
     (void)[[NCManageDatabase sharedInstance] addPhotoLibrary:(NSArray *)assets];
 
     NSLog(@"[LOG] Align Photo Library %lu", (unsigned long)[assets count]);

+ 25 - 25
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Contents.json

@@ -3,151 +3,151 @@
     {
       "size" : "20x20",
       "idiom" : "iphone",
-      "filename" : "nextcloud40@1x-1.png",
+      "filename" : "Icon-App-20x20@2x.png",
       "scale" : "2x"
     },
     {
       "size" : "20x20",
       "idiom" : "iphone",
-      "filename" : "nextcloud60@3x.png",
+      "filename" : "Icon-App-20x20@3x.png",
       "scale" : "3x"
     },
     {
       "size" : "29x29",
       "idiom" : "iphone",
-      "filename" : "nextcloud29@1x.png",
+      "filename" : "Icon-App-29x29@1x.png",
       "scale" : "1x"
     },
     {
       "size" : "29x29",
       "idiom" : "iphone",
-      "filename" : "nextcloud58@2x.png",
+      "filename" : "Icon-App-29x29@2x.png",
       "scale" : "2x"
     },
     {
       "size" : "29x29",
       "idiom" : "iphone",
-      "filename" : "nextcloud87@3x.png",
+      "filename" : "Icon-App-29x29@3x.png",
       "scale" : "3x"
     },
     {
       "size" : "40x40",
       "idiom" : "iphone",
-      "filename" : "nextcloud80@2x.png",
+      "filename" : "Icon-App-40x40@2x.png",
       "scale" : "2x"
     },
     {
       "size" : "40x40",
       "idiom" : "iphone",
-      "filename" : "nextcloud120@3x.png",
+      "filename" : "Icon-App-40x40@3x.png",
       "scale" : "3x"
     },
     {
       "size" : "57x57",
       "idiom" : "iphone",
-      "filename" : "nextcloud57@1x.png",
+      "filename" : "Icon-App-57x57@1x.png",
       "scale" : "1x"
     },
     {
       "size" : "57x57",
       "idiom" : "iphone",
-      "filename" : "nextcloud114@2x.png",
+      "filename" : "Icon-App-57x57@2x.png",
       "scale" : "2x"
     },
     {
       "size" : "60x60",
       "idiom" : "iphone",
-      "filename" : "nextcloud120@2x.png",
+      "filename" : "Icon-App-60x60@2x.png",
       "scale" : "2x"
     },
     {
       "size" : "60x60",
       "idiom" : "iphone",
-      "filename" : "nextcloud180@3x.png",
+      "filename" : "Icon-App-60x60@3x.png",
       "scale" : "3x"
     },
     {
       "size" : "20x20",
       "idiom" : "ipad",
-      "filename" : "nextcloud20.png",
+      "filename" : "Icon-App-20x20@1x.png",
       "scale" : "1x"
     },
     {
       "size" : "20x20",
       "idiom" : "ipad",
-      "filename" : "nextcloud40@2x.png",
+      "filename" : "Icon-App-20x20@2x-1.png",
       "scale" : "2x"
     },
     {
       "size" : "29x29",
       "idiom" : "ipad",
-      "filename" : "nextcloud29@1x-1.png",
+      "filename" : "Icon-App-29x29@1x-1.png",
       "scale" : "1x"
     },
     {
       "size" : "29x29",
       "idiom" : "ipad",
-      "filename" : "nextcloud58@2x-1.png",
+      "filename" : "Icon-App-29x29@2x-1.png",
       "scale" : "2x"
     },
     {
       "size" : "40x40",
       "idiom" : "ipad",
-      "filename" : "nextcloud40@1x.png",
+      "filename" : "Icon-App-40x40@1x.png",
       "scale" : "1x"
     },
     {
       "size" : "40x40",
       "idiom" : "ipad",
-      "filename" : "nextcloud80@2x-1.png",
+      "filename" : "Icon-App-40x40@2x-1.png",
       "scale" : "2x"
     },
     {
       "size" : "50x50",
       "idiom" : "ipad",
-      "filename" : "nextcloud50@1x.png",
+      "filename" : "Icon-Small-50x50@1x.png",
       "scale" : "1x"
     },
     {
       "size" : "50x50",
       "idiom" : "ipad",
-      "filename" : "nextcloud100@2x.png",
+      "filename" : "Icon-Small-50x50@2x.png",
       "scale" : "2x"
     },
     {
       "size" : "72x72",
       "idiom" : "ipad",
-      "filename" : "nextcloud72@1x.png",
+      "filename" : "Icon-App-72x72@1x.png",
       "scale" : "1x"
     },
     {
       "size" : "72x72",
       "idiom" : "ipad",
-      "filename" : "nextcloud144@2x.png",
+      "filename" : "Icon-App-72x72@2x.png",
       "scale" : "2x"
     },
     {
       "size" : "76x76",
       "idiom" : "ipad",
-      "filename" : "nextcloud76@1x.png",
+      "filename" : "Icon-App-76x76@1x.png",
       "scale" : "1x"
     },
     {
       "size" : "76x76",
       "idiom" : "ipad",
-      "filename" : "nextcloud152@2x.png",
+      "filename" : "Icon-App-76x76@2x.png",
       "scale" : "2x"
     },
     {
       "size" : "83.5x83.5",
       "idiom" : "ipad",
-      "filename" : "nextcloud167@2x.png",
+      "filename" : "Icon-App-83.5x83.5@2x.png",
       "scale" : "2x"
     },
     {
       "size" : "1024x1024",
       "idiom" : "ios-marketing",
-      "filename" : "nextcloud1024.png",
+      "filename" : "ItunesArtwork@2x.png",
       "scale" : "1x"
     }
   ],

BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-29x29@1x-1.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud100@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud1024.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud114@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud120@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud120@3x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud144@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud152@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud167@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud180@3x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud20.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud29@1x-1.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud29@1x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud40@1x-1.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud40@1x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud40@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud50@1x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud57@1x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud58@2x-1.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud58@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud60@3x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud72@1x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud76@1x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud80@2x-1.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud80@2x.png


BIN
iOSClient/Brand/Custom.xcassets/AppIcon.appiconset/nextcloud87@3x.png


+ 3 - 3
iOSClient/Images.xcassets/nextcloudlaunchscreen.imageset/Contents.json → iOSClient/Brand/Custom.xcassets/launchscreen.imageset/Contents.json

@@ -2,17 +2,17 @@
   "images" : [
     {
       "idiom" : "universal",
-      "filename" : "nextcloudlaunchscreen.png",
+      "filename" : "launchscreen.png",
       "scale" : "1x"
     },
     {
       "idiom" : "universal",
-      "filename" : "nextcloudlaunchscreen@2x.png",
+      "filename" : "launchscreen@2x.png",
       "scale" : "2x"
     },
     {
       "idiom" : "universal",
-      "filename" : "nextcloudlaunchscreen@3x.png",
+      "filename" : "launchscreen@3x.png",
       "scale" : "3x"
     }
   ],

+ 0 - 0
iOSClient/Images.xcassets/nextcloudlaunchscreen.imageset/nextcloudlaunchscreen.png → iOSClient/Brand/Custom.xcassets/launchscreen.imageset/launchscreen.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloudlaunchscreen.imageset/nextcloudlaunchscreen@2x.png → iOSClient/Brand/Custom.xcassets/launchscreen.imageset/launchscreen@2x.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloudlaunchscreen.imageset/nextcloudlaunchscreen@3x.png → iOSClient/Brand/Custom.xcassets/launchscreen.imageset/launchscreen@3x.png


+ 2 - 0
iOSClient/Brand/Custom.xcassets/themingBackground.imageset/Contents.json

@@ -2,6 +2,7 @@
   "images" : [
     {
       "idiom" : "universal",
+      "filename" : "themingBackground.png",
       "scale" : "1x"
     },
     {
@@ -11,6 +12,7 @@
     },
     {
       "idiom" : "universal",
+      "filename" : "themingBackground@3x.png",
       "scale" : "3x"
     }
   ],

BIN
iOSClient/Brand/Custom.xcassets/themingBackground.imageset/themingBackground.png


BIN
iOSClient/Brand/Custom.xcassets/themingBackground.imageset/themingBackground@2x.png


BIN
iOSClient/Brand/Custom.xcassets/themingBackground.imageset/themingBackground@3x.png


+ 3 - 0
iOSClient/Brand/CustomSwift.h

@@ -0,0 +1,3 @@
+
+#import "Custom-Swift.h"
+

+ 4 - 4
iOSClient/Brand/LaunchScreen.xib

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -15,7 +15,7 @@
             <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
-                <imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="nextcloudlaunchscreen" translatesAutoresizingMaskIntoConstraints="NO" id="Rrv-MP-hCW">
+                <imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launchscreen" translatesAutoresizingMaskIntoConstraints="NO" id="Rrv-MP-hCW">
                     <rect key="frame" x="8" y="8" width="464" height="464"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="464" id="9WT-Cv-gy8"/>
@@ -34,6 +34,6 @@
         </view>
     </objects>
     <resources>
-        <image name="nextcloudlaunchscreen" width="223" height="157"/>
+        <image name="launchscreen" width="223" height="157"/>
     </resources>
 </document>

+ 23 - 18
iOSClient/Brand/NCBrand.swift

@@ -31,24 +31,26 @@ class NCBrandColor: NSObject {
     }()
 
     // Color
-    @objc public let customer:                UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)    // BLU NC : #0082c9
-
-    @objc public var brand:                   UIColor
-    @objc public var connectionNo:            UIColor = UIColor(red: 204.0/255.0, green: 204.0/255.0, blue: 204.0/255.0, alpha: 1.0)
-    @objc public var encrypted:               UIColor = .red
-    @objc public var navigationBarProgress:   UIColor = .white
-    @objc public var navigationBarText:       UIColor = .white
-    @objc public var menuBackground:          UIColor = .white
-    @objc public var moreNormal:              UIColor = .black
-    @objc public var moreSettings:            UIColor = .black
-    @objc public var seperator:               UIColor = UIColor(red: 235.0/255.0, green: 235.0/255.0, blue: 235.0/255.0, alpha: 1.0)
-    @objc public var tabBar:                  UIColor = .white
-    @objc public var tableBackground:         UIColor = .white
-    @objc public var transferBackground:      UIColor = UIColor(red: 178.0/255.0, green: 244.0/255.0, blue: 258.0/255.0, alpha: 0.1)
-    @objc public let nextcloud:               UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)
+    @objc public let customer:              UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)    // BLU NC : #0082c9
+    @objc public var customerText:          UIColor = .white
     
+    @objc public var brand:                 UIColor                                                                                 // don't touch me
+    @objc public var brandElement:          UIColor                                                                                 // don't touch me
+    @objc public var brandText:             UIColor                                                                                 // don't touch me
+
+    @objc public var connectionNo:          UIColor = UIColor(red: 204.0/255.0, green: 204.0/255.0, blue: 204.0/255.0, alpha: 1.0)
+    @objc public var encrypted:             UIColor = .red
+    @objc public var backgroundView:        UIColor = .white
+    @objc public var textView:              UIColor = .black
+    @objc public var seperator:             UIColor = UIColor(red: 235.0/255.0, green: 235.0/255.0, blue: 235.0/255.0, alpha: 1.0)
+    @objc public var tabBar:                UIColor = .white
+    @objc public var transferBackground:    UIColor = UIColor(red: 178.0/255.0, green: 244.0/255.0, blue: 258.0/255.0, alpha: 0.1)
+    @objc public let nextcloud:             UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)
+
     override init() {
         self.brand = self.customer
+        self.brandElement = self.customer
+        self.brandText = self.customerText
     }
     
     // Color modify
@@ -73,9 +75,10 @@ class NCBrandColor: NSObject {
     @objc public let linkLoginProvider:               String = "https://nextcloud.com/providers"
     @objc public let textLoginProvider:               String = "_login_bottom_label_"
     @objc public let middlewarePingUrl:               String = ""
-    @objc public let webLoginAutenticationProtocol:   String = ""
-    @objc public let webCloseViewProtocol:            String = ""
-    @objc public let folderBrandAutoUpload:           String = ""
+    @objc public let webLoginAutenticationProtocol:   String = ""                                               // example "abc://"
+    @objc public let webCloseViewProtocol:            String = ""                                               // example "abc://change/plan"
+    @objc public let folderBrandAutoUpload:           String = ""                                               // example "_auto_upload_folder_"
+    @objc public let ncFlowEndpoint:                  String = "/index.php/login/flow"
 
     // Auto Upload default folder
     @objc public var folderDefaultAutoUpload:         String = "Photos"
@@ -85,6 +88,7 @@ class NCBrandColor: NSObject {
     
     // Options
     @objc public let use_login_web:                   Bool = false
+    @objc public let use_login_web_flow:              Bool = false
     @objc public let use_firebase:                    Bool = false
     @objc public let use_default_auto_upload:         Bool = false
     @objc public let use_themingColor:                Bool = true
@@ -97,6 +101,7 @@ class NCBrandColor: NSObject {
     @objc public let disable_request_login_url:       Bool = false
     @objc public let disable_multiaccount:            Bool = false
     @objc public let disable_manage_account:          Bool = false
+    @objc public let disable_more_external_site:      Bool = false
     
     override init() {
         

+ 0 - 0
iOSClient/NCBridgeSwift.h → iOSClient/Brand/NCBridgeSwift.h


+ 4 - 11
iOSClient/CCGlobal.h

@@ -33,7 +33,7 @@ extern NSString *const dav;
 #ifndef EXTENSION
 
 //AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-#define app ((AppDelegate *)[[UIApplication sharedApplication] delegate])
+//#define app ((AppDelegate *)[[UIApplication sharedApplication] delegate])
 #define CALL_ORIGIN NSLog(@"Origin: [%@]", [[[[NSThread callStackSymbols] objectAtIndex:1] componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"[]"]] objectAtIndex:1])
 
 #endif
@@ -142,20 +142,17 @@ extern NSString *const dav;
 #define selectorAddFavorite                             @"addFavorite"
 #define selectorCreateFolder                            @"createFolder"
 #define selectorDelete                                  @"delete"
-#define selectorDownloadFile                            @"downloadFile"
 #define selectorDownloadThumbnail                       @"downloadThumbnail"
 #define selectorDownloadSynchronize                     @"downloadSynchronize"
 #define selectorGetUserAndGroup                         @"getUserAndGroup"
 #define selectorLoadFileView                            @"loadFileView"
 #define selectorLoadModelView                           @"loadModelView"
-#define selectorLoadPlist                               @"loadPlist"
 #define selectorLoadViewImage                           @"loadViewImage"
 #define selectorLoadCopy                                @"loadCopy"
 #define selectorMove                                    @"move"
 #define selectorOpenIn                                  @"openIn"
 #define selectorOpenWindowShare                         @"openWindowShare"
 #define selectorReadFile                                @"readFile"
-#define selectorReadFileUploadFile                      @"readFileUploadFile"
 #define selectorReadFileVerifyUpload                    @"readFileVerifyUpload"
 #define selectorReadFileWithDownload                    @"readFileWithDownload"
 #define selectorReadFileReloadFolder                    @"readFileReloadFolder"
@@ -209,10 +206,9 @@ extern NSString *const dav;
 #define actionDeleteEndToEndPublicKey                   @"deleteEndToEndPublicKey"
 #define actionDeleteEndToEndPrivateKey                  @"deleteEndToEndPrivateKey"
 #define actionGetEndToEndServerPublicKey                @"getEndToEndServerPublicKey"
-#define actionStoreEndToEndMetadata                     @"storeEndToEndMetadata"
 #define actionGetEndToEndMetadata                       @"getEndToEndMetadata"
-#define actionUpdateEndToEndMetadata                    @"updateEndToEndMetadata"
 #define actionDeleteEndToEndMetadata                    @"deleteEndToEndMetadata"
+#define actionUnlockEndToEndFolderEncrypted             @"unlockEndToEndFolderEncrypted"
 
 // Metadata : FileType
 #define k_metadataTypeFile_audio                        @"audio"
@@ -261,11 +257,8 @@ extern NSString *const dav;
 #define k_activityDebugActionCapabilities               @"Capabilities Of Server"
 #define k_activityDebugActionEndToEndEncryption         @"End To End Encryption "
 
-// Priority Auto Upload
-#define k_priorityAutoUploadImage                       0
-#define k_priorityAutoUploadVideo                       -1
-#define k_priorityAutoUploadError                       -2
-#define k_priorityAutoUploadStop                        -4
+// E2E
+#define k_max_filesize_E2E                              524288000   // 500 MB
 
 // -----------------------------------------------------------------------------------------------------------
 // -----------------------------------------------------------------------------------------------------------

+ 26 - 73
iOSClient/Create/CCCreateCloud.swift

@@ -36,7 +36,7 @@ class CreateMenuAdd: NSObject {
 
     let colorLightGray = UIColor(red: 250.0/255.0, green: 250.0/255.0, blue: 250.0/255.0, alpha: 1)
     let colorGray = UIColor(red: 150.0/255.0, green: 150.0/255.0, blue: 150.0/255.0, alpha: 1)
-    var colorIcon = NCBrandColor.sharedInstance.brand
+    var colorIcon = NCBrandColor.sharedInstance.brandElement
     
     @objc init (themingColor : UIColor) {
         
@@ -44,7 +44,7 @@ class CreateMenuAdd: NSObject {
         colorIcon = themingColor
     }
     
-    @objc func createMenuPlain(view : UIView) {
+    @objc func createMenu(view : UIView) {
         
         let appDelegate = UIApplication.shared.delegate as! AppDelegate
         let actionSheet = AHKActionSheet.init(view: view, title: nil)!
@@ -65,75 +65,23 @@ class CreateMenuAdd: NSObject {
         
         actionSheet.cancelButtonTitle = NSLocalizedString("_cancel_", comment: "")
         
-        actionSheet.addButton(withTitle: NSLocalizedString("_upload_photos_videos_", comment: ""), image: CCGraphics.changeThemingColorImage(UIImage(named: "menuUploadPhoto"), color: colorGray), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
+        actionSheet.addButton(withTitle: NSLocalizedString("_upload_photos_videos_", comment: ""), image: CCGraphics.changeThemingColorImage(UIImage(named: "menuUploadPhoto"), color: colorGray), backgroundColor: NCBrandColor.sharedInstance.backgroundView, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
             appDelegate.activeMain.returnCreate(Int(k_returnCreateFotoVideoPlain))
         })
         
-        actionSheet.addButton(withTitle: NSLocalizedString("_upload_file_", comment: ""), image: CCGraphics.changeThemingColorImage(UIImage(named: "menuUploadFile"), color: colorGray), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
+        actionSheet.addButton(withTitle: NSLocalizedString("_upload_file_", comment: ""), image: CCGraphics.changeThemingColorImage(UIImage(named: "menuUploadFile"), color: colorGray), backgroundColor: NCBrandColor.sharedInstance.backgroundView, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
             appDelegate.activeMain.returnCreate(Int(k_returnCreateFilePlain))
         })
         
-        actionSheet.addButton(withTitle: NSLocalizedString("_upload_file_text_", comment: ""), image: CCGraphics.changeThemingColorImage(UIImage(named: "file_txt"), color: colorGray), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
+        actionSheet.addButton(withTitle: NSLocalizedString("_upload_file_text_", comment: ""), image: CCGraphics.changeThemingColorImage(UIImage(named: "file_txt"), color: colorGray), backgroundColor: NCBrandColor.sharedInstance.backgroundView, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
             appDelegate.activeMain.returnCreate(Int(k_returnCreateFileText))
         })
         
-        actionSheet.addButton(withTitle: NSLocalizedString("_create_folder_", comment: ""), image: CCGraphics.changeThemingColorImage(UIImage(named: "folder"), color: colorIcon), backgroundColor: UIColor.white, height: 50.0 ,type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
+        actionSheet.addButton(withTitle: NSLocalizedString("_create_folder_", comment: ""), image: CCGraphics.changeThemingColorImage(UIImage(named: "folder"), color: colorIcon), backgroundColor: NCBrandColor.sharedInstance.backgroundView, height: 50.0 ,type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
             appDelegate.activeMain.returnCreate(Int(k_returnCreateFolderPlain))
         })
         
-        /*
-        if appDelegate.isCryptoCloudMode {
-        
-            actionSheet.addButton(withTitle: NSLocalizedString("_upload_encrypted_mode", comment: ""), image: UIImage(named: "actionSheetLock"), backgroundColor: colorLightGray, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
-                self.createMenuEncrypted(view: view)
-            })
-        }
-        */
-        
-        actionSheet.show()
-        
-        CCUtility.setCreateMenuEncrypted(false)
-    }
-    
-    @objc func createMenuEncrypted(view : UIView) {
-        
-        let appDelegate = UIApplication.shared.delegate as! AppDelegate
-        let actionSheet = AHKActionSheet.init(view: view, title: nil)!
-        
-        actionSheet.animationDuration = 0.2
-        
-        actionSheet.buttonHeight = 50.0
-        actionSheet.cancelButtonHeight = 50.0
-        actionSheet.separatorHeight = 5.0
-        
-        actionSheet.separatorColor = NCBrandColor.sharedInstance.seperator
-
-        actionSheet.buttonTextAttributes = fontButton
-        actionSheet.encryptedButtonTextAttributes = fontEncrypted
-        actionSheet.cancelButtonTextAttributes = fontCancel
-        actionSheet.disableButtonTextAttributes = fontDisable
-        
-        actionSheet.cancelButtonTitle = NSLocalizedString("_cancel_", comment: "")
-        
-        actionSheet.addButton(withTitle: NSLocalizedString("_upload_photos_videos_", comment: ""), image: UIImage(named: "menuUploadPhotoCrypto"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
-            appDelegate.activeMain.returnCreate(Int(k_returnCreateFotoVideoEncrypted))
-        })
-
-        actionSheet.addButton(withTitle: NSLocalizedString("_upload_file_", comment: ""), image: UIImage(named: "menuUploadFileCrypto"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
-            appDelegate.activeMain.returnCreate(Int(k_returnCreateFileEncrypted))
-        })
-        
-        actionSheet.addButton(withTitle: NSLocalizedString("_create_folder_", comment: ""), image: UIImage(named: "foldercrypto"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
-            appDelegate.activeMain.returnCreate(Int(k_returnCreateFolderEncrypted))
-        })
-
-        actionSheet.addButton(withTitle: NSLocalizedString("_upload_plain_mode_", comment: ""), image: UIImage(named: "menuUploadPlainMode"), backgroundColor: colorLightGray, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
-            self.createMenuPlain(view: view)
-        })
-        
         actionSheet.show()
-        
-        CCUtility.setCreateMenuEncrypted(true)
     }
 }
 
@@ -189,7 +137,7 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
         section = XLFormSectionDescriptor.formSection()
         form.addFormSection(section)
         row = XLFormRowDescriptor(tag: "ButtonDestinationFolder", rowType: XLFormRowDescriptorTypeButton, title: self.titleServerUrl)
-        let imageFolder = CCGraphics.changeThemingColorImage(UIImage(named: "folder")!, color: NCBrandColor.sharedInstance.brand) as UIImage
+        let imageFolder = CCGraphics.changeThemingColorImage(UIImage(named: "folder")!, color: NCBrandColor.sharedInstance.brandElement) as UIImage
         row.cellConfig.setObject(imageFolder, forKey: "imageView.image" as NSCopying)
         row.cellConfig.setObject(UIColor.black, forKey: "textLabel.textColor" as NSCopying)
         row.action.formSelector = #selector(changeDestinationFolder(_:))
@@ -245,8 +193,8 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
         
         row = XLFormRowDescriptor(tag: "previewFileName", rowType: XLFormRowDescriptorTypeTextView, title: "")
         row.height = 180
-        row.cellConfig.setObject(NCBrandColor.sharedInstance.tableBackground, forKey: "backgroundColor" as NSCopying)
-        row.cellConfig.setObject(NCBrandColor.sharedInstance.tableBackground, forKey: "textView.backgroundColor" as NSCopying)
+        row.cellConfig.setObject(NCBrandColor.sharedInstance.backgroundView, forKey: "backgroundColor" as NSCopying)
+        row.cellConfig.setObject(NCBrandColor.sharedInstance.backgroundView, forKey: "textView.backgroundColor" as NSCopying)
 
         row.disabled = true
         section.addFormRow(row)
@@ -327,12 +275,12 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
         
         self.navigationController?.navigationBar.isTranslucent = false
         self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
-        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
-        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.navigationBarText]
+        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
+        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.brandText]
         
         self.tableView.separatorStyle = UITableViewCellSeparatorStyle.none
         
-        self.tableView.backgroundColor = NCBrandColor.sharedInstance.tableBackground
+        self.tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundView
         
         self.reloadForm()
     }
@@ -457,10 +405,11 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
             if valueRenameTrimming.count > 0 {
                 
                 self.form.delegate = nil
-                CCUtility.setFileNameMask(valueRenameTrimming, key: k_keyFileNameMask)
+                CCUtility.setFileNameMask(valueRename, key: k_keyFileNameMask)
                 self.form.delegate = self
                 
                 returnString = CCUtility.createFileName(asset.value(forKey: "filename"), fileDate: asset.creationDate, fileType: asset.mediaType, keyFileName: k_keyFileNameMask, keyFileNameType: k_keyFileNameType)
+                
             } else {
                 
                 CCUtility.setFileNameMask("", key: k_keyFileNameMask)
@@ -485,11 +434,13 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
         let viewController : CCMove = navigationController.topViewController as! CCMove
         
         viewController.delegate = self;
-        viewController.tintColor = NCBrandColor.sharedInstance.navigationBarText
+        viewController.tintColor = NCBrandColor.sharedInstance.brandText
         viewController.barTintColor = NCBrandColor.sharedInstance.brand
-        viewController.tintColorTitle = NCBrandColor.sharedInstance.navigationBarText
+        viewController.tintColorTitle = NCBrandColor.sharedInstance.brandText
         viewController.move.title = NSLocalizedString("_select_", comment: "");
         viewController.networkingOperationQueue =  appDelegate.netQueue
+        // E2E
+        viewController.includeDirectoryE2EEncryption = true;
         
         navigationController.modalPresentationStyle = UIModalPresentationStyle.formSheet
         self.present(navigationController, animated: true, completion: nil)
@@ -538,7 +489,7 @@ class CreateFormUploadFile: XLFormViewController, CCMoveDelegate {
         section = XLFormSectionDescriptor.formSection()
         form.addFormSection(section)
         row = XLFormRowDescriptor(tag: "ButtonDestinationFolder", rowType: XLFormRowDescriptorTypeButton, title: self.titleServerUrl)
-        let imageFolder = CCGraphics.changeThemingColorImage(UIImage(named: "folder")!, color: NCBrandColor.sharedInstance.brand) as UIImage
+        let imageFolder = CCGraphics.changeThemingColorImage(UIImage(named: "folder")!, color: NCBrandColor.sharedInstance.brandElement) as UIImage
         row.cellConfig.setObject(imageFolder, forKey: "imageView.image" as NSCopying)
         row.cellConfig.setObject(UIColor.black, forKey: "textLabel.textColor" as NSCopying)
         row.action.formSelector = #selector(changeDestinationFolder(_:))
@@ -586,11 +537,11 @@ class CreateFormUploadFile: XLFormViewController, CCMoveDelegate {
         
         self.navigationController?.navigationBar.isTranslucent = false
         self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
-        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
-        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.navigationBarText]
+        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
+        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.brandText]
         
         self.tableView.separatorStyle = UITableViewCellSeparatorStyle.none
-        self.tableView.backgroundColor = NCBrandColor.sharedInstance.tableBackground
+        self.tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundView
         
         self.reloadForm()
     }
@@ -675,11 +626,13 @@ class CreateFormUploadFile: XLFormViewController, CCMoveDelegate {
         let viewController : CCMove = navigationController.topViewController as! CCMove
         
         viewController.delegate = self;
-        viewController.tintColor = NCBrandColor.sharedInstance.navigationBarText
+        viewController.tintColor = NCBrandColor.sharedInstance.brandText
         viewController.barTintColor = NCBrandColor.sharedInstance.brand
-        viewController.tintColorTitle = NCBrandColor.sharedInstance.navigationBarText
+        viewController.tintColorTitle = NCBrandColor.sharedInstance.brandText
         viewController.move.title = NSLocalizedString("_select_", comment: "");
         viewController.networkingOperationQueue =  appDelegate.netQueue
+        // E2E
+        viewController.includeDirectoryE2EEncryption = true;
         
         navigationController.modalPresentationStyle = UIModalPresentationStyle.formSheet
         self.present(navigationController, animated: true, completion: nil)

+ 11 - 7
iOSClient/Database/NCDatabase.swift

@@ -38,7 +38,6 @@ class tableAccount: Object {
     @objc dynamic var autoUploadVideo: Bool = false
     @objc dynamic var autoUploadWWAnPhoto: Bool = false
     @objc dynamic var autoUploadWWAnVideo: Bool = false
-    @objc dynamic var autoUploadFormatCompatibility: Bool = false
     @objc dynamic var displayName = ""
     @objc dynamic var email = ""
     @objc dynamic var enabled: Bool = false
@@ -77,6 +76,8 @@ class tableCapabilities: Object {
     @objc dynamic var account = ""
     @objc dynamic var themingBackground = ""
     @objc dynamic var themingColor = ""
+    @objc dynamic var themingColorElement = ""
+    @objc dynamic var themingColorText = ""
     @objc dynamic var themingLogo = ""
     @objc dynamic var themingName = ""
     @objc dynamic var themingSlogan = ""
@@ -99,10 +100,12 @@ class tableDirectory: Object {
     @objc dynamic var account = ""
     @objc dynamic var dateReadDirectory: NSDate? = nil
     @objc dynamic var directoryID = ""
+    @objc dynamic var e2eEncrypted: Bool = false
     @objc dynamic var etag = ""
     @objc dynamic var favorite: Bool = false
     @objc dynamic var fileID = ""
     @objc dynamic var lock: Bool = false
+    @objc dynamic var e2eTokenLock = ""
     @objc dynamic var permissions = ""
     @objc dynamic var serverUrl = ""
     
@@ -117,16 +120,17 @@ class tableE2eEncryption: Object {
     @objc dynamic var authenticationTag = ""
     @objc dynamic var fileName = ""
     @objc dynamic var fileNameIdentifier = ""
+    @objc dynamic var fileNamePath = ""
     @objc dynamic var key = ""
     @objc dynamic var initializationVector = ""
-    @objc dynamic var metadataKey: Int = 0
+    @objc dynamic var metadataKey = ""
+    @objc dynamic var metadataKeyIndex: Int = 0
     @objc dynamic var mimeType = ""
     @objc dynamic var serverUrl = ""
-    @objc dynamic var tokenLock = ""
-    @objc dynamic var version: Int = 0
+    @objc dynamic var version: Int = 1
     
     override static func primaryKey() -> String {
-        return "fileName"
+        return "fileNamePath"
     }
 }
 
@@ -178,11 +182,12 @@ class tableMetadata: Object {
     @objc dynamic var date = NSDate()
     @objc dynamic var directory: Bool = false
     @objc dynamic var directoryID = ""
-    @objc dynamic var encrypted: Bool = false
+    @objc dynamic var e2eEncrypted: Bool = false
     @objc dynamic var etag = ""
     @objc dynamic var favorite: Bool = false
     @objc dynamic var fileID = ""
     @objc dynamic var fileName = ""
+    @objc dynamic var fileNameView = ""
     @objc dynamic var iconName = ""
     @objc dynamic var permissions = ""
     @objc dynamic var session = ""
@@ -240,7 +245,6 @@ class tableQueueUpload: Object {
     @objc dynamic var date = NSDate()
     @objc dynamic var fileName = ""
     @objc dynamic var lock: Bool = false
-    @objc dynamic var priority: Int = 0
     @objc dynamic var selector = ""
     @objc dynamic var selectorPost = ""
     @objc dynamic var serverUrl = ""

+ 134 - 121
iOSClient/Database/NCManageDatabase.swift

@@ -57,10 +57,13 @@ class NCManageDatabase: NSObject {
         let config = Realm.Configuration(
         
             fileURL: dirGroup?.appendingPathComponent("\(appDatabaseNextcloud)/\(k_databaseDefault)"),
-            schemaVersion: 11,
+            schemaVersion: 14,
             
             // 10 : Version 2.18.0
-            // 11 : Add object tableE2eEncryption
+            // 11 : Version 2.18.2
+            // 12 : Version 2.19.0.5
+            // 13 : Version 2.19.0.14
+            // 14 : ...
             
             migrationBlock: { migration, oldSchemaVersion in
                 // We haven’t migrated anything yet, so oldSchemaVersion == 0
@@ -560,6 +563,8 @@ class NCManageDatabase: NSObject {
                 resultCapabilities.account = tableAccount.account
                 resultCapabilities.themingBackground = capabilities.themingBackground
                 resultCapabilities.themingColor = capabilities.themingColor
+                resultCapabilities.themingColorElement = capabilities.themingColorElement
+                resultCapabilities.themingColorText = capabilities.themingColorText
                 resultCapabilities.themingLogo = capabilities.themingLogo
                 resultCapabilities.themingName = capabilities.themingName
                 resultCapabilities.themingSlogan = capabilities.themingSlogan
@@ -687,7 +692,7 @@ class NCManageDatabase: NSObject {
     //MARK: -
     //MARK: Table Directory
     
-    @objc func addDirectory(serverUrl: String, permissions: String?) -> String {
+    @objc func addDirectory(serverUrl: String, permissions: String?, encrypted: Bool) -> String {
         
         guard let tableAccount = self.getAccountActive() else {
             return ""
@@ -709,6 +714,7 @@ class NCManageDatabase: NSObject {
                 
                     directoryID = NSUUID().uuidString
                     addObject.directoryID = directoryID
+                    addObject.e2eEncrypted = encrypted
                 
                     if let permissions = permissions {
                         addObject.permissions = permissions
@@ -722,6 +728,7 @@ class NCManageDatabase: NSObject {
                         result!.permissions = permissions
                     }
                     directoryID = result!.directoryID
+                    result!.e2eEncrypted = encrypted
                     realm.add(result!, update: true)
                 }
             }
@@ -761,7 +768,7 @@ class NCManageDatabase: NSObject {
         }
     }
     
-    @objc func setDirectory(serverUrl: String, serverUrlTo: String?, etag: String?, fileID: String?) {
+    @objc func setDirectory(serverUrl: String, serverUrlTo: String?, etag: String?, fileID: String?, encrypted: Bool) {
         
         guard let tableAccount = self.getAccountActive() else {
             return
@@ -776,6 +783,7 @@ class NCManageDatabase: NSObject {
                     return
                 }
                 
+                result.e2eEncrypted = encrypted
                 if let serverUrlTo = serverUrlTo {
                     result.serverUrl = serverUrlTo
 
@@ -870,7 +878,7 @@ class NCManageDatabase: NSObject {
         let realm = try! Realm()
         
         guard let result = realm.objects(tableDirectory.self).filter("account = %@ AND serverUrl = %@", tableAccount.account,serverUrl).first else {
-            return self.addDirectory(serverUrl: serverUrl, permissions: nil)
+            return self.addDirectory(serverUrl: serverUrl, permissions: nil, encrypted: false)
         }
         
         return result.directoryID
@@ -895,6 +903,21 @@ class NCManageDatabase: NSObject {
         return result.serverUrl
     }
     
+    @objc func getDirectoryE2ETokenLock(serverUrl: String) -> String? {
+        
+        guard let tableAccount = self.getAccountActive() else {
+            return nil
+        }
+        
+        let realm = try! Realm()
+        
+        guard let result = realm.objects(tableDirectory.self).filter("account = %@ AND serverUrl = %@ AND e2eTokenLock != ''", tableAccount.account, serverUrl).first else {
+            return nil
+        }
+        
+        return result.e2eTokenLock
+    }
+    
     @objc func setDateReadDirectory(directoryID: String) {
         
         guard let tableAccount = self.getAccountActive() else {
@@ -993,6 +1016,35 @@ class NCManageDatabase: NSObject {
         }
     }
 
+    @objc func setDirectoryE2ETokenLock(fileID: String, token: String?) {
+        
+        guard let tableAccount = self.getAccountActive() else {
+            return
+        }
+        
+        let realm = try! Realm()
+        
+        realm.beginWrite()
+        
+        guard let result = realm.objects(tableDirectory.self).filter("account = %@ AND fileID = %@", tableAccount.account, fileID).first else {
+            realm.cancelWrite()
+            return
+        }
+        
+        if (token == nil) {
+            result.e2eTokenLock = ""
+        } else {
+            result.e2eTokenLock = token!
+        }
+    
+        do {
+            try realm.commitWrite()
+        } catch let error {
+            print("[LOG] Could not write to database: ", error)
+            return
+        }
+    }
+    
     //MARK: -
     //MARK: Table e2e Encryption
     
@@ -1018,19 +1070,19 @@ class NCManageDatabase: NSObject {
     
     @objc func deleteE2eEncryption(predicate: NSPredicate) {
         
-        let realm = try! Realm()
-        
-        realm.beginWrite()
-        
-        guard let result = realm.objects(tableE2eEncryption.self).filter(predicate).first else {
-            realm.cancelWrite()
+        guard self.getAccountActive() != nil else {
             return
         }
         
-        realm.delete(result)
+        let realm = try! Realm()
         
         do {
-            try realm.commitWrite()
+            try realm.write {
+                
+                let results = realm.objects(tableE2eEncryption.self).filter(predicate)
+                
+                realm.delete(results)
+            }
         } catch let error {
             print("[LOG] Could not write to database: ", error)
         }
@@ -1044,51 +1096,63 @@ class NCManageDatabase: NSObject {
         
         let realm = try! Realm()
         
-        guard let result = realm.objects(tableE2eEncryption.self).filter(predicate).first else {
+        guard let result = realm.objects(tableE2eEncryption.self).filter(predicate).sorted(byKeyPath: "metadataKeyIndex", ascending: false).first else {
             return nil
         }
         
         return tableE2eEncryption.init(value: result)
     }
     
-    @objc func getE2eEncryptionTokenLock(serverUrl: String) -> String? {
+    @objc func getE2eEncryptions(predicate: NSPredicate) -> [tableE2eEncryption]? {
         
-        guard let tableAccount = self.getAccountActive() else {
+        guard self.getAccountActive() != nil else {
             return nil
         }
         
         let realm = try! Realm()
+        let results : Results<tableE2eEncryption>
         
-        guard let result = realm.objects(tableE2eEncryption.self).filter("account = %@ AND serverUrl = %@ AND tokenLock != ''", tableAccount.account, serverUrl).first else {
+        results = realm.objects(tableE2eEncryption.self).filter(predicate)
+        
+        if (results.count > 0) {
+            return Array(results.map { tableE2eEncryption.init(value:$0) })
+        } else {
             return nil
         }
-        
-        return result.tokenLock
     }
     
-    @objc func setE2eEncryptionTokenLock(fileName: String, token: String) {
+    @objc func renameFileE2eEncryption(serverUrl: String, fileNameIdentifier: String, newFileName: String, newFileNamePath: String) -> Bool {
         
         guard let tableAccount = self.getAccountActive() else {
-            return
+            return false
         }
         
         let realm = try! Realm()
         
         realm.beginWrite()
-        
-        guard let result = realm.objects(tableE2eEncryption.self).filter("account = %@ AND fileName = %@", tableAccount.account, fileName).first else {
+
+        guard let result = realm.objects(tableE2eEncryption.self).filter("account = %@ AND serverUrl = %@ AND fileNameIdentifier = %@", tableAccount.account, serverUrl, fileNameIdentifier).first else {
             realm.cancelWrite()
-            return
+            return false
         }
         
-        result.tokenLock = token
+        let object = tableE2eEncryption.init(value: result)
         
+        realm.delete(result)
+
+        object.fileName = newFileName
+        object.fileNamePath = newFileNamePath
+
+        realm.add(object)
+
         do {
             try realm.commitWrite()
         } catch let error {
             print("[LOG] Could not write to database: ", error)
-            return
+            return false
         }
+        
+        return true
     }
     
     //MARK: -
@@ -1521,6 +1585,38 @@ class NCManageDatabase: NSObject {
         }
     }
     
+    @objc func setMetadataFileNameView(directoryID: String, fileName: String, newFileNameView: String) {
+        
+        guard let tableAccount = self.getAccountActive() else {
+            return
+        }
+        
+        let realm = try! Realm()
+        
+        realm.beginWrite()
+
+        guard let result = realm.objects(tableMetadata.self).filter("account = %@ AND directoryID = %@ AND fileName = %@", tableAccount.account, directoryID, fileName).first else {
+            realm.cancelWrite()
+            return
+        }
+                
+        result.fileNameView = newFileNameView
+        
+        let directoryID : String? = result.directoryID
+    
+        do {
+            try realm.commitWrite()
+        } catch let error {
+            print("[LOG] Could not write to database: ", error)
+            return
+        }
+    
+        if let directoryID = directoryID {
+            // Update Date Read Directory
+            self.setDateReadDirectory(directoryID: directoryID)
+        }
+    }
+    
     @objc func setMetadataStatus(fileID: String, status: Double) {
         
         guard let tableAccount = self.getAccountActive() else {
@@ -1787,52 +1883,6 @@ class NCManageDatabase: NSObject {
     //MARK: -
     //MARK: Table Queue Download
     
-    /*
-    @objc func addQueueDownload(fileID: String, encrypted: Bool, selector: String, selectorPost: String?, serverUrl: String, session: String) -> Bool {
-        
-        guard let tableAccount = self.getAccountActive() else {
-            return false
-        }
-        
-        let realm = try! Realm()
-        
-        if realm.isInWriteTransaction {
-            
-            print("[LOG] Could not write to database, addQueueDownload is already in write transaction")
-            return false
-            
-        } else {
-            
-            do {
-                try realm.write {
-                    
-                    // Add new
-                    let addObject = tableQueueDownload()
-                        
-                    addObject.account = tableAccount.account
-                    addObject.encrypted = encrypted
-                    addObject.fileID = fileID
-                    addObject.selector = selector
-                        
-                    if let selectorPost = selectorPost {
-                        addObject.selectorPost = selectorPost
-                    }
-                    
-                    addObject.serverUrl = serverUrl
-                    addObject.session = session
-                    
-                    realm.add(addObject, update: true)
-                }
-            } catch let error {
-                print("[LOG] Could not write to database: ", error)
-                return false
-            }
-        }
-        
-        return true
-    }
-    */
-    
     @objc func addQueueDownload(metadatasNet: [CCMetadataNet]) {
         
         guard let tableAccount = self.getAccountActive() else {
@@ -1962,7 +2012,6 @@ class NCManageDatabase: NSObject {
                         
                         addObject.serverUrl = metadataNet.serverUrl
                         addObject.session = metadataNet.session
-                        addObject.priority = metadataNet.priority
                         
                         realm.add(addObject)
                     }
@@ -2005,7 +2054,6 @@ class NCManageDatabase: NSObject {
                         
                         addObject.serverUrl = metadataNet.serverUrl
                         addObject.session = metadataNet.session
-                        addObject.priority = metadataNet.priority
                         
                         realm.add(addObject)
                     }
@@ -2016,7 +2064,7 @@ class NCManageDatabase: NSObject {
         }
     }
     
-    @objc func getQueueUpload(selector: String) -> CCMetadataNet? {
+    @objc func getQueueUploadLock(selector: String) -> CCMetadataNet? {
         
         guard let tableAccount = self.getAccountActive() else {
             return nil
@@ -2026,7 +2074,7 @@ class NCManageDatabase: NSObject {
         
         realm.beginWrite()
         
-        guard let result = realm.objects(tableQueueUpload.self).filter("account = %@ AND selector = %@ AND lock == false", tableAccount.account, selector).sorted(byKeyPath: "priority", ascending: false).first else {
+        guard let result = realm.objects(tableQueueUpload.self).filter("account = %@ AND selector = %@ AND lock == false", tableAccount.account, selector).first else {
             realm.cancelWrite()
             return nil
         }
@@ -2036,7 +2084,6 @@ class NCManageDatabase: NSObject {
         metadataNet.account = result.account
         metadataNet.assetLocalIdentifier = result.assetLocalIdentifier
         metadataNet.fileName = result.fileName
-        metadataNet.priority = result.priority
         metadataNet.selector = result.selector
         metadataNet.selectorPost = result.selectorPost
         metadataNet.serverUrl = result.serverUrl
@@ -2069,50 +2116,23 @@ class NCManageDatabase: NSObject {
         return Array(results.map { tableQueueUpload.init(value:$0) })
     }
     
-    @objc func unlockQueueUpload(assetLocalIdentifier: String) {
+    @objc func getQueueUpload(predicate: NSPredicate) -> [tableQueueUpload]? {
         
-        guard let tableAccount = self.getAccountActive() else {
-            return
+        guard self.getAccountActive() != nil else {
+            return nil
         }
         
         let realm = try! Realm()
         
-        realm.beginWrite()
-        
-        guard let result = realm.objects(tableQueueUpload.self).filter("account = %@ AND assetLocalIdentifier = %@", tableAccount.account, assetLocalIdentifier).first else {
-            realm.cancelWrite()
-            return
-        }
+        let results = realm.objects(tableQueueUpload.self).filter(predicate)
         
-        // UnLock
-        result.lock = false
-        
-        do {
-            try realm.commitWrite()
-        } catch let error {
-            print("[LOG] Could not write to database: ", error)
-        }
+        return Array(results.map { tableQueueUpload.init(value:$0) })
     }
     
-    @objc func getPriorityQueueUpload(assetLocalIdentifier: String) -> NSInteger {
-        
-        guard let tableAccount = self.getAccountActive() else {
-            return 0
-        }
-        
-        let realm = try! Realm()
-        
-        guard let result = realm.objects(tableQueueUpload.self).filter("account = %@ AND assetLocalIdentifier = %@", tableAccount.account, assetLocalIdentifier).first else {
-            return 0
-        }
-        
-        return result.priority
-    }
-
-    @objc func setPriorityQueueUpload(assetLocalIdentifier: String, priority: NSInteger) -> Bool {
+    @objc func unlockQueueUpload(assetLocalIdentifier: String) {
         
         guard let tableAccount = self.getAccountActive() else {
-            return false
+            return
         }
         
         let realm = try! Realm()
@@ -2121,24 +2141,17 @@ class NCManageDatabase: NSObject {
         
         guard let result = realm.objects(tableQueueUpload.self).filter("account = %@ AND assetLocalIdentifier = %@", tableAccount.account, assetLocalIdentifier).first else {
             realm.cancelWrite()
-            return false
+            return
         }
         
-        // priority
-        if (result.priority <= Int(k_priorityAutoUploadError)) {
-            result.priority = result.priority - 1            
-        } else {
-            result.priority = priority
-        }
+        // UnLock
+        result.lock = false
         
         do {
             try realm.commitWrite()
         } catch let error {
             print("[LOG] Could not write to database: ", error)
-            return false
         }
-        
-        return true
     }
     
     @objc func deleteQueueUpload(assetLocalIdentifier: String, selector: String) {

+ 80 - 64
iOSClient/Favorites/CCFavorites.m

@@ -29,10 +29,10 @@
 
 @interface CCFavorites () <CCActionsDeleteDelegate, CCActionsSettingFavoriteDelegate>
 {
+    AppDelegate *appDelegate;
+
     NSArray *_dataSource;
     BOOL _reloadDataSource;
-    
-    CCHud *_hudDeterminate;
 }
 @end
 
@@ -46,10 +46,12 @@
 {
     if (self = [super initWithCoder:aDecoder])  {
         
+        appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(triggerProgressTask:) name:@"NotificationProgressTask" object:nil];
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
         
-        app.activeFavorites = self;
+        appDelegate.activeFavorites = self;
     }
     return self;
 }
@@ -90,11 +92,11 @@
     [super viewWillAppear:animated];
     
     // Color
-    [app aspectNavigationControllerBar:self.navigationController.navigationBar online:[app.reachability isReachable] hidden:NO];
-    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
     
     // Plus Button
-    [app plusButtonVisibile:true];
+    [appDelegate plusButtonVisibile:true];
     
     [self reloadDatasource];
 }
@@ -105,13 +107,13 @@
     [super viewDidAppear:animated];
     
     // Active Main
-    app.activeFavorites = self;
+    appDelegate.activeFavorites = self;
 }
 
 - (void)changeTheming
 {
     if (self.isViewLoaded && self.view.window)
-        [app changeTheming:self];
+        [appDelegate changeTheming:self];
     
     // Reload Table View
     [self.tableView reloadData];
@@ -129,7 +131,7 @@
 
 - (UIColor *)backgroundColorForEmptyDataSet:(UIScrollView *)scrollView
 {
-    return [UIColor whiteColor];
+    return [NCBrandColor sharedInstance].backgroundView;
 }
 
 - (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
@@ -165,11 +167,15 @@
 
 - (void)deleteFileOrFolderFailure:(CCMetadataNet *)metadataNet message:(NSString *)message errorCode:(NSInteger)errorCode
 {
-    NSLog(@"[LOG] DeleteFileOrFolder failure error %lu, %@", (long)errorCode, message);
+    NSLog(@"[LOG] DeleteFileOrFolder failure error %d, %@", (int)errorCode, message);
 }
 
 - (void)deleteFileOrFolderSuccess:(CCMetadataNet *)metadataNet
 {
+    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+        [[CCNetworking sharedNetworking] rebuildAndSendEndToEndMetadataOnServerUrl:metadataNet.serverUrl];
+    });
+    
     [self reloadDatasource];
 }
 
@@ -179,7 +185,7 @@
 
 - (void)settingFavoriteFailure:(CCMetadataNet *)metadataNet message:(NSString *)message errorCode:(NSInteger)errorCode
 {
-    NSLog(@"[LOG] Setting Favorite failure error %lu, %@", (long)errorCode, message);
+    NSLog(@"[LOG] Setting Favorite failure error %d, %@", (int)errorCode, message);
 }
 
 - (void)settingFavoriteSuccess:(CCMetadataNet *)metadataNet
@@ -192,7 +198,7 @@
 - (void)readListingFavorites
 {
     // test
-    if (app.activeAccount.length == 0)
+    if (appDelegate.activeAccount.length == 0)
         return;
 
     [[CCActions sharedInstance] listingFavorites:@"" delegate:self];
@@ -204,7 +210,7 @@
     if (!directoryID) return;
     
     NSString *selector;
-    CCMetadataNet *metadataNet = [[CCMetadataNet alloc] initWithAccount:app.activeAccount];
+    CCMetadataNet *metadataNet = [[CCMetadataNet alloc] initWithAccount:appDelegate.activeAccount];
     
     metadataNet.action = actionReadFolder;
     metadataNet.depth = @"1";
@@ -218,7 +224,7 @@
     metadataNet.selector = selector;
     metadataNet.serverUrl = serverUrl;
     
-    [app addNetworkingOperationQueue:app.netQueue delegate:[CCSynchronize sharedSynchronize] metadataNet:metadataNet];
+    [appDelegate addNetworkingOperationQueue:appDelegate.netQueue delegate:[CCSynchronize sharedSynchronize] metadataNet:metadataNet];
 }
 
 - (void)listingFavoritesSuccess:(CCMetadataNet *)metadataNet metadatas:(NSArray *)metadatas
@@ -262,7 +268,7 @@
     }
     
     // Verify remove favorite
-    NSArray *allRecordFavorite = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account = %@ AND favorite = true", app.activeAccount] sorted:nil ascending:NO];
+    NSArray *allRecordFavorite = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account = %@ AND favorite = true", appDelegate.activeAccount] sorted:nil ascending:NO];
     
     for (tableMetadata *metadata in allRecordFavorite)
         if (![filesEtag containsObject:metadata.fileID])
@@ -273,7 +279,7 @@
 
 - (void)listingFavoritesFailure:(CCMetadataNet *)metadataNet message:(NSString *)message errorCode:(NSInteger)errorCode
 {
-    NSLog(@"[LOG] Listing Favorites failure error %lu, %@", (long)errorCode, message);
+    NSLog(@"[LOG] Listing Favorites failure error %d, %@", (int)errorCode, message);
 }
 
 #pragma --------------------------------------------------------------------------------------------
@@ -289,42 +295,44 @@
 #pragma mark ==== Download <Delegate> ====
 #pragma --------------------------------------------------------------------------------------------
 
-- (void)downloadFileFailure:(NSString *)fileID serverUrl:(NSString *)serverUrl selector:(NSString *)selector message:(NSString *)message errorCode:(NSInteger)errorCode
-{
-    if (errorCode != k_CCErrorFileAlreadyInDownload)
-        [app messageNotification:@"_download_file_" description:message visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeError errorCode:errorCode];
-}
-
-- (void)downloadFileSuccess:(NSString *)fileID serverUrl:(NSString *)serverUrl selector:(NSString *)selector selectorPost:(NSString *)selectorPost
+- (void)downloadFileSuccessFailure:(NSString *)fileName fileID:(NSString *)fileID serverUrl:(NSString *)serverUrl selector:(NSString *)selector selectorPost:(NSString *)selectorPost errorMessage:(NSString *)errorMessage errorCode:(NSInteger)errorCode
 {
-    _metadata = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID = %@", fileID]];
-    
-    if ([_metadata.typeFile isEqualToString: k_metadataTypeFile_compress]) {
+    if (errorCode == 0) {
         
-        //[self performSelector:@selector(unZipFile:) withObject:_metadata.fileID];
-        [self openWith:_metadata];
+        _metadata = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID = %@", fileID]];
         
-    } else if ([_metadata.typeFile isEqualToString: k_metadataTypeFile_unknown]) {
-        
-        [self openWith:_metadata];
+        if ([_metadata.typeFile isEqualToString: k_metadataTypeFile_compress]) {
+            
+            //[self performSelector:@selector(unZipFile:) withObject:_metadata.fileID];
+            [self openWith:_metadata];
+            
+        } else if ([_metadata.typeFile isEqualToString: k_metadataTypeFile_unknown]) {
+            
+            [self openWith:_metadata];
+            
+        } else {
+            
+            if ([self shouldPerformSegue])
+                [self performSegueWithIdentifier:@"segueDetail" sender:self];
+        }
         
     } else {
         
-        if ([self shouldPerformSegue])
-            [self performSegueWithIdentifier:@"segueDetail" sender:self];
+        if (errorCode != k_CCErrorFileAlreadyInDownload)
+            [appDelegate messageNotification:@"_download_file_" description:errorMessage visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeError errorCode:errorCode];
     }
 }
 
 - (void)openWith:(tableMetadata *)metadata
 {
-    NSString *fileNamePath = [NSString stringWithFormat:@"%@/%@", app.directoryUser, metadata.fileID];
+    NSString *fileNamePath = [NSString stringWithFormat:@"%@/%@", appDelegate.directoryUser, metadata.fileID];
     
     if ([[NSFileManager defaultManager] fileExistsAtPath:fileNamePath]) {
         
-        [[NSFileManager defaultManager] removeItemAtPath:[NSTemporaryDirectory() stringByAppendingString:metadata.fileName] error:nil];
-        [[NSFileManager defaultManager] linkItemAtPath:fileNamePath toPath:[NSTemporaryDirectory() stringByAppendingString:metadata.fileName] error:nil];
+        [[NSFileManager defaultManager] removeItemAtPath:[NSTemporaryDirectory() stringByAppendingString:metadata.fileNameView] error:nil];
+        [[NSFileManager defaultManager] linkItemAtPath:fileNamePath toPath:[NSTemporaryDirectory() stringByAppendingString:metadata.fileNameView] error:nil];
         
-        NSURL *url = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingString:metadata.fileName]];
+        NSURL *url = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingString:metadata.fileNameView]];
         
         _docController = [UIDocumentInteractionController interactionControllerWithURL:url];
         _docController.delegate = self;
@@ -381,31 +389,31 @@
     actionSheet.cancelButtonTitle = NSLocalizedString(@"_cancel_",nil);
     
     // assegnamo l'immagine anteprima se esiste, altrimenti metti quella standars
-    if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, metadata.fileID]]) {
+    if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@.ico", appDelegate.directoryUser, metadata.fileID]]) {
         
-        iconHeader = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, metadata.fileID]];
+        iconHeader = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.ico", appDelegate.directoryUser, metadata.fileID]];
         
     } else {
         
         if (metadata.directory)
-            iconHeader = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder"] color:[NCBrandColor sharedInstance].brand];
+            iconHeader = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder"] color:[NCBrandColor sharedInstance].brandElement];
         else
             iconHeader = [UIImage imageNamed:metadata.iconName];
     }
     
-    [actionSheet addButtonWithTitle: metadata.fileName image: iconHeader backgroundColor: [NCBrandColor sharedInstance].tabBar height: 50.0 type: AHKActionSheetButtonTypeDisabled handler: nil
+    [actionSheet addButtonWithTitle: metadata.fileNameView image: iconHeader backgroundColor: [NCBrandColor sharedInstance].tabBar height: 50.0 type: AHKActionSheetButtonTypeDisabled handler: nil
     ];
 
     // Share
-    [actionSheet addButtonWithTitle:NSLocalizedString(@"_share_", nil) image:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"actionSheetShare"] color:[NCBrandColor sharedInstance].brand] backgroundColor:[UIColor whiteColor] height: 50.0 type:AHKActionSheetButtonTypeDefault handler:^(AHKActionSheet *as) {
+    [actionSheet addButtonWithTitle:NSLocalizedString(@"_share_", nil) image:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"actionSheetShare"] color:[NCBrandColor sharedInstance].brandElement] backgroundColor:[NCBrandColor sharedInstance].backgroundView height: 50.0 type:AHKActionSheetButtonTypeDefault handler:^(AHKActionSheet *as) {
                                     
-            [app.activeMain openWindowShare:metadata];
+            [appDelegate.activeMain openWindowShare:metadata];
     }];
 
     // NO Directory
     if (metadata.directory == NO) {
         
-        [actionSheet addButtonWithTitle:NSLocalizedString(@"_open_in_", nil) image:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"actionSheetOpenIn"] color:[NCBrandColor sharedInstance].brand] backgroundColor:[UIColor whiteColor] height: 50.0 type:AHKActionSheetButtonTypeDefault handler:^(AHKActionSheet *as) {
+        [actionSheet addButtonWithTitle:NSLocalizedString(@"_open_in_", nil) image:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"actionSheetOpenIn"] color:[NCBrandColor sharedInstance].brandElement] backgroundColor:[NCBrandColor sharedInstance].backgroundView height: 50.0 type:AHKActionSheetButtonTypeDefault handler:^(AHKActionSheet *as) {
                 [self.tableView setEditing:NO animated:YES];
                 [self openWith:metadata];
             }];
@@ -422,7 +430,7 @@
     tableMetadata *metadata = [_dataSource objectAtIndex:indexPath.row];
 
     if (metadata)
-        [app.activeMain openWindowShare:metadata];
+        [appDelegate.activeMain openWindowShare:metadata];
 }
 
 
@@ -488,17 +496,17 @@
         
     if (!_serverUrl) {
         
-        recordsTableMetadata = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account = %@ AND favorite = true", app.activeAccount] sorted:sorted ascending:[CCUtility getAscendingSettings]];
+        recordsTableMetadata = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account = %@ AND favorite = true", appDelegate.activeAccount] sorted:sorted ascending:[CCUtility getAscendingSettings]];
             
     } else {
         
         NSString *directoryID = [[NCManageDatabase sharedInstance] getDirectoryID:_serverUrl];        
         
         if (directoryID)
-            recordsTableMetadata = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account = %@ AND directoryID = %@", app.activeAccount, directoryID] sorted:sorted ascending:[CCUtility getAscendingSettings]];
+            recordsTableMetadata = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account = %@ AND directoryID = %@", appDelegate.activeAccount, directoryID] sorted:sorted ascending:[CCUtility getAscendingSettings]];
     }
         
-    CCSectionDataSourceMetadata *sectionDataSource = [CCSectionMetadata creataDataSourseSectionMetadata:recordsTableMetadata listProgressMetadata:nil groupByField:nil activeAccount:app.activeAccount];
+    CCSectionDataSourceMetadata *sectionDataSource = [CCSectionMetadata creataDataSourseSectionMetadata:recordsTableMetadata listProgressMetadata:nil e2eEncryptions:nil groupByField:nil activeAccount:appDelegate.activeAccount];
         
     NSArray *fileIDs = [sectionDataSource.sectionArrayRow objectForKey:@"_none_"];
     for (NSString *fileID in fileIDs)
@@ -556,25 +564,25 @@
     cell.labelTitle.textColor = [UIColor blackColor];
     
     // filename
-    cell.labelTitle.text = metadata.fileName;
+    cell.labelTitle.text = metadata.fileNameView;
     cell.labelInfoFile.text = @"";
     
     // Shared
     NSString *serverUrl = [[NCManageDatabase sharedInstance] getServerUrl:metadata.directoryID];
     if (!serverUrl)
         return cell;
-    NSString *shareLink = [app.sharesLink objectForKey:[serverUrl stringByAppendingString:metadata.fileName]];
-    NSString *shareUserAndGroup = [app.sharesUserAndGroup objectForKey:[serverUrl stringByAppendingString:metadata.fileName]];
+    NSString *shareLink = [appDelegate.sharesLink objectForKey:[serverUrl stringByAppendingString:metadata.fileName]];
+    NSString *shareUserAndGroup = [appDelegate.sharesUserAndGroup objectForKey:[serverUrl stringByAppendingString:metadata.fileName]];
 
     // Immage
     if (metadata.directory) {
             
         if ([shareLink length] > 0) {
-            cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder_public"] color:[NCBrandColor sharedInstance].brand];
+            cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder_public"] color:[NCBrandColor sharedInstance].brandElement];
         } else if ([shareUserAndGroup length] > 0) {
-            cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder_shared_with_me"] color:[NCBrandColor sharedInstance].brand];
+            cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder_shared_with_me"] color:[NCBrandColor sharedInstance].brandElement];
         } else {
-            cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:metadata.iconName] color:[NCBrandColor sharedInstance].brand];
+            cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder"] color:[NCBrandColor sharedInstance].brandElement];
         }
             
     } else {
@@ -582,9 +590,9 @@
         if ([shareLink length] > 0 || [shareUserAndGroup length] > 0) {
             
             if ([shareLink length] > 0)
-                cell.shared.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"shareLink"] color:[NCBrandColor sharedInstance].brand];
+                cell.shared.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"shareLink"] color:[NCBrandColor sharedInstance].brandElement];
             else
-                cell.shared.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"actionSheetShare"] color:[NCBrandColor sharedInstance].brand];
+                cell.shared.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"actionSheetShare"] color:[NCBrandColor sharedInstance].brandElement];
                 
             UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapActionConnectionMounted:)];
             [tap setNumberOfTapsRequired:1];
@@ -592,7 +600,7 @@
             [cell.shared addGestureRecognizer:tap];
         }
         
-        cell.file.image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, metadata.fileID]];
+        cell.file.image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.ico", appDelegate.directoryUser, metadata.fileID]];
         
         if (cell.file.image == nil) {
             
@@ -601,6 +609,14 @@
             if (metadata.thumbnailExists)
                 [[CCActions sharedInstance] downloadTumbnail:metadata delegate:self];
         }
+        
+        // ----------------------------------------------------------------------------------------------------------
+        // E2E Image Status Encrypted
+        // ----------------------------------------------------------------------------------------------------------
+        
+        tableE2eEncryption *tableE2eEncryption = [[NCManageDatabase sharedInstance] getE2eEncryptionWithPredicate:[NSPredicate predicateWithFormat:@"account = %@ AND fileNameIdentifier = %@", appDelegate.activeAccount, metadata.fileName]];
+        if (tableE2eEncryption)
+            cell.status.image = [UIImage imageNamed:@"encrypted"];
     }
     
     // text and length
@@ -614,7 +630,7 @@
         
         NSString *date = [CCUtility dateDiff:metadata.date];
         NSString *length = [CCUtility transformedSize:metadata.size];
-        BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@", app.directoryUser, metadata.fileID]];
+        BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@", appDelegate.directoryUser, metadata.fileID]];
             
         if (fileExists)
             cell.local.image = [UIImage imageNamed:@"local"];
@@ -671,13 +687,13 @@
         NSString *serverUrl = [[NCManageDatabase sharedInstance] getServerUrl:_metadata.directoryID];
 
         if (serverUrl) {
-            if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@", app.directoryUser, _metadata.fileID]]) {
-            
-                [self downloadFileSuccess:_metadata.fileID serverUrl:serverUrl selector:selectorLoadFileView selectorPost:nil];
+            if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@", appDelegate.directoryUser, _metadata.fileID]]) {
             
+                [self downloadFileSuccessFailure:_metadata.fileName fileID:_metadata.fileID serverUrl:serverUrl selector:selectorLoadFileView selectorPost:@"" errorMessage:@"" errorCode:0];
+                            
             } else {
             
-                [[CCNetworking sharedNetworking] downloadFile:_metadata.fileID serverUrl:serverUrl selector:selectorLoadFileView selectorPost:nil session:k_download_session taskStatus:k_taskStatusResume delegate:self];
+                [[CCNetworking sharedNetworking] downloadFile:_metadata.fileName fileID:_metadata.fileID serverUrl:serverUrl selector:selectorLoadFileView selectorPost:nil session:k_download_session taskStatus:k_taskStatusResume delegate:self];
             }
         }
     }
@@ -696,7 +712,7 @@
     if (serverUrl) {
         
         vc.serverUrl = [CCUtility stringAppendServerUrl:serverUrl addFileName:_metadata.fileName];
-        vc.titleViewControl = _metadata.fileName;
+        vc.titleViewControl = _metadata.fileNameView;
     
         [self.navigationController pushViewController:vc animated:YES];
     }
@@ -744,7 +760,7 @@
     _detailViewController.dateFilterQuery = nil;
     _detailViewController.dataSourceImagesVideos = allRecordsDataSourceImagesVideos;
     
-    [_detailViewController setTitle:_metadata.fileName];
+    [_detailViewController setTitle:_metadata.fileNameView];
 }
 
 @end

+ 0 - 23
iOSClient/Images.xcassets/actionSheetLocal.imageset/Contents.json

@@ -1,23 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "scale" : "1x",
-      "filename" : "actionSheetLocal.png"
-    },
-    {
-      "idiom" : "universal",
-      "filename" : "actionSheetLocal@2x.png",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "3x",
-      "filename" : "actionSheetLocal@3x.png"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

BIN
iOSClient/Images.xcassets/actionSheetLocal.imageset/actionSheetLocal.png


BIN
iOSClient/Images.xcassets/actionSheetLocal.imageset/actionSheetLocal@2x.png


BIN
iOSClient/Images.xcassets/actionSheetLocal.imageset/actionSheetLocal@3x.png


Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно