marinofaggiana 4 years ago
parent
commit
9aa72579e4
49 changed files with 286 additions and 614 deletions
  1. 1 1
      Cartfile
  2. 2 2
      Cartfile.resolved
  3. 100 382
      Carthage/Checkouts/realm-cocoa/.jenkins.yml
  4. 41 0
      Carthage/Checkouts/realm-cocoa/CHANGELOG.md
  5. 5 2
      Carthage/Checkouts/realm-cocoa/Configuration/Base.xcconfig
  6. 1 1
      Carthage/Checkouts/realm-cocoa/Configuration/Realm/Realm iOS static.xcconfig
  7. 1 1
      Carthage/Checkouts/realm-cocoa/Configuration/Realm/Tests iOS static.xcconfig
  8. 1 1
      Carthage/Checkouts/realm-cocoa/Configuration/TestHost.xcconfig
  9. 2 7
      Carthage/Checkouts/realm-cocoa/Jenkinsfile.releasability
  10. 1 1
      Carthage/Checkouts/realm-cocoa/Realm.podspec
  11. 3 3
      Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/CMake/RealmCore.cmake
  12. 4 1
      Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/thread_safe_reference.cpp
  13. 3 0
      Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/thread_safe_reference.hpp
  14. 10 0
      Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/thread_safe_reference.cpp
  15. 1 1
      Carthage/Checkouts/realm-cocoa/Realm/RLMRealm+Sync.h
  16. 1 1
      Carthage/Checkouts/realm-cocoa/Realm/RLMRealm.h
  17. 1 1
      Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration+Sync.h
  18. 1 1
      Carthage/Checkouts/realm-cocoa/Realm/RLMSyncCredentials.h
  19. 1 1
      Carthage/Checkouts/realm-cocoa/Realm/RLMSyncManager.h
  20. 1 1
      Carthage/Checkouts/realm-cocoa/Realm/RLMSyncSession.h
  21. 3 3
      Carthage/Checkouts/realm-cocoa/Realm/RLMSyncUser.h
  22. 2 2
      Carthage/Checkouts/realm-cocoa/Realm/Realm-Info.plist
  23. 2 0
      Carthage/Checkouts/realm-cocoa/Realm/Tests/KVOTests.mm
  24. 1 0
      Carthage/Checkouts/realm-cocoa/Realm/Tests/MigrationTests.mm
  25. 1 1
      Carthage/Checkouts/realm-cocoa/RealmSwift.podspec
  26. 0 70
      Carthage/Checkouts/realm-cocoa/RealmSwift/List.swift
  27. 0 2
      Carthage/Checkouts/realm-cocoa/RealmSwift/Optional.swift
  28. 0 8
      Carthage/Checkouts/realm-cocoa/RealmSwift/RealmConfiguration.swift
  29. 0 2
      Carthage/Checkouts/realm-cocoa/RealmSwift/Results.swift
  30. 14 14
      Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/KVOTests.swift
  31. 2 10
      Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ListTests.swift
  32. 2 2
      Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/PrimitiveListTests.swift
  33. 13 13
      Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/RealmTests.swift
  34. 11 11
      Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/TestCase.swift
  35. 22 38
      Carthage/Checkouts/realm-cocoa/build.sh
  36. 3 3
      Carthage/Checkouts/realm-cocoa/dependencies.list
  37. 1 1
      Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/Podfile
  38. 1 1
      Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/Podfile
  39. 1 1
      Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/Podfile
  40. 1 1
      Carthage/Checkouts/realm-cocoa/examples/ios/objc/Podfile
  41. 1 1
      Carthage/Checkouts/realm-cocoa/scripts/package_examples.rb
  42. 5 3
      Carthage/Checkouts/realm-cocoa/scripts/reset-simulators.rb
  43. 1 1
      Share/NCSelectDestination.m
  44. 1 1
      iOSClient/AppDelegate.m
  45. 1 1
      iOSClient/Database/NCManageDatabase.swift
  46. 3 3
      iOSClient/Favorites/CCFavorites.m
  47. 3 3
      iOSClient/Main/CCMain.m
  48. 2 2
      iOSClient/Synchronize/CCSynchronize.m
  49. 8 8
      iOSClient/Transfers/CCTransfers.m

+ 1 - 1
Cartfile

@@ -4,7 +4,7 @@ github "kishikawakatsumi/UICKeyChainStore" "v2.1.2"
 github "MortimerGoro/MGSwipeTableCell" "1.6.8"
 github "dzenbot/DZNEmptyDataSet" "v1.8.1"
 github "jdg/MBProgressHUD" "1.1.0"
-github "realm/realm-cocoa" "v5.1.0"
+github "realm/realm-cocoa" 
 github "SVGKit/SVGKit" "3.x"
 github "WeTransfer/WeScan" "1.2.0"
 github "malcommac/SwiftRichString"

+ 2 - 2
Cartfile.resolved

@@ -3,7 +3,7 @@ github "AssistoLab/DropDown" "v2.3.13"
 github "CocoaLumberjack/CocoaLumberjack" "3.6.1"
 github "FabrizioBrancati/Queuer" "2.1.1"
 github "MortimerGoro/MGSwipeTableCell" "1.6.8"
-github "SVGKit/SVGKit" "7831fc2f778c7b1aadf8336ba09508e185ef9b83"
+github "SVGKit/SVGKit" "2a4068f0ea546dcd82f7e4dd9aa9026c0a0a2235"
 github "SwiftyJSON/SwiftyJSON" "5.0.0"
 github "WeTransfer/WeScan" "1.2.0"
 github "WenchaoD/FSCalendar" "2.8.0"
@@ -20,7 +20,7 @@ github "marinofaggiana/KTVHTTPCache" "2.0.2"
 github "marinofaggiana/TOPasscodeViewController" "0.0.7"
 github "marinofaggiana/XLForm" "eb9381ad8129f60402bf412250fb31b95a628a08"
 github "nextcloud/ios-communication-library" "v0.71"
-github "realm/realm-cocoa" "v5.1.0"
+github "realm/realm-cocoa" "v5.2.0"
 github "rechsteiner/Parchment" "v1.7.0"
 github "scenee/FloatingPanel" "v1.7.5"
 github "tilltue/TLPhotoPicker" "2.0.11"

+ 100 - 382
Carthage/Checkouts/realm-cocoa/.jenkins.yml

@@ -4,12 +4,10 @@
 # This is a generated file produced by scripts/pr-ci-matrix.rb.
 
 xcode_version: 
- - 10.3
- - 11.1
- - 11.2.1
  - 11.3
  - 11.4.1
  - 11.5
+ - 12.0
 target: 
  - docs
  - swiftlint
@@ -40,30 +38,6 @@ configuration:
 
 exclude:
 
-  - xcode_version: 10.3
-    target: docs
-    configuration: Debug
-
-  - xcode_version: 10.3
-    target: docs
-    configuration: Release
-
-  - xcode_version: 11.1
-    target: docs
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: docs
-    configuration: Release
-
-  - xcode_version: 11.2.1
-    target: docs
-    configuration: Debug
-
-  - xcode_version: 11.2.1
-    target: docs
-    configuration: Release
-
   - xcode_version: 11.3
     target: docs
     configuration: Debug
@@ -84,30 +58,14 @@ exclude:
     target: docs
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: swiftlint
-    configuration: Debug
-
-  - xcode_version: 10.3
-    target: swiftlint
-    configuration: Release
-
-  - xcode_version: 11.1
-    target: swiftlint
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: swiftlint
+  - xcode_version: 11.5
+    target: docs
     configuration: Release
 
-  - xcode_version: 11.2.1
-    target: swiftlint
+  - xcode_version: 12.0
+    target: docs
     configuration: Debug
 
-  - xcode_version: 11.2.1
-    target: swiftlint
-    configuration: Release
-
   - xcode_version: 11.3
     target: swiftlint
     configuration: Debug
@@ -128,34 +86,18 @@ exclude:
     target: swiftlint
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: osx-encryption
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: osx-encryption
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: osx-encryption
+  - xcode_version: 11.5
+    target: swiftlint
     configuration: Release
 
-  - xcode_version: 11.2.1
-    target: osx-encryption
+  - xcode_version: 12.0
+    target: swiftlint
     configuration: Debug
 
-  - xcode_version: 11.2.1
-    target: osx-encryption
-    configuration: Release
-
   - xcode_version: 11.3
     target: osx-encryption
     configuration: Debug
 
-  - xcode_version: 11.3
-    target: osx-encryption
-    configuration: Release
-
   - xcode_version: 11.4.1
     target: osx-encryption
     configuration: Debug
@@ -168,34 +110,18 @@ exclude:
     target: osx-encryption
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: osx-object-server
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: osx-object-server
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: osx-object-server
+  - xcode_version: 11.5
+    target: osx-encryption
     configuration: Release
 
-  - xcode_version: 11.2.1
-    target: osx-object-server
+  - xcode_version: 12.0
+    target: osx-encryption
     configuration: Debug
 
-  - xcode_version: 11.2.1
-    target: osx-object-server
-    configuration: Release
-
   - xcode_version: 11.3
     target: osx-object-server
     configuration: Debug
 
-  - xcode_version: 11.3
-    target: osx-object-server
-    configuration: Release
-
   - xcode_version: 11.4.1
     target: osx-object-server
     configuration: Debug
@@ -208,34 +134,18 @@ exclude:
     target: osx-object-server
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: ios-static
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: ios-static
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: ios-static
+  - xcode_version: 11.5
+    target: osx-object-server
     configuration: Release
 
-  - xcode_version: 11.2.1
-    target: ios-static
+  - xcode_version: 12.0
+    target: osx-object-server
     configuration: Debug
 
