فهرست منبع

Merge branch 'Detail'

Marino Faggiana 7 سال پیش
والد
کامیت
f8475816e4
100فایلهای تغییر یافته به همراه2149 افزوده شده و 631 حذف شده
  1. BIN
      Libraries external/Fabric/Crashlytics.framework/Crashlytics
  2. 31 0
      Libraries external/Fabric/Crashlytics.framework/Headers/ANSCompatibility.h
  3. 210 0
      Libraries external/Fabric/Crashlytics.framework/Headers/Answers.h
  4. 33 0
      Libraries external/Fabric/Crashlytics.framework/Headers/CLSAttributes.h
  5. 64 0
      Libraries external/Fabric/Crashlytics.framework/Headers/CLSLogging.h
  6. 103 0
      Libraries external/Fabric/Crashlytics.framework/Headers/CLSReport.h
  7. 38 0
      Libraries external/Fabric/Crashlytics.framework/Headers/CLSStackFrame.h
  8. 288 0
      Libraries external/Fabric/Crashlytics.framework/Headers/Crashlytics.h
  9. BIN
      Libraries external/Fabric/Crashlytics.framework/Info.plist
  10. 14 0
      Libraries external/Fabric/Crashlytics.framework/Modules/module.modulemap
  11. 28 0
      Libraries external/Fabric/Crashlytics.framework/run
  12. BIN
      Libraries external/Fabric/Crashlytics.framework/submit
  13. BIN
      Libraries external/Fabric/Crashlytics.framework/uploadDSYM
  14. BIN
      Libraries external/Fabric/Fabric.framework/Fabric
  15. 51 0
      Libraries external/Fabric/Fabric.framework/Headers/FABAttributes.h
  16. 82 0
      Libraries external/Fabric/Fabric.framework/Headers/Fabric.h
  17. BIN
      Libraries external/Fabric/Fabric.framework/Info.plist
  18. 6 0
      Libraries external/Fabric/Fabric.framework/Modules/module.modulemap
  19. 28 0
      Libraries external/Fabric/Fabric.framework/run
  20. BIN
      Libraries external/Fabric/Fabric.framework/uploadDSYM
  21. 7 1
      Libraries external/OCCommunicationLib/OCCommunicationLib/OCCapabilities.h
  22. 6 0
      Libraries external/OCCommunicationLib/OCCommunicationLib/OCCapabilities.m
  23. 96 65
      Libraries external/OCCommunicationLib/OCCommunicationLib/OCCommunication.m
  24. 126 35
      Nextcloud.xcodeproj/project.pbxproj
  25. BIN
      Nextcloud.xcodeproj/project.xcworkspace/xcuserdata/marinofaggiana.xcuserdatad/UserInterfaceState.xcuserstate
  26. 108 0
      Nextcloud.xcodeproj/xcuserdata/marinofaggiana.xcuserdatad/xcschemes/Share.xcscheme
  27. 26 12
      Picker/DocumentPickerViewController.swift
  28. 1 0
      Share Ext/ShareViewController.h
  29. 13 8
      Share Ext/ShareViewController.m
  30. 1 1
      iOSClient/Actions/CCActions.swift
  31. 19 8
      iOSClient/Activity/CCActivity.m
  32. 10 9
      iOSClient/AppDelegate.h
  33. 116 29
      iOSClient/AppDelegate.m
  34. 0 71
      iOSClient/Brand/CCNextcloudConstant.h
  35. 0 30
      iOSClient/Brand/CCNextcloudImages.h
  36. 0 56
      iOSClient/Brand/Constant.swift
  37. 68 0
      iOSClient/Brand/NCBrand.swift
  38. 48 0
      iOSClient/Brand/NCBrandConstant.h
  39. 2 2
      iOSClient/Brand/Picker.plist
  40. 2 2
      iOSClient/Brand/PickerFileProvider.plist
  41. 2 2
      iOSClient/Brand/Share.plist
  42. 16 2
      iOSClient/Brand/iOSClient.plist
  43. 3 15
      iOSClient/CCGlobal.h
  44. 0 33
      iOSClient/CCGlobal.m
  45. 1 2
      iOSClient/CCStandardImages.h
  46. 33 21
      iOSClient/Create/CCCreateCloud.swift
  47. 56 53
      iOSClient/Favorites/CCFavorites.m
  48. 14 4
      iOSClient/FileSystem/CCCoreData.h
  49. 173 68
      iOSClient/FileSystem/CCCoreData.m
  50. 0 3
      iOSClient/FileSystem/TableAccount+CoreDataProperties.h
  51. 0 3
      iOSClient/FileSystem/TableAccount+CoreDataProperties.m
  52. 20 0
      iOSClient/FileSystem/TableCapabilities+CoreDataClass.h
  53. 13 0
      iOSClient/FileSystem/TableCapabilities+CoreDataClass.m
  54. 32 0
      iOSClient/FileSystem/TableCapabilities+CoreDataProperties.h
  55. 29 0
      iOSClient/FileSystem/TableCapabilities+CoreDataProperties.m
  56. BIN
      iOSClient/Images.xcassets/MoreBackground.imageset/MoreBackground@2x.jpg
  57. 0 23
      iOSClient/Images.xcassets/PlusClear.imageset/Contents.json
  58. BIN
      iOSClient/Images.xcassets/PlusClear.imageset/PlusClear@3x.png
  59. BIN
      iOSClient/Images.xcassets/PlusClear.imageset/PlusClearpng.png
  60. 0 0
      iOSClient/Images.xcassets/backgroundDetail.imageset/Contents.json
  61. 0 0
      iOSClient/Images.xcassets/backgroundDetail.imageset/nextcloud_lite.png
  62. 0 0
      iOSClient/Images.xcassets/backgroundDetail.imageset/nextcloud_lite@2x.png
  63. 0 0
      iOSClient/Images.xcassets/backgroundDetail.imageset/nextcloud_lite@3x.png
  64. 0 0
      iOSClient/Images.xcassets/button.imageset/Contents.json
  65. 0 0
      iOSClient/Images.xcassets/button.imageset/buttonWhite.png
  66. BIN
      iOSClient/Images.xcassets/buttonBlu.imageset/buttonBlu.png
  67. BIN
      iOSClient/Images.xcassets/disclosureIndicator.imageset/disclosureIndicator@2x.png
  68. BIN
      iOSClient/Images.xcassets/folderphotocamera.imageset/folder.png
  69. BIN
      iOSClient/Images.xcassets/folderphotocamera.imageset/folder@2x.png
  70. BIN
      iOSClient/Images.xcassets/folderphotocamera.imageset/folder@3x.png
  71. 0 0
      iOSClient/Images.xcassets/loginLogo.imageset/Contents.json
  72. 0 0
      iOSClient/Images.xcassets/loginLogo.imageset/nextcloudLogin.png
  73. 0 0
      iOSClient/Images.xcassets/loginLogo.imageset/nextcloudLogin@2x.png
  74. 0 0
      iOSClient/Images.xcassets/loginLogo.imageset/nextcloudLogin@3x.png
  75. 0 0
      iOSClient/Images.xcassets/navigationLogo.imageset/Contents.json
  76. 0 0
      iOSClient/Images.xcassets/navigationLogo.imageset/nextcloud_navigationcontroller.png
  77. 0 0
      iOSClient/Images.xcassets/navigationLogo.imageset/nextcloud_navigationcontroller@2x.png
  78. 0 0
      iOSClient/Images.xcassets/navigationLogo.imageset/nextcloud_navigationcontroller@3x copia.png
  79. 0 0
      iOSClient/Images.xcassets/navigationLogoOffline.imageset/Contents.json
  80. 0 0
      iOSClient/Images.xcassets/navigationLogoOffline.imageset/nextcloud_navigationcontroller_offline.png
  81. 0 0
      iOSClient/Images.xcassets/navigationLogoOffline.imageset/nextcloud_navigationcontroller_offline@2x.png
  82. 0 0
      iOSClient/Images.xcassets/navigationLogoOffline.imageset/nextcloud_navigationcontroller_offline@3x.png
  83. 1 1
      iOSClient/Images.xcassets/tabBarPlus.imageset/Contents.json
  84. 0 0
      iOSClient/Images.xcassets/tabBarPlus.imageset/PlusClear@2x.png
  85. 0 0
      iOSClient/Images.xcassets/tabBarPlusWhite.imageset/Contents.json
  86. 0 0
      iOSClient/Images.xcassets/tabBarPlusWhite.imageset/Plus@2x.png
  87. 1 1
      iOSClient/Images.xcassets/themingBackground.imageset/Contents.json
  88. BIN
      iOSClient/Images.xcassets/themingBackground.imageset/themingBackground@2x.png
  89. 6 6
      iOSClient/Intro/CCIntro.m
  90. 1 1
      iOSClient/Library/MWPhotoBrowser/MWCaptionView.m
  91. 1 1
      iOSClient/Library/MWPhotoBrowser/MWCommon.h
  92. 11 5
      iOSClient/Library/MWPhotoBrowser/MWPhotoBrowser.m
  93. 3 0
      iOSClient/Library/VFR Pdf Reader/Sources/ReaderViewController.h
  94. 4 3
      iOSClient/Library/VFR Pdf Reader/Sources/ReaderViewController.m
  95. 30 18
      iOSClient/Local storage/CCLocalStorage.m
  96. 0 1
      iOSClient/Login/CCLogin.h
  97. 21 9
      iOSClient/Login/CCLogin.m
  98. 2 3
      iOSClient/Login/CCLogin.storyboard
  99. 1 1
      iOSClient/Login/CCLoginWeb.swift
  100. 50 23
      iOSClient/Main/CCDetail.m

BIN
Libraries external/Fabric/Crashlytics.framework/Crashlytics


+ 31 - 0
Libraries external/Fabric/Crashlytics.framework/Headers/ANSCompatibility.h

@@ -0,0 +1,31 @@
+//
+//  ANSCompatibility.h
+//  AnswersKit
+//
+//  Copyright (c) 2015 Crashlytics, Inc. All rights reserved.
+//
+
+#pragma once
+
+#if !__has_feature(nullability)
+#define nonnull
+#define nullable
+#define _Nullable
+#define _Nonnull
+#endif
+
+#ifndef NS_ASSUME_NONNULL_BEGIN
+#define NS_ASSUME_NONNULL_BEGIN
+#endif
+
+#ifndef NS_ASSUME_NONNULL_END
+#define NS_ASSUME_NONNULL_END
+#endif
+
+#if __has_feature(objc_generics)
+#define ANS_GENERIC_NSARRAY(type) NSArray<type>
+#define ANS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary<key_type, object_key>
+#else
+#define ANS_GENERIC_NSARRAY(type) NSArray
+#define ANS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary
+#endif

+ 210 - 0
Libraries external/Fabric/Crashlytics.framework/Headers/Answers.h

@@ -0,0 +1,210 @@
+//
+//  Answers.h
+//  Crashlytics
+//
+//  Copyright (c) 2015 Crashlytics, Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "ANSCompatibility.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ *  This class exposes the Answers Events API, allowing you to track key 
+ *  user user actions and metrics in your app.
+ */
+@interface Answers : NSObject
+
+/**
+ *  Log a Sign Up event to see users signing up for your app in real-time, understand how
+ *  many users are signing up with different methods and their success rate signing up.
+ *
+ *  @param signUpMethodOrNil     The method by which a user logged in, e.g. Twitter or Digits.
+ *  @param signUpSucceededOrNil  The ultimate success or failure of the login
+ *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
+ */
++ (void)logSignUpWithMethod:(nullable NSString *)signUpMethodOrNil
+                    success:(nullable NSNumber *)signUpSucceededOrNil
+           customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
+
+/**
+ *  Log an Log In event to see users logging into your app in real-time, understand how many
+ *  users are logging in with different methods and their success rate logging into your app.
+ *
+ *  @param loginMethodOrNil      The method by which a user logged in, e.g. email, Twitter or Digits.
+ *  @param loginSucceededOrNil   The ultimate success or failure of the login
+ *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
+ */
++ (void)logLoginWithMethod:(nullable NSString *)loginMethodOrNil
+                   success:(nullable NSNumber *)loginSucceededOrNil
+          customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
+
+/**
+ *  Log a Share event to see users sharing from your app in real-time, letting you
+ *  understand what content they're sharing from the type or genre down to the specific id.
+ *
+ *  @param shareMethodOrNil      The method by which a user shared, e.g. email, Twitter, SMS.
+ *  @param contentNameOrNil      The human readable name for this piece of content.
+ *  @param contentTypeOrNil      The type of content shared.
+ *  @param contentIdOrNil        The unique identifier for this piece of content. Useful for finding the top shared item.
+ *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
+ */
++ (void)logShareWithMethod:(nullable NSString *)shareMethodOrNil
+               contentName:(nullable NSString *)contentNameOrNil
+               contentType:(nullable NSString *)contentTypeOrNil
+                 contentId:(nullable NSString *)contentIdOrNil
+          customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
+
+/**
+ *  Log an Invite Event to track how users are inviting other users into
+ *  your application.
+ *
+ *  @param inviteMethodOrNil     The method of invitation, e.g. GameCenter, Twitter, email.
+ *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
+ */
++ (void)logInviteWithMethod:(nullable NSString *)inviteMethodOrNil
+           customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
+
+/**
+ *  Log a Purchase event to see your revenue in real-time, understand how many users are making purchases, see which
+ *  items are most popular, and track plenty of other important purchase-related metrics.
+ *
+ *  @param itemPriceOrNil         The purchased item's price.
+ *  @param currencyOrNil          The ISO4217 currency code. Example: USD
+ *  @param purchaseSucceededOrNil Was the purchase succesful or unsuccesful
+ *  @param itemNameOrNil          The human-readable form of the item's name. Example:
+ *  @param itemTypeOrNil          The type, or genre of the item. Example: Song
+ *  @param itemIdOrNil            The machine-readable, unique item identifier Example: SKU
+ *  @param customAttributesOrNil  A dictionary of custom attributes to associate with this purchase.
+ */
++ (void)logPurchaseWithPrice:(nullable NSDecimalNumber *)itemPriceOrNil
+                    currency:(nullable NSString *)currencyOrNil
+                     success:(nullable NSNumber *)purchaseSucceededOrNil
+                    itemName:(nullable NSString *)itemNameOrNil
+                    itemType:(nullable NSString *)itemTypeOrNil
+                      itemId:(nullable NSString *)itemIdOrNil
+            customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
+
+/**
+ *  Log a Level Start Event to track where users are in your game.
+ *
+ *  @param levelNameOrNil        The level name
+ *  @param customAttributesOrNil A dictionary of custom attributes to associate with this level start event.
+ */
++ (void)logLevelStart:(nullable NSString *)levelNameOrNil
+     customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
+
+/**
+ *  Log a Level End event to track how users are completing levels in your game.
+ *
+ *  @param levelNameOrNil                 The name of the level completed, E.G. "1" or "Training"
+ *  @param scoreOrNil                     The score the user completed the level with.
+ *  @param levelCompletedSuccesfullyOrNil A boolean representing whether or not the level was completed succesfully.
+ *  @param customAttributesOrNil          A dictionary of custom attributes to associate with this event.
+ */
++ (void)logLevelEnd:(nullable NSString *)levelNameOrNil
+              score:(nullable NSNumber *)scoreOrNil
+            success:(nullable NSNumber *)levelCompletedSuccesfullyOrNil
+   customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
+
+/**
+ *  Log an Add to Cart event to see users adding items to a shopping cart in real-time, understand how
+ *  many users start the purchase flow, see which items are most popular, and track plenty of other important
+ *  purchase-related metrics.
+ *
+ *  @param itemPriceOrNil         The purchased item's price.
+ *  @param currencyOrNil          The ISO4217 currency code. Example: USD
+ *  @param itemNameOrNil          The human-readable form of the item's name. Example:
+ *  @param itemTypeOrNil          The type, or genre of the item. Example: Song
+ *  @param itemIdOrNil            The machine-readable, unique item identifier Example: SKU
+ *  @param customAttributesOrNil  A dictionary of custom attributes to associate with this event.
+ */
++ (void)logAddToCartWithPrice:(nullable NSDecimalNumber *)itemPriceOrNil
+                     currency:(nullable NSString *)currencyOrNil
+                     itemName:(nullable NSString *)itemNameOrNil
+                     itemType:(nullable NSString *)itemTypeOrNil
+                       itemId:(nullable NSString *)itemIdOrNil
+             customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
+
+/**
+ *  Log a Start Checkout event to see users moving through the purchase funnel in real-time, understand how many
+ *  users are doing this and how much they're spending per checkout, and see how it related to other important
+ *  purchase-related metrics.
+ *
+ *  @param totalPriceOrNil        The total price of the cart.
+ *  @param currencyOrNil          The ISO4217 currency code. Example: USD
+ *  @param itemCountOrNil         The number of items in the cart.
+ *  @param customAttributesOrNil  A dictionary of custom attributes to associate with this event.
+ */
++ (void)logStartCheckoutWithPrice:(nullable NSDecimalNumber *)totalPriceOrNil
+                         currency:(nullable NSString *)currencyOrNil
+                        itemCount:(nullable NSNumber *)itemCountOrNil
+                 customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
+
+/**
+ *  Log a Rating event to see users rating content within your app in real-time and understand what
+ *  content is most engaging, from the type or genre down to the specific id.
+ *
+ *  @param ratingOrNil           The integer rating given by the user.
+ *  @param contentNameOrNil      The human readable name for this piece of content.
+ *  @param contentTypeOrNil      The type of content shared.
+ *  @param contentIdOrNil        The unique identifier for this piece of content. Useful for finding the top shared item.
+ *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
+ */
++ (void)logRating:(nullable NSNumber *)ratingOrNil
+      contentName:(nullable NSString *)contentNameOrNil
+      contentType:(nullable NSString *)contentTypeOrNil
+        contentId:(nullable NSString *)contentIdOrNil
+ customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
+
+/**
+ *  Log a Content View event to see users viewing content within your app in real-time and
+ *  understand what content is most engaging, from the type or genre down to the specific id.
+ *
+ *  @param contentNameOrNil      The human readable name for this piece of content.
+ *  @param contentTypeOrNil      The type of content shared.
+ *  @param contentIdOrNil        The unique identifier for this piece of content. Useful for finding the top shared item.
+ *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
+ */
++ (void)logContentViewWithName:(nullable NSString *)contentNameOrNil
+                   contentType:(nullable NSString *)contentTypeOrNil
+                     contentId:(nullable NSString *)contentIdOrNil
+              customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
+
+/**
+ *  Log a Search event allows you to see users searching within your app in real-time and understand
+ *  exactly what they're searching for.
+ *
+ *  @param queryOrNil            The user's query.
+ *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
+ */
++ (void)logSearchWithQuery:(nullable NSString *)queryOrNil
+          customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
+
+/**
+ *  Log a Custom Event to see user actions that are uniquely important for your app in real-time, to see how often
+ *  they're performing these actions with breakdowns by different categories you add. Use a human-readable name for
+ *  the name of the event, since this is how the event will appear in Answers.
+ *
+ *  @param eventName             The human-readable name for the event.
+ *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event. Attribute keys
+ *                               must be <code>NSString</code> and and values must be <code>NSNumber</code> or <code>NSString</code>.
+ *  @discussion                  How we treat <code>NSNumbers</code>:
+ *                               We will provide information about the distribution of values over time.
+ *
+ *                               How we treat <code>NSStrings</code>:
+ *                               NSStrings are used as categorical data, allowing comparison across different category values.
+ *                               Strings are limited to a maximum length of 100 characters, attributes over this length will be
+ *                               truncated.
+ *
+ *                               When tracking the Tweet views to better understand user engagement, sending the tweet's length
+ *                               and the type of media present in the tweet allows you to track how tweet length and the type of media influence
+ *                               engagement.
+ */
++ (void)logCustomEventWithName:(NSString *)eventName
+              customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 33 - 0
Libraries external/Fabric/Crashlytics.framework/Headers/CLSAttributes.h

@@ -0,0 +1,33 @@
+//
+//  CLSAttributes.h
+//  Crashlytics
+//
+//  Copyright (c) 2015 Crashlytics, Inc. All rights reserved.
+//
+
+#pragma once
+
+#define CLS_DEPRECATED(x)  __attribute__ ((deprecated(x)))
+
+#if !__has_feature(nullability)
+    #define nonnull
+    #define nullable
+    #define _Nullable
+    #define _Nonnull
+#endif
+
+#ifndef NS_ASSUME_NONNULL_BEGIN
+    #define NS_ASSUME_NONNULL_BEGIN
+#endif
+
+#ifndef NS_ASSUME_NONNULL_END
+    #define NS_ASSUME_NONNULL_END
+#endif
+
+#if __has_feature(objc_generics)
+    #define CLS_GENERIC_NSARRAY(type) NSArray<type>
+    #define CLS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary<key_type, object_key>
+#else
+    #define CLS_GENERIC_NSARRAY(type) NSArray
+    #define CLS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary
+#endif

+ 64 - 0
Libraries external/Fabric/Crashlytics.framework/Headers/CLSLogging.h

@@ -0,0 +1,64 @@
+//
+//  CLSLogging.h
+//  Crashlytics
+//
+//  Copyright (c) 2015 Crashlytics, Inc. All rights reserved.
+//
+#ifdef __OBJC__
+#import "CLSAttributes.h"
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+#endif
+
+
+
+/**
+ *
+ * The CLS_LOG macro provides as easy way to gather more information in your log messages that are
+ * sent with your crash data. CLS_LOG prepends your custom log message with the function name and
+ * line number where the macro was used. If your app was built with the DEBUG preprocessor macro
+ * defined CLS_LOG uses the CLSNSLog function which forwards your log message to NSLog and CLSLog.
+ * If the DEBUG preprocessor macro is not defined CLS_LOG uses CLSLog only.
+ *
+ * Example output:
+ * -[AppDelegate login:] line 134 $ login start
+ *
+ * If you would like to change this macro, create a new header file, unset our define and then define
+ * your own version. Make sure this new header file is imported after the Crashlytics header file.
+ *
+ * #undef CLS_LOG
+ * #define CLS_LOG(__FORMAT__, ...) CLSNSLog...
+ *
+ **/
+#ifdef __OBJC__
+#ifdef DEBUG
+#define CLS_LOG(__FORMAT__, ...) CLSNSLog((@"%s line %d $ " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
+#else
+#define CLS_LOG(__FORMAT__, ...) CLSLog((@"%s line %d $ " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
+#endif
+#endif
+
+/**
+ *
+ * Add logging that will be sent with your crash data. This logging will not show up in the system.log
+ * and will only be visible in your Crashlytics dashboard.
+ *
+ **/
+
+#ifdef __OBJC__
+OBJC_EXTERN void CLSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2);
+OBJC_EXTERN void CLSLogv(NSString *format, va_list ap) NS_FORMAT_FUNCTION(1,0);
+
+/**
+ *
+ * Add logging that will be sent with your crash data. This logging will show up in the system.log
+ * and your Crashlytics dashboard. It is not recommended for Release builds.
+ *
+ **/
+OBJC_EXTERN void CLSNSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2);
+OBJC_EXTERN void CLSNSLogv(NSString *format, va_list ap) NS_FORMAT_FUNCTION(1,0);
+
+
+NS_ASSUME_NONNULL_END
+#endif

+ 103 - 0
Libraries external/Fabric/Crashlytics.framework/Headers/CLSReport.h

@@ -0,0 +1,103 @@
+//
+//  CLSReport.h
+//  Crashlytics
+//
+//  Copyright (c) 2015 Crashlytics, Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "CLSAttributes.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * The CLSCrashReport protocol is deprecated. See the CLSReport class and the CrashyticsDelegate changes for details.
+ **/
+@protocol CLSCrashReport <NSObject>
+
+@property (nonatomic, copy, readonly) NSString *identifier;
+@property (nonatomic, copy, readonly) NSDictionary *customKeys;
+@property (nonatomic, copy, readonly) NSString *bundleVersion;
+@property (nonatomic, copy, readonly) NSString *bundleShortVersionString;
+@property (nonatomic, readonly, nullable) NSDate *crashedOnDate;
+@property (nonatomic, copy, readonly) NSString *OSVersion;
+@property (nonatomic, copy, readonly) NSString *OSBuildVersion;
+
+@end
+
+/**
+ * The CLSReport exposes an interface to the phsyical report that Crashlytics has created. You can
+ * use this class to get information about the event, and can also set some values after the
+ * event has occured.
+ **/
+@interface CLSReport : NSObject <CLSCrashReport>
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+/**
+ * Returns the session identifier for the report.
+ **/
+@property (nonatomic, copy, readonly) NSString *identifier;
+
+/**
+ * Returns the custom key value data for the report.
+ **/
+@property (nonatomic, copy, readonly) NSDictionary *customKeys;
+
+/**
+ * Returns the CFBundleVersion of the application that generated the report.
+ **/
+@property (nonatomic, copy, readonly) NSString *bundleVersion;
+
+/**
+ * Returns the CFBundleShortVersionString of the application that generated the report.
+ **/
+@property (nonatomic, copy, readonly) NSString *bundleShortVersionString;
+
+/**
+ * Returns the date that the report was created.
+ **/
+@property (nonatomic, copy, readonly) NSDate *dateCreated;
+
+/**
+ * Returns the os version that the application crashed on.
+ **/
+@property (nonatomic, copy, readonly) NSString *OSVersion;
+
+/**
+ * Returns the os build version that the application crashed on.
+ **/
+@property (nonatomic, copy, readonly) NSString *OSBuildVersion;
+
+/**
+ * Returns YES if the report contains any crash information, otherwise returns NO.
+ **/
+@property (nonatomic, assign, readonly) BOOL isCrash;
+
+/**
+ * You can use this method to set, after the event, additional custom keys. The rules
+ * and semantics for this method are the same as those documented in Crashlytics.h. Be aware
+ * that the maximum size and count of custom keys is still enforced, and you can overwrite keys
+ * and/or cause excess keys to be deleted by using this method.
+ **/
+- (void)setObjectValue:(nullable id)value forKey:(NSString *)key;
+
+/**
+ * Record an application-specific user identifier. See Crashlytics.h for details.
+ **/
+@property (nonatomic, copy, nullable) NSString * userIdentifier;
+
+/**
+ * Record a user name. See Crashlytics.h for details.
+ **/
+@property (nonatomic, copy, nullable) NSString * userName;
+
+/**
+ * Record a user email. See Crashlytics.h for details.
+ **/
+@property (nonatomic, copy, nullable) NSString * userEmail;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 38 - 0
Libraries external/Fabric/Crashlytics.framework/Headers/CLSStackFrame.h

@@ -0,0 +1,38 @@
+//
+//  CLSStackFrame.h
+//  Crashlytics
+//
+//  Copyright 2015 Crashlytics, Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "CLSAttributes.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ *
+ * This class is used in conjunction with -[Crashlytics recordCustomExceptionName:reason:frameArray:] to
+ * record information about non-ObjC/C++ exceptions. All information included here will be displayed 
+ * in the Crashlytics UI, and can influence crash grouping. Be particularly careful with the use of the 
+ * address property. If set, Crashlytics will attempt symbolication and could overwrite other properities 
+ * in the process.
+ *
+ **/
+@interface CLSStackFrame : NSObject
+
++ (instancetype)stackFrame;
++ (instancetype)stackFrameWithAddress:(NSUInteger)address;
++ (instancetype)stackFrameWithSymbol:(NSString *)symbol;
+
+@property (nonatomic, copy, nullable) NSString *symbol;
+@property (nonatomic, copy, nullable) NSString *rawSymbol;
+@property (nonatomic, copy, nullable) NSString *library;
+@property (nonatomic, copy, nullable) NSString *fileName;
+@property (nonatomic, assign) uint32_t lineNumber;
+@property (nonatomic, assign) uint64_t offset;
+@property (nonatomic, assign) uint64_t address;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 288 - 0
Libraries external/Fabric/Crashlytics.framework/Headers/Crashlytics.h

@@ -0,0 +1,288 @@
+//
+//  Crashlytics.h
+//  Crashlytics
+//
+//  Copyright (c) 2015 Crashlytics, Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import "CLSAttributes.h"
+#import "CLSLogging.h"
+#import "CLSReport.h"
+#import "CLSStackFrame.h"
+#import "Answers.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@protocol CrashlyticsDelegate;
+
+/**
+ * Crashlytics. Handles configuration and initialization of Crashlytics.
+ *
+ * Note: The Crashlytics class cannot be subclassed. If this is causing you pain for
+ * testing, we suggest using either a wrapper class or a protocol extension.
+ */
+@interface Crashlytics : NSObject
+
+@property (nonatomic, readonly, copy) NSString *APIKey;
+@property (nonatomic, readonly, copy) NSString *version;
+@property (nonatomic, assign)         BOOL      debugMode;
+
+/**
+ *
+ * The delegate can be used to influence decisions on reporting and behavior, as well as reacting
+ * to previous crashes.
+ *
+ * Make certain that the delegate is setup before starting Crashlytics with startWithAPIKey:... or
+ * via +[Fabric with:...]. Failure to do will result in missing any delegate callbacks that occur
+ * synchronously during start.
+ *
+ **/
+@property (nonatomic, assign, nullable) id <CrashlyticsDelegate> delegate;
+
+/**
+ *  The recommended way to install Crashlytics into your application is to place a call to +startWithAPIKey: 
+ *  in your -application:didFinishLaunchingWithOptions: or -applicationDidFinishLaunching:
+ *  method.
+ *
+ *  Note: Starting with 3.0, the submission process has been significantly improved. The delay parameter
+ *  is no longer required to throttle submissions on launch, performance will be great without it.
+ *
+ *  @param apiKey The Crashlytics API Key for this app
+ *
+ *  @return The singleton Crashlytics instance
+ */
++ (Crashlytics *)startWithAPIKey:(NSString *)apiKey;
++ (Crashlytics *)startWithAPIKey:(NSString *)apiKey afterDelay:(NSTimeInterval)delay CLS_DEPRECATED("Crashlytics no longer needs or uses the delay parameter.  Please use +startWithAPIKey: instead.");
+
+/**
+ *  If you need the functionality provided by the CrashlyticsDelegate protocol, you can use
+ *  these convenience methods to activate the framework and set the delegate in one call.
+ *  
+ *  @param apiKey   The Crashlytics API Key for this app
+ *  @param delegate A delegate object which conforms to CrashlyticsDelegate.
+ *
+ *  @return The singleton Crashlytics instance
+ */
++ (Crashlytics *)startWithAPIKey:(NSString *)apiKey delegate:(nullable id<CrashlyticsDelegate>)delegate;
++ (Crashlytics *)startWithAPIKey:(NSString *)apiKey delegate:(nullable id<CrashlyticsDelegate>)delegate afterDelay:(NSTimeInterval)delay CLS_DEPRECATED("Crashlytics no longer needs or uses the delay parameter.  Please use +startWithAPIKey:delegate: instead.");
+
+/**
+ *  Access the singleton Crashlytics instance.
+ *
+ *  @return The singleton Crashlytics instance
+ */
++ (Crashlytics *)sharedInstance;
+
+/**
+ *  The easiest way to cause a crash - great for testing!
+ */
+- (void)crash;
+
+/**
+ *  The easiest way to cause a crash with an exception - great for testing.
+ */
+- (void)throwException;
+
+/**
+ *  Specify a user identifier which will be visible in the Crashlytics UI.
+ *
+ *  Many of our customers have requested the ability to tie crashes to specific end-users of their
+ *  application in order to facilitate responses to support requests or permit the ability to reach
+ *  out for more information. We allow you to specify up to three separate values for display within
+ *  the Crashlytics UI - but please be mindful of your end-user's privacy.
+ *
+ *  We recommend specifying a user identifier - an arbitrary string that ties an end-user to a record
+ *  in your system. This could be a database id, hash, or other value that is meaningless to a
+ *  third-party observer but can be indexed and queried by you.
+ *
+ *  Optionally, you may also specify the end-user's name or username, as well as email address if you
+ *  do not have a system that works well with obscured identifiers.
+ *
+ *  Pursuant to our EULA, this data is transferred securely throughout our system and we will not
+ *  disseminate end-user data unless required to by law. That said, if you choose to provide end-user
+ *  contact information, we strongly recommend that you disclose this in your application's privacy
+ *  policy. Data privacy is of our utmost concern.
+ *
+ *  @param identifier An arbitrary user identifier string which ties an end-user to a record in your system.
+ */
+- (void)setUserIdentifier:(nullable NSString *)identifier;
+
+/**
+ *  Specify a user name which will be visible in the Crashlytics UI.
+ *  Please be mindful of your end-user's privacy and see if setUserIdentifier: can fulfil your needs.
+ *  @see setUserIdentifier:
+ *
+ *  @param name An end user's name.
+ */
+- (void)setUserName:(nullable NSString *)name;
+
+/**
+ *  Specify a user email which will be visible in the Crashlytics UI.
+ *  Please be mindful of your end-user's privacy and see if setUserIdentifier: can fulfil your needs.
+ *  
+ *  @see setUserIdentifier:
+ *
+ *  @param email An end user's email address.
+ */
+- (void)setUserEmail:(nullable NSString *)email;
+
++ (void)setUserIdentifier:(nullable NSString *)identifier CLS_DEPRECATED("Please access this method via +sharedInstance");
++ (void)setUserName:(nullable NSString *)name CLS_DEPRECATED("Please access this method via +sharedInstance");
++ (void)setUserEmail:(nullable NSString *)email CLS_DEPRECATED("Please access this method via +sharedInstance");
+
+/**
+ *  Set a value for a for a key to be associated with your crash data which will be visible in the Crashlytics UI.
+ *  When setting an object value, the object is converted to a string. This is typically done by calling 
+ *  -[NSObject description].
+ *
+ *  @param value The object to be associated with the key
+ *  @param key   The key with which to associate the value
+ */
+- (void)setObjectValue:(nullable id)value forKey:(NSString *)key;
+
+/**
+ *  Set an int value for a key to be associated with your crash data which will be visible in the Crashlytics UI.
+ *
+ *  @param value The integer value to be set
+ *  @param key   The key with which to associate the value
+ */
+- (void)setIntValue:(int)value forKey:(NSString *)key;
+
+/**
+ *  Set an BOOL value for a key to be associated with your crash data which will be visible in the Crashlytics UI.
+ *
+ *  @param value The BOOL value to be set
+ *  @param key   The key with which to associate the value
+ */
+- (void)setBoolValue:(BOOL)value forKey:(NSString *)key;
+
+/**
+ *  Set an float value for a key to be associated with your crash data which will be visible in the Crashlytics UI.
+ *
+ *  @param value The float value to be set
+ *  @param key   The key with which to associate the value
+ */
+- (void)setFloatValue:(float)value forKey:(NSString *)key;
+
++ (void)setObjectValue:(nullable id)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance");
++ (void)setIntValue:(int)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance");
++ (void)setBoolValue:(BOOL)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance");
++ (void)setFloatValue:(float)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance");
+
+/**
+ *  This method can be used to record a single exception structure in a report. This is particularly useful
+ *  when your code interacts with non-native languages like Lua, C#, or Javascript. This call can be
+ *  expensive and should only be used shortly before process termination. This API is not intended be to used
+ *  to log NSException objects. All safely-reportable NSExceptions are automatically captured by
+ *  Crashlytics.
+ *
+ *  @param name       The name of the custom exception
+ *  @param reason     The reason this exception occured
+ *  @param frameArray An array of CLSStackFrame objects
+ */
+- (void)recordCustomExceptionName:(NSString *)name reason:(nullable NSString *)reason frameArray:(CLS_GENERIC_NSARRAY(CLSStackFrame *) *)frameArray;
+
+/**
+ *
+ * This allows you to record a non-fatal event, described by an NSError object. These events will be grouped and
+ * displayed similarly to crashes. Keep in mind that this method can be expensive. Also, the total number of
+ * NSErrors that can be recorded during your app's life-cycle is limited by a fixed-size circular buffer. If the
+ * buffer is overrun, the oldest data is dropped. Errors are relayed to Crashlytics on a subsequent launch
+ * of your application.
+ *
+ * You can also use the -recordError:withAdditionalUserInfo: to include additional context not represented
+ * by the NSError instance itself.
+ *
+ **/
+- (void)recordError:(NSError *)error;
+- (void)recordError:(NSError *)error withAdditionalUserInfo:(nullable CLS_GENERIC_NSDICTIONARY(NSString *, id) *)userInfo;
+
+- (void)logEvent:(NSString *)eventName CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:");
+- (void)logEvent:(NSString *)eventName attributes:(nullable NSDictionary *) attributes CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:");
++ (void)logEvent:(NSString *)eventName CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:");
++ (void)logEvent:(NSString *)eventName attributes:(nullable NSDictionary *) attributes CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:");
+
+@end
+
+/**
+ *
+ * The CrashlyticsDelegate protocol provides a mechanism for your application to take
+ * action on events that occur in the Crashlytics crash reporting system.  You can make
+ * use of these calls by assigning an object to the Crashlytics' delegate property directly,
+ * or through the convenience +startWithAPIKey:delegate: method.
+ *
+ */
+@protocol CrashlyticsDelegate <NSObject>
+@optional
+
+
+- (void)crashlyticsDidDetectCrashDuringPreviousExecution:(Crashlytics *)crashlytics CLS_DEPRECATED("Please refer to -crashlyticsDidDetectReportForLastExecution:");
+- (void)crashlytics:(Crashlytics *)crashlytics didDetectCrashDuringPreviousExecution:(id <CLSCrashReport>)crash CLS_DEPRECATED("Please refer to -crashlyticsDidDetectReportForLastExecution:");
+
+/**
+ *
+ *  Called when a Crashlytics instance has determined that the last execution of the
+ *  application resulted in a saved report.  This is called synchronously on Crashlytics
+ *  initialization. Your delegate must invoke the completionHandler, but does not need to do so
+ *  synchronously, or even on the main thread. Invoking completionHandler with NO will cause the
+ *  detected report to be deleted and not submitted to Crashlytics. This is useful for
+ *  implementing permission prompts, or other more-complex forms of logic around submitting crashes.
+ *
+ *  Instead of using this method, you should try to make use of -crashlyticsDidDetectReportForLastExecution: 
+ *  if you can.
+ *
+ *  @warning Failure to invoke the completionHandler will prevent submissions from being reported. Watch out.
+ *
+ *  @warning Just implementing this delegate method will disable all forms of synchronous report submission. This can
+ *           impact the reliability of reporting crashes very early in application launch.
+ *
+ *  @param report            The CLSReport object representing the last detected report
+ *  @param completionHandler The completion handler to call when your logic has completed.
+ *
+ */
+- (void)crashlyticsDidDetectReportForLastExecution:(CLSReport *)report completionHandler:(void (^)(BOOL submit))completionHandler;
+
+/**
+ *
+ *  Called when a Crashlytics instance has determined that the last execution of the
+ *  application resulted in a saved report. This method differs from
+ *  -crashlyticsDidDetectReportForLastExecution:completionHandler: in three important ways:
+ *
+ *    - it is not called synchronously during initialization
+ *    - it does not give you the ability to prevent the report from being submitted
+ *    - the report object itself is immutable
+ *
+ *  Thanks to these limitations, making use of this method does not impact reporting 
+ *  reliabilty in any way.
+ *
+ *  @param report The read-only CLSReport object representing the last detected report
+ *
+ */
+
+- (void)crashlyticsDidDetectReportForLastExecution:(CLSReport *)report;
+
+/**
+ *  If your app is running on an OS that supports it (OS X 10.9+, iOS 7.0+), Crashlytics will submit
+ *  most reports using out-of-process background networking operations. This results in a significant
+ *  improvement in reliability of reporting, as well as power and performance wins for your users.
+ *  If you don't want this functionality, you can disable by returning NO from this method.
+ *
+ *  @warning Background submission is not supported for extensions on iOS or OS X.
+ *
+ *  @param crashlytics The Crashlytics singleton instance
+ *
+ *  @return Return NO if you don't want out-of-process background network operations.
+ *
+ */
+- (BOOL)crashlyticsCanUseBackgroundSessions:(Crashlytics *)crashlytics;
+
+@end
+
+/**
+ *  `CrashlyticsKit` can be used as a parameter to `[Fabric with:@[CrashlyticsKit]];` in Objective-C. In Swift, use Crashlytics.sharedInstance()
+ */
+#define CrashlyticsKit [Crashlytics sharedInstance]
+
+NS_ASSUME_NONNULL_END

BIN
Libraries external/Fabric/Crashlytics.framework/Info.plist


+ 14 - 0
Libraries external/Fabric/Crashlytics.framework/Modules/module.modulemap

@@ -0,0 +1,14 @@
+framework module Crashlytics {
+    header "Crashlytics.h"
+    header "Answers.h"
+    header "ANSCompatibility.h"
+    header "CLSLogging.h"
+    header "CLSReport.h"
+    header "CLSStackFrame.h"
+    header "CLSAttributes.h"
+
+    export *
+
+    link "z"
+    link "c++"
+}

+ 28 - 0
Libraries external/Fabric/Crashlytics.framework/run

@@ -0,0 +1,28 @@
+#!/bin/sh
+
+#  run
+#
+#  Copyright (c) 2015 Crashlytics. All rights reserved.
+
+#  Figure out where we're being called from
+DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+
+#  Quote path in case of spaces or special chars
+DIR="\"${DIR}"
+
+PATH_SEP="/"
+VALIDATE_COMMAND="uploadDSYM\" $@ validate run-script"
+UPLOAD_COMMAND="uploadDSYM\" $@ run-script"
+
+#  Ensure params are as expected, run in sync mode to validate
+eval $DIR$PATH_SEP$VALIDATE_COMMAND
+return_code=$?
+
+if [[ $return_code != 0 ]]; then
+  exit $return_code
+fi
+
+#  Verification passed, upload dSYM in background to prevent Xcode from waiting
+#  Note: Validation is performed again before upload.
+#  Output can still be found in Console.app
+eval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 &

BIN
Libraries external/Fabric/Crashlytics.framework/submit


BIN
Libraries external/Fabric/Crashlytics.framework/uploadDSYM


BIN
Libraries external/Fabric/Fabric.framework/Fabric


+ 51 - 0
Libraries external/Fabric/Fabric.framework/Headers/FABAttributes.h

@@ -0,0 +1,51 @@
+//
+//  FABAttributes.h
+//  Fabric
+//
+//  Copyright (C) 2015 Twitter, Inc.
+//
+//  Licensed under the Apache License, Version 2.0 (the "License");
+//  you may not use this file except in compliance with the License.
+//  You may obtain a copy of the License at
+//
+//  http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+
+#pragma once
+
+#define FAB_UNAVAILABLE(x) __attribute__((unavailable(x)))
+
+#if !__has_feature(nullability)
+    #define nonnull
+    #define nullable
+    #define _Nullable
+    #define _Nonnull
+#endif
+
+#ifndef NS_ASSUME_NONNULL_BEGIN
+    #define NS_ASSUME_NONNULL_BEGIN
+#endif
+
+#ifndef NS_ASSUME_NONNULL_END
+    #define NS_ASSUME_NONNULL_END
+#endif
+
+
+/**
+ * The following macros are defined here to provide
+ * backwards compatability. If you are still using
+ * them you should migrate to the native nullability
+ * macros.
+ */
+#define fab_nullable      nullable
+#define fab_nonnull       nonnull
+#define FAB_NONNULL       __fab_nonnull
+#define FAB_NULLABLE      __fab_nullable
+#define FAB_START_NONNULL NS_ASSUME_NONNULL_BEGIN
+#define FAB_END_NONNULL   NS_ASSUME_NONNULL_END

+ 82 - 0
Libraries external/Fabric/Fabric.framework/Headers/Fabric.h

@@ -0,0 +1,82 @@
+//
+//  Fabric.h
+//  Fabric
+//
+//  Copyright (C) 2015 Twitter, Inc.
+//
+//  Licensed under the Apache License, Version 2.0 (the "License");
+//  you may not use this file except in compliance with the License.
+//  You may obtain a copy of the License at
+//
+//  http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+
+#import <Foundation/Foundation.h>
+#import "FABAttributes.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+#if TARGET_OS_IPHONE
+#if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000
+    #error "Fabric's minimum iOS version is 6.0"
+#endif
+#else
+#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1070
+    #error "Fabric's minimum OS X version is 10.7"
+#endif
+#endif
+
+/**
+ *  Fabric Base. Coordinates configuration and starts all provided kits.
+ */
+@interface Fabric : NSObject
+
+/**
+ * Initialize Fabric and all provided kits. Call this method within your App Delegate's `application:didFinishLaunchingWithOptions:` and provide the kits you wish to use.
+ *
+ * For example, in Objective-C:
+ *
+ *      `[Fabric with:@[[Crashlytics class], [Twitter class], [Digits class], [MoPub class]]];`
+ *
+ * Swift:
+ *
+ *      `Fabric.with([Crashlytics.self(), Twitter.self(), Digits.self(), MoPub.self()])`
+ *
+ * Only the first call to this method is honored. Subsequent calls are no-ops.
+ *
+ * @param kitClasses An array of kit Class objects
+ *
+ * @return Returns the shared Fabric instance. In most cases this can be ignored.
+ */
++ (instancetype)with:(NSArray *)kitClasses;
+
+/**
+ *  Returns the Fabric singleton object.
+ */
++ (instancetype)sharedSDK;
+
+/**
+ *  This BOOL enables or disables debug logging, such as kit version information. The default value is NO.
+ */
+@property (nonatomic, assign) BOOL debug;
+
+/**
+ *  Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance.
+ */
+- (id)init FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance.");
+
+/**
+ *  Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance.
+ */
++ (instancetype)new FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance.");
+
+@end
+
+NS_ASSUME_NONNULL_END
+

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


+ 6 - 0
Libraries external/Fabric/Fabric.framework/Modules/module.modulemap

@@ -0,0 +1,6 @@
+framework module Fabric {
+    umbrella header "Fabric.h"
+
+    export *
+    module * { export * }
+}

+ 28 - 0
Libraries external/Fabric/Fabric.framework/run

@@ -0,0 +1,28 @@
+#!/bin/sh
+
+#  run
+#
+#  Copyright (c) 2015 Crashlytics. All rights reserved.
+
+#  Figure out where we're being called from
+DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+
+#  Quote path in case of spaces or special chars
+DIR="\"${DIR}"
+
+PATH_SEP="/"
+VALIDATE_COMMAND="uploadDSYM\" $@ validate run-script"
+UPLOAD_COMMAND="uploadDSYM\" $@ run-script"
+
+#  Ensure params are as expected, run in sync mode to validate
+eval $DIR$PATH_SEP$VALIDATE_COMMAND
+return_code=$?
+
+if [[ $return_code != 0 ]]; then
+  exit $return_code
+fi
+
+#  Verification passed, upload dSYM in background to prevent Xcode from waiting
+#  Note: Validation is performed again before upload.
+#  Output can still be found in Console.app
+eval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 &

BIN
Libraries external/Fabric/Fabric.framework/uploadDSYM


+ 7 - 1
Libraries external/OCCommunicationLib/OCCommunicationLib/OCCapabilities.h

@@ -57,6 +57,12 @@
 @property (nonatomic) BOOL isFileUndeleteEnabled;
 @property (nonatomic) BOOL isFileVersioningEnabled;
 
-
+// Theming
+@property (nonatomic, strong) NSString *themingBackground;
+@property (nonatomic, strong) NSString *themingColor;
+@property (nonatomic, strong) NSString *themingLogo;
+@property (nonatomic, strong) NSString *themingName;
+@property (nonatomic, strong) NSString *themingSlogan;
+@property (nonatomic, strong) NSString *themingUrl;
 
 @end

+ 6 - 0
Libraries external/OCCommunicationLib/OCCommunicationLib/OCCapabilities.m

@@ -21,6 +21,12 @@
         self.corePollInterval = 0;
         self.filesSharingExpireDateDaysNumber = 0;
         
+        self.themingBackground = @"";
+        self.themingColor = @"";
+        self.themingLogo = @"";
+        self.themingName = @"";
+        self.themingSlogan = @"";
+        self.themingUrl = @"";
     }
     return self;
 }

+ 96 - 65
Libraries external/OCCommunicationLib/OCCommunicationLib/OCCommunication.m

@@ -1269,105 +1269,136 @@
             NSDictionary *data = [ocs valueForKey:@"data"];
             NSDictionary *version = [data valueForKey:@"version"];
             