-  - xcode_version: 11.2.1
-    target: ios-static
-    configuration: Release
-
   - xcode_version: 11.3
     target: ios-static
     configuration: Debug
 
-  - xcode_version: 11.3
-    target: ios-static
-    configuration: Release
-
   - xcode_version: 11.4.1
     target: ios-static
     configuration: Debug
@@ -248,34 +158,18 @@ exclude:
     target: ios-static
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: ios-dynamic
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: ios-dynamic
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: ios-dynamic
+  - xcode_version: 11.5
+    target: ios-static
     configuration: Release
 
-  - xcode_version: 11.2.1
-    target: ios-dynamic
+  - xcode_version: 12.0
+    target: ios-static
     configuration: Debug
 
-  - xcode_version: 11.2.1
-    target: ios-dynamic
-    configuration: Release
-
   - xcode_version: 11.3
     target: ios-dynamic
     configuration: Debug
 
-  - xcode_version: 11.3
-    target: ios-dynamic
-    configuration: Release
-
   - xcode_version: 11.4.1
     target: ios-dynamic
     configuration: Debug
@@ -288,34 +182,18 @@ exclude:
     target: ios-dynamic
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: watchos
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: watchos
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: watchos
+  - xcode_version: 11.5
+    target: ios-dynamic
     configuration: Release
 
-  - xcode_version: 11.2.1
-    target: watchos
+  - xcode_version: 12.0
+    target: ios-dynamic
     configuration: Debug
 
-  - xcode_version: 11.2.1
-    target: watchos
-    configuration: Release
-
   - xcode_version: 11.3
     target: watchos
     configuration: Debug
 
-  - xcode_version: 11.3
-    target: watchos
-    configuration: Release
-
   - xcode_version: 11.4.1
     target: watchos
     configuration: Debug
@@ -328,34 +206,18 @@ exclude:
     target: watchos
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: tvos
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: tvos
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: tvos
+  - xcode_version: 11.5
+    target: watchos
     configuration: Release
 
-  - xcode_version: 11.2.1
-    target: tvos
+  - xcode_version: 12.0
+    target: watchos
     configuration: Debug
 
-  - xcode_version: 11.2.1
-    target: tvos
-    configuration: Release
-
   - xcode_version: 11.3
     target: tvos
     configuration: Debug
 
-  - xcode_version: 11.3
-    target: tvos
-    configuration: Release
-
   - xcode_version: 11.4.1
     target: tvos
     configuration: Debug
@@ -368,34 +230,18 @@ exclude:
     target: tvos
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: ios-swift
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: ios-swift
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: ios-swift
+  - xcode_version: 11.5
+    target: tvos
     configuration: Release
 
-  - xcode_version: 11.2.1
-    target: ios-swift
+  - xcode_version: 12.0
+    target: tvos
     configuration: Debug
 
-  - xcode_version: 11.2.1
-    target: ios-swift
-    configuration: Release
-
   - xcode_version: 11.3
     target: ios-swift
     configuration: Debug
 
-  - xcode_version: 11.3
-    target: ios-swift
-    configuration: Release
-
   - xcode_version: 11.4.1
     target: ios-swift
     configuration: Debug
@@ -408,34 +254,18 @@ exclude:
     target: ios-swift
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: tvos-swift
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: tvos-swift
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: tvos-swift
+  - xcode_version: 11.5
+    target: ios-swift
     configuration: Release
 
-  - xcode_version: 11.2.1
-    target: tvos-swift
+  - xcode_version: 12.0
+    target: ios-swift
     configuration: Debug
 
-  - xcode_version: 11.2.1
-    target: tvos-swift
-    configuration: Release
-
   - xcode_version: 11.3
     target: tvos-swift
     configuration: Debug
 
-  - xcode_version: 11.3
-    target: tvos-swift
-    configuration: Release
-
   - xcode_version: 11.4.1
     target: tvos-swift
     configuration: Debug
@@ -448,44 +278,36 @@ exclude:
     target: tvos-swift
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: catalyst
-    configuration: Debug
-
-  - xcode_version: 10.3
-    target: catalyst
+  - xcode_version: 11.5
+    target: tvos-swift
     configuration: Release
 
-  - xcode_version: 11.1
-    target: catalyst
+  - xcode_version: 12.0
+    target: tvos-swift
     configuration: Debug
 
-  - xcode_version: 11.2.1
+  - xcode_version: 11.3
     target: catalyst
     configuration: Debug
 
-  - xcode_version: 11.3
+  - xcode_version: 11.4.1
     target: catalyst
     configuration: Debug
 
   - xcode_version: 11.4.1
     target: catalyst
-    configuration: Debug
+    configuration: Release
 
-  - xcode_version: 10.3
-    target: catalyst-swift
+  - xcode_version: 11.5
+    target: catalyst
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: catalyst-swift
+  - xcode_version: 11.5
+    target: catalyst
     configuration: Release
 
-  - xcode_version: 11.1
-    target: catalyst-swift
-    configuration: Debug
-
-  - xcode_version: 11.2.1
-    target: catalyst-swift
+  - xcode_version: 12.0
+    target: catalyst
     configuration: Debug
 
   - xcode_version: 11.3
@@ -496,30 +318,22 @@ exclude:
     target: catalyst-swift
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: xcframework
-    configuration: Debug
-
-  - xcode_version: 10.3
-    target: xcframework
+  - xcode_version: 11.4.1
+    target: catalyst-swift
     configuration: Release
 
-  - xcode_version: 11.1
-    target: xcframework
+  - xcode_version: 11.5
+    target: catalyst-swift
     configuration: Debug
 
-  - xcode_version: 11.1
-    target: xcframework
+  - xcode_version: 11.5
+    target: catalyst-swift
     configuration: Release
 
-  - xcode_version: 11.2.1
-    target: xcframework
+  - xcode_version: 12.0
+    target: catalyst-swift
     configuration: Debug
 
-  - xcode_version: 11.2.1
-    target: xcframework
-    configuration: Release
-
   - xcode_version: 11.3
     target: xcframework
     configuration: Debug
@@ -540,16 +354,12 @@ exclude:
     target: xcframework
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: cocoapods-osx
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: cocoapods-osx
-    configuration: Debug
+  - xcode_version: 11.5
+    target: xcframework
+    configuration: Release
 
-  - xcode_version: 11.2.1
-    target: cocoapods-osx
+  - xcode_version: 12.0
+    target: xcframework
     configuration: Debug
 
   - xcode_version: 11.3
@@ -564,34 +374,14 @@ exclude:
     target: cocoapods-osx
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: cocoapods-ios
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: cocoapods-ios
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: cocoapods-ios
-    configuration: Release
-
-  - xcode_version: 11.2.1
-    target: cocoapods-ios
+  - xcode_version: 12.0
+    target: cocoapods-osx
     configuration: Debug
 
-  - xcode_version: 11.2.1
-    target: cocoapods-ios
-    configuration: Release
-
   - xcode_version: 11.3
     target: cocoapods-ios
     configuration: Debug
 
-  - xcode_version: 11.3
-    target: cocoapods-ios
-    configuration: Release
-
   - xcode_version: 11.4.1
     target: cocoapods-ios
     configuration: Debug
@@ -604,34 +394,18 @@ exclude:
     target: cocoapods-ios
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: cocoapods-ios-dynamic
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: cocoapods-ios-dynamic
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: cocoapods-ios-dynamic
+  - xcode_version: 11.5
+    target: cocoapods-ios
     configuration: Release
 
-  - xcode_version: 11.2.1
-    target: cocoapods-ios-dynamic
+  - xcode_version: 12.0
+    target: cocoapods-ios
     configuration: Debug
 
-  - xcode_version: 11.2.1
-    target: cocoapods-ios-dynamic
-    configuration: Release
-
   - xcode_version: 11.3
     target: cocoapods-ios-dynamic
     configuration: Debug
 
-  - xcode_version: 11.3
-    target: cocoapods-ios-dynamic
-    configuration: Release
-
   - xcode_version: 11.4.1
     target: cocoapods-ios-dynamic
     configuration: Debug
@@ -644,34 +418,18 @@ exclude:
     target: cocoapods-ios-dynamic
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: cocoapods-watchos
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: cocoapods-watchos
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: cocoapods-watchos
+  - xcode_version: 11.5
+    target: cocoapods-ios-dynamic
     configuration: Release
 
-  - xcode_version: 11.2.1
-    target: cocoapods-watchos
+  - xcode_version: 12.0
+    target: cocoapods-ios-dynamic
     configuration: Debug
 
-  - xcode_version: 11.2.1
-    target: cocoapods-watchos
-    configuration: Release
-
   - xcode_version: 11.3
     target: cocoapods-watchos
     configuration: Debug
 
-  - xcode_version: 11.3
-    target: cocoapods-watchos
-    configuration: Release
-
   - xcode_version: 11.4.1
     target: cocoapods-watchos
     configuration: Debug
@@ -684,20 +442,12 @@ exclude:
     target: cocoapods-watchos
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: swiftpm
-    configuration: Debug
-
-  - xcode_version: 10.3
-    target: swiftpm
+  - xcode_version: 11.5
+    target: cocoapods-watchos
     configuration: Release
 
-  - xcode_version: 11.1
-    target: swiftpm
-    configuration: Debug
-
-  - xcode_version: 11.2.1
-    target: swiftpm
+  - xcode_version: 12.0
+    target: cocoapods-watchos
     configuration: Debug
 
   - xcode_version: 11.3
@@ -708,30 +458,22 @@ exclude:
     target: swiftpm
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: swiftpm-address
-    configuration: Debug
-
-  - xcode_version: 10.3
-    target: swiftpm-address
+  - xcode_version: 11.4.1
+    target: swiftpm
     configuration: Release
 