-            //VERSION
+            if (ocs.count > 0 && data.count > 0 && version.count > 0) {
             
-            NSNumber *versionMajorNumber = (NSNumber*) [version valueForKey:@"major"];
-            NSNumber *versionMinorNumber = (NSNumber*) [version valueForKey:@"minor"];
-            NSNumber *versionMicroNumber = (NSNumber*) [version valueForKey:@"micro"];
+                //VERSION
             
-            capabilities.versionMajor = versionMajorNumber.integerValue;
-            capabilities.versionMinor = versionMinorNumber.integerValue;
-            capabilities.versionMicro = versionMicroNumber.integerValue;
+                NSNumber *versionMajorNumber = (NSNumber*) [version valueForKey:@"major"];
+                NSNumber *versionMinorNumber = (NSNumber*) [version valueForKey:@"minor"];
+                NSNumber *versionMicroNumber = (NSNumber*) [version valueForKey:@"micro"];
             
-            capabilities.versionString = (NSString*)[version valueForKey:@"string"];
-            capabilities.versionEdition = (NSString*)[version valueForKey:@"edition"];
+                capabilities.versionMajor = versionMajorNumber.integerValue;
+                capabilities.versionMinor = versionMinorNumber.integerValue;
+                capabilities.versionMicro = versionMicroNumber.integerValue;
             
-            NSDictionary *capabilitiesDict = [data valueForKey:@"capabilities"];
-            NSDictionary *core = [capabilitiesDict valueForKey:@"core"];
+                capabilities.versionString = (NSString*)[version valueForKey:@"string"];
+                capabilities.versionEdition = (NSString*)[version valueForKey:@"edition"];
             
-            //CORE
+                NSDictionary *capabilitiesDict = [data valueForKey:@"capabilities"];
+                NSDictionary *core = [capabilitiesDict valueForKey:@"core"];
             
-            NSNumber *corePollIntervalNumber = (NSNumber*)[core valueForKey:@"pollinterval"];
-            capabilities.corePollInterval = corePollIntervalNumber.integerValue;
+                //CORE
             
-            NSDictionary *fileSharing = [capabilitiesDict valueForKey:@"files_sharing"];
+                NSNumber *corePollIntervalNumber = (NSNumber*)[core valueForKey:@"pollinterval"];
+                capabilities.corePollInterval = corePollIntervalNumber.integerValue;
             
-            //FILE SHARING
+                NSDictionary *fileSharing = [capabilitiesDict valueForKey:@"files_sharing"];
             
-            NSNumber *fileSharingAPIEnabledNumber = (NSNumber*)[fileSharing valueForKey:@"api_enabled"];
-            NSNumber *filesSharingReSharingEnabledNumber = (NSNumber*)[fileSharing valueForKey:@"resharing"];
-      
+                //FILE SHARING
             
-            capabilities.isFilesSharingAPIEnabled = fileSharingAPIEnabledNumber.boolValue;
-            capabilities.isFilesSharingReSharingEnabled = filesSharingReSharingEnabledNumber.boolValue;
+                NSNumber *fileSharingAPIEnabledNumber = (NSNumber*)[fileSharing valueForKey:@"api_enabled"];
+                NSNumber *filesSharingReSharingEnabledNumber = (NSNumber*)[fileSharing valueForKey:@"resharing"];
             
-            NSDictionary *fileSharingPublic = [fileSharing valueForKey:@"public"];
+                capabilities.isFilesSharingAPIEnabled = fileSharingAPIEnabledNumber.boolValue;
+                capabilities.isFilesSharingReSharingEnabled = filesSharingReSharingEnabledNumber.boolValue;
             
-            NSNumber *filesSharingShareLinkEnabledNumber = (NSNumber*)[fileSharingPublic valueForKey:@"enabled"];
-            NSNumber *filesSharingAllowPublicUploadsEnabledNumber = (NSNumber*)[fileSharingPublic valueForKey:@"upload"];
-            NSNumber *filesSharingAllowUserSendMailNotificationAboutShareLinkEnabledNumber = (NSNumber*)[fileSharingPublic valueForKey:@"send_mail"];
+                NSDictionary *fileSharingPublic = [fileSharing valueForKey:@"public"];
             
-            capabilities.isFilesSharingShareLinkEnabled = filesSharingShareLinkEnabledNumber.boolValue;
-            capabilities.isFilesSharingAllowPublicUploadsEnabled = filesSharingAllowPublicUploadsEnabledNumber.boolValue;
-            capabilities.isFilesSharingAllowUserSendMailNotificationAboutShareLinkEnabled = filesSharingAllowUserSendMailNotificationAboutShareLinkEnabledNumber.boolValue;
+                NSNumber *filesSharingShareLinkEnabledNumber = (NSNumber*)[fileSharingPublic valueForKey:@"enabled"];
+                NSNumber *filesSharingAllowPublicUploadsEnabledNumber = (NSNumber*)[fileSharingPublic valueForKey:@"upload"];
+                NSNumber *filesSharingAllowUserSendMailNotificationAboutShareLinkEnabledNumber = (NSNumber*)[fileSharingPublic valueForKey:@"send_mail"];
             
-            NSDictionary *fileSharingPublicExpireDate = [fileSharingPublic valueForKey:@"expire_date"];
+                capabilities.isFilesSharingShareLinkEnabled = filesSharingShareLinkEnabledNumber.boolValue;
+                capabilities.isFilesSharingAllowPublicUploadsEnabled = filesSharingAllowPublicUploadsEnabledNumber.boolValue;
+                capabilities.isFilesSharingAllowUserSendMailNotificationAboutShareLinkEnabled = filesSharingAllowUserSendMailNotificationAboutShareLinkEnabledNumber.boolValue;
             
-            NSNumber *filesSharingExpireDateByDefaultEnabledNumber = (NSNumber*)[fileSharingPublicExpireDate valueForKey:@"enabled"];
-            NSNumber *filesSharingExpireDateEnforceEnabledNumber = (NSNumber*)[fileSharingPublicExpireDate valueForKey:@"enforced"];
-            NSNumber *filesSharingExpireDateDaysNumber = (NSNumber*)[fileSharingPublicExpireDate valueForKey:@"days"];
+                NSDictionary *fileSharingPublicExpireDate = [fileSharingPublic valueForKey:@"expire_date"];
+            
+                NSNumber *filesSharingExpireDateByDefaultEnabledNumber = (NSNumber*)[fileSharingPublicExpireDate valueForKey:@"enabled"];
+                NSNumber *filesSharingExpireDateEnforceEnabledNumber = (NSNumber*)[fileSharingPublicExpireDate valueForKey:@"enforced"];
+                NSNumber *filesSharingExpireDateDaysNumber = (NSNumber*)[fileSharingPublicExpireDate valueForKey:@"days"];
             
     
-            capabilities.isFilesSharingExpireDateByDefaultEnabled = filesSharingExpireDateByDefaultEnabledNumber.boolValue;
-            capabilities.isFilesSharingExpireDateEnforceEnabled = filesSharingExpireDateEnforceEnabledNumber.boolValue;
-            capabilities.filesSharingExpireDateDaysNumber = filesSharingExpireDateDaysNumber.integerValue;
+                capabilities.isFilesSharingExpireDateByDefaultEnabled = filesSharingExpireDateByDefaultEnabledNumber.boolValue;
+                capabilities.isFilesSharingExpireDateEnforceEnabled = filesSharingExpireDateEnforceEnabledNumber.boolValue;
+                capabilities.filesSharingExpireDateDaysNumber = filesSharingExpireDateDaysNumber.integerValue;
             
-            NSDictionary *fileSharingPublicPassword = [fileSharingPublic valueForKey:@"password"];
+                NSDictionary *fileSharingPublicPassword = [fileSharingPublic valueForKey:@"password"];
             
-            NSNumber *filesSharingPasswordEnforcedEnabledNumber = (NSNumber*)[fileSharingPublicPassword valueForKey:@"enforced"];
+                NSNumber *filesSharingPasswordEnforcedEnabledNumber = (NSNumber*)[fileSharingPublicPassword valueForKey:@"enforced"];
             
-            capabilities.isFilesSharingPasswordEnforcedEnabled = filesSharingPasswordEnforcedEnabledNumber.boolValue;;
+                capabilities.isFilesSharingPasswordEnforcedEnabled = filesSharingPasswordEnforcedEnabledNumber.boolValue;;
             
-            NSDictionary *fileSharingUser = [fileSharing valueForKey:@"user"];
+                NSDictionary *fileSharingUser = [fileSharing valueForKey:@"user"];
             
-            NSNumber *filesSharingAllowUserSendMailNotificationAboutOtherUsersEnabledNumber = (NSNumber*)[fileSharingUser valueForKey:@"send_mail"];
+                NSNumber *filesSharingAllowUserSendMailNotificationAboutOtherUsersEnabledNumber = (NSNumber*)[fileSharingUser valueForKey:@"send_mail"];
             
-            capabilities.isFilesSharingAllowUserSendMailNotificationAboutOtherUsersEnabled = filesSharingAllowUserSendMailNotificationAboutOtherUsersEnabledNumber.boolValue;
+                capabilities.isFilesSharingAllowUserSendMailNotificationAboutOtherUsersEnabled = filesSharingAllowUserSendMailNotificationAboutOtherUsersEnabledNumber.boolValue;
             
-            //FEDERATION
+                //FEDERATION
             
-            NSDictionary *fileSharingFederation = [fileSharing valueForKey:@"federation"];
+                NSDictionary *fileSharingFederation = [fileSharing valueForKey:@"federation"];
             
-            NSNumber *filesSharingAllowUserSendSharesToOtherServersEnabledNumber = (NSNumber*)[fileSharingFederation valueForKey:@"outgoing"];
-            NSNumber *filesSharingAllowUserReceiveSharesToOtherServersEnabledNumber = (NSNumber*)[fileSharingFederation valueForKey:@"incoming"];
+                NSNumber *filesSharingAllowUserSendSharesToOtherServersEnabledNumber = (NSNumber*)[fileSharingFederation valueForKey:@"outgoing"];
+                NSNumber *filesSharingAllowUserReceiveSharesToOtherServersEnabledNumber = (NSNumber*)[fileSharingFederation valueForKey:@"incoming"];
             
-            capabilities.isFilesSharingAllowUserSendSharesToOtherServersEnabled = filesSharingAllowUserSendSharesToOtherServersEnabledNumber.boolValue;
-            capabilities.isFilesSharingAllowUserReceiveSharesToOtherServersEnabled = filesSharingAllowUserReceiveSharesToOtherServersEnabledNumber.boolValue;
+                capabilities.isFilesSharingAllowUserSendSharesToOtherServersEnabled = filesSharingAllowUserSendSharesToOtherServersEnabledNumber.boolValue;
+                capabilities.isFilesSharingAllowUserReceiveSharesToOtherServersEnabled = filesSharingAllowUserReceiveSharesToOtherServersEnabledNumber.boolValue;
             
-            // EXTERNAL SITES
+                // EXTERNAL SITES
             
-            NSDictionary *externalSitesDic = [capabilitiesDict valueForKey:@"external"];
-            if (externalSitesDic) {
-                NSArray *externalSitesArray = [externalSitesDic valueForKey:@"v1"];
-                if (externalSitesArray)
-                    if ([[externalSitesArray objectAtIndex:0] isEqualToString:@"sites"])
-                        capabilities.isExternalSitesServerEnabled = YES;
-            }
-            //FILES
+                NSDictionary *externalSitesDic = [capabilitiesDict valueForKey:@"external"];
+                if (externalSitesDic) {
+                    NSArray *externalSitesArray = [externalSitesDic valueForKey:@"v1"];
+                    if (externalSitesArray)
+                        if ([[externalSitesArray objectAtIndex:0] isEqualToString:@"sites"])
+                            capabilities.isExternalSitesServerEnabled = YES;
+                }
+                
+                //FILES
             
-            NSDictionary *files = [capabilitiesDict valueForKey:@"files"];
+                NSDictionary *files = [capabilitiesDict valueForKey:@"files"];
             
-            NSNumber *fileBigFileChunkingEnabledNumber = (NSNumber*)[files valueForKey:@"bigfilechunking"];
-            NSNumber *fileUndeleteEnabledNumber = (NSNumber*)[files valueForKey:@"undelete"];
-            NSNumber *fileVersioningEnabledNumber = (NSNumber*)[files valueForKey:@"versioning"];
+                NSNumber *fileBigFileChunkingEnabledNumber = (NSNumber*)[files valueForKey:@"bigfilechunking"];
+                NSNumber *fileUndeleteEnabledNumber = (NSNumber*)[files valueForKey:@"undelete"];
+                NSNumber *fileVersioningEnabledNumber = (NSNumber*)[files valueForKey:@"versioning"];
             
-            capabilities.isFileBigFileChunkingEnabled = fileBigFileChunkingEnabledNumber.boolValue;
-            capabilities.isFileUndeleteEnabled = fileUndeleteEnabledNumber.boolValue;
-            capabilities.isFileVersioningEnabled = fileVersioningEnabledNumber.boolValue;
+                capabilities.isFileBigFileChunkingEnabled = fileBigFileChunkingEnabledNumber.boolValue;
+                capabilities.isFileUndeleteEnabled = fileUndeleteEnabledNumber.boolValue;
+                capabilities.isFileVersioningEnabled = fileVersioningEnabledNumber.boolValue;
             
-        }
+                //THEMING
+            
+                NSDictionary *theming = [capabilitiesDict valueForKey:@"theming"];
+            
+                if ([theming count] > 0) {
+                
+                    if ([theming valueForKey:@"background"] && ![[theming valueForKey:@"background"] isEqual:[NSNull null]])
+                        capabilities.themingBackground = [theming valueForKey:@"background"];
+                
+                    if ([theming valueForKey:@"color"] && ![[theming valueForKey:@"color"] isEqual:[NSNull null]])
+                        capabilities.themingColor = [theming valueForKey:@"color"];
+                
+                    if ([theming valueForKey:@"logo"] && ![[theming valueForKey:@"logo"] isEqual:[NSNull null]])
+                        capabilities.themingLogo = [theming valueForKey:@"logo"];
+                
+                    if ([theming valueForKey:@"name"] && ![[theming valueForKey:@"name"] isEqual:[NSNull null]])
+                        capabilities.themingName = [theming valueForKey:@"name"];
+                
+                    if ([theming valueForKey:@"slogan"] && ![[theming valueForKey:@"slogan"] isEqual:[NSNull null]])
+                        capabilities.themingSlogan = [theming valueForKey:@"slogan"];
+                
+                    if ([theming valueForKey:@"url"] && ![[theming valueForKey:@"url"] isEqual:[NSNull null]])
+                        capabilities.themingUrl = [theming valueForKey:@"url"];
+                }
+            }
         
-        successRequest(response, capabilities, request.redirectedServer);
+            successRequest(response, capabilities, request.redirectedServer);
+            
+        } else {
+            
+            failureRequest(response, error, request.redirectedServer);
+        }
         
     } failure:^(NSHTTPURLResponse *response, NSData *responseData, NSError *error) {
         failureRequest(response, error, request.redirectedServer);

+ 126 - 35
Nextcloud.xcodeproj/project.pbxproj

@@ -109,10 +109,6 @@
 		F71E68021DC1F79D003BA52B /* libownCloudiOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F71E67FC1DC1F76F003BA52B /* libownCloudiOS.a */; };
 		F720E01F1E48C73E001A4B9E /* CCActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F720E01E1E48C73E001A4B9E /* CCActions.swift */; };
 		F725437C1E12A44A009BF4C2 /* CCSection.m in Sources */ = {isa = PBXBuildFile; fileRef = F78F6FAF1CC8CCB700F4EA25 /* CCSection.m */; };
-		F7274FED1E6EB6F400C241B6 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7274FEC1E6EB6F400C241B6 /* Constant.swift */; };
-		F7274FEE1E6EB6F400C241B6 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7274FEC1E6EB6F400C241B6 /* Constant.swift */; };
-		F7274FEF1E6EB6F400C241B6 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7274FEC1E6EB6F400C241B6 /* Constant.swift */; };
-		F7274FF01E6EB6F400C241B6 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7274FEC1E6EB6F400C241B6 /* Constant.swift */; };
 		F72AAECA1E5C60C700BB17E1 /* AHKActionSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = F72AAEC31E5C60C700BB17E1 /* AHKActionSheet.m */; };
 		F72AAECB1E5C60C700BB17E1 /* AHKActionSheetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F72AAEC51E5C60C700BB17E1 /* AHKActionSheetViewController.m */; };
 		F72AAECC1E5C60C700BB17E1 /* UIImage+AHKAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = F72AAEC71E5C60C700BB17E1 /* UIImage+AHKAdditions.m */; };
@@ -159,8 +155,6 @@
 		F73F537F1E929C8500F8678D /* CCMore.swift in Sources */ = {isa = PBXBuildFile; fileRef = F73F537E1E929C8500F8678D /* CCMore.swift */; };
 		F74344171E1264EE001CC831 /* DocumentPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74344161E1264EE001CC831 /* DocumentPickerViewController.swift */; };
 		F74344251E1264EE001CC831 /* FileProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74344241E1264EE001CC831 /* FileProvider.swift */; };
-		F743444A1E126B4D001CC831 /* CCMove.m in Sources */ = {isa = PBXBuildFile; fileRef = F7D02A471C5F9E4400D6F972 /* CCMove.m */; };
-		F743444B1E126B69001CC831 /* CCMove.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7D02A481C5F9E4400D6F972 /* CCMove.storyboard */; };
 		F74344541E1277D8001CC831 /* libownCloudiOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F71E67FC1DC1F76F003BA52B /* libownCloudiOS.a */; };
 		F74344551E1277E2001CC831 /* libMagicalRecord.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F7B61E9B1DC13C20009E938F /* libMagicalRecord.a */; };
 		F74344561E12784A001CC831 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F70A63061D5B3467004E2AA5 /* libcrypto.a */; };
@@ -172,7 +166,6 @@
 		F74344671E127E38001CC831 /* CCMetadata.m in Sources */ = {isa = PBXBuildFile; fileRef = F7C8C1731B482A920048180E /* CCMetadata.m */; };
 		F74344781E127E9E001CC831 /* CCExifGeo.m in Sources */ = {isa = PBXBuildFile; fileRef = F7A54C351C6267B500E2C8BF /* CCExifGeo.m */; };
 		F74344791E127EA1001CC831 /* CCError.m in Sources */ = {isa = PBXBuildFile; fileRef = F76C3B881C638A4C00DC4301 /* CCError.m */; };
-		F743447A1E127EA6001CC831 /* CCGraphics.m in Sources */ = {isa = PBXBuildFile; fileRef = F76C3B841C6388BC00DC4301 /* CCGraphics.m */; };
 		F743447B1E127EAC001CC831 /* CCUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = F7053E3D1C639DF500741EA5 /* CCUtility.m */; };
 		F743447C1E127EB2001CC831 /* NSString+TruncateToWidth.m in Sources */ = {isa = PBXBuildFile; fileRef = F73049B91CB567F000C7C320 /* NSString+TruncateToWidth.m */; };
 		F743447D1E127ECB001CC831 /* AESCrypt.m in Sources */ = {isa = PBXBuildFile; fileRef = F70F02AB1C889183008DAB36 /* AESCrypt.m */; };
@@ -324,6 +317,18 @@
 		F769D39A1E9E1506006DBBB4 /* CCLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = F769D3961E9E1506006DBBB4 /* CCLocalStorage.m */; };
 		F769D39B1E9E1506006DBBB4 /* CCLocalStorageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F769D3981E9E1506006DBBB4 /* CCLocalStorageCell.m */; };
 		F769D39C1E9E1506006DBBB4 /* CCLocalStorageCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F769D3991E9E1506006DBBB4 /* CCLocalStorageCell.xib */; };
+		F76B3CCE1EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
+		F76B3CCF1EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
+		F76B3CD01EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
+		F76B3CD11EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
+		F76B3CE11EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.m in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CDE1EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.m */; };
+		F76B3CE21EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.m in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CDE1EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.m */; };
+		F76B3CE31EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.m in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CDE1EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.m */; };
+		F76B3CE41EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.m in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CDE1EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.m */; };
+		F76B3CE51EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CE01EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.m */; };
+		F76B3CE61EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CE01EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.m */; };
+		F76B3CE71EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CE01EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.m */; };
+		F76B3CE81EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CE01EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.m */; };
 		F77B0DF01D118A16002130FE /* UIImage+Resizing.m in Sources */ = {isa = PBXBuildFile; fileRef = F70F04CA1C889184008DAB36 /* UIImage+Resizing.m */; };
 		F77B0DF21D118A16002130FE /* CCUploadFromOtherUpp.m in Sources */ = {isa = PBXBuildFile; fileRef = F7956FCA1B4886E60085DEA3 /* CCUploadFromOtherUpp.m */; };
 		F77B0DF41D118A16002130FE /* CCMain.m in Sources */ = {isa = PBXBuildFile; fileRef = F70211FB1BAC56E9003FC03E /* CCMain.m */; };
@@ -518,6 +523,8 @@
 		F7A3217B1E9E3EAF0069AD1B /* CCTransfersCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7A321781E9E3EAF0069AD1B /* CCTransfersCell.xib */; };
 		F7A3218C1E9E42B30069AD1B /* CCMenuAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = F7A3218B1E9E42B30069AD1B /* CCMenuAccount.m */; };
 		F7A321AD1E9E6AD50069AD1B /* CCAdvanced.m in Sources */ = {isa = PBXBuildFile; fileRef = F7A321AC1E9E6AD50069AD1B /* CCAdvanced.m */; };
+		F7A377161EB2364A002856D3 /* Crashlytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7A377141EB2364A002856D3 /* Crashlytics.framework */; };
+		F7A3771A1EB2364A002856D3 /* Fabric.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7A377151EB2364A002856D3 /* Fabric.framework */; };
 		F7B1FBC41E72E3D1001781FE /* Media.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F7B1FBB11E72E3D1001781FE /* Media.xcassets */; };
 		F7B1FBC61E72E3D1001781FE /* SwiftModalWebVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B1FBBF1E72E3D1001781FE /* SwiftModalWebVC.swift */; };
 		F7B1FBC71E72E3D1001781FE /* SwiftWebVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B1FBC01E72E3D1001781FE /* SwiftWebVC.swift */; };
@@ -533,6 +540,7 @@
 		F7C525A21E3B6DA800FFE02C /* CCNotification.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7C525A11E3B6DA800FFE02C /* CCNotification.storyboard */; };
 		F7C742D81E7BD5C900D9C973 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7C742D71E7BD5C900D9C973 /* MainInterface.storyboard */; };
 		F7D2677C1E157053005ACB7E /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F7F67BB81A24D27800EE80DA /* Images.xcassets */; };
+		F7E718B01EB0FBE700FA58C9 /* CCGraphics.m in Sources */ = {isa = PBXBuildFile; fileRef = F76C3B841C6388BC00DC4301 /* CCGraphics.m */; };
 		F7ECBA6D1E239DCD003E6328 /* CCCreateCloud.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7ECBA6C1E239DCD003E6328 /* CCCreateCloud.swift */; };
 		F7EF0CAF1D9E95F400A9D15E /* CCSharedDBSession.m in Sources */ = {isa = PBXBuildFile; fileRef = F7EF0CAD1D9E95F400A9D15E /* CCSharedDBSession.m */; };
 		F7F06E8D1DBFACC600099AE9 /* NSBundle+CTAssetsPickerController.m in Sources */ = {isa = PBXBuildFile; fileRef = F7F06E2E1DBFACC600099AE9 /* NSBundle+CTAssetsPickerController.m */; };
@@ -1010,7 +1018,6 @@
 		F721372F1BAFF0920012B613 /* CCTemplates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTemplates.h; sourceTree = "<group>"; };
 		F72137301BAFF0920012B613 /* CCTemplates.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCTemplates.m; sourceTree = "<group>"; };
 		F7229B491DF71BB300E8C4E7 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = SOURCE_ROOT; };
-		F7274FEC1E6EB6F400C241B6 /* Constant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = "<group>"; };
 		F7296A601C8880C9001A7809 /* CCCellShareExt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCCellShareExt.h; sourceTree = "<group>"; };
 		F7296A611C8880C9001A7809 /* CCCellShareExt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCCellShareExt.m; sourceTree = "<group>"; };
 		F7296A621C8880C9001A7809 /* CCCellShareExt.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CCCellShareExt.xib; sourceTree = "<group>"; };
@@ -1085,6 +1092,20 @@
 		F744BE921BEBB2EE004FFF66 /* CCIntro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCIntro.h; sourceTree = "<group>"; };
 		F744BE931BEBB2EE004FFF66 /* CCIntro.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCIntro.m; sourceTree = "<group>"; };
 		F744BE961BEBB31E004FFF66 /* ImagesIntro.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = ImagesIntro.xcassets; sourceTree = "<group>"; };
+		F74639DA1EB35BC700862322 /* fi-FI */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fi-FI"; path = "fi-FI.lproj/CTAssetsPicker.strings"; sourceTree = "<group>"; };
+		F74639DB1EB35BC700862322 /* fi-FI */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fi-FI"; path = "fi-FI.lproj/SwiftWebVC.strings"; sourceTree = "<group>"; };
+		F74639DC1EB35BC800862322 /* fi-FI */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fi-FI"; path = "fi-FI.lproj/BKPasscodeView.strings"; sourceTree = "<group>"; };
+		F74639DD1EB35BC800862322 /* fi-FI */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fi-FI"; path = "fi-FI.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		F74639DE1EB35BC800862322 /* fi-FI */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fi-FI"; path = "fi-FI.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
+		F74639DF1EB35BC800862322 /* fi-FI */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fi-FI"; path = "fi-FI.lproj/Intro.strings"; sourceTree = "<group>"; };
+		F74639E01EB35BC800862322 /* fi-FI */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fi-FI"; path = "fi-FI.lproj/Error.strings"; sourceTree = "<group>"; };
+		F74639E11EB35C1300862322 /* is */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = is; path = is.lproj/CTAssetsPicker.strings; sourceTree = "<group>"; };
+		F74639E21EB35C1300862322 /* is */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = is; path = is.lproj/SwiftWebVC.strings; sourceTree = "<group>"; };
+		F74639E31EB35C1300862322 /* is */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = is; path = is.lproj/BKPasscodeView.strings; sourceTree = "<group>"; };
+		F74639E41EB35C1300862322 /* is */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = is; path = is.lproj/Localizable.strings; sourceTree = "<group>"; };
+		F74639E51EB35C1300862322 /* is */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = is; path = is.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		F74639E61EB35C1300862322 /* is */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = is; path = is.lproj/Intro.strings; sourceTree = "<group>"; };
+		F74639E71EB35C1300862322 /* is */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = is; path = is.lproj/Error.strings; sourceTree = "<group>"; };
 		F74D3DBD1BAC1941000BAE4B /* OCNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCNetworking.h; sourceTree = "<group>"; };
 		F74D3DBE1BAC1941000BAE4B /* OCNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCNetworking.m; sourceTree = "<group>"; };
 		F75037431DBFA91A008FB480 /* ALView+PureLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ALView+PureLayout.h"; sourceTree = "<group>"; };
@@ -1431,6 +1452,12 @@
 		F769D3971E9E1506006DBBB4 /* CCLocalStorageCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLocalStorageCell.h; sourceTree = "<group>"; };
 		F769D3981E9E1506006DBBB4 /* CCLocalStorageCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCLocalStorageCell.m; sourceTree = "<group>"; };
 		F769D3991E9E1506006DBBB4 /* CCLocalStorageCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CCLocalStorageCell.xib; sourceTree = "<group>"; };
+		F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCBrand.swift; sourceTree = "<group>"; };
+		F76B3CDC1EAE4D9100921AC9 /* cryptocloud 8.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "cryptocloud 8.xcdatamodel"; sourceTree = "<group>"; };
+		F76B3CDD1EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "TableCapabilities+CoreDataClass.h"; sourceTree = "<group>"; };
+		F76B3CDE1EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "TableCapabilities+CoreDataClass.m"; sourceTree = "<group>"; };
+		F76B3CDF1EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "TableCapabilities+CoreDataProperties.h"; sourceTree = "<group>"; };
+		F76B3CE01EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "TableCapabilities+CoreDataProperties.m"; sourceTree = "<group>"; };
 		F76C3B831C6388BC00DC4301 /* CCGraphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGraphics.h; sourceTree = "<group>"; };
 		F76C3B841C6388BC00DC4301 /* CCGraphics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCGraphics.m; sourceTree = "<group>"; };
 		F76C3B871C638A4C00DC4301 /* CCError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCError.h; sourceTree = "<group>"; };
@@ -1476,6 +1503,8 @@
 		F7A3218B1E9E42B30069AD1B /* CCMenuAccount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCMenuAccount.m; sourceTree = "<group>"; };
 		F7A321AB1E9E6AD50069AD1B /* CCAdvanced.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAdvanced.h; sourceTree = "<group>"; };
 		F7A321AC1E9E6AD50069AD1B /* CCAdvanced.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCAdvanced.m; sourceTree = "<group>"; };
+		F7A377141EB2364A002856D3 /* Crashlytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Crashlytics.framework; sourceTree = "<group>"; };
+		F7A377151EB2364A002856D3 /* Fabric.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Fabric.framework; sourceTree = "<group>"; };
 		F7A54C341C6267B500E2C8BF /* CCExifGeo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCExifGeo.h; sourceTree = "<group>"; };
 		F7A54C351C6267B500E2C8BF /* CCExifGeo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCExifGeo.m; sourceTree = "<group>"; };
 		F7A582D61A24DAB500E903D7 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = AppDelegate.m; sourceTree = "<group>"; };
@@ -1512,8 +1541,7 @@
 		F7C0F46E1C8880540059EC54 /* ShareViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ShareViewController.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
 		F7C0F46F1C8880540059EC54 /* ShareViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ShareViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
 		F7C1CDCE1E6DFAD1005D92BE /* CCStandardImages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCStandardImages.h; sourceTree = "<group>"; };
-		F7C1CDDA1E6DFC6F005D92BE /* CCNextcloudConstant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNextcloudConstant.h; sourceTree = "<group>"; };
-		F7C1CDDB1E6DFC6F005D92BE /* CCNextcloudImages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNextcloudImages.h; sourceTree = "<group>"; };
+		F7C1CDDA1E6DFC6F005D92BE /* NCBrandConstant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NCBrandConstant.h; sourceTree = "<group>"; };
 		F7C1D8BB1D47781C00B89DEA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/BKPasscodeView.strings; sourceTree = "<group>"; };
 		F7C1D8BC1D47781C00B89DEA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; };
 		F7C1D8BD1D47781C00B89DEA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
@@ -1735,10 +1763,12 @@
 				F714526D1DC1523B0006A5D4 /* libMagicalRecord.a in Frameworks */,
 				F75EDFAC1E8C106900E6F369 /* FirebaseAnalytics.framework in Frameworks */,
 				F75EDFAE1E8C106900E6F369 /* FirebaseInstanceID.framework in Frameworks */,
+				F7A377161EB2364A002856D3 /* Crashlytics.framework in Frameworks */,
 				F75EDFB11E8C106900E6F369 /* Protobuf.framework in Frameworks */,
 				F7FC7D561DC1F93800BB2C6A /* libz.tbd in Frameworks */,
 				F75EDFAD1E8C106900E6F369 /* FirebaseCore.framework in Frameworks */,
 				F75EDFAF1E8C106900E6F369 /* FirebaseMessaging.framework in Frameworks */,
+				F7A3771A1EB2364A002856D3 /* Fabric.framework in Frameworks */,
 				F7BB14961D5B62C000ECEE68 /* libcrypto.a in Frameworks */,
 				F7BB14971D5B62C000ECEE68 /* libssl.a in Frameworks */,
 				F75EDFB01E8C106900E6F369 /* GoogleToolboxForMac.framework in Frameworks */,
@@ -2864,6 +2894,10 @@
 		F77F86401B4ABF6D009F0A10 /* Table */ = {
 			isa = PBXGroup;
 			children = (
+				F76B3CDD1EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.h */,
+				F76B3CDE1EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.m */,
+				F76B3CDF1EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.h */,
+				F76B3CE01EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.m */,
 				F73C414C1E82E51F000137C0 /* TableExternalSites+CoreDataClass.h */,
 				F73C414D1E82E51F000137C0 /* TableExternalSites+CoreDataClass.m */,
 				F73C414E1E82E51F000137C0 /* TableExternalSites+CoreDataProperties.h */,
@@ -2963,6 +2997,16 @@
 			path = MenuAccount;
 			sourceTree = "<group>";
 		};
+		F7A377131EB2364A002856D3 /* Fabric */ = {
+			isa = PBXGroup;
+			children = (
+				F7A377141EB2364A002856D3 /* Crashlytics.framework */,
+				F7A377151EB2364A002856D3 /* Fabric.framework */,
+			);
+			name = Fabric;
+			path = "Libraries external/Fabric";
+			sourceTree = SOURCE_ROOT;
+		};
 		F7ACE4281BAC0268006C0017 /* Settings */ = {
 			isa = PBXGroup;
 			children = (
@@ -3093,9 +3137,8 @@
 			isa = PBXGroup;
 			children = (
 				F7C742D31E7BD36600D9C973 /* Supporting Files */,
-				F7274FEC1E6EB6F400C241B6 /* Constant.swift */,
-				F7C1CDDA1E6DFC6F005D92BE /* CCNextcloudConstant.h */,
-				F7C1CDDB1E6DFC6F005D92BE /* CCNextcloudImages.h */,
+				F7C1CDDA1E6DFC6F005D92BE /* NCBrandConstant.h */,
+				F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */,
 			);
 			path = Brand;
 			sourceTree = "<group>";
@@ -3331,6 +3374,7 @@
 				F71E67F61DC1F76F003BA52B /* ownCloud iOS library.xcodeproj */,
 				F70F02A81C889183008DAB36 /* Libraries external */,
 				F75EDFA41E8C106900E6F369 /* Analytics */,
+				F7A377131EB2364A002856D3 /* Fabric */,
 				F7A582D71A24DAB500E903D7 /* AppDelegate.h */,
 				F7A582D61A24DAB500E903D7 /* AppDelegate.m */,
 				F7C8C1901B482CEA0048180E /* CCGlobal.h */,
@@ -3508,6 +3552,7 @@
 				F77B0EE91D118A16002130FE /* Resources */,
 				F77B0F981D118A16002130FE /* Embed App Extensions */,
 				F73B02C01DC0F1C900EC2C33 /* ShellScript */,
+				F7A377371EB24469002856D3 /* ShellScript */,
 			);
 			buildRules = (
 			);
@@ -3600,6 +3645,8 @@
 				el,
 				pl,
 				"nb-NO",
+				"fi-FI",
+				is,
 			);
 			mainGroup = F7F67B9F1A24D27800EE80DA;
 			productRefGroup = F7F67B9F1A24D27800EE80DA;
@@ -3721,7 +3768,6 @@
 				F7FC88FB1E141A34006D0506 /* BKPasscodeView.strings in Resources */,
 				F7FC88FC1E141A39006D0506 /* Localizable.strings in Resources */,
 				F7D2677C1E157053005ACB7E /* Images.xcassets in Resources */,
-				F743444B1E126B69001CC831 /* CCMove.storyboard in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -3917,6 +3963,19 @@
 			shellPath = /bin/sh;
 			shellScript = "#!/bin/bash\n# buildNumber=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"$INFOPLIST_FILE\")\n# buildNumber=$(echo $buildNumber | sed 's/0*//')\n# buildNumber=$(($buildNumber + 1))\n# buildNumber=$(printf \"%04d\" $buildNumber)\n# /usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"$INFOPLIST_FILE\"";
 		};
+		F7A377371EB24469002856D3 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "\"${PROJECT_DIR}/Libraries external/Fabric/Fabric.framework/run\" 52fe877f4a4ff58868da789df0b0eb915fd94ae1 3d6e5abfdc40776a4a8468ddf5910958596ccbccc341e19f7aaf0fbeb4ff6cf5\n";
+		};
 /* End PBXShellScriptBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */
@@ -3931,13 +3990,13 @@
 				F71459BA1D12E3B700CAFEEC /* NSString+TruncateToWidth.m in Sources */,
 				F708CF9B1E56E8CC00271D8B /* TableAccount+CoreDataProperties.m in Sources */,
 				F71459BB1D12E3B700CAFEEC /* NYXProgressiveImageView.m in Sources */,
-				F7274FEE1E6EB6F400C241B6 /* Constant.swift in Sources */,
 				F708CF981E56E8CC00271D8B /* TableAccount+CoreDataClass.m in Sources */,
 				F71459BC1D12E3B700CAFEEC /* Reachability.m in Sources */,
 				F73C41511E82E51F000137C0 /* TableExternalSites+CoreDataClass.m in Sources */,
 				F71459BD1D12E3B700CAFEEC /* UIImage+animatedGIF.m in Sources */,
 				F708CF6E1E56E8CC00271D8B /* TableMetadata+CoreDataClass.m in Sources */,
 				F71459BE1D12E3B700CAFEEC /* UIImage+Reflection.m in Sources */,
+				F76B3CE61EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.m in Sources */,
 				F73CC06D1E813DFF006E3047 /* BKPasscodeField.m in Sources */,
 				F71459BF1D12E3B700CAFEEC /* RNEncryptor.m in Sources */,
 				F708CF891E56E8CC00271D8B /* TableShare+CoreDataProperties.m in Sources */,
@@ -3951,6 +4010,7 @@
 				F7FB5F201E66F0A400389481 /* TableActivity+CoreDataClass.m in Sources */,
 				F71459C61D12E3B700CAFEEC /* CCMetadata.m in Sources */,
 				F708CF771E56E8CC00271D8B /* TableLocalFile+CoreDataProperties.m in Sources */,
+				F76B3CE21EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.m in Sources */,
 				F71459C91D12E3B700CAFEEC /* OCNetworking.m in Sources */,
 				F71459CC1D12E3B700CAFEEC /* RNCryptorEngine.m in Sources */,
 				F71459CD1D12E3B700CAFEEC /* AFViewShaker.m in Sources */,
@@ -3992,6 +4052,7 @@
 				F7145A041D12E3B700CAFEEC /* CCloadItemData.swift in Sources */,
 				F708CF951E56E8CC00271D8B /* TableAutomaticUpload+CoreDataProperties.m in Sources */,
 				F73CC07F1E813DFF006E3047 /* BKTouchIDSwitchView.m in Sources */,
+				F76B3CCF1EAE01BD00921AC9 /* NCBrand.swift in Sources */,
 				F73CC0761E813DFF006E3047 /* BKPasscodeViewController.m in Sources */,
 				F7145A081D12E3B700CAFEEC /* PPCollectionViewCell.m in Sources */,
 				F7145A0D1D12E3B700CAFEEC /* NSData+Base64.m in Sources */,
@@ -4010,8 +4071,8 @@
 				F708CF931E56E8CC00271D8B /* TableAutomaticUpload+CoreDataClass.m in Sources */,
 				F74344801E127ED3001CC831 /* NSString+Base64.m in Sources */,
 				F708CF871E56E8CC00271D8B /* TableShare+CoreDataClass.m in Sources */,
-				F743447A1E127EA6001CC831 /* CCGraphics.m in Sources */,
 				F708CF9C1E56E8CC00271D8B /* TableAccount+CoreDataProperties.m in Sources */,
+				F76B3CE71EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.m in Sources */,
 				F708CF811E56E8CC00271D8B /* TableDirectory+CoreDataClass.m in Sources */,
 				F708CF901E56E8CC00271D8B /* TableCertificates+CoreDataProperties.m in Sources */,
 				F743448C1E128010001CC831 /* CCCrypto.m in Sources */,
@@ -4022,13 +4083,13 @@
 				F708CF841E56E8CC00271D8B /* TableDirectory+CoreDataProperties.m in Sources */,
 				F74344821E127F68001CC831 /* MBProgressHUD.m in Sources */,
 				F708CF7B1E56E8CC00271D8B /* TableGPS+CoreDataClass.m in Sources */,
-				F743444A1E126B4D001CC831 /* CCMove.m in Sources */,
 				F743448B1E12800D001CC831 /* CCCertificate.m in Sources */,
 				F743447D1E127ECB001CC831 /* AESCrypt.m in Sources */,
 				F743447E1E127ECE001CC831 /* NSData+Base64.m in Sources */,
 				F74344671E127E38001CC831 /* CCMetadata.m in Sources */,
 				F73CC0741E813DFF006E3047 /* BKPasscodeLockScreenManager.m in Sources */,
 				F74344781E127E9E001CC831 /* CCExifGeo.m in Sources */,
+				F7E718B01EB0FBE700FA58C9 /* CCGraphics.m in Sources */,
 				F74344171E1264EE001CC831 /* DocumentPickerViewController.swift in Sources */,
 				F74344811E127F49001CC831 /* AFViewShaker.m in Sources */,
 				F74344791E127EA1001CC831 /* CCError.m in Sources */,
@@ -4046,7 +4107,6 @@
 				F74344881E127F9C001CC831 /* UIImage+animatedGIF.m in Sources */,
 				F708CF7E1E56E8CC00271D8B /* TableGPS+CoreDataProperties.m in Sources */,
 				F73CC0771E813DFF006E3047 /* BKPasscodeViewController.m in Sources */,
-				F7274FEF1E6EB6F400C241B6 /* Constant.swift in Sources */,
 				F743448A1E127FF2001CC831 /* CCHud.m in Sources */,
 				F74344861E127F89001CC831 /* RNEncryptor.m in Sources */,
 				F73C41521E82E51F000137C0 /* TableExternalSites+CoreDataClass.m in Sources */,
@@ -4058,6 +4118,8 @@
 				F74344631E127D79001CC831 /* CCBKPasscode.m in Sources */,
 				F708CF8A1E56E8CC00271D8B /* TableShare+CoreDataProperties.m in Sources */,
 				F74344661E127E35001CC831 /* CCCoreData.m in Sources */,
+				F76B3CD01EAE01BD00921AC9 /* NCBrand.swift in Sources */,
+				F76B3CE31EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.m in Sources */,
 				F73CC0801E813DFF006E3047 /* BKTouchIDSwitchView.m in Sources */,
 				F743447C1E127EB2001CC831 /* NSString+TruncateToWidth.m in Sources */,
 				F708CF751E56E8CC00271D8B /* TableLocalFile+CoreDataClass.m in Sources */,
@@ -4073,7 +4135,9 @@
 			buildActionMask = 2147483647;
 			files = (
 				F74344251E1264EE001CC831 /* FileProvider.swift in Sources */,
-				F7274FF01E6EB6F400C241B6 /* Constant.swift in Sources */,
+				F76B3CE41EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.m in Sources */,
+				F76B3CE81EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.m in Sources */,
+				F76B3CD11EAE01BD00921AC9 /* NCBrand.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -4143,7 +4207,6 @@
 				F77B0E161D118A16002130FE /* AFViewShaker.m in Sources */,
 				F762CB021EACB66200B38484 /* XLFormSliderCell.m in Sources */,
 				F77B0E1B1D118A16002130FE /* CCGraphics.m in Sources */,
-				F7274FED1E6EB6F400C241B6 /* Constant.swift in Sources */,
 				F7659A6E1DC0B760004860C4 /* PSTGridLayoutRow.m in Sources */,
 				F769D39B1E9E1506006DBBB4 /* CCLocalStorageCell.m in Sources */,
 				F762CB701EACB7D400B38484 /* ReaderThumbCache.m in Sources */,
@@ -4186,6 +4249,7 @@
 				F77B0E391D118A16002130FE /* CCContoCorrente.m in Sources */,
 				F77B0E3A1D118A16002130FE /* RNCryptorEngine.m in Sources */,
 				F77B0E3C1D118A16002130FE /* CCCartaIdentita.m in Sources */,
+				F76B3CE51EAE4E5100921AC9 /* TableCapabilities+CoreDataProperties.m in Sources */,
 				F762CB761EACB7D400B38484 /* ReaderThumbView.m in Sources */,
 				F7659A6C1DC0B760004860C4 /* PSTGridLayoutItem.m in Sources */,
 				F762CAFF1EACB66200B38484 /* XLFormPickerCell.m in Sources */,
@@ -4251,8 +4315,10 @@
 				F7659A2E1DC0B72F004860C4 /* EARestrictedScrollView.m in Sources */,
 				F77B0E741D118A16002130FE /* CCBancomat.m in Sources */,
 				F77B0E7B1D118A16002130FE /* CCPassaporto.m in Sources */,
+				F76B3CCE1EAE01BD00921AC9 /* NCBrand.swift in Sources */,
 				F7B1FBC91E72E3D1001781FE /* SwiftWebVCActivityChrome.swift in Sources */,
 				F7F06EA51DBFACC600099AE9 /* CTAssetItemViewController.m in Sources */,
+				F76B3CE11EAE4E5100921AC9 /* TableCapabilities+CoreDataClass.m in Sources */,
 				F762CB8A1EACB81000B38484 /* REMenuItemView.m in Sources */,
 				F7659A5A1DC0B760004860C4 /* PSTCollectionView.m in Sources */,
 				F7BF1B431D51E893000854F6 /* CCLogin.m in Sources */,
@@ -4406,6 +4472,8 @@
 				F762CBD11EACC66600B38484 /* el */,
 				F762CBD81EACC6A500B38484 /* pl */,
 				F762CBDF1EACC70500B38484 /* nb-NO */,
+				F74639DC1EB35BC800862322 /* fi-FI */,
+				F74639E31EB35C1300862322 /* is */,
 			);
 			name = BKPasscodeView.strings;
 			path = "Supporting Files";
@@ -4427,6 +4495,8 @@
 				F762CBD01EACC66600B38484 /* el */,
 				F762CBD71EACC6A500B38484 /* pl */,
 				F762CBDE1EACC70400B38484 /* nb-NO */,
+				F74639DB1EB35BC700862322 /* fi-FI */,
+				F74639E21EB35C1300862322 /* is */,
 			);
 			name = SwiftWebVC.strings;
 			path = "Supporting Files";
@@ -4448,6 +4518,8 @@
 				F762CBD41EACC66600B38484 /* el */,
 				F762CBDB1EACC6A500B38484 /* pl */,
 				F762CBE21EACC70500B38484 /* nb-NO */,
+				F74639DF1EB35BC800862322 /* fi-FI */,
+				F74639E61EB35C1300862322 /* is */,
 			);
 			name = Intro.strings;
 			path = "Supporting Files";
@@ -4469,6 +4541,8 @@
 				F762CBCF1EACC66600B38484 /* el */,
 				F762CBD61EACC6A500B38484 /* pl */,
 				F762CBDD1EACC70400B38484 /* nb-NO */,
+				F74639DA1EB35BC700862322 /* fi-FI */,
+				F74639E11EB35C1300862322 /* is */,
 			);
 			name = CTAssetsPicker.strings;
 			path = "Supporting Files";
@@ -4490,6 +4564,8 @@
 				F762CBD51EACC66600B38484 /* el */,
 				F762CBDC1EACC6A500B38484 /* pl */,
 				F762CBE31EACC70500B38484 /* nb-NO */,
+				F74639E01EB35BC800862322 /* fi-FI */,
+				F74639E71EB35C1300862322 /* is */,
 			);
 			name = Error.strings;
 			path = "Supporting Files";
@@ -4511,6 +4587,8 @@
 				F762CBD31EACC66600B38484 /* el */,
 				F762CBDA1EACC6A500B38484 /* pl */,
 				F762CBE11EACC70500B38484 /* nb-NO */,
+				F74639DE1EB35BC800862322 /* fi-FI */,
+				F74639E51EB35C1300862322 /* is */,
 			);
 			name = InfoPlist.strings;
 			path = "Supporting Files";
@@ -4532,6 +4610,8 @@
 				F762CBD21EACC66600B38484 /* el */,
 				F762CBD91EACC6A500B38484 /* pl */,
 				F762CBE01EACC70500B38484 /* nb-NO */,
+				F74639DD1EB35BC800862322 /* fi-FI */,
+				F74639E41EB35C1300862322 /* is */,
 			);
 			name = Localizable.strings;
 			path = "Supporting Files";
@@ -4557,8 +4637,9 @@
 				GCC_PREFIX_HEADER = iOSClient/CryptoCloud.pch;
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"$(inherited)",
-					"EXTENSION=1",
-					"NC=1",
+					EXTENSION,
+					EXTENSION_SHARE,
+					NC,
 				);
 				HEADER_SEARCH_PATHS = "\"Libraries external\"/**";
 				INFOPLIST_FILE = "$(SRCROOT)/iOSClient/Brand/Share.plist";
@@ -4597,8 +4678,9 @@
 				GCC_PREFIX_HEADER = iOSClient/CryptoCloud.pch;
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"$(inherited)",
-					"EXTENSION=1",
-					"NC=1",
+					EXTENSION,
+					EXTENSION_SHARE,
+					NC,
 				);
 				HEADER_SEARCH_PATHS = "\"Libraries external\"/**";
 				INFOPLIST_FILE = "$(SRCROOT)/iOSClient/Brand/Share.plist";
@@ -4630,11 +4712,13 @@
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				DEBUG_INFORMATION_FORMAT = dwarf;
 				DEVELOPMENT_TEAM = 6JLRKY9ZV7;
+				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
 				GCC_PREFIX_HEADER = iOSClient/CryptoCloud.pch;
 				GCC_PREPROCESSOR_DEFINITIONS = (
-					"EXTENSION=1",
-					"DEBUG=1",
-					"NC=1",
+					DEBUG,
+					EXTENSION,
+					EXTENSION_PICKER,
+					NC,
 				);
 				HEADER_SEARCH_PATHS = "\"Libraries external\"/**";
 				INFOPLIST_FILE = "$(SRCROOT)/iOSClient/Brand/Picker.plist";
@@ -4663,10 +4747,12 @@
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DEVELOPMENT_TEAM = 6JLRKY9ZV7;
+				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
 				GCC_PREFIX_HEADER = iOSClient/CryptoCloud.pch;
 				GCC_PREPROCESSOR_DEFINITIONS = (
-					"EXTENSION=1",
-					"NC=1",
+					EXTENSION,
+					EXTENSION_PICKER,
+					NC,
 				);
 				HEADER_SEARCH_PATHS = "\"Libraries external\"/**";
 				INFOPLIST_FILE = "$(SRCROOT)/iOSClient/Brand/Picker.plist";
@@ -4695,10 +4781,11 @@
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				DEBUG_INFORMATION_FORMAT = dwarf;
 				DEVELOPMENT_TEAM = 6JLRKY9ZV7;
+				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
 				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"EXTENSION=1",
-					"NC=1",
+					DEBUG,
+					EXTENSION,
+					NC,
 				);
 				INFOPLIST_FILE = "$(SRCROOT)/iOSClient/Brand/PickerFileProvider.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
@@ -4727,9 +4814,10 @@
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DEVELOPMENT_TEAM = 6JLRKY9ZV7;
+				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
 				GCC_PREPROCESSOR_DEFINITIONS = (
-					"NC=1",
-					"EXTENSION=1",
+					EXTENSION,
+					NC,
 				);
 				INFOPLIST_FILE = "$(SRCROOT)/iOSClient/Brand/PickerFileProvider.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
@@ -4761,6 +4849,7 @@
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)\"/Libraries external/Analytics\"",
+					"$(PROJECT_DIR)\"/Libraries external/Fabric\"",
 				);
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = iOSClient/CryptoCloud.pch;
@@ -4807,6 +4896,7 @@
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)\"/Libraries external/Analytics\"",
+					"$(PROJECT_DIR)\"/Libraries external/Fabric\"",
 				);
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = iOSClient/CryptoCloud.pch;
@@ -4987,6 +5077,7 @@
 		F78088E51DD3A1DB005C5A7C /* cryptocloud.xcdatamodeld */ = {
 			isa = XCVersionGroup;
 			children = (
+				F76B3CDC1EAE4D9100921AC9 /* cryptocloud 8.xcdatamodel */,
 				F7C00D4A1E2D10BB0032160B /* cryptocloud 7.xcdatamodel */,
 				F7BFA4541E0693EE0010E44C /* cryptocloud 5.xcdatamodel */,
 				F78088E61DD3A1DB005C5A7C /* cryptocloud 2.xcdatamodel */,
@@ -4994,7 +5085,7 @@
 				F78088E81DD3A1DB005C5A7C /* cryptocloud 4.xcdatamodel */,
 				F78088E91DD3A1DB005C5A7C /* cryptocloud.xcdatamodel */,
 			);
-			currentVersion = F7C00D4A1E2D10BB0032160B /* cryptocloud 7.xcdatamodel */;
+			currentVersion = F76B3CDC1EAE4D9100921AC9 /* cryptocloud 8.xcdatamodel */;
 			path = cryptocloud.xcdatamodeld;
 			sourceTree = "<group>";
 			versionGroupType = wrapper.xcdatamodel;

BIN
Nextcloud.xcodeproj/project.xcworkspace/xcuserdata/marinofaggiana.xcuserdatad/UserInterfaceState.xcuserstate


+ 108 - 0
Nextcloud.xcodeproj/xcuserdata/marinofaggiana.xcuserdatad/xcschemes/Share.xcscheme

@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "0830"
+   wasCreatedForAppExtension = "YES"
+   version = "2.0">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "F71459B41D12E3B700CAFEEC"
+               BuildableName = "Share.appex"
+               BlueprintName = "Share"
+               ReferencedContainer = "container:Nextcloud.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "F77B0DEB1D118A16002130FE"
+               BuildableName = "Nextcloud.app"
+               BlueprintName = "Nextcloud"
+               ReferencedContainer = "container:Nextcloud.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "F71459B41D12E3B700CAFEEC"
+            BuildableName = "Share.appex"
+            BlueprintName = "Share"
+            ReferencedContainer = "container:Nextcloud.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = ""
+      selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES"
+      launchAutomaticallySubstyle = "2">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "F77B0DEB1D118A16002130FE"
+            BuildableName = "Nextcloud.app"
+            BlueprintName = "Nextcloud"
+            ReferencedContainer = "container:Nextcloud.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES"
+      launchAutomaticallySubstyle = "2">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "F77B0DEB1D118A16002130FE"
+            BuildableName = "Nextcloud.app"
+            BlueprintName = "Nextcloud"
+            ReferencedContainer = "container:Nextcloud.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 26 - 12
Picker/DocumentPickerViewController.swift

@@ -128,12 +128,20 @@ class DocumentPickerViewController: UIDocumentPickerExtensionViewController, CCN
         CCNetworking.shared().settingDelegate(self)
         hud = CCHud.init(view: self.navigationController?.view)
         
+        // Theming
+        let tableCapabilities = CCCoreData.getCapabilitesForAccount(activeAccount)
+        if (tableCapabilities != nil && CCGraphics.isOptionUseThemingColor() == true) {
+            if ((tableCapabilities?.themingColor?.characters.count)! > 0) {
+                NCBrandColor.sharedInstance.brand = CCGraphics.color(fromHexString: tableCapabilities?.themingColor)
+            }
+        }
+        
         // COLOR
-        self.navigationController?.navigationBar.barTintColor = Constant.GlobalConstants.k_Color_NavigationBar
-        self.navigationController?.navigationBar.tintColor = Constant.GlobalConstants.k_Color_NavigationBar_Text
-        self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: Constant.GlobalConstants.k_Color_NavigationBar_Text]
+        self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
+        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
+        self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: NCBrandColor.sharedInstance.navigationBarText]
         