-  - xcode_version: 11.1
-    target: swiftpm-address
+  - xcode_version: 11.5
+    target: swiftpm
     configuration: Debug
 
-  - xcode_version: 11.1
-    target: swiftpm-address
+  - xcode_version: 11.5
+    target: swiftpm
     configuration: Release
 
-  - xcode_version: 11.2.1
-    target: swiftpm-address
+  - xcode_version: 12.0
+    target: swiftpm
     configuration: Debug
 
-  - xcode_version: 11.2.1
-    target: swiftpm-address
-    configuration: Release
-
   - xcode_version: 11.3
     target: swiftpm-address
     configuration: Debug
@@ -752,30 +494,14 @@ exclude:
     target: swiftpm-address
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: swiftpm-thread
-    configuration: Debug
-
-  - xcode_version: 10.3
-    target: swiftpm-thread
-    configuration: Release
-
-  - xcode_version: 11.1
-    target: swiftpm-thread
-    configuration: Debug
-
-  - xcode_version: 11.1
-    target: swiftpm-thread
+  - xcode_version: 11.5
+    target: swiftpm-address
     configuration: Release
 
-  - xcode_version: 11.2.1
-    target: swiftpm-thread
+  - xcode_version: 12.0
+    target: swiftpm-address
     configuration: Debug
 
-  - xcode_version: 11.2.1
-    target: swiftpm-thread
-    configuration: Release
-
   - xcode_version: 11.3
     target: swiftpm-thread
     configuration: Debug
@@ -796,46 +522,38 @@ exclude:
     target: swiftpm-thread
     configuration: Debug
 
-  - xcode_version: 10.3
-    target: swiftpm-ios
-    configuration: Debug
-
-  - xcode_version: 10.3
-    target: swiftpm-ios
+  - xcode_version: 11.5
+    target: swiftpm-thread
     configuration: Release
 
-  - xcode_version: 11.1
-    target: swiftpm-ios
+  - xcode_version: 12.0
+    target: swiftpm-thread
     configuration: Debug
 
-  - xcode_version: 11.1
-    target: swiftpm-ios
-    configuration: Release
-
-  - xcode_version: 11.2.1
+  - xcode_version: 11.3
     target: swiftpm-ios
     configuration: Debug
 
-  - xcode_version: 11.2.1
+  - xcode_version: 11.3
     target: swiftpm-ios
     configuration: Release
 
-  - xcode_version: 11.3
+  - xcode_version: 11.4.1
     target: swiftpm-ios
     configuration: Debug
 
-  - xcode_version: 11.3
+  - xcode_version: 11.4.1
     target: swiftpm-ios
     configuration: Release
 
-  - xcode_version: 11.4.1
+  - xcode_version: 11.5
     target: swiftpm-ios
     configuration: Debug
 
-  - xcode_version: 11.4.1
+  - xcode_version: 11.5
     target: swiftpm-ios
     configuration: Release
 
-  - xcode_version: 11.5
+  - xcode_version: 12.0
     target: swiftpm-ios
     configuration: Debug

+ 41 - 0
Carthage/Checkouts/realm-cocoa/CHANGELOG.md