-        self.tableView.separatorColor = Constant.GlobalConstants.k_Color_Seperator
+        self.tableView.separatorColor = NCBrandColor.sharedInstance.seperator
         self.tableView.tableFooterView = UIView()
         
         // Get Crypto Cloud Mode
@@ -156,7 +164,7 @@ class DocumentPickerViewController: UIDocumentPickerExtensionViewController, CCN
             
             // Color Button
             if parameterEncrypted == true {
-                encryptedButton.tintColor = Constant.GlobalConstants.k_Color_Cryptocloud
+                encryptedButton.tintColor = NCBrandColor.sharedInstance.cryptocloud
             } else {
                 encryptedButton.tintColor = self.view.tintColor
                 
@@ -494,7 +502,7 @@ extension DocumentPickerViewController {
         parameterEncrypted = !parameterEncrypted!
         
         if parameterEncrypted == true {
-            encryptedButton.tintColor = Constant.GlobalConstants.k_Color_Cryptocloud
+            encryptedButton.tintColor = NCBrandColor.sharedInstance.cryptocloud
         } else {
             encryptedButton.tintColor = self.view.tintColor
         }
@@ -621,7 +629,7 @@ extension DocumentPickerViewController {
         viewController.touchIDManager = touchIDManager
         viewController.title = title
         viewController.navigationItem.leftBarButtonItem = UIBarButtonItem.init(barButtonSystemItem: UIBarButtonSystemItem.cancel, target: self, action: #selector(passcodeViewCloseButtonPressed(sender:)))
-        viewController.navigationItem.leftBarButtonItem?.tintColor = Constant.GlobalConstants.k_Color_Cryptocloud
+        viewController.navigationItem.leftBarButtonItem?.tintColor = NCBrandColor.sharedInstance.cryptocloud
         
         let navController = UINavigationController.init(rootViewController: viewController)
         self.present(navController, animated: true, completion: nil)
@@ -728,12 +736,18 @@ extension DocumentPickerViewController: UITableViewDataSource {
             
         } else {
             
-            cell.fileImageView.image = UIImage(named: metadata.iconName!)
-            
-            if metadata.thumbnailExists && metadata.directory == false {
+            if metadata.directory {
+                
+                cell.fileImageView.image = CCGraphics.changeThemingColorImage(UIImage(named: metadata.iconName!), color: NCBrandColor.sharedInstance.brand)
                 
-                downloadThumbnail(metadata)
-                thumbnailInLoading[metadata.fileID] = indexPath
+            } else {
+                
+                cell.fileImageView.image = UIImage(named: metadata.iconName!)
+                if metadata.thumbnailExists {
+                    
+                    downloadThumbnail(metadata)
+                    thumbnailInLoading[metadata.fileID] = indexPath
+                }
             }
         }
         

+ 1 - 0
Share Ext/ShareViewController.h

@@ -38,6 +38,7 @@
 #import "CCHud.h"
 
 #import "TableAccount+CoreDataClass.h"
+#import "TableCapabilities+CoreDataClass.h"
 
 @interface ShareViewController : UIViewController <UITableViewDelegate, OCNetworkingDelegate, MBProgressHUDDelegate, BKPasscodeViewControllerDelegate, CCNetworkingDelegate, CCMoveDelegate>
 

+ 13 - 8
Share Ext/ShareViewController.m

@@ -171,18 +171,23 @@
 - (void)navigationBarToolBar
 {    
     UIBarButtonItem *rightButtonUpload, *rightButtonEncrypt, *leftButtonCancel;
+
+    // Theming
+    TableCapabilities *tableCapabilities = [CCCoreData getCapabilitesForAccount:self.activeAccount];
+    if (k_option_use_themingColor && tableCapabilities.themingColor.length > 0)
+        [NCBrandColor sharedInstance].brand = [CCGraphics colorFromHexString:tableCapabilities.themingColor];
+
+    self.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].brand;
+    self.navigationController.navigationBar.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     
-    self.navigationController.navigationBar.barTintColor = COLOR_NAVIGATIONBAR;
-    self.navigationController.navigationBar.tintColor = COLOR_NAVIGATIONBAR_TEXT;
-    
-    self.toolBar.barTintColor = COLOR_TABBAR;
-    self.toolBar.tintColor = COLOR_TABBAR_TEXT;
+    self.toolBar.barTintColor = [NCBrandColor sharedInstance].tabBar;
+    self.toolBar.tintColor = [NCBrandColor sharedInstance].brand;
     
     // Upload
     if (self.localCryptated && _isCryptoCloudMode) {
         
         rightButtonUpload = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"_save_encrypted_", nil) style:UIBarButtonItemStylePlain target:self action:@selector(selectPost)];
-        [rightButtonUpload setTintColor:COLOR_CRYPTOCLOUD];
+        [rightButtonUpload setTintColor:[NCBrandColor sharedInstance].cryptocloud];
         
     } else {
         
@@ -193,7 +198,7 @@
     if (_isCryptoCloudMode) {
         UIImage *icon = [[UIImage imageNamed:image_shareExtEncrypt] imageWithRenderingMode:UIImageRenderingModeAutomatic];
         rightButtonEncrypt = [[UIBarButtonItem alloc] initWithImage:icon style:UIBarButtonItemStylePlain target:self action:@selector(changeEncrypt)];
-        if (self.localCryptated) [rightButtonEncrypt setTintColor:COLOR_CRYPTOCLOUD];
+        if (self.localCryptated) [rightButtonEncrypt setTintColor:[NCBrandColor sharedInstance].cryptocloud];
     }
     
     // Cancel
@@ -383,7 +388,7 @@
     viewController.touchIDManager = touchIDManager;
     viewController.title = k_brand;
     viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(passcodeViewCloseButtonPressed:)];
-    viewController.navigationItem.leftBarButtonItem.tintColor = COLOR_CRYPTOCLOUD;
+    viewController.navigationItem.leftBarButtonItem.tintColor = [NCBrandColor sharedInstance].cryptocloud;
     
     UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
     [self presentViewController:navController animated:YES completion:nil];

+ 1 - 1
iOSClient/Actions/CCActions.swift

@@ -154,7 +154,7 @@ class CCActions: NSObject {
 
         let metadataNet: CCMetadataNet = CCMetadataNet.init(account: appDelegate.activeAccount)
         
-        let fileName = CCUtility.removeForbiddenCharacters(fileName, hasServerForbiddenCharactersSupport: appDelegate.hasServerForbiddenCharactersSupport)!
+        let fileName = CCUtility.removeForbiddenCharactersServer(fileName)!
         
         let serverUrl = CCCoreData.getServerUrl(fromDirectoryID: metadata.directoryID, activeAccount: appDelegate.activeAccount)!
         

+ 19 - 8
iOSClient/Activity/CCActivity.m

@@ -22,16 +22,19 @@
 //
 
 #import "CCActivity.h"
-
 #import "AppDelegate.h"
 #import "CCSection.h"
 
+#ifdef CUSTOM_BUILD
+#import "CustomSwift.h"
+#else
+#import "Nextcloud-Swift.h"
+#endif
+
 #define fontSizeData    [UIFont boldSystemFontOfSize:15]
 #define fontSizeAction  [UIFont systemFontOfSize:14]
 #define fontSizeNote    [UIFont systemFontOfSize:14]
 
-#define daysOfActivity  7
-
 @interface CCActivity ()
 {
     BOOL _verbose;
@@ -52,6 +55,8 @@
     if (self = [super initWithCoder:aDecoder])  {
         
         app.activeActivity = self;
+        
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
     }
     return self;
 }
@@ -81,8 +86,8 @@
     _verbose = [CCUtility getActivityVerboseHigh];
     
     // Color
-    [CCAspect aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
-    [CCAspect aspectTabBar:self.tabBarController.tabBar hidden:NO];
+    [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
     
     // Plus Button
     [app plusButtonVisibile:true];
@@ -96,6 +101,12 @@
     [self reloadDatasource];
 }
 
+- (void)changeTheming
+{
+    if (self.isViewLoaded && self.view.window)
+        [app changeTheming:self];
+}
+
 - (void)didReceiveMemoryWarning {
     
     [super didReceiveMemoryWarning];
@@ -144,7 +155,7 @@
     
     NSPredicate *predicate;
         
-    NSDate *sixDaysAgo = [[NSCalendar currentCalendar] dateByAddingUnit:NSCalendarUnitDay value:-daysOfActivity toDate:[NSDate date] options:0];
+    NSDate *sixDaysAgo = [[NSCalendar currentCalendar] dateByAddingUnit:NSCalendarUnitDay value:-k_daysOfActivity toDate:[NSDate date] options:0];
         
     if (_verbose)
         predicate = [NSPredicate predicateWithFormat:@"((account == %@) || (account == '')) AND (date > %@)", app.activeAccount, sixDaysAgo];
@@ -256,7 +267,7 @@
 
         if ([activity.type isEqualToString:k_activityTypeInfo]) {
         
-            actionLabel.textColor = COLOR_BRAND;
+            actionLabel.textColor = [NCBrandColor sharedInstance].brand;
         
             if (activity.idActivity == 0)
                 typeImage.image = [UIImage imageNamed:@"activityTypeInfo"];
@@ -278,7 +289,7 @@
     
         [noteLabel setFont:fontSizeNote];
         [noteLabel sizeToFit];
-        noteLabel.textColor = COLOR_TEXT_ANTHRACITE;
+        noteLabel.textColor = [UIColor blackColor];
         noteLabel.numberOfLines = 0;
         noteLabel.lineBreakMode = NSLineBreakByWordWrapping;
     

+ 10 - 9
iOSClient/AppDelegate.h

@@ -38,8 +38,8 @@
 #import "CCQuickActions.h"
 #import "CCMain.h"
 #import "CCPhotosCameraUpload.h"
-#import "CCSettings.h"
 #import "CCTransfers.h"
+#import "CCSettings.h"
 
 @interface AppDelegate : UIResponder <UIApplicationDelegate, BKPasscodeLockScreenManagerDelegate, BKPasscodeViewControllerDelegate, LMMediaPlayerViewDelegate, TWMessageBarStyleSheet, CCNetworkingDelegate>
 
@@ -57,19 +57,14 @@
 @property (nonatomic, strong) NSString *activeUser;
 @property (nonatomic, strong) NSString *activePassword;
 @property (nonatomic, strong) NSString *directoryUser;
+@property (nonatomic, strong) NSString *activeEmail;
 
 // next version ... ? ...
 @property double currentLatitude;
 @property double currentLongitude;
 
-// Nextcloud
-@property BOOL hasServerForbiddenCharactersSupport;
-@property BOOL hasServerShareSupport;
-@property BOOL hasServerShareeSupport;
-@property BOOL hasServerCapabilitiesSupport;
-@property OCCapabilities *capabilities;
+// Notification
 @property (nonatomic, strong) NSMutableArray<OCCommunication *> *listOfNotifications;
-@property NSInteger serverVersion;
 
 // Network Operation
 @property (nonatomic, strong) NSOperationQueue *netQueue;
@@ -157,9 +152,13 @@
 - (void)messageNotification:(NSString *)title description:(NSString *)description visible:(BOOL)visible delay:(NSTimeInterval)delay type:(TWMessageBarMessageType)type;
 - (void)updateApplicationIconBadgeNumber;
 - (BOOL)handleShortCutItem:(UIApplicationShortcutItem *)shortcutItem;
-
+- (void)aspectNavigationControllerBar:(UINavigationBar *)nav encrypted:(BOOL)encrypted online:(BOOL)online hidden:(BOOL)hidden;
+- (void)aspectTabBar:(UITabBar *)tab hidden:(BOOL)hidden;
 - (void)plusButtonVisibile:(BOOL)visible;
 
+- (void)settingThemingColorBrand;
+- (void)changeTheming:(UIViewController *)vc;
+
 // Operation Networking
 - (void)cancelAllOperations;
 - (void)addNetworkingOperationQueue:(NSOperationQueue *)netQueue delegate:(id)delegate metadataNet:(CCMetadataNet *)metadataNet;
@@ -170,5 +169,7 @@
 
 - (BOOL)createFolderSubFolderAutomaticUploadFolderPhotos:(NSString *)folderPhotos useSubFolder:(BOOL)useSubFolder assets:(NSArray *)assets selector:(NSString *)selector;
 
+- (void)logUserCrashlytics;
+
 @end
 

+ 116 - 29
iOSClient/AppDelegate.m

@@ -35,6 +35,8 @@
 #import "CCMain.h"
 #import "CCDetail.h"
 #import "Firebase.h"
+#import <Fabric/Fabric.h>
+#import <Crashlytics/Crashlytics.h>
 
 #ifdef CUSTOM_BUILD
     #import "CustomSwift.h"
@@ -202,27 +204,10 @@
     // Player audio
     self.player = [LMMediaPlayerView sharedPlayerView];
     self.player.delegate = self;
-    
+        
     // ico Image Cache
     self.icoImagesCache = [[NSMutableDictionary alloc] init];
     
-    // Page Control
-    UIPageControl *pageControl = [UIPageControl appearance];
-    pageControl.pageIndicatorTintColor = [UIColor whiteColor];
-    pageControl.currentPageIndicatorTintColor = COLOR_PAGECONTROL_INDICATOR;
-    pageControl.backgroundColor = COLOR_BACKGROUND_PAGECONTROL;
-    
-    // remove tmp & cache
-    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-    
-        NSArray* tmpDirectory = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:NSTemporaryDirectory() error:NULL];
-        for (NSString *file in tmpDirectory) {
-            [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@%@", NSTemporaryDirectory(), file] error:NULL];
-        }
-        
-        [[NSURLCache sharedURLCache] removeAllCachedResponses];
-    });
-    
     // setting Reachable in back
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 
@@ -238,16 +223,13 @@
     //[[AVAudioSession sharedInstance] setActive:YES error:nil];
     [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
     
-    // Tint Color GLOBAL WINDOW
-    [self.window setTintColor:COLOR_WINDOW_TINTCOLOR];
-    
     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;
-    [CCAspect aspectNavigationControllerBar:navigationController.navigationBar encrypted:NO online:YES hidden:NO];
+    [app aspectNavigationControllerBar:navigationController.navigationBar encrypted:NO online:YES hidden:NO];
     
     // Settings TabBar
     [self createTabBarController];
@@ -280,6 +262,10 @@
     UIUserNotificationSettings *notificationSettings = [UIUserNotificationSettings settingsForTypes:types categories:nil];
     [application registerUserNotificationSettings:notificationSettings];
     
+    // Fabric
+    [Fabric with:@[[Crashlytics class]]];
+    [self logUserCrashlytics];
+    
     return YES;
 }
 
@@ -360,10 +346,10 @@
     
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
         
-        NSLog(@"[LOG] Request Server Information");
+        NSLog(@"[LOG] Request Server Capabilities");
     
         if (_activeMain)
-            [_activeMain requestServerInformation];
+            [_activeMain requestServerCapabilities];
     
         NSLog(@"[LOG] Initialize Camera Upload");
         [[NSNotificationCenter defaultCenter] postNotificationName:@"initStateCameraUpload" object:nil];
@@ -758,7 +744,7 @@
             backgroundColor = [UIColor colorWithRed:0.588 green:0.797 blue:0.000 alpha:0.90];
             break;
         case TWMessageBarMessageTypeInfo:
-            backgroundColor = COLOR_BACKGROUND_MESSAGE_INFO;
+            backgroundColor = [NCBrandColor sharedInstance].brand;
             break;
         default:
             break;
@@ -818,7 +804,7 @@
     UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
     UITabBarController *tabBarController = [splitViewController.viewControllers firstObject];
     
-    [CCAspect aspectTabBar:tabBarController.tabBar hidden:NO];
+    [app aspectTabBar:tabBarController.tabBar hidden:NO];
     
     // File
     item = [tabBarController.tabBar.items objectAtIndex: k_tabBarApplicationIndexFile];
@@ -851,7 +837,7 @@
     item.selectedImage = [UIImage imageNamed:image_tabBarMore];
     
     // Plus Button
-    UIImage *buttonImage = [UIImage imageNamed:image_tabBarPlus];    
+    UIImage *buttonImage = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"tabBarPlus"] color:[NCBrandColor sharedInstance].brand];
     UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
     button.tag = 99;
     button.frame = CGRectMake(0.0, 0.0, buttonImage.size.width, buttonImage.size.height);
@@ -871,12 +857,46 @@
     [tabBarController.view addConstraint:constraint];
 }
 
+- (void)aspectNavigationControllerBar:(UINavigationBar *)nav encrypted:(BOOL)encrypted online:(BOOL)online hidden:(BOOL)hidden
+{
+    nav.translucent = NO;
+    nav.barTintColor = [NCBrandColor sharedInstance].brand;
+    nav.tintColor = [NCBrandColor sharedInstance].navigationBarText;
+    [nav setTitleTextAttributes:@{NSForegroundColorAttributeName : [NCBrandColor sharedInstance].navigationBarText}];
+    
+    if (encrypted)
+        [nav setTitleTextAttributes:@{NSForegroundColorAttributeName : [NCBrandColor sharedInstance].cryptocloud}];
+    
+    if (!online)
+        [nav setTitleTextAttributes:@{NSForegroundColorAttributeName : [NCBrandColor sharedInstance].connectionNo}];
+    
+    nav.hidden = hidden;
+    
+    [nav setAlpha:1];
+}
+
+- (void)aspectTabBar:(UITabBar *)tab hidden:(BOOL)hidden
+{
+    tab.translucent = NO;
+    tab.barTintColor = [NCBrandColor sharedInstance].tabBar;
+    tab.tintColor = [NCBrandColor sharedInstance].brand;
+    
+    tab.hidden = hidden;
+    
+    [tab setAlpha:1];
+}
+
 - (void)plusButtonVisibile:(BOOL)visible
 {
     UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
     UITabBarController *tabBarController = [splitViewController.viewControllers firstObject];
     
     UIButton *buttonPlus = [tabBarController.view viewWithTag:99];
+    
+    UIImage *buttonImage = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"tabBarPlus"] color:[NCBrandColor sharedInstance].brand];
+    [buttonPlus setBackgroundImage:buttonImage forState:UIControlStateNormal];
+    [buttonPlus setBackgroundImage:buttonImage forState:UIControlStateHighlighted];
+    
     if (buttonPlus) {
 
         if (visible) {
@@ -892,7 +912,7 @@
 
 - (void)handleTouchTabbarCenter:(id)sender
 {
-    CreateMenuAdd *menuAdd = [[CreateMenuAdd alloc] init];
+    CreateMenuAdd *menuAdd = [[CreateMenuAdd alloc] initWithThemingColor:[NCBrandColor sharedInstance].brand];
     
     if ([CCUtility getCreateMenuEncrypted])
         [menuAdd createMenuEncryptedWithView:self.window.rootViewController.view];
@@ -945,6 +965,55 @@
     }
 }
 
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== Theming Color =====
+#pragma --------------------------------------------------------------------------------------------
+
+- (void)settingThemingColorBrand
+{
+    if (self.activeAccount.length > 0) {
+    
+        TableCapabilities *tableCapabilities = [CCCoreData getCapabilitesForAccount:self.activeAccount];
+    
+        if (k_option_use_themingColor && tableCapabilities.themingColor.length > 0) {
+        
+            [NCBrandColor sharedInstance].brand = [CCGraphics colorFromHexString:tableCapabilities.themingColor];
+            
+        } else {
+            
+            [NCBrandColor sharedInstance].brand = [NCBrandColor sharedInstance].customer;
+        }
+        
+    } else {
+        
+        [NCBrandColor sharedInstance].brand = [NCBrandColor sharedInstance].customer;
+    }
+    
+    [[NSNotificationCenter defaultCenter] postNotificationName:@"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;
+    
+    // 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];
+    
+    [button setBackgroundImage:buttonImage forState:UIControlStateNormal];
+    [button setBackgroundImage:buttonImage forState:UIControlStateHighlighted];
+    
+    // Tint Color GLOBAL WINDOW
+    [self.window setTintColor:[NCBrandColor sharedInstance].brand];
+}
+
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== Media Player Control =====
 #pragma --------------------------------------------------------------------------------------------
@@ -1081,7 +1150,7 @@
             [self messageNotification:@"_network_available_" description:nil visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeInfo];
             
             if (_activeMain)
-                [_activeMain performSelector:@selector(requestServerInformation) withObject:nil afterDelay:3];
+                [_activeMain performSelector:@selector(requestServerCapabilities) withObject:nil afterDelay:3];
         }
         
         NSLog(@"[LOG] Reachability Changed: Reachable");
@@ -1500,6 +1569,20 @@
     return YES;
 }
 
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== Crashlytics =====
+#pragma --------------------------------------------------------------------------------------------
+
+- (void)logUserCrashlytics
+{
+    TableAccount *tableAccount = [CCCoreData getActiveAccount];
+    
+    if (tableAccount) {
+        if (tableAccount.email && tableAccount.email.length > 0)
+            [CrashlyticsKit setUserEmail:tableAccount.email];
+    }
+}
+
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== UPGRADE =====
 #pragma --------------------------------------------------------------------------------------------
@@ -1537,6 +1620,10 @@
     if (([actualVersion compare:@"2.17.1" options:NSNumericSearch] == NSOrderedAscending)) {
         
     }
+    
+    if (([actualVersion compare:@"2.17.2" options:NSNumericSearch] == NSOrderedAscending)) {
+        
+    }
 }
 
 @end

+ 0 - 71
iOSClient/Brand/CCNextcloudConstant.h

@@ -1,71 +0,0 @@
-//
-//  CCConstant.h
-//  Nextcloud
-//
-//  Created by Marino Faggiana on 06/03/17.
-//  Copyright © 2017 TWS. All rights reserved.
-//
-//  Author Marino Faggiana <m.faggiana@twsweb.it>
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-
-// Brand
-#define k_brand                                 @"Nextcloud"
-#define k_mailMe                                @"ios@nextcloud.com"
-#define k_textCopyrightNextcloudiOS             @"Nextcloud for iOS %@ © 2017 T.W.S. Inc."
-#define k_textCopyrightNextcloudServer          @"Nextcloud Server %@"
-#define k_loginBaseUrl                          @"https://cloud.twsweb.it"
-#define k_pushNotificationServer                @"https://push-notifications.nextcloud.com"
-#define k_loginButtonLabelLink                  @"https://nextcloud.com/providers"
-#define k_webLoginAutenticationProtocol         @""
-
-// Capabilities Group
-#define k_capabilitiesGroups                    @"group.it.twsweb.Crypto-Cloud"
-
-// Define option Brand
-#define k_option_use_login_web                  NO
-#define k_option_use_firebase                   NO
-#define k_option_use_default_automatic_upload   NO
-
-#define k_option_disable_intro                  NO
-#define k_option_disable_request_login_url      NO
-#define k_option_disable_multiaccount           NO
-#define k_option_disable_cryptocloudsystem      NO
-
-//Color
-#define COLOR_BRAND                             [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]       // BLU NC : #0082c9
-#define COLOR_SELECT_BACKGROUND                 [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:0.1]       // BLU NC : #0082c9
-#define COLOR_TRANSFER_BACKGROUND               [UIColor colorWithRed:178.0/255.0 green:244.0/255.0 blue:258.0/255.0 alpha:0.1]
-#define COLOR_GROUPBY_BAR                       [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:0.2]       // BLU NC : #0082c9
-#define COLOR_GROUPBY_BAR_NO_BLUR               [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:0.3]       // BLU NC : #0082c9
-#define COLOR_NAVIGATIONBAR                     [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]       // BLU NC : #0082c9
-#define COLOR_NAVIGATIONBAR_SHARE               [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]
-#define COLOR_NAVIGATIONBAR_TEXT                [UIColor whiteColor]
-#define COLOR_NAVIGATIONBAR_PROGRESS            [UIColor whiteColor]
-#define COLOR_TABBAR                            [UIColor whiteColor]
-#define COLOR_TABBAR_TEXT                       [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]       // BLU NC : #0082c9
-#define COLOR_BACKGROUND_MENU                   [UIColor whiteColor]
-#define COLOR_BACKGROUND_PAGECONTROL            [UIColor colorWithRed:247.0/255.0 green:247.0/255.0 blue:247.0/255.0 alpha:1.0]
-#define COLOR_PAGECONTROL_INDICATOR             [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]       // BLU NC : #0082c9
-#define COLOR_CRYPTOCLOUD                       [UIColor colorWithRed:241.0/255.0 green:90.0/255.0 blue:34.0/255.0 alpha:1.0]
-#define COLOR_TEXT_ANTHRACITE                   [UIColor colorWithRed:65.0/255.0 green:64.0/255.0 blue:66.0/255.0 alpha:1.0]        // #414042
-#define COLOR_TEXT_NO_CONNECTION                [UIColor colorWithRed:204.0/255.0 green:204.0/255.0 blue:204.0/255.0 alpha:1.0]
-#define COLOR_SEPARATOR_TABLE                   [UIColor colorWithRed:235.0/255.0 green:235.0/255.0 blue:235.0/255.0 alpha:1.0]     // iOS 7
-#define COLOR_BACKGROUND_MESSAGE_INFO           [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]       // BLU NC : #0082c9
-#define COLOR_CONTROL_CENTER                    [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]       // BLU NC : #0082c9
-#define COLOR_REFRESH_CONTROL                   [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]       // BLU NC : #0082c9
-#define COLOR_WINDOW_TINTCOLOR                  [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]       // BLU NC : #0082c9
-#define COLOR_TABLE_BACKGROUND                  [UIColor whiteColor]
-

+ 0 - 30
iOSClient/Brand/CCNextcloudImages.h

@@ -1,30 +0,0 @@
-//
-//  CCImages.h
-//  Crypto Cloud Technology Nextcloud
-//
-//  Created by Marino Faggiana on 15/06/16.
-//  Copyright (c) 2014 TWS. All rights reserved.
-//
-//  Author Marino Faggiana <m.faggiana@twsweb.it>
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-
-#define image_tabBarPlus                        @"tabBarPlusNextcloud"
-
-#define image_brandLogin                        @"nextcloudLogin"
-#define image_brandNavigationController         @"nextcloud_navigationcontroller"
-#define image_brandNavigationControllerOffline  @"nextcloud_navigationcontroller_offline"
-#define image_brandBackgroundLite               @"nextcloud_lite"
-#define image_brandMenuMoreBackground           @"MoreBackground"

+ 0 - 56
iOSClient/Brand/Constant.swift

@@ -1,56 +0,0 @@
-//
-//  CCConstant.h
-//  Crypto Cloud Technology Nextcloud
-//
-//  Created by Marino Faggiana on 26/01/17.
-//  Copyright (c) 2017 TWS. All rights reserved.
-//
-//  Author Marino Faggiana <m.faggiana@twsweb.it>
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-
-import UIKit
-
-class Constant: NSObject {
-    
-    struct GlobalConstants {
-        
-        // GLOBLE COLOR DEFINE
-        
-        static let k_Color_Brand: UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)              // BLU NC : #0082c9
-
-        static let k_Color_Nextcloud: UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)          // BLU NC : #0082c9
-
-        static let k_Color_Seperator: UIColor = UIColor(red: 235.0/255.0, green: 235.0/255.0, blue: 235.0/255.0, alpha: 1.0)
-        
-        static let k_Color_Cryptocloud: UIColor = UIColor(red: 241.0/255.0, green: 90.0/255.0, blue: 34.0/255.0, alpha: 1.0)
-        
-        static let k_Color_SelectBackgrond: UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 0.1)    // BLU NC : #0082c9
-        
-        static let k_Color_NavigationBar: UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)      // BLU NC : #0082c9
-        
-        static let k_Color_NavigationBar_Text: UIColor = UIColor.white
-        
-        static let k_Color_MoreNormal: UIColor = .black
-        
-        static let k_Color_MoreSettings: UIColor = .black
-        
-        static let k_Color_Table_Background: UIColor = UIColor.white
-        
-        // Response searchList
-        
-        static let kOrganizationFullName    = "FullName"
-    }
-}

+ 68 - 0
iOSClient/Brand/NCBrand.swift

@@ -0,0 +1,68 @@
+//
+//  NCBrandColor.swift
+//  Crypto Cloud Technology Nextcloud
+//
+//  Created by Marino Faggiana on 24/04/17.
+//  Copyright (c) 2017 TWS. All rights reserved.
+//
+//  Author Marino Faggiana <m.faggiana@twsweb.it>
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+import UIKit
+
+class NCBrandColor: NSObject {
+
+    static let sharedInstance: NCBrandColor = {
+        let instance = NCBrandColor()
+        return instance
+    }()
+
+    // Color
+    public var brand:                   UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)    // BLU NC : #0082c9
+    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
+
+    public var connectionNo:            UIColor = UIColor(red: 204.0/255.0, green: 204.0/255.0, blue: 204.0/255.0, alpha: 1.0)
+    public var cryptocloud:             UIColor = UIColor(red: 241.0/255.0, green: 90.0/255.0, blue: 34.0/255.0, alpha: 1.0)
+    public var navigationBarProgress:   UIColor = .white
+    public var navigationBarText:       UIColor = .white
+    public var menuBackground:          UIColor = .white
+    public var moreNormal:              UIColor = .black
+    public var moreSettings:            UIColor = .black
+    public var seperator:               UIColor = UIColor(red: 235.0/255.0, green: 235.0/255.0, blue: 235.0/255.0, alpha: 1.0)
+    public var tabBar:                  UIColor = .white
+    public var tableBackground:         UIColor = .white
+    public var transferBackground:      UIColor = UIColor(red: 178.0/255.0, green: 244.0/255.0, blue: 258.0/255.0, alpha: 0.1)
+    
+    // Color modify
+    public func getColorSelectBackgrond() -> UIColor {
+        return self.brand.withAlphaComponent(0.1)
+    }
+}
+
+class NCBrandImages: NSObject {
+
+    static let sharedInstance: NCBrandImages = {
+        let instance = NCBrandImages()
+        return instance
+    }()
+    
+    public var login:                   String = "loginLogo"
+    public var navigationLogo:          String = "navigationLogo"
+    public var navigationLogoOffline:   String = "navigationLogoOffline"
+    public var BackgroundDetail:        String = "backgroundDetail"
+    public var themingBackground:       String = "themingBackground"
+}
+

+ 48 - 0
iOSClient/Brand/NCBrandConstant.h

@@ -0,0 +1,48 @@
+//
+//  NCBrandConstant.h
+//  Crypto Cloud Technology Nextcloud
+//
+//  Created by Marino Faggiana on 06/03/17.
+//  Copyright © 2017 TWS. All rights reserved.
+//
+//  Author Marino Faggiana <m.faggiana@twsweb.it>
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+// Brand Text
+#define k_brand                                 @"Nextcloud"
+#define k_mailMe                                @"ios@nextcloud.com"
+#define k_textCopyrightNextcloudiOS             @"Nextcloud for iOS %@ © 2017 T.W.S. Inc."
+#define k_textCopyrightNextcloudServer          @"Nextcloud Server %@"
+#define k_loginBaseUrl                          @"https://cloud.twsweb.it"
+#define k_pushNotificationServer                @"https://push-notifications.nextcloud.com"
+#define k_loginButtonLabelLink                  @"https://nextcloud.com/providers"
+#define k_webLoginAutenticationProtocol         @""
+
+// Capabilities Group
+#define k_capabilitiesGroups                    @"group.it.twsweb.Crypto-Cloud"
+
+// Option 
+#define k_option_use_login_web                  NO
+#define k_option_use_firebase                   NO
+#define k_option_use_default_automatic_upload   NO
+#define k_option_use_themingColor               YES
+#define k_option_use_themingBackground          YES
+
+#define k_option_disable_intro                  NO
+#define k_option_disable_request_login_url      NO
+#define k_option_disable_multiaccount           NO
+#define k_option_disable_cryptocloudsystem      NO
+

+ 2 - 2
iOSClient/Brand/Picker.plist

@@ -17,9 +17,9 @@
 	<key>CFBundlePackageType</key>
 	<string>XPC!</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.17.1</string>
+	<string>2.17.2</string>
 	<key>CFBundleVersion</key>
-	<string>00001</string>
+	<string>00005</string>
 	<key>NSExtension</key>
 	<dict>
 		<key>NSExtensionAttributes</key>

+ 2 - 2
iOSClient/Brand/PickerFileProvider.plist

@@ -17,9 +17,9 @@
 	<key>CFBundlePackageType</key>
 	<string>XPC!</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.17.1</string>
+	<string>2.17.2</string>
 	<key>CFBundleVersion</key>
-	<string>00001</string>
+	<string>00005</string>
 	<key>NSExtension</key>
 	<dict>
 		<key>NSExtensionFileProviderDocumentGroup</key>

+ 2 - 2
iOSClient/Brand/Share.plist

@@ -17,9 +17,9 @@
 	<key>CFBundlePackageType</key>
 	<string>XPC!</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.17.1</string>
+	<string>2.17.2</string>
 	<key>CFBundleVersion</key>
-	<string>00001</string>
+	<string>00005</string>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>

+ 16 - 2
iOSClient/Brand/iOSClient.plist

@@ -46,7 +46,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.17.1</string>
+	<string>2.17.2</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleURLTypes</key>
@@ -69,7 +69,21 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>00001</string>
+	<string>00005</string>
+	<key>Fabric</key>
+	<dict>
+		<key>APIKey</key>
+		<string>52fe877f4a4ff58868da789df0b0eb915fd94ae1</string>
+		<key>Kits</key>
+		<array>
+			<dict>
+				<key>KitInfo</key>
+				<dict/>
+				<key>KitName</key>
+				<string>Crashlytics</string>
+			</dict>
+		</array>
+	</dict>
 	<key>ITSAppUsesNonExemptEncryption</key>
 	<true/>
 	<key>ITSEncryptionExportComplianceCode</key>

+ 3 - 15
iOSClient/CCGlobal.h

@@ -23,14 +23,7 @@
 
 #import <UIKit/UIKit.h>
 #import "CCStandardImages.h"
-
-#ifdef CUSTOM_BUILD
-    #import "CustomImages.h"
-    #import "CustomConstant.h"
-#else
-    #import "CCNextcloudImages.h"
-    #import "CCNextcloudConstant.h"
-#endif
+#import "NCBrandConstant.h"
 
 extern NSString *const appApplicationSupport;
 extern NSString *const appDatabase;
@@ -64,6 +57,8 @@ extern NSString *const urlBaseUploadDB;
 
 #define k_dayForceReadFolder                            3
 
+#define k_daysOfActivity                                7
+
 #define k_returnCreateFolderPlain                       0
 #define k_returnCreateFotoVideoPlain                    1
 #define k_returnCreateFilePlain                         2
@@ -204,7 +199,6 @@ extern NSString *const urlBaseUploadDB;
 #define actionDownloadThumbnail                         @"downloadThumbnail"
 #define actionGetActivityServer                         @"getActivityServer"
 #define actionGetCapabilities                           @"getCapabilitiesOfServer"
-#define actionGetFeaturesSuppServer                     @"getFeaturesSupportedByServer"
 #define actionGetUserAndGroup                           @"getUserAndGroup"
 #define actionGetUserProfile                            @"getUserProfile"
 #define actionGetNotificationServer                     @"getNotificationServer"
@@ -288,9 +282,3 @@ extern NSString *const urlBaseUploadDB;
 // -----------------------------------------------------------------------------------------------------------
 // -----------------------------------------------------------------------------------------------------------
 
-@interface CCAspect : NSObject
-
-+ (void)aspectNavigationControllerBar:(UINavigationBar *)nav encrypted:(BOOL)encrypted online:(BOOL)online hidden:(BOOL)hidden;
-+ (void)aspectTabBar:(UITabBar *)tab hidden:(BOOL)hidden;
-
-@end

+ 0 - 33
iOSClient/CCGlobal.m

@@ -31,36 +31,3 @@ NSString *const appCertificates = @"Library/Application Support/Certificates";
 // webDAV & DAV
 NSString *const webDAV = @"/remote.php/webdav";
 NSString *const dav = @"/remote.php/dav";
-
-@implementation CCAspect
-
-+ (void)aspectNavigationControllerBar:(UINavigationBar *)nav encrypted:(BOOL)encrypted online:(BOOL)online hidden:(BOOL)hidden
-{
-    nav.translucent = NO;
-    nav.barTintColor = COLOR_NAVIGATIONBAR;
-    nav.tintColor = COLOR_NAVIGATIONBAR_TEXT;
-    [nav setTitleTextAttributes:@{NSForegroundColorAttributeName : COLOR_NAVIGATIONBAR_TEXT}];
-
-    if (encrypted)
-        [nav setTitleTextAttributes:@{NSForegroundColorAttributeName : COLOR_CRYPTOCLOUD}];
-    
-    if (!online)
-        [nav setTitleTextAttributes:@{NSForegroundColorAttributeName : COLOR_TEXT_NO_CONNECTION}];
-
-    nav.hidden = hidden;
-    
-    [nav setAlpha:1];
-}
-
-+ (void)aspectTabBar:(UITabBar *)tab hidden:(BOOL)hidden
-{    
-    tab.translucent = NO;
-    tab.barTintColor = COLOR_TABBAR;
-    tab.tintColor = COLOR_TABBAR_TEXT;
-    
-    tab.hidden = hidden;
-    
-    [tab setAlpha:1];
-}
-
-@end

+ 1 - 2
iOSClient/CCStandardImages.h

@@ -40,8 +40,7 @@
 #define image_bkfull                            @"bkfull"
 #define image_bkempty                           @"bkempty"
 
-#define image_buttonBlu                         @"buttonBlu"
-#define image_buttonWhite                       @"buttonWhite"
+#define image_button                            @"button"
 
 #define image_checked                           @"checked"
 

+ 33 - 21
iOSClient/Create/CCCreateCloud.swift

@@ -27,12 +27,21 @@ import Foundation
 
 class CreateMenuAdd: NSObject {
     
+    let appDelegate = UIApplication.shared.delegate as! AppDelegate
+
     let fontButton = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: UIColor(colorLiteralRed: 65.0/255.0, green: 64.0/255.0, blue: 66.0/255.0, alpha: 1.0)]
-    let fontEncrypted = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: Constant.GlobalConstants.k_Color_Cryptocloud]
-    let fontCancel = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: Constant.GlobalConstants.k_Color_NavigationBar]
+    let fontEncrypted = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: NCBrandColor.sharedInstance.cryptocloud] as [String : Any]
+    let fontCancel = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: NCBrandColor.sharedInstance.brand] as [String : Any]
     let fontDisable = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: UIColor(colorLiteralRed: 65.0/255.0, green: 64.0/255.0, blue: 66.0/255.0, alpha: 1.0)]
 
     let colorLightGray = UIColor(colorLiteralRed: 250.0/255.0, green: 250.0/255.0, blue: 250.0/255.0, alpha: 1)
+    var colorIcon = NCBrandColor.sharedInstance.brand
+    
+    init (themingColor : UIColor) {
+        super.init()
+        
+        colorIcon = themingColor
+    }
     
     func createMenuPlain(view : UIView) {
         
@@ -49,7 +58,7 @@ class CreateMenuAdd: NSObject {
         actionSheet.cancelButtonHeight = 50.0
         actionSheet.separatorHeight = 5.0
         
-        actionSheet.separatorColor = Constant.GlobalConstants.k_Color_Seperator
+        actionSheet.separatorColor = NCBrandColor.sharedInstance.seperator
         
         actionSheet.buttonTextAttributes = fontButton
         actionSheet.encryptedButtonTextAttributes = fontEncrypted
@@ -57,16 +66,16 @@ class CreateMenuAdd: NSObject {
         actionSheet.disableButtonTextAttributes = fontDisable
         
         actionSheet.cancelButtonTitle = NSLocalizedString("_cancel_", comment: "")
-
-        actionSheet.addButton(withTitle: NSLocalizedString("_create_folder_", comment: ""), image: UIImage(named: image_folder), 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: image_folder), color: colorIcon), backgroundColor: UIColor.white, height: 50.0 ,type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
             appDelegate.activeMain.returnCreate(Int(k_returnCreateFolderPlain))
         })
         
-        actionSheet.addButton(withTitle: NSLocalizedString("_upload_photos_videos_", comment: ""), image: UIImage(named: image_MenuUploadPhoto), 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: image_MenuUploadPhoto), color: colorIcon), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
             appDelegate.activeMain.returnCreate(Int(k_returnCreateFotoVideoPlain))
         })
         
-        actionSheet.addButton(withTitle: NSLocalizedString("_upload_file_", comment: ""), image: UIImage(named: image_MenuUploadFile), 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: image_MenuUploadFile), color: colorIcon), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
             appDelegate.activeMain.returnCreate(Int(k_returnCreateFilePlain))
         })
         
@@ -95,7 +104,7 @@ class CreateMenuAdd: NSObject {
         actionSheet.cancelButtonHeight = 50.0
         actionSheet.separatorHeight = 5.0
         
-        actionSheet.separatorColor = Constant.GlobalConstants.k_Color_Seperator
+        actionSheet.separatorColor = NCBrandColor.sharedInstance.seperator
 
         actionSheet.buttonTextAttributes = fontButton
         actionSheet.encryptedButtonTextAttributes = fontEncrypted
@@ -143,7 +152,7 @@ class CreateMenuAdd: NSObject {
         actionSheet.cancelButtonHeight = 50.0
         actionSheet.separatorHeight = 5.0
         
-        actionSheet.separatorColor = Constant.GlobalConstants.k_Color_Seperator
+        actionSheet.separatorColor = NCBrandColor.sharedInstance.seperator
 
         actionSheet.buttonTextAttributes = fontButton
         actionSheet.encryptedButtonTextAttributes = fontEncrypted
@@ -208,7 +217,7 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
     var session : String = ""
     
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
-    let sectionColor: UIColor = UIColor(colorLiteralRed: 239.0/255.0, green: 239.0/255.0, blue: 244.0/255.0, alpha: 1)
+    //let sectionColor: //UIColor = UIColor(colorLiteralRed: 239.0/255.0, green: 239.0/255.0, blue: 244.0/255.0, alpha: 1)
     
     convenience init(_ titleServerUrl : String?, serverUrl : String, assets : NSMutableArray, cryptated : Bool, session : String) {
         
@@ -242,9 +251,10 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
         
         section = XLFormSectionDescriptor.formSection()
         form.addFormSection(section)
-        
         row = XLFormRowDescriptor(tag: "ButtonDestinationFolder", rowType: XLFormRowDescriptorTypeButton, title: self.titleServerUrl)
-        row.cellConfig.setObject(UIImage(named: image_folderphotocamera)!, forKey: "imageView.image" as NSCopying)
+        let imageFolder = CCGraphics.changeThemingColorImage(UIImage(named: image_folder)!, color: NCBrandColor.sharedInstance.brand) 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(_:))
         section.addFormRow(row)
         
@@ -287,8 +297,8 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
         
         row = XLFormRowDescriptor(tag: "previewFileName", rowType: XLFormRowDescriptorTypeTextView, title: "")
         row.height = 180
-        row.cellConfig.setObject(sectionColor, forKey: "backgroundColor" as NSCopying)
-        row.cellConfig.setObject(sectionColor, forKey: "textView.backgroundColor" as NSCopying)
+        row.cellConfig.setObject(NCBrandColor.sharedInstance.tableBackground, forKey: "backgroundColor" as NSCopying)
+        row.cellConfig.setObject(NCBrandColor.sharedInstance.tableBackground, forKey: "textView.backgroundColor" as NSCopying)
         //row.cellConfig.setObject(10, forKey: "textView.layer.borderWidth" as NSCopying)
 
         row.disabled = true
@@ -329,7 +339,7 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
             self.form.delegate = nil
             
             if fileName != nil {
-                formRow.value = CCUtility.removeForbiddenCharacters(fileName, hasServerForbiddenCharactersSupport: appDelegate.hasServerForbiddenCharactersSupport)
+                formRow.value = CCUtility.removeForbiddenCharactersServer(fileName)
             }
             
             self.form.delegate = self
@@ -365,12 +375,14 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
         self.navigationItem.leftBarButtonItem = cancelButton
         self.navigationItem.rightBarButtonItem = saveButton
         
-        self.navigationController?.navigationBar.barTintColor = Constant.GlobalConstants.k_Color_NavigationBar
-        self.navigationController?.navigationBar.tintColor = Constant.GlobalConstants.k_Color_NavigationBar_Text
-        self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: Constant.GlobalConstants.k_Color_NavigationBar_Text]
+        self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
+        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
+        self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: NCBrandColor.sharedInstance.navigationBarText]
         
         self.tableView.separatorStyle = UITableViewCellSeparatorStyle.none
         
+        self.tableView.backgroundColor = NCBrandColor.sharedInstance.tableBackground
+        
         self.reloadForm()
     }
 
@@ -512,9 +524,9 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
         let viewController : CCMove = navigationController.topViewController as! CCMove
         
         viewController.delegate = self;
-        viewController.tintColor = Constant.GlobalConstants.k_Color_NavigationBar_Text
-        viewController.barTintColor = Constant.GlobalConstants.k_Color_NavigationBar
-        viewController.tintColorTitle = Constant.GlobalConstants.k_Color_NavigationBar_Text
+        viewController.tintColor = NCBrandColor.sharedInstance.navigationBarText
+        viewController.barTintColor = NCBrandColor.sharedInstance.brand
+        viewController.tintColorTitle = NCBrandColor.sharedInstance.navigationBarText
         viewController.move.title = NSLocalizedString("_select_", comment: "");
         viewController.networkingOperationQueue =  appDelegate.netQueue
         

+ 56 - 53
iOSClient/Favorites/CCFavorites.m

@@ -22,13 +22,12 @@
 //
 
 #import "CCFavorites.h"
-
 #import "AppDelegate.h"
 
 #ifdef CUSTOM_BUILD
-    #import "CustomSwift.h"
+#import "CustomSwift.h"
 #else
-    #import "Nextcloud-Swift.h"
+#import "Nextcloud-Swift.h"
 #endif
 
 @interface CCFavorites () <CCActionsDeleteDelegate, CCActionsSettingFavoriteDelegate>
@@ -51,6 +50,7 @@
     if (self = [super initWithCoder:aDecoder])  {
         
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(triggerProgressTask:) name:@"NotificationProgressTask" object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
     }
     return self;
 }
@@ -69,7 +69,7 @@
     _metadata = [CCMetadata new];
     
     self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 1)];
-    self.tableView.separatorColor = COLOR_SEPARATOR_TABLE;
+    self.tableView.separatorColor = [NCBrandColor sharedInstance].seperator;
     self.tableView.emptyDataSetDelegate = self;
     self.tableView.emptyDataSetSource = self;
     self.tableView.delegate = self;
@@ -91,8 +91,8 @@
     [super viewWillAppear:animated];
     
     // Color
-    [CCAspect aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
-    [CCAspect aspectTabBar:self.tabBarController.tabBar hidden:NO];
+    [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
     
     // Plus Button
     [app plusButtonVisibile:true];
@@ -100,14 +100,13 @@
     [self reloadDatasource];
 }
 
-// E' arrivato
-- (void)viewDidAppear:(BOOL)animated
+- (void)changeTheming
 {
-    [super viewDidAppear:animated];
-}
-
-- (void)didReceiveMemoryWarning {
-    [super didReceiveMemoryWarning];
+    if (self.isViewLoaded && self.view.window)
+        [app changeTheming:self];
+    
+    // Reload Table View
+    [self.tableView reloadData];
 }
 
 - (void)triggerProgressTask:(NSNotification *)notification
@@ -118,7 +117,7 @@
     if (progress == 0)
         [self.navigationController cancelCCProgress];
     else
-        [self.navigationController setCCProgressPercentage:progress*100 andTintColor:COLOR_NAVIGATIONBAR_PROGRESS];
+        [self.navigationController setCCProgressPercentage:progress*100 andTintColor:[NCBrandColor sharedInstance].navigationBarProgress];
 }
 
 #pragma --------------------------------------------------------------------------------------------
@@ -379,32 +378,34 @@
     
     actionSheet.automaticallyTintButtonImages = @(NO);
     
-    actionSheet.encryptedButtonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:COLOR_CRYPTOCLOUD };
-    actionSheet.buttonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:COLOR_TEXT_ANTHRACITE };
-    actionSheet.cancelButtonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:COLOR_BRAND };
-    actionSheet.disableButtonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:COLOR_TEXT_ANTHRACITE };
+    actionSheet.encryptedButtonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:[NCBrandColor sharedInstance].cryptocloud };
+    actionSheet.buttonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:[UIColor blackColor] };
+    actionSheet.cancelButtonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:[NCBrandColor sharedInstance].brand };
+    actionSheet.disableButtonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:[UIColor blackColor] };
     
-    actionSheet.separatorColor = COLOR_SEPARATOR_TABLE;
+    actionSheet.separatorColor = [NCBrandColor sharedInstance].seperator;
     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", app.directoryUser, metadata.fileID]]) {
+        
         iconHeader = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, metadata.fileID]];