@@ -1,3 +1,44 @@
+5.2.0 Release notes (2020-06-30)
+=============================================================
+
+Xcode 11.3 and iOS 9 are now the minimum supported versions.
+
+### Enhancements
+
+* Add support for building with Xcode 12 beta 1. watchOS currently requires
+  removing x86_64 from the supported architectures. Support for the new 64-bit
+  watch simulator will come in a future release.
+
+### Fixed
+
+* Opening a Realm file in file format v6 (created by Realm Cocoa versions
+  between 2.4 and 2.10) would crash. (Since 5.0.0, [Core #3764](https://github.com/realm/realm-core/issues/3764)).
+* Upgrading v9 (pre-5.0) Realm files would create a redundant search index for
+  primary key properties. This index would then be removed the next time the
+  Realm was opened, resulting in some extra i/o in the upgrade process.
+  (Since 5.0.0, [Core #3787](https://github.com/realm/realm-core/issues/3787)).
+* Fixed a performance issue with upgrading v9 files with search indexes on
+  non-primary-key properties. (Since 5.0.0, [Core #3767](https://github.com/realm/realm-core/issues/3767)).
+* `List.index(of:)` would give incorrect results if it was the very first thing
+  called on that List after a Realm was refreshed following a write which
+  modified the List. (Since 5.0.0, [#6606](https://github.com/realm/realm-cocoa/issues/6606)).
+* If a ThreadSafeReference was the only remaining reference to a Realm,
+  multiple copies of the file could end up mapped into memory at once. This
+  probably did not have any symptoms other than increased memory usage. (Since 5.0.0).
+
+### Compatibility
+
+* File format: Generates Realms with format v10 (Reads and upgrades all previous formats)
+* Realm Object Server: 3.21.0 or later.
+* Realm Studio: 3.11 or later.
+* APIs are backwards compatible with all previous releases in the 5.x.y series.
+* Carthage release for Swift is built with Xcode 11.5.
+
+### Internal
+
+* Upgraded realm-core from v6.0.6 to v6.0.8
+* Upgraded realm-sync from v5.0.5 to v5.0.7
+
 5.1.0 Release notes (2020-06-22)
 =============================================================
 

+ 5 - 2
Carthage/Checkouts/realm-cocoa/Configuration/Base.xcconfig

@@ -24,6 +24,7 @@ CLANG_WARN_STRICT_PROTOTYPES = YES;
 CLANG_WARN_SUSPICIOUS_MOVE = YES;
 CLANG_WARN_UNREACHABLE_CODE = YES;
 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
 COMBINE_HIDPI_IMAGES = YES;
 ENABLE_STRICT_OBJC_MSGSEND = YES;
 GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -57,10 +58,12 @@ CODE_SIGN_IDENTITY[sdk=iphone*] = iPhone Developer;
 CODE_SIGNING_REQUIRED[sdk=macosx] = NO;
 
 MACOSX_DEPLOYMENT_TARGET = 10.9;
-IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 WATCHOS_DEPLOYMENT_TARGET = 2.0;
 TVOS_DEPLOYMENT_TARGET = 9.0;
 
-SWIFT_VERSION = 4.0;
+VALID_ARCHS[sdk=watchsimulator*] = i386;
+
+SWIFT_VERSION = 5.0;
 TARGETED_DEVICE_FAMILY = 1,2,3,4;
 SDKROOT = $(REALM_SDKROOT);

+ 1 - 1
Carthage/Checkouts/realm-cocoa/Configuration/Realm/Realm iOS static.xcconfig

@@ -2,7 +2,7 @@
 
 SUPPORTED_PLATFORMS = iphoneos iphonesimulator;
 TARGETED_DEVICE_FAMILY = 1,2;
-IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 
 MACH_O_TYPE = staticlib;
 EXECUTABLE_NAME = Realm;

+ 1 - 1
Carthage/Checkouts/realm-cocoa/Configuration/Realm/Tests iOS static.xcconfig

@@ -2,6 +2,6 @@
 
 CONFIGURATION_BUILD_DIR = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)-static;
 CONFIGURATION_TEMP_DIR = $(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)-static;
-IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 
 TEST_HOST[sdk=iphone*] = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)-static/TestHost static.app/TestHost static;

+ 1 - 1
Carthage/Checkouts/realm-cocoa/Configuration/TestHost.xcconfig

@@ -22,4 +22,4 @@ PRINCIPAL_CLASS[sdk=iphone*] = UIApplication;
 PRINCIPAL_CLASS[sdk=appletv*] = UIApplication;
 PRINCIPAL_CLASS[sdk=macosx*] = NSApplication;
 
-IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+IPHONEOS_DEPLOYMENT_TARGET = 9.0;

+ 2 - 7
Carthage/Checkouts/realm-cocoa/Jenkinsfile.releasability

@@ -1,9 +1,9 @@
-xcodeVersions = ['10.3', '11.1', '11.2.1', '11.3', '11.4.1', '11.5']
+xcodeVersions = ['11.3', '11.4.1', '11.5']
 platforms = ['osx', 'ios', 'watchos', 'tvos', 'catalyst']
 carthagePlatforms = ['osx', 'ios', 'watchos', 'tvos']
 platformNames = ['osx': 'macOS', 'ios': 'iOS', 'watchos': 'watchOS', 'tvos': 'tvOS', 'catalyst': 'Catalyst']
 carthageXcodeVersion = '11.5'
-objcXcodeVersion = '10.3'
+objcXcodeVersion = '11.3'
 docsSwiftVersion = '5.2.4'
 
 def installationTest(platform, test, language) {
@@ -163,11 +163,6 @@ def doBuild() {
             unstash "${platform}-${objcXcodeVersion}"
           }
 
-          // The 10.x builds don't actually have a framework for catalyst, so
-          // use the 11.0 version instead
-          unstash 'catalyst-11.1'
-          sh "mv realm-framework-catalyst-11.1.zip realm-framework-catalyst-${objcXcodeVersion}.zip"
-
           unstash 'ios-static'
           unstash 'examples'
           unstash 'source'

+ 1 - 1
Carthage/Checkouts/realm-cocoa/Realm.podspec

@@ -95,7 +95,7 @@ Pod::Spec.new do |s|
                               }
   s.preserve_paths          = %w(build.sh include)
 
-  s.ios.deployment_target   = '8.0'
+  s.ios.deployment_target   = '9.0'
   s.ios.vendored_library    = 'core/librealmcore-ios.a'
 
   s.osx.deployment_target   = '10.9'

+ 3 - 3
Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/CMake/RealmCore.cmake

@@ -200,7 +200,7 @@ function(download_realm_core core_version)
     set_property(TARGET realm PROPERTY IMPORTED_LOCATION_RELEASE ${core_library_release})
     set_property(TARGET realm PROPERTY IMPORTED_LOCATION ${core_library_release})
 
-    set_property(TARGET realm PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads ${CRYPTO_LIBRARIES})
+    set_property(TARGET realm PROPERTY INTERFACE_LINK_LIBRARIES ${CRYPTO_LIBRARIES} Threads::Threads)
 
     # Create directories that are included in INTERFACE_INCLUDE_DIRECTORIES, as CMake requires they exist at
     # configure time, when they'd otherwise not be created until we download and extract core.
@@ -223,8 +223,8 @@ macro(build_realm_core)
         BUILD_IN_SOURCE 1
         UPDATE_DISCONNECTED 1
         INSTALL_COMMAND ""
-        CONFIGURE_COMMAND cmake -B build.debug -DOpenSSL_DIR="${CMAKE_BINARY_DIR}/openssl/lib/cmake/OpenSSL" -D CMAKE_BUILD_TYPE=Debug ${CORE_SANITIZER_FLAGS} -G Ninja
-                       && cmake -B build.release -DOpenSSL_DIR="${CMAKE_BINARY_DIR}/openssl/lib/cmake/OpenSSL" -D CMAKE_BUILD_TYPE=RelWithDebInfo ${CORE_SANITIZER_FLAGS} -G Ninja
+        CONFIGURE_COMMAND cmake -B build.debug -DOpenSSL_DIR=${CMAKE_BINARY_DIR}/openssl/lib/cmake/OpenSSL -D CMAKE_BUILD_TYPE=Debug ${CORE_SANITIZER_FLAGS} -G Ninja
+                       && cmake -B build.release -DOpenSSL_DIR=${CMAKE_BINARY_DIR}/openssl/lib/cmake/OpenSSL -D CMAKE_BUILD_TYPE=RelWithDebInfo ${CORE_SANITIZER_FLAGS} -G Ninja
                        
         BUILD_COMMAND cmake --build build.debug --target Storage --target QueryParser
                    && cmake --build build.release --target Storage --target QueryParser

+ 4 - 1
Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/thread_safe_reference.cpp

@@ -24,6 +24,8 @@
 #include "results.hpp"
 #include "shared_realm.hpp"
 
+#include "impl/realm_coordinator.hpp"
+
 #include <realm/db.hpp>
 #include <realm/keys.hpp>
 
@@ -33,6 +35,7 @@ public:
     virtual ~Payload() = default;
     Payload(Realm& realm)
     : m_transaction(realm.is_in_read_transaction() ? realm.duplicate() : nullptr)
+    , m_coordinator(Realm::Internal::get_coordinator(realm).shared_from_this())
     , m_created_in_write_transaction(realm.is_in_transaction())
     {
     }
@@ -43,7 +46,7 @@ protected:
     const TransactionRef m_transaction;
 
 private:
-    const VersionID m_target_version;
+    const std::shared_ptr<_impl::RealmCoordinator> m_coordinator;
     const bool m_created_in_write_transaction;
 };
 

+ 3 - 0
Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/thread_safe_reference.hpp

@@ -51,6 +51,9 @@ private:
     template<typename> class PayloadImpl;
     std::unique_ptr<Payload> m_payload;
 };
+
+template<> ThreadSafeReference::ThreadSafeReference(std::shared_ptr<Realm> const&);
+template<> std::shared_ptr<Realm> ThreadSafeReference::resolve(std::shared_ptr<Realm> const&);
 }
 
 #endif /* REALM_OS_THREAD_SAFE_REFERENCE_HPP */

+ 10 - 0
Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/thread_safe_reference.cpp

@@ -31,6 +31,7 @@
 #include "util/scheduler.hpp"
 
 #include "impl/object_accessor_impl.hpp"
+#include "impl/realm_coordinator.hpp"
 
 #include <realm/db.hpp>
 #include <realm/history.hpp>
@@ -858,10 +859,19 @@ TEST_CASE("thread safe reference") {
     SECTION("lifetime") {
         SECTION("retains source realm") { // else version will become unpinned
             auto ref = ThreadSafeReference(foo);
+            foo = {};
             r = nullptr;
             r = Realm::get_shared_realm(config);
             REQUIRE_NOTHROW(ref.resolve<Object>(r));
         }
+
+        SECTION("retains source RealmCoordinator") {
+            auto ref = ThreadSafeReference(foo);
+            auto coordinator = _impl::RealmCoordinator::get_existing_coordinator(config.path).get();
+            foo = {};
+            r = nullptr;
+            REQUIRE(coordinator == _impl::RealmCoordinator::get_existing_coordinator(config.path).get());
+        }
     }
 
     SECTION("metadata") {

+ 1 - 1
Carthage/Checkouts/realm-cocoa/Realm/RLMRealm+Sync.h

@@ -18,7 +18,7 @@
 
 #import <Foundation/Foundation.h>
 
-#import "RLMRealm.h"
+#import <Realm/RLMRealm.h>
 
 @class RLMResults, RLMSyncSession;
 

+ 1 - 1
Carthage/Checkouts/realm-cocoa/Realm/RLMRealm.h

@@ -17,7 +17,7 @@
 ////////////////////////////////////////////////////////////////////////////
 
 #import <Foundation/Foundation.h>
-#import "RLMConstants.h"
+#import <Realm/RLMConstants.h>
 
 @class RLMRealmConfiguration, RLMRealm, RLMObject, RLMSchema, RLMMigration, RLMNotificationToken, RLMThreadSafeReference, RLMAsyncOpenTask;
 struct RLMRealmPrivileges;

+ 1 - 1
Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration+Sync.h

@@ -18,7 +18,7 @@
 
 #import <Realm/RLMRealmConfiguration.h>
 
-#import "RLMSyncUtil.h"
+#import <Realm/RLMSyncUtil.h>
 
 @class RLMSyncConfiguration;
 

+ 1 - 1
Carthage/Checkouts/realm-cocoa/Realm/RLMSyncCredentials.h

@@ -18,7 +18,7 @@
 
 #import <Foundation/Foundation.h>
 
-#import "RLMSyncUtil.h"
+#import <Realm/RLMSyncUtil.h>
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 1 - 1
Carthage/Checkouts/realm-cocoa/Realm/RLMSyncManager.h

@@ -18,7 +18,7 @@
 
 #import <Foundation/Foundation.h>
 
-#import "RLMSyncUtil.h"
+#import <Realm/RLMSyncUtil.h>
 
 @class RLMSyncSession, RLMSyncTimeoutOptions;
 

+ 1 - 1
Carthage/Checkouts/realm-cocoa/Realm/RLMSyncSession.h

@@ -18,7 +18,7 @@
 
 #import <Foundation/Foundation.h>
 
-#import "RLMRealm.h"
+#import <Realm/RLMRealm.h>
 
 /**
  The current state of the session represented by a session object.

+ 3 - 3
Carthage/Checkouts/realm-cocoa/Realm/RLMSyncUser.h

@@ -18,9 +18,9 @@
 
 #import <Foundation/Foundation.h>
 
-#import "RLMRealmConfiguration.h"
-#import "RLMSyncCredentials.h"
-#import "RLMSyncPermission.h"
+#import <Realm/RLMRealmConfiguration.h>
+#import <Realm/RLMSyncCredentials.h>
+#import <Realm/RLMSyncPermission.h>
 
 @class RLMSyncUser, RLMSyncUserInfo, RLMSyncCredentials, RLMSyncPermission, RLMSyncSession, RLMRealm, RLMSyncPermissionOffer;
 

+ 2 - 2
Carthage/Checkouts/realm-cocoa/Realm/Realm-Info.plist

@@ -17,11 +17,11 @@
 	<key>CFBundlePackageType</key>
 	<string>FMWK</string>
 	<key>CFBundleShortVersionString</key>
-	<string>5.1.0</string>
+	<string>5.2.0</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>5.1.0</string>
+	<string>5.2.0</string>
 	<key>NSHumanReadableCopyright</key>
 	<string>Copyright © 2014 Realm. All rights reserved.</string>
 	<key>NSPrincipalClass</key>

+ 2 - 0
Carthage/Checkouts/realm-cocoa/Realm/Tests/KVOTests.mm

@@ -233,6 +233,7 @@ public:
             XCTFail(@"%@", e.description);
         }
         XCTAssertEqual(0U, _notifications.count);
+        static_cast<void>(self); // Pre-12 versions of Xcode require the self variable but 12 doesn't use it
     }
 
     // record a single notification
@@ -241,6 +242,7 @@ public:
         XCTAssertEqual(obj, _obj);
         XCTAssertEqualObjects(key, _keyPath);
         [_notifications addObject:changeDictionary.copy];
+        static_cast<void>(self); // Pre-12 versions of Xcode require the self variable but 12 doesn't use it
     }
 
     // ensure that the observed object is updated for any changes made to the

+ 1 - 0
Carthage/Checkouts/realm-cocoa/Realm/Tests/MigrationTests.mm

@@ -50,6 +50,7 @@ static void RLMAssertRealmSchemaMatchesTable(id self, RLMRealm *realm) {
             XCTAssertEqual(indexed, table->has_search_index(column));
         }
     }
+    static_cast<void>(self);
 }
 
 @interface MigrationTestObject : RLMObject

+ 1 - 1
Carthage/Checkouts/realm-cocoa/RealmSwift.podspec

@@ -26,7 +26,7 @@ Pod::Spec.new do |s|
 
   s.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' }
 
-  s.ios.deployment_target     = '8.0'
+  s.ios.deployment_target     = '9.0'
   s.osx.deployment_target     = '10.9'
   s.watchos.deployment_target = '2.0'
   s.tvos.deployment_target    = '9.0'

+ 0 - 70
Carthage/Checkouts/realm-cocoa/RealmSwift/List.swift

@@ -527,11 +527,7 @@ extension List: RealmCollection {
 
 // MARK: - MutableCollection conformance, range replaceable collection emulation
 extension List: MutableCollection {
-#if swift(>=4.1)
     public typealias SubSequence = Slice<List>
-#else
-    public typealias SubSequence = RandomAccessSlice<List>
-#endif
 
     /**
      Returns the objects at the given range (get), or replaces the objects at the
@@ -598,7 +594,6 @@ extension List: MutableCollection {
             currentIndex += 1
         }
     }
-    #if swift(>=4.1.50)
     /**
      Removes objects from the list at the given range.
 
@@ -610,69 +605,6 @@ extension List: MutableCollection {
             remove(at: bounds.lowerBound)
         }
     }
-    #else
-    /**
-     Removes objects from the list at the given range.
-
-     - warning: This method may only be called during a write transaction.
-     */
-    public func removeSubrange(_ bounds: Range<Int>) {
-        removeSubrange(bounds.lowerBound..<bounds.upperBound)
-    }
-
-    /// :nodoc:
-    public func removeSubrange(_ bounds: ClosedRange<Int>) {
-        removeSubrange(bounds.lowerBound...bounds.upperBound)
-    }
-
-    /// :nodoc:
-    public func removeSubrange(_ bounds: CountableRange<Int>) {
-        for _ in bounds {
-            remove(at: bounds.lowerBound)
-        }
-    }
-
-    /// :nodoc:
-    public func removeSubrange(_ bounds: CountableClosedRange<Int>) {
-        for _ in bounds {
-            remove(at: bounds.lowerBound)
-        }
-    }
-
-    /// :nodoc:
-    public func removeSubrange(_ bounds: DefaultRandomAccessIndices<List>) {
-        removeSubrange(bounds.startIndex..<bounds.endIndex)
-    }
-
-    /// :nodoc:
-    public func replaceSubrange<C: Collection>(_ subrange: ClosedRange<Int>, with newElements: C)
-        where C.Iterator.Element == Element {
-            removeSubrange(subrange)
-            insert(contentsOf: newElements, at: subrange.lowerBound)
-    }
-
-    /// :nodoc:
-    public func replaceSubrange<C: Collection>(_ subrange: CountableRange<Int>, with newElements: C)
-        where C.Iterator.Element == Element {
-            removeSubrange(subrange)
-            insert(contentsOf: newElements, at: subrange.lowerBound)
-    }
-
-    /// :nodoc:
-    public func replaceSubrange<C: Collection>(_ subrange: CountableClosedRange<Int>, with newElements: C)
-        where C.Iterator.Element == Element {
-            removeSubrange(subrange)
-            insert(contentsOf: newElements, at: subrange.lowerBound)
-    }
-
-
-    /// :nodoc:
-    public func replaceSubrange<C: Collection>(_ subrange: DefaultRandomAccessIndices<List>, with newElements: C)
-        where C.Iterator.Element == Element {
-            removeSubrange(subrange)
-            insert(contentsOf: newElements, at: subrange.startIndex)
-    }
-#endif
     /// :nodoc:
     public func remove(atOffsets offsets: IndexSet) {
         for offset in offsets.reversed() {
@@ -700,7 +632,6 @@ extension List: MutableCollection {
 
 // MARK: - Codable
 
-#if swift(>=4.1)
 extension List: Decodable where Element: Decodable {
     public convenience init(from decoder: Decoder) throws {
         self.init()
@@ -719,7 +650,6 @@ extension List: Encodable where Element: Encodable {
         }
     }
 }
-#endif
 
 // MARK: - AssistedObjectiveCBridgeable
 

+ 0 - 2
Carthage/Checkouts/realm-cocoa/RealmSwift/Optional.swift

@@ -65,7 +65,6 @@ public final class RealmOptional<Value: RealmOptionalType>: RLMOptionalBase {
     }
 }
 
-#if swift(>=4.1)
 extension RealmOptional: Codable where Value: Codable {
     public convenience init(from decoder: Decoder) throws {
         self.init()
@@ -79,7 +78,6 @@ extension RealmOptional: Codable where Value: Codable {
         try self.value.encode(to: encoder)
     }
 }
-#endif
 
 internal protocol RealmOptionalProtocol { }
 extension RealmOptional: RealmOptionalProtocol { }

+ 0 - 8
Carthage/Checkouts/realm-cocoa/RealmSwift/RealmConfiguration.swift

@@ -20,14 +20,6 @@ import Foundation
 import Realm
 import Realm.Private
 
-#if !swift(>=4.1)
-fileprivate extension Sequence {
-    func compactMap<T>(_ fn: (Self.Iterator.Element) throws -> T?) rethrows -> [T] {
-        return try flatMap(fn)
-    }
-}
-#endif
-
 extension Realm {
     /**
      A `Configuration` instance describes the different options used to create an instance of a Realm.

+ 0 - 2
Carthage/Checkouts/realm-cocoa/RealmSwift/Results.swift

@@ -413,7 +413,6 @@ extension Results: AssistedObjectiveCBridgeable {
 
 // MARK: - Codable
 
-#if swift(>=4.1)
 extension Results: Encodable where Element: Encodable {
     public func encode(to encoder: Encoder) throws {
         var container = encoder.unkeyedContainer()
@@ -422,4 +421,3 @@ extension Results: Encodable where Element: Encodable {
         }
     }
 }
-#endif

+ 14 - 14
Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/KVOTests.swift

@@ -107,7 +107,7 @@ class KVOTests: TestCase {
         block()
         obj.removeObserver(self, forKeyPath: key)
 
-        XCTAssert(changeDictionary != nil, "Did not get a notification", file: fileName, line: lineNumber)
+        XCTAssert(changeDictionary != nil, "Did not get a notification", file: (fileName), line: lineNumber)
         guard changeDictionary != nil else { return }
 
         let actualOld = changeDictionary![.oldKey]! as? T
@@ -115,10 +115,10 @@ class KVOTests: TestCase {
 
         XCTAssert(old == actualOld,
                   "Old value: expected \(String(describing: old)), got \(String(describing: actualOld))",
-                  file: fileName, line: lineNumber)
+                  file: (fileName), line: lineNumber)
         XCTAssert(new == actualNew,
                   "New value: expected \(String(describing: new)), got \(String(describing: actualNew))",
-                  file: fileName, line: lineNumber)
+                  file: (fileName), line: lineNumber)
 
         changeDictionary = nil
     }
@@ -128,15 +128,15 @@ class KVOTests: TestCase {
         let kvoOptions: NSKeyValueObservingOptions = [.old, .new]
         var gotNotification = false
         let observation = obj.observe(keyPath, options: kvoOptions) { _, change in
-            XCTAssertEqual(change.oldValue, old, file: fileName, line: lineNumber)
-            XCTAssertEqual(change.newValue, new, file: fileName, line: lineNumber)
+            XCTAssertEqual(change.oldValue, old, file: (fileName), line: lineNumber)
+            XCTAssertEqual(change.newValue, new, file: (fileName), line: lineNumber)
             gotNotification = true
         }
 
         block()
         observation.invalidate()
 
-        XCTAssertTrue(gotNotification, file: fileName, line: lineNumber)
+        XCTAssertTrue(gotNotification, file: (fileName), line: lineNumber)
     }
 
     func observeChange<T: Equatable>(_ obj: SwiftKVOObject, _ keyPath: KeyPath<SwiftKVOObject, T?>, _ old: T?, _ new: T?,
@@ -145,14 +145,14 @@ class KVOTests: TestCase {
         var gotNotification = false
         let observation = obj.observe(keyPath, options: kvoOptions) { _, change in
             if let oldValue = change.oldValue {
-                XCTAssertEqual(oldValue, old, file: fileName, line: lineNumber)
+                XCTAssertEqual(oldValue, old, file: (fileName), line: lineNumber)
             } else {
-                XCTAssertNil(old, file: fileName, line: lineNumber)
+                XCTAssertNil(old, file: (fileName), line: lineNumber)
             }
             if let newValue = change.newValue {
-                XCTAssertEqual(newValue, new, file: fileName, line: lineNumber)
+                XCTAssertEqual(newValue, new, file: (fileName), line: lineNumber)
             } else {
-                XCTAssertNil(new, file: fileName, line: lineNumber)
+                XCTAssertNil(new, file: (fileName), line: lineNumber)
             }
             gotNotification = true
         }
@@ -160,7 +160,7 @@ class KVOTests: TestCase {
         block()
         observation.invalidate()
 
-        XCTAssertTrue(gotNotification, file: fileName, line: lineNumber)
+        XCTAssertTrue(gotNotification, file: (fileName), line: lineNumber)
     }
 
     func observeListChange(_ obj: NSObject, _ key: String, _ kind: NSKeyValueChange, _ indexes: NSIndexSet = NSIndexSet(index: 0),
@@ -168,15 +168,15 @@ class KVOTests: TestCase {
         obj.addObserver(self, forKeyPath: key, options: [.old, .new], context: nil)
         block()
         obj.removeObserver(self, forKeyPath: key)
-        XCTAssert(changeDictionary != nil, "Did not get a notification", file: fileName, line: lineNumber)
+        XCTAssert(changeDictionary != nil, "Did not get a notification", file: (fileName), line: lineNumber)
         guard changeDictionary != nil else { return }
 
         let actualKind = NSKeyValueChange(rawValue: (changeDictionary![NSKeyValueChangeKey.kindKey] as! NSNumber).uintValue)!
         let actualIndexes = changeDictionary![NSKeyValueChangeKey.indexesKey]! as! NSIndexSet
-        XCTAssert(actualKind == kind, "Change kind: expected \(kind), got \(actualKind)", file: fileName,
+        XCTAssert(actualKind == kind, "Change kind: expected \(kind), got \(actualKind)", file: (fileName),
             line: lineNumber)
         XCTAssert(actualIndexes.isEqual(indexes), "Changed indexes: expected \(indexes), got \(actualIndexes)",
-            file: fileName, line: lineNumber)
+                  file: (fileName), line: lineNumber)
 
         changeDictionary = nil
     }

+ 2 - 10
Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ListTests.swift

@@ -19,14 +19,6 @@
 import XCTest
 import RealmSwift
 
-#if !swift(>=4.1)
-extension Sequence {
-    func compactMap<ElementOfResult>(_ transform: (Self.Element) throws -> ElementOfResult?) rethrows -> [ElementOfResult] {
-        return try flatMap(transform)
-    }
-}
-#endif
-
 class ListTests: TestCase {
     var str1: SwiftStringObject?
     var str2: SwiftStringObject?
@@ -204,8 +196,8 @@ class ListTests: TestCase {
         assertEqual(str2, array[0])
         assertEqual(str1, array[1])
 
-        assertThrows(_ = array.insert(str2, at: 200))
-        assertThrows(_ = array.insert(str2, at: -200))
+        assertThrows(array.insert(str2, at: 200))
+        assertThrows(array.insert(str2, at: -200))
     }
 
     func testRemoveAtIndex() {

+ 2 - 2
Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/PrimitiveListTests.swift

@@ -381,8 +381,8 @@ class PrimitiveListTests<O: ObjectFactory, V: ValueFactory>: PrimitiveListTestsB
         XCTAssertEqual(values[0], array[1])
         XCTAssertEqual(values[2], array[2])
 
-        assertThrows(_ = array.insert(values[0], at: 4))
-        assertThrows(_ = array.insert(values[0], at: -1))
+        assertThrows(array.insert(values[0], at: 4))
+        assertThrows(array.insert(values[0], at: -1))
     }
 
     func testRemove() {

+ 13 - 13
Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/RealmTests.swift

@@ -315,7 +315,7 @@ class RealmTests: TestCase {
 
     func testAddSingleObject() {
         let realm = try! Realm()
-        assertThrows(_ = realm.add(SwiftObject()))
+        assertThrows(realm.add(SwiftObject()))
         XCTAssertEqual(0, realm.objects(SwiftObject.self).count)
         var defaultRealmObject: SwiftObject!
         try! realm.write {
@@ -329,7 +329,7 @@ class RealmTests: TestCase {
 
         let testRealm = realmWithTestPath()
         try! testRealm.write {
-            self.assertThrows(_ = testRealm.add(defaultRealmObject))
+            self.assertThrows(testRealm.add(defaultRealmObject))
         }
     }
 
@@ -348,13 +348,13 @@ class RealmTests: TestCase {
 
         let testRealm = realmWithTestPath()
         try! testRealm.write {
-            self.assertThrows(_ = testRealm.add(defaultRealmObject, update: .all))
+            self.assertThrows(testRealm.add(defaultRealmObject, update: .all))
         }
     }
 
     func testAddMultipleObjects() {
         let realm = try! Realm()
-        assertThrows(_ = realm.add([SwiftObject(), SwiftObject()]))
+        assertThrows(realm.add([SwiftObject(), SwiftObject()]))
         XCTAssertEqual(0, realm.objects(SwiftObject.self).count)
         try! realm.write {
             let objs = [SwiftObject(), SwiftObject()]
@@ -365,7 +365,7 @@ class RealmTests: TestCase {
 
         let testRealm = realmWithTestPath()
         try! testRealm.write {
-            self.assertThrows(_ = testRealm.add(realm.objects(SwiftObject.self)))
+            self.assertThrows(testRealm.add(realm.objects(SwiftObject.self)))
         }
     }
 
@@ -381,7 +381,7 @@ class RealmTests: TestCase {
 
         let testRealm = realmWithTestPath()
         try! testRealm.write {
-            self.assertThrows(_ = testRealm.add(realm.objects(SwiftPrimaryStringObject.self), update: .all))
+            self.assertThrows(testRealm.add(realm.objects(SwiftPrimaryStringObject.self), update: .all))
         }
     }
 
@@ -390,24 +390,24 @@ class RealmTests: TestCase {
     func testDeleteSingleObject() {
         let realm = try! Realm()
         XCTAssertEqual(0, realm.objects(SwiftObject.self).count)
-        assertThrows(_ = realm.delete(SwiftObject()))
+        assertThrows(realm.delete(SwiftObject()))
         var defaultRealmObject: SwiftObject!
         try! realm.write {
             defaultRealmObject = SwiftObject()
-            self.assertThrows(_ = realm.delete(defaultRealmObject))
+            self.assertThrows(realm.delete(defaultRealmObject))
             XCTAssertEqual(0, realm.objects(SwiftObject.self).count)
             realm.add(defaultRealmObject)
             XCTAssertEqual(1, realm.objects(SwiftObject.self).count)
             realm.delete(defaultRealmObject)
             XCTAssertEqual(0, realm.objects(SwiftObject.self).count)
         }
-        assertThrows(_ = realm.delete(defaultRealmObject))
+        assertThrows(realm.delete(defaultRealmObject))
         XCTAssertEqual(0, realm.objects(SwiftObject.self).count)
 
         let testRealm = realmWithTestPath()
-        assertThrows(_ = testRealm.delete(defaultRealmObject))
+        assertThrows(testRealm.delete(defaultRealmObject))
         try! testRealm.write {
-            self.assertThrows(_ = testRealm.delete(defaultRealmObject))
+            self.assertThrows(testRealm.delete(defaultRealmObject))
         }
     }
 
@@ -425,9 +425,9 @@ class RealmTests: TestCase {
         XCTAssertEqual(0, realm.objects(SwiftObject.self).count)
 
         let testRealm = realmWithTestPath()
-        assertThrows(_ = testRealm.delete(objs))
+        assertThrows(testRealm.delete(objs))
         try! testRealm.write {
-            self.assertThrows(_ = testRealm.delete(objs))
+            self.assertThrows(testRealm.delete(objs))
         }
     }
 

+ 11 - 11
Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/TestCase.swift

@@ -104,13 +104,13 @@ class TestCase: RLMTestCaseBase {
             return
         }
         XCTFail("Objects expected to be equal, but weren't. First: \(String(describing: o1)), "
-            + "second: \(String(describing: o2))", file: fileName, line: lineNumber)
+            + "second: \(String(describing: o2))", file: (fileName), line: lineNumber)
     }
 
     /// Check whether two collections containing Realm objects are equal.
     func assertEqual<C: Collection>(_ c1: C, _ c2: C, fileName: StaticString = #file, lineNumber: UInt = #line)
         where C.Iterator.Element: Object {
-            XCTAssertEqual(c1.count, c2.count, "Collection counts were incorrect", file: fileName, line: lineNumber)
+            XCTAssertEqual(c1.count, c2.count, "Collection counts were incorrect", file: (fileName), line: lineNumber)
             for (o1, o2) in zip(c1, c2) {
                 assertEqual(o1, o2, fileName: fileName, lineNumber: lineNumber)
             }
@@ -119,14 +119,14 @@ class TestCase: RLMTestCaseBase {
     func assertEqual<T: Equatable>(_ expected: [T?], _ actual: [T?], file: StaticString = #file, line: UInt = #line) {
         if expected.count != actual.count {
             XCTFail("assertEqual failed: (\"\(expected)\") is not equal to (\"\(actual)\")",
-                file: file, line: line)
+                file: (file), line: line)
             return
         }
 
-        XCTAssertEqual(expected.count, actual.count, "Collection counts were incorrect", file: file, line: line)
+        XCTAssertEqual(expected.count, actual.count, "Collection counts were incorrect", file: (file), line: line)
         for (e, a) in zip(expected, actual) where e != a {
             XCTFail("assertEqual failed: (\"\(expected)\") is not equal to (\"\(actual)\")",
-                file: file, line: line)
+                file: (file), line: line)
             return
         }
     }
@@ -155,7 +155,7 @@ class TestCase: RLMTestCaseBase {
             try block()
         } catch {
             XCTFail("Expected no error, but instead caught <\(error)>.",
-                file: fileName, line: lineNumber)
+                file: (fileName), line: lineNumber)
         }
     }
 
@@ -165,12 +165,12 @@ class TestCase: RLMTestCaseBase {
         do {
             _ = try block()
             XCTFail("Expected to catch <\(expectedError)>, but no error was thrown.",
-                file: fileName, line: lineNumber)
+                file: (fileName), line: lineNumber)
         } catch let e as Realm.Error where e.code == expectedError {
             // Success!
         } catch {
             XCTFail("Expected to catch <\(expectedError)>, but instead caught <\(error)>.",
-                file: fileName, line: lineNumber)
+                file: (fileName), line: lineNumber)
         }
     }
 
@@ -180,18 +180,18 @@ class TestCase: RLMTestCaseBase {
         do {
             _ = try block()
             XCTFail("Expected to catch <\(expectedError)>, but no error was thrown.",
-                file: fileName, line: lineNumber)
+                file: (fileName), line: lineNumber)
         } catch let e where e._code == expectedError._code {
             // Success!
         } catch {
             XCTFail("Expected to catch <\(expectedError)>, but instead caught <\(error)>.",
-                file: fileName, line: lineNumber)
+                file: (fileName), line: lineNumber)
         }
     }
 
     func assertNil<T>(block: @autoclosure() -> T?, _ message: String? = nil,
                       fileName: StaticString = #file, lineNumber: UInt = #line) {
-        XCTAssert(block() == nil, message ?? "", file: fileName, line: lineNumber)
+        XCTAssert(block() == nil, message ?? "", file: (fileName), line: lineNumber)
     }
 
     func assertMatches(_ block: @autoclosure () -> String, _ regexString: String, _ message: String? = nil,

+ 22 - 38
Carthage/Checkouts/realm-cocoa/build.sh

@@ -363,6 +363,13 @@ download_common() {
     rm -rf "${download_type}-${version}" core
     mv "${temp_dir}/${download_type}-${version}" .
     ln -s "${download_type}-${version}" core
+
+    # Xcode 12 beta 1 ships a broken version of __bit_reference which breaks
+    # ABI compatibility with older versions, so grab a fixed version of that
+    # header.
+    if (( $(xcode_version_major) > 11 )); then
+        curl --silent https://raw.githubusercontent.com/llvm/llvm-project/4198874630be5c6126d78944f8a2d89dea90c7c4/libcxx/include/__bit_reference -o core/include/__bit_reference
+    fi
 }
 
 download_core() {
@@ -557,11 +564,6 @@ case "$COMMAND" in
         ;;
 
     "catalyst")
-        if (( $(xcode_version_major) < 11 )); then
-            echo 'Building for Catalyst requires Xcode 11'
-            exit 1
-        fi
-
         xc "-scheme Realm -configuration $CONFIGURATION \
             REALM_CATALYST_FLAGS='-target x86_64-apple-ios13.0-macabi' \
             REALM_PLATFORM_SUFFIX='maccatalyst' \
@@ -570,11 +572,6 @@ case "$COMMAND" in
         ;;
 
     "catalyst-swift")
-        if (( $(xcode_version_major) < 11 )); then
-            echo 'Building for Catalyst requires Xcode 11'
-            exit 1
-        fi
-
         sh build.sh catalyst
         # FIXME: change this to just "-destination variant='Mac Catalyst'" once the CI machines are running 10.15
         xc "-scheme 'RealmSwift' -configuration $CONFIGURATION build \
@@ -590,11 +587,6 @@ case "$COMMAND" in
         ;;
 
     "xcframework")
-        if (( $(xcode_version_major) < 11 )); then
-            echo 'Building a xcframework requires Xcode 11'
-            exit 1
-        fi
-
         export REALM_EXTRA_BUILD_ARGUMENTS="$REALM_EXTRA_BUILD_ARGUMENTS BUILD_LIBRARY_FOR_DISTRIBUTION=YES REALM_OBJC_MACH_O_TYPE=staticlib"
 
         # Build all of the requested frameworks
@@ -760,10 +752,8 @@ case "$COMMAND" in
         sh build.sh test-tvos-devices || failed=1
         sh build.sh test-osx || failed=1
         sh build.sh test-osx-swift || failed=1
-        if (( $(xcode_version_major) >= 11 )); then
-            sh build.sh test-catalyst || failed=1
-            sh build.sh test-catalyst-swift || failed=1
-        fi
+        sh build.sh test-catalyst || failed=1
+        sh build.sh test-catalyst-swift || failed=1
         exit $failed
         ;;
 
@@ -902,10 +892,8 @@ case "$COMMAND" in
         sh build.sh verify-swiftlint
         sh build.sh verify-swiftpm
         sh build.sh verify-osx-object-server
-        if (( $(xcode_version_major) >= 11 )); then
-            sh build.sh verify-catalyst
-            sh build.sh verify-catalyst-swift
-        fi
+        sh build.sh verify-catalyst
+        sh build.sh verify-catalyst-swift
         ;;
 
     "verify-cocoapods")
@@ -1221,16 +1209,6 @@ case "$COMMAND" in
     # CocoaPods
     ######################################
     "cocoapods-setup")
-        if [ ! -d core ]; then
-          sh build.sh download-sync
-          rm core
-          mv sync-* core
-          mv core/librealm-ios.a core/librealmcore-ios.a
-          mv core/librealm-macosx.a core/librealmcore-macosx.a
-          mv core/librealm-tvos.a core/librealmcore-tvos.a
-          mv core/librealm-watchos.a core/librealmcore-watchos.a
-        fi
-
         if [[ "$2" != "swift" ]]; then
           if [ ! -d Realm/ObjectStore/src ]; then
             cat >&2 <<EOM
@@ -1246,6 +1224,16 @@ EOM
             exit 1
           fi
 
+          if [ ! -d core ]; then
+            sh build.sh download-sync
+            rm core
+            mv sync-* core
+            mv core/librealm-ios.a core/librealmcore-ios.a
+            mv core/librealm-macosx.a core/librealmcore-macosx.a
+            mv core/librealm-tvos.a core/librealmcore-tvos.a
+            mv core/librealm-watchos.a core/librealmcore-watchos.a
+          fi
+
           rm -rf include
           mkdir -p include
           mv core/include include/core
@@ -1407,11 +1395,7 @@ EOM
 
         set_xcode_and_swift_versions
 
-        if [[ "$PLATFORM" = "catalyst" ]] && (( $(xcode_version_major) < 11 )); then
-            mkdir -p build/catalyst/swift-$REALM_XCODE_VERSION
-        else
-            sh build.sh $PLATFORM-swift
-        fi
+        sh build.sh $PLATFORM-swift
 
         cd build/$PLATFORM
         zip --symlinks -r realm-framework-$PLATFORM-$REALM_XCODE_VERSION.zip swift-$REALM_XCODE_VERSION

+ 3 - 3
Carthage/Checkouts/realm-cocoa/dependencies.list

@@ -1,4 +1,4 @@
-VERSION=5.1.0
-REALM_CORE_VERSION=6.0.6
-REALM_SYNC_VERSION=5.0.5
+VERSION=5.2.0
+REALM_CORE_VERSION=6.0.8
+REALM_SYNC_VERSION=5.0.7
 REALM_OBJECT_SERVER_VERSION=3.28.5

+ 1 - 1
Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/Podfile

@@ -1,5 +1,5 @@
 # Uncomment this line to define a global platform for your project
-# platform :ios, '6.0'
+platform :ios, '9.0'
 
 use_frameworks!
 branch = ENV['sha']

+ 1 - 1
Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/Podfile

@@ -1,5 +1,5 @@
 # Uncomment this line to define a global platform for your project
-# platform :ios, '6.0'
+platform :ios, '9.0'
 
 branch = ENV['sha']
 

+ 1 - 1
Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/Podfile

@@ -1,5 +1,5 @@
 # Uncomment this line to define a global platform for your project
-# platform :ios, '6.0'
+platform :ios, '9.0'
 
 branch = ENV['sha']
 

+ 1 - 1
Carthage/Checkouts/realm-cocoa/examples/ios/objc/Podfile

@@ -1,4 +1,4 @@
-platform :ios, '7.0'
+platform :ios, '9.0'
 
 target 'RACTableView' do
   pod 'ReactiveCocoa', :inhibit_warnings => true

+ 1 - 1
Carthage/Checkouts/realm-cocoa/scripts/package_examples.rb

@@ -41,7 +41,7 @@ base_examples = [
   "examples/tvos/swift",
 ]
 
-xcode_versions = %w(10.3 11.1 11.2.1 11.3 11.4.1 11.5)
+xcode_versions = %w(11.3 11.4.1 11.5)
 
 # Remove reference to Realm.xcodeproj from all example workspaces.
 base_examples.each do |example|

+ 5 - 3
Carthage/Checkouts/realm-cocoa/scripts/reset-simulators.rb

@@ -141,9 +141,11 @@ begin
         end
       end
 
-      # Error code 161-163 indicate that the given device is not supported by the runtime, such as the iPad 2 and
-      # iPhone 4s not being supported by the iOS 10 simulator runtime.
-      next if output =~ /(domain=com.apple.CoreSimulator.SimError, code=16[123])/
+      # Not all runtime and device pairs are valid as newer simulator runtimes
+      # don't support older devices. The exact error code for this changes
+      # every few versions of Xcode, so this just lists all the ones we've
+      # seen.
+      next if /domain=com.apple.CoreSimulator.SimError, code=(?<code>\d+)/ =~ output and [161, 162, 163, 403].include? code.to_i
 
       puts "Failed to create device of type #{device_type['identifier']} with runtime #{runtime['identifier']}:"
       output.each_line do |line|

+ 1 - 1
Share/NCSelectDestination.m

@@ -225,7 +225,7 @@
         }
     }
     
-    NSArray *result = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:predicateDataSource sorted:nil ascending:NO freeze:NO];
+    NSArray *result = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:predicateDataSource sorted:nil ascending:NO freeze:NO nresults:0];
     
     if (result)
         return [result count];

+ 1 - 1
iOSClient/AppDelegate.m

@@ -984,7 +984,7 @@
     // after 20 sec
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 20 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
         
-        NSArray *records = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"session != ''"] sorted:nil ascending:NO freeze:YES];
+        NSArray *records = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"session != ''"] sorted:nil ascending:NO freeze:YES nresults:0];
         
         if ([records count] > 0) {
             completionHandler(UIBackgroundFetchResultNewData);

+ 1 - 1
iOSClient/Database/NCManageDatabase.swift

@@ -2164,7 +2164,7 @@ class NCManageDatabase: NSObject {
         }
     }
     
-    @objc func getMetadatas(predicate: NSPredicate, sorted: String?, ascending: Bool, freeze: Bool = false) -> [tableMetadata]? {
+    @objc func getMetadatas(predicate: NSPredicate, sorted: String?, ascending: Bool, freeze: Bool = false, nresults: Int = 0) -> [tableMetadata]? {
         
         let realm = try! Realm()
         realm.refresh()

+ 3 - 3
iOSClient/Favorites/CCFavorites.m

@@ -214,7 +214,7 @@
                 }
                  
                 // Verify remove favorite
-                NSArray *allRecordFavorite = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND favorite == true", account] sorted:nil ascending:NO freeze:NO];
+                NSArray *allRecordFavorite = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND favorite == true", account] sorted:nil ascending:NO freeze:NO nresults:0];
                 for (tableMetadata *metadata in allRecordFavorite)
                     if (![filesOcId containsObject:metadata.ocId])
                         [[NCManageDatabase sharedInstance] setMetadataFavoriteWithOcId:metadata.ocId favorite:NO];
@@ -431,11 +431,11 @@
     
     if (!_serverUrl) {
         
-        recordsTableMetadata = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND favorite == true", appDelegate.activeAccount] sorted:nil ascending:NO freeze:NO];
+        recordsTableMetadata = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND favorite == true", appDelegate.activeAccount] sorted:nil ascending:NO freeze:NO nresults:0];
         
     } else {
         
-        recordsTableMetadata = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@", appDelegate.activeAccount, self.serverUrl] sorted:nil ascending:NO freeze:NO];
+        recordsTableMetadata = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@", appDelegate.activeAccount, self.serverUrl] sorted:nil ascending:NO freeze:NO nresults:0];
     }
     
     sectionDataSource = [CCSectionMetadata creataDataSourseSectionMetadata:recordsTableMetadata listProgressMetadata:nil groupByField:nil filterTypeFileImage:NO filterTypeFileVideo:NO filterLivePhoto:YES sorted:sorted ascending:[CCUtility getAscendingSettings] activeAccount:appDelegate.activeAccount];

+ 3 - 3
iOSClient/Main/CCMain.m

@@ -1032,7 +1032,7 @@
         }
         
         // Check if is in upload
-        NSArray *isRecordInSessions = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@ AND fileName == %@ AND session != ''", appDelegate.activeAccount, serverUrl, fileName] sorted:nil ascending:NO freeze:YES];
+        NSArray *isRecordInSessions = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@ AND fileName == %@ AND session != ''", appDelegate.activeAccount, serverUrl, fileName] sorted:nil ascending:NO freeze:YES nresults:0];
         if ([isRecordInSessions count] > 0)
             continue;
         
@@ -1254,7 +1254,7 @@
             
             // First : filter
                 
-            NSArray *records = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@ AND fileNameView CONTAINS[cd] %@", appDelegate.activeAccount, _serverUrl, fileName] sorted:nil ascending:NO freeze:NO];
+            NSArray *records = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@ AND fileNameView CONTAINS[cd] %@", appDelegate.activeAccount, _serverUrl, fileName] sorted:nil ascending:NO freeze:NO nresults:0];
                 
             [_searchResultMetadatas removeAllObjects];
             for (tableMetadata *record in records) {
@@ -2014,7 +2014,7 @@
     
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                 
-        NSArray *recordsTableMetadata = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@", appDelegate.activeAccount, serverUrl] sorted:nil ascending:NO freeze:NO];
+        NSArray *recordsTableMetadata = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@", appDelegate.activeAccount, serverUrl] sorted:nil ascending:NO freeze:NO nresults:0];
         
         // [CCUtility getGroupBySettings]
         CCSectionDataSourceMetadata *sectionDataSourceTemp = [CCSectionMetadata creataDataSourseSectionMetadata:recordsTableMetadata listProgressMetadata:nil groupByField:nil filterTypeFileImage:NO filterTypeFileVideo:NO filterLivePhoto:YES sorted:[CCUtility getOrderSettings] ascending:[CCUtility getAscendingSettings] activeAccount:appDelegate.activeAccount];

+ 2 - 2
iOSClient/Synchronize/CCSynchronize.m

@@ -72,13 +72,13 @@
         NSMutableArray *metadatasForVerifyChange = [NSMutableArray new];
         NSMutableArray *addMetadatas = [NSMutableArray new];
         
-        NSArray *recordsInSessions = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@ AND session != ''", account, serverUrl] sorted:nil ascending:NO freeze:NO];
+        NSArray *recordsInSessions = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@ AND session != ''", account, serverUrl] sorted:nil ascending:NO freeze:NO nresults:0];
         
         // ----- Test : (DELETE) -----
         
         NSMutableArray *metadatasNotPresents = [NSMutableArray new];
         
-        NSArray *tableMetadatas = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@ AND session == ''", account, serverUrl] sorted:nil ascending:NO  freeze:NO];
+        NSArray *tableMetadatas = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@ AND session == ''", account, serverUrl] sorted:nil ascending:NO  freeze:NO nresults:0];
         
         for (tableMetadata *record in tableMetadatas) {
             

+ 8 - 8
iOSClient/Transfers/CCTransfers.m

@@ -176,7 +176,7 @@
     
     // Detect E2EE
     NSString *saveserverUrl = @"";
-    NSArray *metadatasForE2EE = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"status != %d", k_metadataStatusNormal] sorted:@"serverUrl" ascending:NO freeze:YES];
+    NSArray *metadatasForE2EE = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"status != %d", k_metadataStatusNormal] sorted:@"serverUrl" ascending:NO freeze:YES nresults:0];
     for (tableMetadata *metadata in metadatasForE2EE) {
         if (![saveserverUrl isEqualToString:metadata.serverUrl]) {
             saveserverUrl = metadata.serverUrl;
@@ -267,7 +267,7 @@
         return;
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
-        NSArray *recordsTableMetadata = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"(session CONTAINS 'upload') OR (session CONTAINS 'download')"] sorted:@"sessionTaskIdentifier" ascending:NO freeze:YES];
+        NSArray *recordsTableMetadata = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"(session CONTAINS 'upload') OR (session CONTAINS 'download')"] sorted:@"sessionTaskIdentifier" ascending:NO freeze:YES nresults:100];
         
         CCSectionDataSourceMetadata *sectionDataSourceTemp = [CCSectionDataSourceMetadata new];
         
@@ -314,10 +314,10 @@
     NSInteger typeOfSession = 0;
     NSString *sessionDownload = [[NCCommunicationCommon shared] sessionIdentifierDownload];
 
-    NSInteger queueDownload = [[[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"session == %@", sessionDownload] sorted:nil ascending:NO freeze:YES] count];
+    NSInteger queueDownload = [[[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"session == %@", sessionDownload] sorted:nil ascending:NO freeze:YES nresults:0] count];
 
-    NSInteger queueUpload = [[[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"session == %@", NCCommunicationCommon.shared.sessionIdentifierBackground] sorted:nil ascending:NO freeze:YES] count];
-    NSInteger queueUploadWWan = [[[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"session == %@", NCCommunicationCommon.shared.sessionIdentifierBackgroundWWan] sorted:nil ascending:NO freeze:YES] count];
+    NSInteger queueUpload = [[[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"session == %@", NCCommunicationCommon.shared.sessionIdentifierBackground] sorted:nil ascending:NO freeze:YES nresults:0] count];
+    NSInteger queueUploadWWan = [[[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"session == %@", NCCommunicationCommon.shared.sessionIdentifierBackgroundWWan] sorted:nil ascending:NO freeze:YES nresults:0] count];
     
     if ([[sectionDataSource.sections objectAtIndex:section] isKindOfClass:[NSString class]]) titleSection = [sectionDataSource.sections objectAtIndex:section];
     if ([[sectionDataSource.sections objectAtIndex:section] isKindOfClass:[NSDate class]]) titleSection = [CCUtility getTitleSectionDate:[sectionDataSource.sections objectAtIndex:section]];
@@ -396,7 +396,7 @@
     if ([titleSection containsString:@"download"] && titleSection != nil) {
         
         NSString *session = [[NCCommunicationCommon shared] sessionIdentifierDownload];
-        NSInteger queueDownload = [[[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"session == %@", session] sorted:nil ascending:NO freeze:YES] count];
+        NSInteger queueDownload = [[[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"session == %@", session] sorted:nil ascending:NO freeze:YES nresults:0] count];
         
         // element or elements ?
         if (queueDownload > 1) element_s = NSLocalizedString(@"_elements_",nil);
@@ -413,7 +413,7 @@
     // Footer Upload
     if ([titleSection containsString:@"upload"] && ![titleSection containsString:@"wwan"] && titleSection != nil) {
         
-        NSInteger queueUpload = [[[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"session == %@", NCCommunicationCommon.shared.sessionIdentifierBackground] sorted:nil ascending:NO freeze:YES] count];
+        NSInteger queueUpload = [[[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"session == %@", NCCommunicationCommon.shared.sessionIdentifierBackground] sorted:nil ascending:NO freeze:YES nresults:0] count];
         
         // element or elements ?
         if (queueUpload > 1) element_s = NSLocalizedString(@"_elements_",nil);
@@ -430,7 +430,7 @@
     // Footer Upload WWAN
     if ([titleSection containsString:@"upload"] && [titleSection containsString:@"wwan"] && titleSection != nil) {
         
-        NSInteger queueUploadWWan = [[[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"session == %@", NCCommunicationCommon.shared.sessionIdentifierBackgroundWWan] sorted:nil ascending:NO freeze:YES] count];
+        NSInteger queueUploadWWan = [[[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"session == %@", NCCommunicationCommon.shared.sessionIdentifierBackgroundWWan] sorted:nil ascending:NO freeze:YES nresults:0] count];
        
         // element or elements ?
         if (queueUploadWWan > 1) element_s = NSLocalizedString(@"_elements_",nil);