-    else
-        iconHeader = [UIImage imageNamed:metadata.iconName];
-    
-    [actionSheet addButtonWithTitle: metadata.fileNamePrint
-                              image: iconHeader
-                    backgroundColor: COLOR_TABBAR
-                             height: 50.0
-                               type: AHKActionSheetButtonTypeDisabled
-                            handler: nil
+        
+    } else {
+        
+        if (metadata.directory)
+            iconHeader = [CCGraphics changeThemingColorImage:[UIImage imageNamed:metadata.iconName] color:[NCBrandColor sharedInstance].brand];
+        else
+            iconHeader = [UIImage imageNamed:metadata.iconName];
+    }
+    
+    [actionSheet addButtonWithTitle: metadata.fileNamePrint image: iconHeader backgroundColor: [NCBrandColor sharedInstance].tabBar height: 50.0 type: AHKActionSheetButtonTypeDisabled handler: nil
     ];
 
     // ONLY Root Favorites : Remove file/folder Favorites
     if (_serverUrl == nil) {
         
-        [actionSheet addButtonWithTitle:NSLocalizedString(@"_remove_favorites_", nil) image:[UIImage imageNamed:image_actionSheetOffline] backgroundColor:[UIColor whiteColor] height: 50.0 type:AHKActionSheetButtonTypeDefault handler:^(AHKActionSheet *as) {
+        [actionSheet addButtonWithTitle:NSLocalizedString(@"_remove_favorites_", nil) image:[CCGraphics changeThemingColorImage:[UIImage imageNamed:image_actionSheetOffline] color:[NCBrandColor sharedInstance].brand] backgroundColor:[UIColor whiteColor] height: 50.0 type:AHKActionSheetButtonTypeDefault handler:^(AHKActionSheet *as) {
                                     
             [self.tableView setEditing:NO animated:YES];
             [[CCActions sharedInstance] settingFavorite:metadata favorite:NO delegate:self];
@@ -412,30 +413,23 @@
     }
     
     // Share
-    if (_metadata.cryptated == NO && app.hasServerShareSupport) {
-        
-        [actionSheet addButtonWithTitle:NSLocalizedString(@"_share_", nil)
-                                  image:[UIImage imageNamed:image_actionSheetShare]
-                        backgroundColor:[UIColor whiteColor]
-                                 height: 50.0
-                                   type:AHKActionSheetButtonTypeDefault
-                                handler:^(AHKActionSheet *as) {
-                                    
-                                    // close swipe
-                                    [self setEditing:NO animated:YES];
+    if (_metadata.cryptated == NO) {
+        
+        [actionSheet addButtonWithTitle:NSLocalizedString(@"_share_", nil) image:[CCGraphics changeThemingColorImage:[UIImage imageNamed:image_actionSheetShare] color:[NCBrandColor sharedInstance].brand] backgroundColor:[UIColor whiteColor] height: 50.0 type:AHKActionSheetButtonTypeDefault handler:^(AHKActionSheet *as) {
+                // close swipe
+                [self setEditing:NO animated:YES];
                                     
-                                    [app.activeMain openWindowShare:metadata];
-                                }];
+                [app.activeMain openWindowShare:metadata];
+            }];
     }
 
     // NO Directory - NO Template
     if (metadata.directory == NO && [metadata.type isEqualToString:k_metadataType_template] == NO) {
         
-        [actionSheet addButtonWithTitle:NSLocalizedString(@"_open_in_", nil) image:[UIImage imageNamed:image_actionSheetOpenIn] backgroundColor:[UIColor whiteColor] height: 50.0 type:AHKActionSheetButtonTypeDefault handler:^(AHKActionSheet *as) {
-            
-            [self.tableView setEditing:NO animated:YES];
-            [self openWith:metadata];
-        }];
+        [actionSheet addButtonWithTitle:NSLocalizedString(@"_open_in_", nil) image:[CCGraphics changeThemingColorImage:[UIImage imageNamed:image_actionSheetOpenIn] color:[NCBrandColor sharedInstance].brand] backgroundColor:[UIColor whiteColor] height: 50.0 type:AHKActionSheetButtonTypeDefault handler:^(AHKActionSheet *as) {
+                [self.tableView setEditing:NO animated:YES];
+                [self openWith:metadata];
+            }];
     }
     
     [actionSheet show];
@@ -544,10 +538,10 @@
     // Initialize
     cell.statusImageView.image = nil;
     cell.offlineImageView.image = nil;
-    
+        
     // change color selection
     UIView *selectionColor = [[UIView alloc] init];
-    selectionColor.backgroundColor = COLOR_SELECT_BACKGROUND;
+    selectionColor.backgroundColor = [[NCBrandColor sharedInstance] getColorSelectBackgrond];
     cell.selectedBackgroundView = selectionColor;
     
     metadata = [_dataSource objectAtIndex:indexPath.row];
@@ -562,7 +556,7 @@
     
     // encrypted color
     if (metadata.cryptated) {
-        cell.labelTitle.textColor = COLOR_CRYPTOCLOUD;
+        cell.labelTitle.textColor = [NCBrandColor sharedInstance].cryptocloud;
     } else {
         cell.labelTitle.textColor = [UIColor blackColor];
     }
@@ -572,8 +566,17 @@
     cell.labelInfoFile.text = @"";
     
     // Immagine del file, se non c'è l'anteprima mettiamo quella standard
-    if (cell.fileImageView.image == nil)
-        cell.fileImageView.image = [UIImage imageNamed:metadata.iconName];
+    if (cell.fileImageView.image == nil) {
+        
+        if (metadata.directory) {
+            
+            cell.fileImageView.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:metadata.iconName] color:[NCBrandColor sharedInstance].brand];
+            
+        } else {
+            
+            cell.fileImageView.image = [UIImage imageNamed:metadata.iconName];
+        }
+    }
     
     // it's encrypted ???
     if (metadata.cryptated && [metadata.type isEqualToString: k_metadataType_template] == NO)

+ 14 - 4
iOSClient/FileSystem/CCCoreData.h

@@ -35,7 +35,7 @@
 #import "OCUserProfile.h"
 #import "OCActivity.h"
 #import "OCExternalSites.h"
-
+#import "OCCapabilities.h"
 #import "TableAccount+CoreDataClass.h"
 #import "TableActivity+CoreDataClass.h"
 #import "TableCertificates+CoreDataClass.h"
@@ -46,6 +46,7 @@
 #import "TableShare+CoreDataClass.h"
 #import "TableAutomaticUpload+CoreDataClass.h"
 #import "TableExternalSites+CoreDataClass.h"
+#import "TableCapabilities+CoreDataClass.h"
 
 @interface CCCoreData : NSObject
 
@@ -77,7 +78,6 @@
 + (BOOL)getCameraUploadCryptatedVideoActiveAccount:(NSString *)activeAccount;
 + (BOOL)getCameraUploadWWanPhotoActiveAccount:(NSString *)activeAccount;
 + (BOOL)getCameraUploadWWanVideoActiveAccount:(NSString *)activeAccount;
-+ (NSInteger)getServerVersionMajorActiveAccount:(NSString *)activeAccount;
 
 + (void)setCameraUpload:(BOOL)state activeAccount:(NSString *)activeAccount;
 + (void)setCameraUploadBackground:(BOOL)state activeAccount:(NSString *)activeAccount;
@@ -97,7 +97,6 @@
 + (void)setCameraUploadSaveAlbum:(BOOL)saveAlbum activeAccount:(NSString *)activeAccount;
 
 + (void)setUserProfileActiveAccount:(NSString *)activeAccount userProfile:(OCUserProfile *)userProfile;
-+ (void)setServerVersionActiveAccount:(NSString *)activeAccount versionMajor:(NSInteger)versionMajor versionMinor:(NSInteger)versionMinor versionMicro:(NSInteger)versionMicro;
 
 // ===== Certificates =====
 
@@ -225,6 +224,12 @@
 + (void)deleteAllExternalSitesForAccount:(NSString *)account;
 + (NSArray *)getAllTableExternalSitesWithPredicate:(NSPredicate *)predicate;
 
+// ===== Capabilities =====
+
++ (void)setCapabilities:(OCCapabilities *)capabilities account:(NSString *)account;
++ (TableCapabilities *)getCapabilitesForAccount:(NSString *)account;
++ (NSInteger)getServerVersionAccount:(NSString *)activeAccount;
+
 // ===== File System =====
 
 + (BOOL)downloadFile:(CCMetadata *)metadata directoryUser:(NSString *)directoryUser activeAccount:(NSString *)activeAccount;
@@ -243,12 +248,17 @@
 
 //+ (void)verifyVersionCoreData;
 
++ (void)flushTableAccount:(NSString *)account;
 + (void)flushTableActivityAccount:(NSString *)account;
 + (void)flushTableAutomaticUploadAccount:(NSString *)account selector:(NSString *)selector;
++ (void)flushTableCapabilitiesAccount:(NSString *)account;
++ (void)flushTableCertificates;
 + (void)flushTableDirectoryAccount:(NSString *)account;
++ (void)flushTableExternalSitesAccount:(NSString *)account;
++ (void)flushTableGPS;
 + (void)flushTableLocalFileAccount:(NSString *)account;
 + (void)flushTableMetadataAccount:(NSString *)account;
-+ (void)flushTableGPS;
++ (void)flushTableShareAccount:(NSString *)account;
 
 + (void)flushAllDatabase;
 @end

+ 173 - 68
iOSClient/FileSystem/CCCoreData.m

@@ -310,20 +310,6 @@
     else return NO;
 }
 
-+ (NSInteger)getServerVersionMajorActiveAccount:(NSString *)activeAccount
-{
-    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(account == %@)", activeAccount];
-    TableAccount *record = [TableAccount MR_findFirstWithPredicate:predicate];
-
-    if (record) {
-        
-        NSInteger versionMajor = [record.versionMajor integerValue];
-        return versionMajor;
-
-    } else
-        return 0;
-}
-
 + (void)setCameraUpload:(BOOL)state activeAccount:(NSString *)activeAccount
 {
     [MagicalRecord saveWithBlockAndWait:^(NSManagedObjectContext *localContext) {
@@ -547,22 +533,6 @@
     }];
 }
 
-+ (void)setServerVersionActiveAccount:(NSString *)activeAccount versionMajor:(NSInteger)versionMajor versionMinor:(NSInteger)versionMinor versionMicro:(NSInteger)versionMicro
-{
-    [MagicalRecord saveWithBlockAndWait:^(NSManagedObjectContext *localContext) {
-        
-        NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(account == %@)", activeAccount];
-        TableAccount *record = [TableAccount MR_findFirstWithPredicate:predicate inContext:localContext];
-
-        if (record) {
-            
-            record.versionMajor = [NSNumber numberWithInteger:versionMajor];
-            record.versionMinor = [NSNumber numberWithInteger:versionMinor];
-            record.versionMicro = [NSNumber numberWithInteger:versionMicro];
-        }
-    }];
-}
-
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== Certificates =====
 #pragma --------------------------------------------------------------------------------------------
@@ -588,8 +558,10 @@
     
     for (TableCertificates *record in records) {
         
-        NSString *certificatePath = [NSString stringWithFormat:@"%@%@", localCertificatesFolder, record.certificateLocation];
-        [output addObject:certificatePath];
+        if (record.certificateLocation && record.certificateLocation.length > 0) {
+            NSString *certificatePath = [NSString stringWithFormat:@"%@%@", localCertificatesFolder, record.certificateLocation];
+            [output addObject:certificatePath];
+        }
     }
     
     return output;
@@ -1910,25 +1882,26 @@
 
 + (void)addActivityServer:(OCActivity *)activity account:(NSString *)account
 {
-    [MagicalRecord saveWithBlockAndWait:^(NSManagedObjectContext *localContext) {
-        
-        if (activity.idActivity != 0)
-            [TableActivity MR_deleteAllMatchingPredicate:[NSPredicate predicateWithFormat:@"(account == %@) AND (idActivity == %d)", account, activity.idActivity] inContext:localContext];
+    NSManagedObjectContext *context = [NSManagedObjectContext MR_defaultContext];
+    
+    if (activity.idActivity != 0)
+        [TableActivity MR_deleteAllMatchingPredicate:[NSPredicate predicateWithFormat:@"(account == %@) AND (idActivity == %d)", account, activity.idActivity] inContext:context];
         
-        TableActivity *record = [TableActivity MR_createEntityInContext:localContext];
+    TableActivity *record = [TableActivity MR_createEntityInContext:context];
 
-        record.account = account;
-        record.action = @"Activity";
-        record.date = activity.date;
-        record.file = activity.file;
-        record.fileID = @"";
-        record.idActivity = [NSNumber numberWithInteger:activity.idActivity];
-        record.link = activity.link;
-        record.note = activity.subject;
-        record.selector = @"";
-        record.type = k_activityTypeInfo;
-        record.verbose = [NSNumber numberWithInteger:k_activityVerboseDefault];
-    }];
+    record.account = account;
+    record.action = @"Activity";
+    record.date = activity.date;
+    record.file = activity.file;
+    record.fileID = @"";
+    record.idActivity = [NSNumber numberWithInteger:activity.idActivity];
+    record.link = activity.link;
+    record.note = activity.subject;
+    record.selector = @"";
+    record.type = k_activityTypeInfo;
+    record.verbose = [NSNumber numberWithInteger:k_activityVerboseDefault];
+    
+    [context MR_saveToPersistentStoreAndWait];
 }
 
 + (void)addActivityClient:(NSString *)file fileID:(NSString *)fileID action:(NSString *)action selector:(NSString *)selector note:(NSString *)note type:(NSString *)type verbose:(NSInteger)verbose account:(NSString *)account activeUrl:(NSString *)activeUrl
@@ -1936,24 +1909,25 @@
     note = [note stringByReplacingOccurrencesOfString:[activeUrl stringByAppendingString:webDAV] withString:@""];
     note = [note stringByReplacingOccurrencesOfString:[k_domain_session_queue stringByAppendingString:@"."] withString:@""];
 
-    [MagicalRecord saveWithBlockAndWait:^(NSManagedObjectContext *localContext) {
-        
-        TableActivity *record = [TableActivity MR_createEntityInContext:localContext];
+    NSManagedObjectContext *context = [NSManagedObjectContext MR_defaultContext];
+    
+    TableActivity *record = [TableActivity MR_createEntityInContext:context];
         
-        if (!account) record.account = @"";
-        else record.account = account;
+    if (!account) record.account = @"";
+    else record.account = account;
         
-        record.action = action;
-        record.date = [NSDate date];
-        record.file = file;
-        record.fileID = fileID;
-        record.idActivity = 0;
-        record.link = @"";
-        record.note = note;
-        record.selector = selector;
-        record.type = type;
-        record.verbose = [NSNumber numberWithInteger:verbose];
-   }];
+    record.action = action;
+    record.date = [NSDate date];
+    record.file = file;
+    record.fileID = fileID;
+    record.idActivity = 0;
+    record.link = @"";
+    record.note = note;
+    record.selector = selector;
+    record.type = type;
+    record.verbose = [NSNumber numberWithInteger:verbose];
+   
+    [context MR_saveToPersistentStoreAndWait];
 }
 
 + (NSArray *)getAllTableActivityWithPredicate:(NSPredicate *)predicate
@@ -2012,6 +1986,58 @@
     return [records sortedArrayUsingDescriptors:[NSArray arrayWithObjects:descriptor, nil]];
 }
 
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== Capabilities =====
+#pragma --------------------------------------------------------------------------------------------
+
++ (void)setCapabilities:(OCCapabilities *)capabilities account:(NSString *)account
+{
+    [MagicalRecord saveWithBlockAndWait:^(NSManagedObjectContext *localContext) {
+        
+        [TableCapabilities MR_deleteAllMatchingPredicate:[NSPredicate predicateWithFormat:@"(account == %@)", account] inContext:localContext];
+        
+        TableCapabilities *record = [TableCapabilities MR_createEntityInContext:localContext];
+        
+        record.account = account;
+        
+        record.themingBackground = capabilities.themingBackground;
+        record.themingColor = capabilities.themingColor;
+        record.themingLogo = capabilities.themingLogo;
+        record.themingName = capabilities.themingName;
+        record.themingSlogan = capabilities.themingSlogan;
+        record.themingUrl = capabilities.themingUrl;
+        
+        record.versionMajor = [NSNumber numberWithInteger:capabilities.versionMajor];
+        record.versionMinor = [NSNumber numberWithInteger:capabilities.versionMinor];
+        record.versionMicro = [NSNumber numberWithInteger:capabilities.versionMicro];
+        record.versionString = capabilities.versionString;
+    }];
+}
+
++ (TableCapabilities *)getCapabilitesForAccount:(NSString *)account
+{
+    NSManagedObjectContext *context = [NSManagedObjectContext MR_defaultContext];
+    
+    return [TableCapabilities MR_findFirstWithPredicate:[NSPredicate predicateWithFormat:@"(account == %@)", account] inContext:context];
+}
+
++ (NSInteger)getServerVersionAccount:(NSString *)activeAccount
+{
+    if (!activeAccount)
+        return 0;
+    
+    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(account == %@)", activeAccount];
+    TableCapabilities *record = [TableCapabilities MR_findFirstWithPredicate:predicate];
+    
+    if (record) {
+        
+        NSInteger versionMajor = [record.versionMajor integerValue];
+        return versionMajor;
+        
+    } else
+        return 0;
+}
+
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== File System =====
 #pragma --------------------------------------------------------------------------------------------
@@ -2246,6 +2272,26 @@
     }
 }
 
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== Flush Database =====
+#pragma --------------------------------------------------------------------------------------------
+
++ (void)flushTableAccount:(NSString *)account
+{
+    NSManagedObjectContext *context = [NSManagedObjectContext MR_defaultContext];
+    
+    if (account) {
+        
+        [TableAccount MR_deleteAllMatchingPredicate:[NSPredicate predicateWithFormat:@"(account == %@)", account] inContext:context];
+        
+    } else {
+        
+        [TableAccount MR_truncateAllInContext:context];
+    }
+    
+    [context MR_saveToPersistentStoreAndWait];
+}
+
 + (void)flushTableActivityAccount:(NSString *)account
 {
     NSManagedObjectContext *context = [NSManagedObjectContext MR_defaultContext];
@@ -2276,6 +2322,31 @@
     [context MR_saveToPersistentStoreAndWait];
 }
 
++ (void)flushTableCapabilitiesAccount:(NSString *)account
+{
+    NSManagedObjectContext *context = [NSManagedObjectContext MR_defaultContext];
+    
+    if (account) {
+        
+        [TableCapabilities MR_deleteAllMatchingPredicate:[NSPredicate predicateWithFormat:@"(account == %@)", account] inContext:context];
+        
+    } else {
+        
+        [TableCapabilities MR_truncateAllInContext:context];
+    }
+    
+    [context MR_saveToPersistentStoreAndWait];
+}
+
++ (void)flushTableCertificates
+{
+    NSManagedObjectContext *context = [NSManagedObjectContext MR_defaultContext];
+    
+    [TableCertificates MR_truncateAllInContext:context];
+    
+    [context MR_saveToPersistentStoreAndWait];
+}
+
 + (void)flushTableDirectoryAccount:(NSString *)account
 {
     NSManagedObjectContext *context = [NSManagedObjectContext MR_defaultContext];
@@ -2292,6 +2363,31 @@
     [context MR_saveToPersistentStoreAndWait];
 }
 
++ (void)flushTableExternalSitesAccount:(NSString *)account
+{
+    NSManagedObjectContext *context = [NSManagedObjectContext MR_defaultContext];
+    
+    if (account) {
+        
+        [TableExternalSites MR_deleteAllMatchingPredicate:[NSPredicate predicateWithFormat:@"(account == %@)", account] inContext:context];
+        
+    } else {
+        
+        [TableExternalSites MR_truncateAllInContext:context];
+    }
+    
+    [context MR_saveToPersistentStoreAndWait];
+}
+
++ (void)flushTableGPS
+{
+    NSManagedObjectContext *context = [NSManagedObjectContext MR_defaultContext];
+    
+    [TableGPS MR_truncateAllInContext:context];
+    
+    [context MR_saveToPersistentStoreAndWait];
+}
+
 + (void)flushTableLocalFileAccount:(NSString *)account
 {
     NSManagedObjectContext *context = [NSManagedObjectContext MR_defaultContext];
@@ -2324,15 +2420,23 @@
     [context MR_saveToPersistentStoreAndWait];
 }
 
-+ (void)flushTableGPS
++ (void)flushTableShareAccount:(NSString *)account
 {
     NSManagedObjectContext *context = [NSManagedObjectContext MR_defaultContext];
-
-    [TableGPS MR_truncateAllInContext:context];
+    
+    if (account) {
+        
+        [TableShare MR_deleteAllMatchingPredicate:[NSPredicate predicateWithFormat:@"(account == %@)", account] inContext:context];
+        
+    } else {
+        
+        [TableShare MR_truncateAllInContext:context];
+    }
     
     [context MR_saveToPersistentStoreAndWait];
 }
 
+
 + (void)flushAllDatabase
 {
     NSManagedObjectContext *context = [NSManagedObjectContext MR_defaultContext];
@@ -2340,6 +2444,7 @@
     [TableAccount MR_truncateAllInContext:context];
     [TableActivity MR_truncateAllInContext:context];
     [TableAutomaticUpload MR_truncateAllInContext:context];
+    [TableCapabilities MR_truncateAllInContext:context];
     [TableCertificates MR_truncateAllInContext:context];
     [TableDirectory MR_truncateAllInContext:context];
     [TableGPS MR_truncateAllInContext:context];

+ 0 - 3
iOSClient/FileSystem/TableAccount+CoreDataProperties.h

@@ -42,9 +42,6 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nullable, nonatomic, copy) NSString *email;
 @property (nullable, nonatomic, copy) NSString *phone;
 @property (nullable, nonatomic, copy) NSString *twitter;
-@property (nullable, nonatomic, copy) NSNumber *versionMajor;
-@property (nullable, nonatomic, copy) NSNumber *versionMicro;
-@property (nullable, nonatomic, copy) NSNumber *versionMinor;
 @property (nullable, nonatomic, copy) NSString *webpage;
 @property (nullable, nonatomic, copy) NSNumber *quota;
 @property (nullable, nonatomic, copy) NSNumber *quotaFree;

+ 0 - 3
iOSClient/FileSystem/TableAccount+CoreDataProperties.m

@@ -41,9 +41,6 @@
 @dynamic email;
 @dynamic phone;
 @dynamic twitter;
-@dynamic versionMajor;
-@dynamic versionMinor;
-@dynamic versionMicro;
 @dynamic webpage;
 @dynamic quota;
 @dynamic quotaFree;

+ 20 - 0
iOSClient/FileSystem/TableCapabilities+CoreDataClass.h

@@ -0,0 +1,20 @@
+//
+//  TableCapabilities+CoreDataClass.h
+//  Nextcloud
+//
+//  Created by Marino Faggiana on 24/04/17.
+//  Copyright © 2017 TWS. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <CoreData/CoreData.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface TableCapabilities : NSManagedObject
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#import "TableCapabilities+CoreDataProperties.h"

+ 13 - 0
iOSClient/FileSystem/TableCapabilities+CoreDataClass.m

@@ -0,0 +1,13 @@
+//
+//  TableCapabilities+CoreDataClass.m
+//  Nextcloud
+//
+//  Created by Marino Faggiana on 24/04/17.
+//  Copyright © 2017 TWS. All rights reserved.
+//
+
+#import "TableCapabilities+CoreDataClass.h"
+
+@implementation TableCapabilities
+
+@end

+ 32 - 0
iOSClient/FileSystem/TableCapabilities+CoreDataProperties.h

@@ -0,0 +1,32 @@
+//
+//  TableCapabilities+CoreDataProperties.h
+//  Nextcloud
+//
+//  Created by Marino Faggiana on 24/04/17.
+//  Copyright © 2017 TWS. All rights reserved.
+//
+
+#import "TableCapabilities+CoreDataClass.h"
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface TableCapabilities (CoreDataProperties)
+
++ (NSFetchRequest<TableCapabilities *> *)fetchRequest;
+
+@property (nullable, nonatomic, copy) NSString *account;
+@property (nullable, nonatomic, copy) NSString *themingBackground;
+@property (nullable, nonatomic, copy) NSString *themingColor;
+@property (nullable, nonatomic, copy) NSString *themingLogo;
+@property (nullable, nonatomic, copy) NSString *themingName;
+@property (nullable, nonatomic, copy) NSString *themingSlogan;
+@property (nullable, nonatomic, copy) NSString *themingUrl;
+@property (nullable, nonatomic, copy) NSNumber *versionMajor;
+@property (nullable, nonatomic, copy) NSNumber *versionMicro;
+@property (nullable, nonatomic, copy) NSNumber *versionMinor;
+@property (nullable, nonatomic, copy) NSString *versionString;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 29 - 0
iOSClient/FileSystem/TableCapabilities+CoreDataProperties.m

@@ -0,0 +1,29 @@
+//
+//  TableCapabilities+CoreDataProperties.m
+//  Nextcloud
+//
+//  Created by Marino Faggiana on 24/04/17.
+//  Copyright © 2017 TWS. All rights reserved.
+//
+
+#import "TableCapabilities+CoreDataProperties.h"
+
+@implementation TableCapabilities (CoreDataProperties)
+
++ (NSFetchRequest<TableCapabilities *> *)fetchRequest {
+	return [[NSFetchRequest alloc] initWithEntityName:@"TableCapabilities"];
+}
+
+@dynamic account;
+@dynamic themingBackground;
+@dynamic themingColor;
+@dynamic themingLogo;
+@dynamic themingName;
+@dynamic themingSlogan;
+@dynamic themingUrl;
+@dynamic versionMajor;
+@dynamic versionMinor;
+@dynamic versionMicro;
+@dynamic versionString;
+
+@end

BIN
iOSClient/Images.xcassets/MoreBackground.imageset/MoreBackground@2x.jpg


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

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

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


BIN
iOSClient/Images.xcassets/PlusClear.imageset/PlusClearpng.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_lite.imageset/Contents.json → iOSClient/Images.xcassets/backgroundDetail.imageset/Contents.json


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_lite.imageset/nextcloud_lite.png → iOSClient/Images.xcassets/backgroundDetail.imageset/nextcloud_lite.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_lite.imageset/nextcloud_lite@2x.png → iOSClient/Images.xcassets/backgroundDetail.imageset/nextcloud_lite@2x.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_lite.imageset/nextcloud_lite@3x.png → iOSClient/Images.xcassets/backgroundDetail.imageset/nextcloud_lite@3x.png


+ 0 - 0
iOSClient/Images.xcassets/buttonWhite.imageset/Contents.json → iOSClient/Images.xcassets/button.imageset/Contents.json


+ 0 - 0
iOSClient/Images.xcassets/buttonWhite.imageset/buttonWhite.png → iOSClient/Images.xcassets/button.imageset/buttonWhite.png


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


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


BIN
iOSClient/Images.xcassets/folderphotocamera.imageset/folder.png


BIN
iOSClient/Images.xcassets/folderphotocamera.imageset/folder@2x.png


BIN
iOSClient/Images.xcassets/folderphotocamera.imageset/folder@3x.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloudLogin.imageset/Contents.json → iOSClient/Images.xcassets/loginLogo.imageset/Contents.json


+ 0 - 0
iOSClient/Images.xcassets/nextcloudLogin.imageset/nextcloudLogin.png → iOSClient/Images.xcassets/loginLogo.imageset/nextcloudLogin.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloudLogin.imageset/nextcloudLogin@2x.png → iOSClient/Images.xcassets/loginLogo.imageset/nextcloudLogin@2x.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloudLogin.imageset/nextcloudLogin@3x.png → iOSClient/Images.xcassets/loginLogo.imageset/nextcloudLogin@3x.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller.imageset/Contents.json → iOSClient/Images.xcassets/navigationLogo.imageset/Contents.json


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller.imageset/nextcloud_navigationcontroller.png → iOSClient/Images.xcassets/navigationLogo.imageset/nextcloud_navigationcontroller.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller.imageset/nextcloud_navigationcontroller@2x.png → iOSClient/Images.xcassets/navigationLogo.imageset/nextcloud_navigationcontroller@2x.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller.imageset/nextcloud_navigationcontroller@3x copia.png → iOSClient/Images.xcassets/navigationLogo.imageset/nextcloud_navigationcontroller@3x copia.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller_offline.imageset/Contents.json → iOSClient/Images.xcassets/navigationLogoOffline.imageset/Contents.json


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller_offline.imageset/nextcloud_navigationcontroller_offline.png → iOSClient/Images.xcassets/navigationLogoOffline.imageset/nextcloud_navigationcontroller_offline.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller_offline.imageset/nextcloud_navigationcontroller_offline@2x.png → iOSClient/Images.xcassets/navigationLogoOffline.imageset/nextcloud_navigationcontroller_offline@2x.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller_offline.imageset/nextcloud_navigationcontroller_offline@3x.png → iOSClient/Images.xcassets/navigationLogoOffline.imageset/nextcloud_navigationcontroller_offline@3x.png


+ 1 - 1
iOSClient/Images.xcassets/buttonBlu.imageset/Contents.json → iOSClient/Images.xcassets/tabBarPlus.imageset/Contents.json

@@ -2,11 +2,11 @@
   "images" : [
     {
       "idiom" : "universal",
-      "filename" : "buttonBlu.png",
       "scale" : "1x"
     },
     {
       "idiom" : "universal",
+      "filename" : "PlusClear@2x.png",
       "scale" : "2x"
     },
     {

+ 0 - 0
iOSClient/Images.xcassets/PlusClear.imageset/PlusClear@2x.png → iOSClient/Images.xcassets/tabBarPlus.imageset/PlusClear@2x.png


+ 0 - 0
iOSClient/Images.xcassets/tabBarPlusNextcloud.imageset/Contents.json → iOSClient/Images.xcassets/tabBarPlusWhite.imageset/Contents.json


+ 0 - 0
iOSClient/Images.xcassets/tabBarPlusNextcloud.imageset/Plus@2x.png → iOSClient/Images.xcassets/tabBarPlusWhite.imageset/Plus@2x.png


+ 1 - 1
iOSClient/Images.xcassets/MoreBackground.imageset/Contents.json → iOSClient/Images.xcassets/themingBackground.imageset/Contents.json

@@ -6,7 +6,7 @@
     },
     {
       "idiom" : "universal",
-      "filename" : "MoreBackground@2x.jpg",
+      "filename" : "themingBackground@2x.png",
       "scale" : "2x"
     },
     {

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


+ 6 - 6
iOSClient/Intro/CCIntro.m

@@ -68,11 +68,11 @@
     EAIntroPage *page1 = [EAIntroPage page];
     page1.title = [CCUtility localizableBrand:@"_intro_1_title_" table:@"Intro"];
     page1.titlePositionY = titlePositionY;
-    page1.titleColor = COLOR_TEXT_ANTHRACITE;
+    page1.titleColor = [UIColor blackColor];
     page1.titleFont = [UIFont systemFontOfSize:20];
     page1.desc = [CCUtility localizableBrand:@"_intro_1_text_" table:@"Intro"];
     page1.descPositionY = descPositionY;
-    page1.descColor = COLOR_TEXT_ANTHRACITE;
+    page1.descColor = [UIColor blackColor];
     page1.descFont = [UIFont systemFontOfSize:14];
     page1.titleIconView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"intro1"]];
     page1.bgImage = [UIImage imageNamed:@"bgbianco"];
@@ -82,11 +82,11 @@
     EAIntroPage *page2 = [EAIntroPage page];
     page2.title = [CCUtility localizableBrand:@"_intro_2_title_" table:@"Intro"];
     page2.titlePositionY = titlePositionY;
-    page2.titleColor = COLOR_TEXT_ANTHRACITE;
+    page2.titleColor = [UIColor blackColor];
     page2.titleFont = [UIFont systemFontOfSize:20];
     page2.desc = [CCUtility localizableBrand:@"_intro_2_text_" table:@"Intro"];
     page2.descPositionY = descPositionY;
-    page2.descColor = COLOR_TEXT_ANTHRACITE;
+    page2.descColor = [UIColor blackColor];
     page2.descFont = [UIFont systemFontOfSize:14];
     page2.titleIconView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"intro2"]];
     page2.bgImage = [UIImage imageNamed:@"bgbianco"];
@@ -96,11 +96,11 @@
     EAIntroPage *page3 = [EAIntroPage page];
     page3.title = [CCUtility localizableBrand:@"_intro_3_title_" table:@"Intro"];
     page3.titlePositionY = titlePositionY;
-    page3.titleColor = COLOR_TEXT_ANTHRACITE;
+    page3.titleColor = [UIColor blackColor];
     page3.titleFont = [UIFont systemFontOfSize:20];
     page3.desc = [CCUtility localizableBrand:@"_intro_3_text_" table:@"Intro"];
     page3.descPositionY = descPositionY;
-    page3.descColor = COLOR_TEXT_ANTHRACITE;
+    page3.descColor = [UIColor blackColor];
     page3.descFont = [UIFont systemFontOfSize:14];
     page3.titleIconView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"intro3"]];
     page3.bgImage = [UIImage imageNamed:@"bgbianco"];

+ 1 - 1
iOSClient/Library/MWPhotoBrowser/MWCaptionView.m

@@ -65,7 +65,7 @@ static const CGFloat labelPadding = 10;
     _label.lineBreakMode = NSLineBreakByWordWrapping;
 
     _label.numberOfLines = 0;
-    _label.textColor = COLOR_TEXT_ANTHRACITE;
+    _label.textColor = [UIColor blackColor];
     _label.font = [UIFont systemFontOfSize:12];
     if ([_photo respondsToSelector:@selector(caption)]) {
         _label.text = [_photo caption] ? [_photo caption] : @" ";

+ 1 - 1
iOSClient/Library/MWPhotoBrowser/MWCommon.h

@@ -9,4 +9,4 @@
 #define SYSTEM_VERSION_GREATER_THAN(v)              ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
 #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
 #define SYSTEM_VERSION_LESS_THAN(v)                 ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
-#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v)     ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
+//#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v)     ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)

+ 11 - 5
iOSClient/Library/MWPhotoBrowser/MWPhotoBrowser.m

@@ -12,6 +12,12 @@
 #import "MWPhotoBrowserPrivate.h"
 #import "UIImage+MWPhotoBrowser.h"
 
+#ifdef CUSTOM_BUILD
+#import "CustomSwift.h"
+#else
+#import "Nextcloud-Swift.h"
+#endif
+
 #define PADDING                  10
 
 #pragma clang diagnostic ignored "-Wundeclared-selector"
@@ -162,8 +168,8 @@ static void * MWVideoPlayerObservation = &MWVideoPlayerObservation;
 	
     // Toolbar
     _toolbar = [[UIToolbar alloc] initWithFrame:[self frameForToolbarAtOrientation:[[UIApplication sharedApplication] statusBarOrientation]]];
-    _toolbar.tintColor = COLOR_TABBAR_TEXT; //TWS
-    _toolbar.barTintColor = COLOR_TABBAR;
+    _toolbar.tintColor = [NCBrandColor sharedInstance].brand; //TWS
+    _toolbar.barTintColor = [NCBrandColor sharedInstance].tabBar;
     [_toolbar setBackgroundImage:nil forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault];
     [_toolbar setBackgroundImage:nil forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsCompact];
     _toolbar.barStyle = UIBarStyleDefault; //TWS
@@ -231,9 +237,9 @@ static void * MWVideoPlayerObservation = &MWVideoPlayerObservation;
     }
     
     // color
-    self.navigationController.navigationBar.barTintColor = COLOR_NAVIGATIONBAR;
-    self.navigationController.navigationBar.tintColor = COLOR_NAVIGATIONBAR_TEXT;
-    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : COLOR_NAVIGATIONBAR_TEXT}];
+    self.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].brand;
+    self.navigationController.navigationBar.tintColor = [NCBrandColor sharedInstance].navigationBarText;
+    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [NCBrandColor sharedInstance].navigationBarText}];
     
     // Toolbar items
     BOOL hasItems = NO;

+ 3 - 0
iOSClient/Library/VFR Pdf Reader/Sources/ReaderViewController.h

@@ -35,6 +35,9 @@
 
 - (void)dismissReaderViewController:(ReaderViewController *)viewController;
 
+//TWS
+- (void)handleSingleTapReader;
+
 @end
 
 @interface ReaderViewController : UIViewController

+ 4 - 3
iOSClient/Library/VFR Pdf Reader/Sources/ReaderViewController.m

@@ -399,9 +399,6 @@
 
 		lastAppearSize = CGSizeZero; // Reset view size tracking
 	}
-    
-    //TWS (IOS7)
-    self.tabBarController.tabBar.hidden = YES;
 }
 
 - (void)viewDidAppear:(BOOL)animated
@@ -562,6 +559,10 @@
 {
 	if (recognizer.state == UIGestureRecognizerStateRecognized)
 	{
+        //TWS
+        if ([self.delegate respondsToSelector:@selector(handleSingleTapReader)])
+            [self.delegate handleSingleTapReader];
+        
 		CGRect viewRect = recognizer.view.bounds; // View bounds
 
 		CGPoint point = [recognizer locationInView:recognizer.view]; // Point

+ 30 - 18
iOSClient/Local storage/CCLocalStorage.m

@@ -24,6 +24,12 @@
 #import "CCLocalStorage.h"
 #import "AppDelegate.h"
 
+#ifdef CUSTOM_BUILD
+#import "CustomSwift.h"
+#else
+#import "Nextcloud-Swift.h"
+#endif
+
 @interface CCLocalStorage ()
 {
     NSArray *dataSource;
@@ -32,6 +38,16 @@
 
 @implementation CCLocalStorage
 
+-  (id)initWithCoder:(NSCoder *)aDecoder
+{
+    if (self = [super initWithCoder:aDecoder])  {
+        
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
+    }
+    
+    return self;
+}
+
 - (void)viewDidLoad
 {
     [super viewDidLoad];
@@ -46,7 +62,7 @@
     _metadata = [CCMetadata new];
     
     self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 1)];
-    self.tableView.separatorColor = COLOR_SEPARATOR_TABLE;
+    self.tableView.separatorColor = [NCBrandColor sharedInstance].seperator;
     self.tableView.emptyDataSetDelegate = self;
     self.tableView.emptyDataSetSource = self;
     self.tableView.allowsMultipleSelectionDuringEditing = NO;
@@ -68,8 +84,8 @@
     [super viewWillAppear:animated];
     
     // Color
-    [CCAspect aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
-    [CCAspect aspectTabBar:self.tabBarController.tabBar hidden:NO];
+    [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
     
     // Plus Button
     [app plusButtonVisibile:true];
@@ -77,14 +93,10 @@
     [self reloadDatasource];
 }
 
-// E' arrivato
-- (void)viewDidAppear:(BOOL)animated
+- (void)changeTheming
 {
-    [super viewDidAppear:animated];        
-}
-
-- (void)didReceiveMemoryWarning {
-    [super didReceiveMemoryWarning];
+    if (self.isViewLoaded && self.view.window)
+        [app changeTheming:self];
 }
 
 #pragma --------------------------------------------------------------------------------------------
@@ -273,12 +285,12 @@
     
     actionSheet.automaticallyTintButtonImages = @(NO);
     
-    actionSheet.encryptedButtonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:COLOR_CRYPTOCLOUD };
-    actionSheet.buttonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:COLOR_TEXT_ANTHRACITE };
-    actionSheet.cancelButtonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:COLOR_BRAND };
-    actionSheet.disableButtonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:COLOR_TEXT_ANTHRACITE };
+    actionSheet.encryptedButtonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:[NCBrandColor sharedInstance].cryptocloud };
+    actionSheet.buttonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:[UIColor blackColor] };
+    actionSheet.cancelButtonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:[NCBrandColor sharedInstance].brand };
+    actionSheet.disableButtonTextAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:[UIColor blackColor] };
     
-    actionSheet.separatorColor = COLOR_SEPARATOR_TABLE;
+    actionSheet.separatorColor = [NCBrandColor sharedInstance].seperator;
     actionSheet.cancelButtonTitle = NSLocalizedString(@"_cancel_",nil);
     
     // assegnamo l'immagine anteprima se esiste, altrimenti metti quella standars
@@ -289,7 +301,7 @@
     
     [actionSheet addButtonWithTitle: metadata.fileNamePrint
                               image: iconHeader
-                    backgroundColor: COLOR_TABBAR
+                    backgroundColor: [NCBrandColor sharedInstance].tabBar
                              height: 50.0
                                type: AHKActionSheetButtonTypeDisabled
                             handler: nil
@@ -403,7 +415,7 @@
     
     // change color selection
     UIView *selectionColor = [[UIView alloc] init];
-    selectionColor.backgroundColor = COLOR_SELECT_BACKGROUND;
+    selectionColor.backgroundColor = [[NCBrandColor sharedInstance] getColorSelectBackgrond];
     cell.selectedBackgroundView = selectionColor;
 
     NSString *cameraFolderName = [CCCoreData getCameraUploadFolderNameActiveAccount:app.activeAccount];
@@ -428,7 +440,7 @@
     
     // encrypted color
     if (metadata.cryptated) {
-        cell.labelTitle.textColor = COLOR_CRYPTOCLOUD;
+        cell.labelTitle.textColor = [NCBrandColor sharedInstance].cryptocloud;
     } else {
         cell.labelTitle.textColor = [UIColor blackColor];
     }

+ 0 - 1
iOSClient/Login/CCLogin.h

@@ -57,7 +57,6 @@ typedef enum {
 
 @property (nonatomic, weak) IBOutlet UILabel *bottomLabel;
 
-
 @property (nonatomic, weak) IBOutlet UIButton *login;
 @property (nonatomic, weak) IBOutlet UIButton *annulla;
 @property (nonatomic, weak) IBOutlet UIButton *toggleVisiblePassword;

+ 21 - 9
iOSClient/Login/CCLogin.m

@@ -26,6 +26,12 @@
 #import "CCUtility.h"
 #import "CCCoreData.h"
 
+#ifdef CUSTOM_BUILD
+#import "CustomSwift.h"
+#else
+#import "Nextcloud-Swift.h"
+#endif
+
 @interface CCLogin ()
 {
     UIAlertView *alertView;
@@ -39,8 +45,8 @@
 {
     [super viewDidLoad];
     
-    self.imageBrand.image = [UIImage imageNamed:image_brandLogin];
-    self.login.backgroundColor = COLOR_BRAND;
+    self.imageBrand.image = [UIImage imageNamed:[NCBrandImages sharedInstance].login];
+    self.login.backgroundColor = [NCBrandColor sharedInstance].customer;
     
     // Bottom label
     self.bottomLabel.text = NSLocalizedString(@"_login_bottom_label_", nil);
@@ -63,13 +69,7 @@
     self.bottomLabel.hidden = YES;
 #endif
     
-    // Brand
-    if (k_option_disable_request_login_url) {
-        
-        _baseUrl.text = k_loginBaseUrl;
-        _imageBaseUrl.hidden = YES;
-        _baseUrl.hidden = YES;
-    }
+    self.annulla.tintColor = [NCBrandColor sharedInstance].customer;
     
     [self.baseUrl setDelegate:self];
     [self.password setDelegate:self];
@@ -79,9 +79,21 @@
     [self.user setFont:[UIFont systemFontOfSize:13]];
     [self.password setFont:[UIFont systemFontOfSize:13]];
     
+    self.imageBaseUrl.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"loginURL"] color:[NCBrandColor sharedInstance].customer];
+    self.imageUser.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"loginUser"] color:[NCBrandColor sharedInstance].customer];
+    self.imagePassword.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"loginPassword"] color:[NCBrandColor sharedInstance].customer];
+
     self.loadingBaseUrl.image = [UIImage animatedImageWithAnimatedGIFURL:[[NSBundle mainBundle] URLForResource: @"loading" withExtension:@"gif"]];
     self.loadingBaseUrl.hidden = YES;
     
+    // Brand
+    if (k_option_disable_request_login_url) {
+        
+        _baseUrl.text = k_loginBaseUrl;
+        _imageBaseUrl.hidden = YES;
+        _baseUrl.hidden = YES;
+    }
+
     if (_loginType == loginAdd) {
         
     }

+ 2 - 3
iOSClient/Login/CCLogin.storyboard

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="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="12088"/>
         <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -91,7 +91,6 @@
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bSU-bn-DlO">
                                 <rect key="frame" x="312" y="20" width="51" height="30"/>
                                 <state key="normal" title="Annulla">
-                                    <color key="titleColor" red="0.21960784310000001" green="0.50196078430000002" blue="0.76470588240000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                     <color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 </state>
                                 <connections>

+ 1 - 1
iOSClient/Login/CCLoginWeb.swift

@@ -35,7 +35,7 @@ public class CCLoginWeb: UIViewController {
             doneButtonVisible = true
         }
         
-        let webVC = SwiftModalWebVC(urlString: k_loginBaseUrl, theme: .custom, color: Constant.GlobalConstants.k_Color_NavigationBar, colorText: Constant.GlobalConstants.k_Color_NavigationBar_Text, doneButtonVisible: doneButtonVisible)
+        let webVC = SwiftModalWebVC(urlString: k_loginBaseUrl, theme: .custom, color: NCBrandColor.sharedInstance.brand, colorText: NCBrandColor.sharedInstance.navigationBarText, doneButtonVisible: doneButtonVisible)
         webVC.delegateWeb = self
 
         vc.present(webVC, animated: false, completion: nil)

+ 50 - 23
iOSClient/Main/CCDetail.m

@@ -22,14 +22,13 @@
 //
 
 #import "CCDetail.h"
-
 #import "AppDelegate.h"
 #import "CCMain.h"
 
 #ifdef CUSTOM_BUILD
-    #import "CustomSwift.h"
+#import "CustomSwift.h"
 #else
-    #import "Nextcloud-Swift.h"
+#import "Nextcloud-Swift.h"
 #endif
 
 #define TOOLBAR_HEIGHT 49.0f
@@ -60,9 +59,8 @@
 {
     if (self = [super initWithCoder:aDecoder])  {
         
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(insertGeocoderLocation:) name:@"insertGeocoderLocation" object:nil];
-        
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(triggerProgressTask:) name:@"NotificationProgressTask" object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
 
         self.metadataDetail = [[CCMetadata alloc] init];
         self.photos = [[NSMutableArray alloc] init];
@@ -85,7 +83,9 @@
 {
     [super viewDidLoad];
     
-    self.imageBackground.image = [UIImage imageNamed:image_brandBackgroundLite];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(insertGeocoderLocation:) name:@"insertGeocoderLocation" object:nil];
+
+    self.imageBackground.image = [UIImage imageNamed:[NCBrandImages sharedInstance].BackgroundDetail];
     
     if ([self.metadataDetail.fileName length] > 0 || [self.metadataDetail.directoryID length] > 0 || [self.metadataDetail.fileID length] > 0) {
     
@@ -189,11 +189,17 @@
     [_toolbar setItems:[NSArray arrayWithObjects: flexible, _buttonDelete, fixedSpaceMini, _buttonShare, fixedSpaceMini, _buttonAction,  nil]];
     [_toolbar setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin];
     
-    _toolbar.barTintColor = COLOR_TABBAR;
+    _toolbar.barTintColor = [NCBrandColor sharedInstance].tabBar;
 
     [self.view addSubview:_toolbar];
 }
 
+- (void)changeTheming
+{
+    if (self.isViewLoaded && self.view.window)
+        [app changeTheming:self];
+}
+
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== UIDocumentInteractionControllerDelegate =====
 #pragma --------------------------------------------------------------------------------------------
@@ -233,7 +239,7 @@
         self.edgesForExtendedLayout = UIRectEdgeBottom;
         [self viewAudio];
         [self createToolbar];
-        [CCAspect aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+        [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
 
     }
     
@@ -246,14 +252,14 @@
             self.edgesForExtendedLayout = UIRectEdgeBottom;
             [self viewPDF:@""];
             [self createToolbar];
-            [CCAspect aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+            [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
 
         } else {
 
             self.edgesForExtendedLayout = UIRectEdgeBottom;
             [self viewDocument];
             [self createToolbar];
-            [CCAspect aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+            [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
         }
     }
 }
@@ -530,7 +536,7 @@
                         
                     } else {
                         
-                        [self.photos replaceObjectAtIndex:index withObject:[MWPhoto photoWithImage:[CCUtility drawText:[NSLocalizedString(@"_loading_", nil) stringByAppendingString:@"..."] inImage:[UIImage imageNamed:image_buttonWhite] colorText:[UIColor lightGrayColor]]]];
+                        [self.photos replaceObjectAtIndex:index withObject:[MWPhoto photoWithImage:[CCUtility drawText:[NSLocalizedString(@"_loading_", nil) stringByAppendingString:@"..."] inImage:[UIImage imageNamed:image_button] colorText:[UIColor lightGrayColor]]]];
                     }
                 }
             }
@@ -559,7 +565,7 @@
                         
                     } else {
                         
-                        [self.photos replaceObjectAtIndex:index withObject:[MWPhoto photoWithImage:[CCUtility drawText:[NSLocalizedString(@"_loading_", nil) stringByAppendingString:@"..."] inImage:[UIImage imageNamed:image_buttonWhite] colorText:[UIColor lightGrayColor]]]];
+                        [self.photos replaceObjectAtIndex:index withObject:[MWPhoto photoWithImage:[CCUtility drawText:[NSLocalizedString(@"_loading_", nil) stringByAppendingString:@"..."] inImage:[UIImage imageNamed:image_button] colorText:[UIColor lightGrayColor]]]];
                     }
                 }
             }
@@ -722,7 +728,7 @@
     if (progress == 0)
         [self.navigationController cancelCCProgress];
     else
-        [self.navigationController setCCProgressPercentage:progress*100 andTintColor:COLOR_NAVIGATIONBAR_PROGRESS];
+        [self.navigationController setCCProgressPercentage:progress*100 andTintColor:[NCBrandColor sharedInstance].navigationBarProgress];
 }
 
 - (void)downloadPhotoBrowserFailure:(NSInteger)errorCode
@@ -778,6 +784,9 @@
 
 - (void)insertGeocoderLocation:(NSNotification *)notification
 {
+    if (notification.userInfo.count == 0)
+        return;
+    
     NSString *fileID = [[notification.userInfo allKeys] objectAtIndex:0];
     //NSDate *date = [[notification.userInfo allValues] objectAtIndex:0];
  
@@ -785,21 +794,18 @@
     if (self.indexNowVisible >= [self.photos count])
         return;
     
-    dispatch_async(dispatch_get_main_queue(), ^{
-        
-        if ([fileID isEqualToString:self.fileIDNowVisible]) {
+    if ([fileID isEqualToString:self.fileIDNowVisible]) {
             
-            MWPhoto *photo = [self.photos objectAtIndex:self.indexNowVisible];
+        MWPhoto *photo = [self.photos objectAtIndex:self.indexNowVisible];
             
-            [self setLocationCaptionPhoto:photo fileID:fileID];
+        [self setLocationCaptionPhoto:photo fileID:fileID];
             
-            if (![self.photoBrowser isGridController]) {
+        if (![self.photoBrowser isGridController]) {
             
-                [self.photoBrowser hideControls];
-                [self.photoBrowser showControls];
-            }
+            //[self.photoBrowser hideControls];
+            //[self.photoBrowser showControls];
         }
-    });
+    }
 }
 
 - (void)setLocationCaptionPhoto:(MWPhoto *)photo fileID:(NSString *)fileID
@@ -935,6 +941,7 @@
     if (documentPDF != nil) {
         
         self.readerPDFViewController = [[ReaderViewController alloc] initWithReaderDocument:documentPDF];
+        self.readerPDFViewController.delegate = self;
         self.readerPDFViewController.view.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height - TOOLBAR_HEIGHT);
         [self.readerPDFViewController updateContentViews];
 
@@ -950,6 +957,19 @@
     }
 }
 
+- (void)handleSingleTapReader
+{
+    self.navigationController.navigationBarHidden = !self.navigationController.navigationBarHidden;
+    _toolbar.hidden = !_toolbar.isHidden;
+    
+    if (_toolbar.isHidden) {
+        self.readerPDFViewController.view.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height);
+    } else {
+        self.readerPDFViewController.view.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height - TOOLBAR_HEIGHT);
+    }
+    [self.readerPDFViewController updateContentViews];
+}
+
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== Delete =====
 #pragma --------------------------------------------------------------------------------------------
@@ -961,6 +981,13 @@
 
 - (void)deleteFileOrFolderSuccess:(CCMetadataNet *)metadataNet
 {
+    // reload Main
+    [app.activeMain reloadDatasource];
+    
+    // If removed document (web) or PDF close
+    if (_webView || _readerPDFViewController)
+        [self removeAllView];
+    
     // if a message for a directory of these
     if (![_dataSourceDirectoryID containsObject:metadataNet.metadata.directoryID])
         return;

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است