Marino Faggiana 7 жил өмнө
parent
commit
73dd097e15
33 өөрчлөгдсөн 312 нэмэгдсэн , 107 устгасан
  1. 59 0
      Libraries external/Realm/Realm.framework/CHANGELOG.md
  2. 7 0
      Libraries external/Realm/Realm.framework/Headers/NSError+RLMSync.h
  3. 2 2
      Libraries external/Realm/Realm.framework/Headers/RLMArray.h
  4. 4 4
      Libraries external/Realm/Realm.framework/Headers/RLMCollection.h
  5. 16 17
      Libraries external/Realm/Realm.framework/Headers/RLMConstants.h
  6. 6 6
      Libraries external/Realm/Realm.framework/Headers/RLMMigration.h
  7. 3 3
      Libraries external/Realm/Realm.framework/Headers/RLMObject.h
  8. 8 8
      Libraries external/Realm/Realm.framework/Headers/RLMObjectBase_Dynamic.h
  9. 3 3
      Libraries external/Realm/Realm.framework/Headers/RLMObjectSchema.h
  10. 19 19
      Libraries external/Realm/Realm.framework/Headers/RLMProperty.h
  11. 2 2
      Libraries external/Realm/Realm.framework/Headers/RLMRealmConfiguration+Sync.h
  12. 2 2
      Libraries external/Realm/Realm.framework/Headers/RLMRealmConfiguration.h
  13. 5 5
      Libraries external/Realm/Realm.framework/Headers/RLMRealm_Dynamic.h
  14. 5 5
      Libraries external/Realm/Realm.framework/Headers/RLMResults.h
  15. 2 2
      Libraries external/Realm/Realm.framework/Headers/RLMSchema.h
  16. 1 1
      Libraries external/Realm/Realm.framework/Headers/RLMSyncConfiguration.h
  17. 12 2
      Libraries external/Realm/Realm.framework/Headers/RLMSyncCredentials.h
  18. 1 1
      Libraries external/Realm/Realm.framework/Headers/RLMSyncManager.h
  19. 32 4
      Libraries external/Realm/Realm.framework/Headers/RLMSyncPermissionValue.h
  20. 1 1
      Libraries external/Realm/Realm.framework/Headers/RLMSyncSession.h
  21. 60 2
      Libraries external/Realm/Realm.framework/Headers/RLMSyncUser.h
  22. 30 3
      Libraries external/Realm/Realm.framework/Headers/RLMSyncUtil.h
  23. BIN
      Libraries external/Realm/Realm.framework/Info.plist
  24. 4 2
      Libraries external/Realm/Realm.framework/Modules/module.modulemap
  25. 4 4
      Libraries external/Realm/Realm.framework/PrivateHeaders/RLMObjectSchema_Private.h
  26. 2 2
      Libraries external/Realm/Realm.framework/PrivateHeaders/RLMObjectStore.h
  27. 11 1
      Libraries external/Realm/Realm.framework/PrivateHeaders/RLMObject_Private.h
  28. 4 6
      Libraries external/Realm/Realm.framework/PrivateHeaders/RLMProperty_Private.h
  29. 4 0
      Libraries external/Realm/Realm.framework/PrivateHeaders/RLMSchema_Private.h
  30. 3 0
      Libraries external/Realm/Realm.framework/PrivateHeaders/RLMSyncUtil_Private.h
  31. BIN
      Libraries external/Realm/Realm.framework/Realm
  32. BIN
      Libraries external/Realm/RealmSwift.framework/Info.plist
  33. BIN
      Libraries external/Realm/RealmSwift.framework/RealmSwift

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

@@ -1,3 +1,62 @@
+2.9.1 Release notes (2017-08-01)
+=============================================================
+
+### API Breaking Changes
+
+* None.
+
+### Enhancements
+
+* None.
+
+### Bugfixes
+
+* The `shouldCompactOnLaunch` block is no longer invoked if the Realm at that
+  path is already open on other threads.
+* Fix an assertion failure in collection notifications when changes are made to
+  the schema via sync while the notification block is active.
+
+2.9.0 Release notes (2017-07-26)
+=============================================================
+
+### API Breaking Changes
+
+* None.
+
+### Enhancements
+
+* Add a new error code to denote 'permission denied' errors when working
+  with synchronized Realms, as well as an accompanying block that can be
+  called to inform the binding that the offending Realm's files should be
+  deleted immediately. This allows recovering from 'permission denied'
+  errors in a more robust manner. See the documentation for
+  `RLMSyncErrorPermissionDeniedError` for more information.
+* Add `-[RLMSyncPermissionValue initWithRealmPath:username:accessLevel:]`
+  API allowing permissions to be applied to a user based on their username
+  (usually, an email address). Requires any edition of the Realm Object
+  Server 1.6.0 or later.
+* Improve performance of creating Swift objects which contain at least one List
+  property.
+* It is now possible to create and log in multiple Realm Object Server users
+  with the same identity if they originate from different servers. Note that
+  if the URLs are different aliases for the same authentication server each
+  user will still be treated as separate (e.g. they will have their own copy
+  of each synchronized Realm opened using them). It is highly encouraged that
+  users defined using the access token credential type be logged in with an
+  authentication server URL specified; this parameter will become mandatory
+  in a future version of the SDK.
+* Add `-[RLMSyncUser retrieveInfoForUser:identityProvider:completion:]`
+  API allowing administrator users to retrieve information about a user based
+  on their provider identity (for example, a username). Requires any edition
+  of the Realm Object Server 1.8.2 or later.
+
+### Bugfixes
+
+* `List.description` now reports the correct types for nested lists.
+* Fix unmanaged object initialization when a nested property type returned
+  `false` from `Object.shouldIncludeInDefaultSchema()`.
+* Don't clear RLMArrays on self-assignment.
+
 2.8.3 Release notes (2017-06-20)
 =============================================================
 

+ 7 - 0
Libraries external/Realm/Realm.framework/Headers/NSError+RLMSync.h

@@ -31,6 +31,13 @@ NS_ASSUME_NONNULL_BEGIN
  */
 - (nullable void(^)(void))rlmSync_clientResetBlock NS_REFINED_FOR_SWIFT;
 
+/**
+ Given a Realm Object Server permission denied error, return the block that
+ can be called to manually initiate the Realm file deletion process, or nil
+ if the error isn't a permission denied error.
+ */
+- (nullable void(^)(void))rlmSync_deleteRealmBlock NS_REFINED_FOR_SWIFT;
+
 /**
  Given a Realm Object Server client reset error, return the path where the
  backup copy of the Realm will be placed once the client reset process is

+ 2 - 2
Libraries external/Realm/Realm.framework/Headers/RLMArray.h

@@ -418,13 +418,13 @@ NS_ASSUME_NONNULL_BEGIN
 
 /**
  `-[RLMArray init]` is not available because `RLMArray`s cannot be created directly.
- `RLMArray` properties on `RLMObject`s are lazily created when accessed, or can be obtained by querying a Realm.
+ `RLMArray` properties on `RLMObject`s are lazily created when accessed.
  */
 - (instancetype)init __attribute__((unavailable("RLMArrays cannot be created directly")));
 
 /**
  `+[RLMArray new]` is not available because `RLMArray`s cannot be created directly.
- `RLMArray` properties on `RLMObject`s are lazily created when accessed, or can be obtained by querying a Realm.
+ `RLMArray` properties on `RLMObject`s are lazily created when accessed.
  */
 + (instancetype)new __attribute__((unavailable("RLMArrays cannot be created directly")));
 

+ 4 - 4
Libraries external/Realm/Realm.framework/Headers/RLMCollection.h

@@ -18,7 +18,7 @@
 
 #import <Foundation/Foundation.h>
 
-#import "RLMThreadSafeReference.h"
+#import <Realm/RLMThreadSafeReference.h>
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -313,7 +313,7 @@ NS_ASSUME_NONNULL_BEGIN
  `sortedResultsUsingDescriptors:`. It is similar to `NSSortDescriptor`, but supports
  only the subset of functionality which can be efficiently run by Realm's query
  engine.
- 
+
  `RLMSortDescriptor` instances are immutable.
  */
 @interface RLMSortDescriptor : NSObject
@@ -388,11 +388,11 @@ NS_ASSUME_NONNULL_BEGIN
 
 /**
  The indices in the new version of the collection which were modified.
- 
+
  For `RLMResults`, this means that one or more of the properties of the object at
  that index were modified (or an object linked to by that object was
  modified).
- 
+
  For `RLMArray`, the array itself being modified to contain a
  different object at that index will also be reported as a modification.
  */

+ 16 - 17
Libraries external/Realm/Realm.framework/Headers/RLMConstants.h

@@ -47,7 +47,6 @@ NS_ASSUME_NONNULL_BEGIN
 
  For more information, see [Realm Models](https://realm.io/docs/objc/latest/#models).
  */
-// Make sure numbers match those in <realm/data_type.hpp>
 typedef NS_ENUM(int32_t, RLMPropertyType) {
 
 #pragma mark - Primitive types
@@ -57,34 +56,34 @@ typedef NS_ENUM(int32_t, RLMPropertyType) {
     /** Booleans: `BOOL`, `bool`, `Bool` (Swift) */
     RLMPropertyTypeBool   = 1,
     /** Floating-point numbers: `float`, `Float` (Swift) */
-    RLMPropertyTypeFloat  = 9,
+    RLMPropertyTypeFloat  = 5,
     /** Double-precision floating-point numbers: `double`, `Double` (Swift) */
-    RLMPropertyTypeDouble = 10,
+    RLMPropertyTypeDouble = 6,
 
 #pragma mark - Object types
 
     /** Strings: `NSString`, `String` (Swift) */
     RLMPropertyTypeString = 2,
     /** Binary data: `NSData` */
-    RLMPropertyTypeData   = 4,
-    /** 
+    RLMPropertyTypeData   = 3,
+    /**
      Any object: `id`.
-     
+
      This property type is no longer supported for new models. However, old models with any-typed properties are still
      supported for migration purposes.
      */
-    RLMPropertyTypeAny    = 6,
+    RLMPropertyTypeAny    = 9,
     /** Dates: `NSDate` */
-    RLMPropertyTypeDate   = 8,
+    RLMPropertyTypeDate   = 4,
 
 #pragma mark - Array/Linked object types
 
     /** Realm model objects. See [Realm Models](https://realm.io/docs/objc/latest/#models) for more information. */
-    RLMPropertyTypeObject = 12,
+    RLMPropertyTypeObject = 7,
     /** Realm arrays. See [Realm Models](https://realm.io/docs/objc/latest/#models) for more information. */
-    RLMPropertyTypeArray  = 13,
+    RLMPropertyTypeArray  = 128,
     /** Realm linking objects. See [Realm Models](https://realm.io/docs/objc/latest/#models) for more information. */
-    RLMPropertyTypeLinkingObjects = 14,
+    RLMPropertyTypeLinkingObjects = 8,
 };
 
 /** An error domain identifying Realm-specific errors. */
@@ -104,9 +103,9 @@ typedef RLM_ERROR_ENUM(NSInteger, RLMError, RLMErrorDomain) {
     /** Denotes a file I/O error that occurred when trying to open a Realm. */
     RLMErrorFileAccess            = 2,
 
-    /** 
+    /**
      Denotes a file permission error that ocurred when trying to open a Realm.
-     
+
      This error can occur if the user does not have permission to open or create
      the specified file in the specified access mode when opening a Realm.
      */
@@ -117,24 +116,24 @@ typedef RLM_ERROR_ENUM(NSInteger, RLMError, RLMErrorDomain) {
 
     /**
      Denotes an error that occurs if a file could not be found.
-     
+
      This error may occur if a Realm file could not be found on disk when trying to open a
      Realm as read-only, or if the directory part of the specified path was not found when
      trying to write a copy.
      */
     RLMErrorFileNotFound          = 5,
 
-    /** 
+    /**
      Denotes an error that occurs if a file format upgrade is required to open the file,
      but upgrades were explicitly disabled.
      */
     RLMErrorFileFormatUpgradeRequired = 6,
 
-    /** 
+    /**
      Denotes an error that occurs if the database file is currently open in another
      process which cannot share with the current process due to an
      architecture mismatch.
-     
+
      This error may occur if trying to share a Realm file between an i386 (32-bit) iOS
      Simulator and the Realm Browser application. In this case, please use the 64-bit
      version of the iOS Simulator.

+ 6 - 6
Libraries external/Realm/Realm.framework/Headers/RLMMigration.h

@@ -25,11 +25,11 @@ NS_ASSUME_NONNULL_BEGIN
 @class RLMObject;
 
 /**
- A block type which provides both the old and new versions of an object in the Realm. Object 
+ A block type which provides both the old and new versions of an object in the Realm. Object
  properties can only be accessed using keyed subscripting.
- 
+
  @see `-[RLMMigration enumerateObjects:block:]`
- 
+
  @param oldObject The object from the original Realm (read-only).
  @param newObject The object from the migrated Realm (read-write).
 */
@@ -37,7 +37,7 @@ typedef void (^RLMObjectMigrationBlock)(RLMObject * __nullable oldObject, RLMObj
 
 /**
  `RLMMigration` instances encapsulate information intended to facilitate a schema migration.
- 
+
  A `RLMMigration` instance is passed into a user-defined `RLMMigrationBlock` block when updating
  the version of a Realm. This instance provides access to the old and new database schemas, the
  objects in the Realm, and provides functionality for modifying the Realm during the migration.
@@ -75,8 +75,8 @@ typedef void (^RLMObjectMigrationBlock)(RLMObject * __nullable oldObject, RLMObj
 
 /**
  Creates and returns an `RLMObject` instance of type `className` in the Realm being migrated.
- 
- The `value` argument is used to populate the object. It can be a key-value coding compliant object, an array or 
+
+ The `value` argument is used to populate the object. It can be a key-value coding compliant object, an array or
  dictionary returned from the methods in `NSJSONSerialization`, or an array containing one element for each managed
  property. An exception will be thrown if any required properties are not present and those properties were not defined
  with default values.

+ 3 - 3
Libraries external/Realm/Realm.framework/Headers/RLMObject.h

@@ -138,7 +138,7 @@ NS_ASSUME_NONNULL_BEGIN
 
  The `value` argument can be a key-value coding compliant object, an array or dictionary returned from the methods in
  `NSJSONSerialization`, or an array containing one element for each managed property.
- 
+
  An exception will be thrown if any required properties are not present and those properties
  were not defined with default values.
 
@@ -159,7 +159,7 @@ NS_ASSUME_NONNULL_BEGIN
 
  The `value` argument can be a key-value coding compliant object, an array or dictionary returned from the methods in
  `NSJSONSerialization`, or an array containing one element for each managed property.
- 
+
  An exception will be thrown if any required properties are not present and those properties
  were not defined with default values.
 
@@ -189,7 +189,7 @@ NS_ASSUME_NONNULL_BEGIN
 
  If the object is being created, an exception will be thrown if any required properties
  are not present and those properties were not defined with default values.
- 
+
  If the `value` argument is a Realm object already managed by the default Realm, the
  argument's type is the same as the receiver, and the objects have identical values for
  their managed properties, this method does nothing.

+ 8 - 8
Libraries external/Realm/Realm.framework/Headers/RLMObjectBase_Dynamic.h

@@ -24,26 +24,26 @@ NS_ASSUME_NONNULL_BEGIN
 
 /**
  Returns the Realm that manages the object, if one exists.
- 
+
  @warning  This function is useful only in specialized circumstances, for example, when building components
            that integrate with Realm. If you are simply building an app on Realm, it is
            recommended to retrieve the Realm that manages the object via `RLMObject`.
 
  @param object	An `RLMObjectBase` obtained via a Swift `Object` or `RLMObject`.
- 
+
  @return The Realm which manages this object. Returns `nil `for unmanaged objects.
  */
 FOUNDATION_EXTERN RLMRealm * _Nullable RLMObjectBaseRealm(RLMObjectBase * _Nullable object);
 
 /**
  Returns an `RLMObjectSchema` which describes the managed properties of the object.
- 
+
  @warning  This function is useful only in specialized circumstances, for example, when building components
            that integrate with Realm. If you are simply building an app on Realm, it is
            recommended to retrieve `objectSchema` via `RLMObject`.
 
  @param object	An `RLMObjectBase` obtained via a Swift `Object` or `RLMObject`.
- 
+
  @return The object schema which lists the managed properties for the object.
  */
 FOUNDATION_EXTERN RLMObjectSchema * _Nullable RLMObjectBaseObjectSchema(RLMObjectBase * _Nullable object);
@@ -56,23 +56,23 @@ FOUNDATION_EXTERN RLMObjectSchema * _Nullable RLMObjectBaseObjectSchema(RLMObjec
            recommended to retrieve key values via `RLMObject`.
 
  @warning Will throw an `NSUndefinedKeyException` if `key` is not present on the object.
- 
+
  @param object	An `RLMObjectBase` obtained via a Swift `Object` or `RLMObject`.
  @param key		The name of the property.
- 
+
  @return The object for the property requested.
  */
 FOUNDATION_EXTERN id _Nullable RLMObjectBaseObjectForKeyedSubscript(RLMObjectBase * _Nullable object, NSString *key);
 
 /**
  Sets a value for a key on the object.
- 
+
  @warning  This function is useful only in specialized circumstances, for example, when building components
            that integrate with Realm. If you are simply building an app on Realm, it is
            recommended to set key values via `RLMObject`.
 
  @warning Will throw an `NSUndefinedKeyException` if `key` is not present on the object.
- 
+
  @param object	An `RLMObjectBase` obtained via a Swift `Object` or `RLMObject`.
  @param key		The name of the property.
  @param obj		The object to set as the value of the key.

+ 3 - 3
Libraries external/Realm/Realm.framework/Headers/RLMObjectSchema.h

@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 /**
  An array of `RLMProperty` instances representing the managed properties of a class described by the schema.
- 
+
  @see `RLMProperty`
  */
 @property (nonatomic, readonly, copy) NSArray<RLMProperty *> *properties;
@@ -55,9 +55,9 @@ NS_ASSUME_NONNULL_BEGIN
 
 /**
  Retrieves an `RLMProperty` object by the property name.
- 
+
  @param propertyName The property's name.
- 
+
  @return An `RLMProperty` object, or `nil` if there is no property with the given name.
  */
 - (nullable RLMProperty *)objectForKeyedSubscript:(NSString *)propertyName;

+ 19 - 19
Libraries external/Realm/Realm.framework/Headers/RLMProperty.h

@@ -16,37 +16,37 @@
 //
 ////////////////////////////////////////////////////////////////////////////
 
-#import <Foundation/Foundation.h>
 #import <Realm/RLMConstants.h>
 
 NS_ASSUME_NONNULL_BEGIN
 
 /// :nodoc:
-@protocol RLMInt
-@end
-
+@protocol RLMInt @end
 /// :nodoc:
-@protocol RLMBool
-@end
-
+@protocol RLMBool @end
 /// :nodoc:
-@protocol RLMDouble
-@end
-
+@protocol RLMDouble @end
 /// :nodoc:
-@protocol RLMFloat
-@end
+@protocol RLMFloat @end
+/// :nodoc:
+@protocol RLMString @end
+/// :nodoc:
+@protocol RLMDate @end
+/// :nodoc:
+@protocol RLMData @end
 
 /// :nodoc:
 @interface NSNumber ()<RLMInt, RLMBool, RLMDouble, RLMFloat>
 @end
 
 /**
- `RLMProperty` instances represent properties managed by a Realm in the context of an object schema. Such properties may
- be persisted to a Realm file or computed from other data from the Realm.
- 
- When using Realm, `RLMProperty` instances allow performing migrations and introspecting the database's schema.
- 
+ `RLMProperty` instances represent properties managed by a Realm in the context
+ of an object schema. Such properties may be persisted to a Realm file or
+ computed from other data from the Realm.
+
+ When using Realm, `RLMProperty` instances allow performing migrations and
+ introspecting the database's schema.
+
  These property instances map to columns in the core database.
  */
 @interface RLMProperty : NSObject
@@ -60,14 +60,14 @@ NS_ASSUME_NONNULL_BEGIN
 
 /**
  The type of the property.
- 
+
  @see `RLMPropertyType`
  */
 @property (nonatomic, readonly) RLMPropertyType type;
 
 /**
  Indicates whether this property is indexed.
- 
+
  @see `RLMObject`
  */
 @property (nonatomic, readonly) BOOL indexed;

+ 2 - 2
Libraries external/Realm/Realm.framework/Headers/RLMRealmConfiguration+Sync.h

@@ -30,10 +30,10 @@ NS_ASSUME_NONNULL_BEGIN
 /**
  A configuration object representing configuration state for Realms intended
  to sync with a Realm Object Server.
- 
+
  This property is mutually exclusive with both `inMemoryIdentifier` and `fileURL`;
  setting any one of the three properties will automatically nil out the other two.
- 
+
  @see `RLMSyncConfiguration`
  */
 @property (nullable, nonatomic) RLMSyncConfiguration *syncConfiguration;

+ 2 - 2
Libraries external/Realm/Realm.framework/Headers/RLMRealmConfiguration.h

@@ -39,10 +39,10 @@ typedef BOOL (^RLMShouldCompactOnLaunchBlock)(NSUInteger totalBytes, NSUInteger
  `RLMRealmConfiguration` instances are just plain `NSObject`s. Unlike `RLMRealm`s
  and `RLMObject`s, they can be freely shared between threads as long as you do not
  mutate them.
- 
+
  Creating configuration objects for class subsets (by setting the
  `objectClasses` property) can be expensive. Because of this, you will normally want to
- cache and reuse a single configuration object for each distinct configuration rather than 
+ cache and reuse a single configuration object for each distinct configuration rather than
  creating a new object each time you open a Realm.
  */
 @interface RLMRealmConfiguration : NSObject<NSCopying>

+ 5 - 5
Libraries external/Realm/Realm.framework/Headers/RLMRealm_Dynamic.h

@@ -79,22 +79,22 @@ NS_ASSUME_NONNULL_BEGIN
 /**
  Returns the object of the given type with the given primary key from the Realm.
 
- @warning This method is useful only in specialized circumstances, for example, when building components 
+ @warning This method is useful only in specialized circumstances, for example, when building components
           that integrate with Realm. The preferred way to get an object of a single class is to use the class
           methods on `RLMObject`.
- 
+
  @param className   The class name for the object you are looking for.
  @param primaryKey  The primary key value for the object you are looking for.
- 
+
  @return    An object, or `nil` if an object with the given primary key does not exist.
- 
+
  @see       `+[RLMObject objectForPrimaryKey:]`
  */
 - (nullable RLMObject *)objectWithClassName:(NSString *)className forPrimaryKey:(id)primaryKey;
 
 /**
  Creates an `RLMObject` instance of type `className` in the Realm, and populates it using a given object.
- 
+
  The `value` argument is used to populate the object. It can be a key-value coding compliant object, an array or
  dictionary returned from the methods in `NSJSONSerialization`, or an array containing one element for each managed
  property. An exception will be thrown if any required properties are not present and those properties were not defined

+ 5 - 5
Libraries external/Realm/Realm.framework/Headers/RLMResults.h

@@ -38,8 +38,8 @@ NS_ASSUME_NONNULL_BEGIN
  enumeration.
 
  `RLMResults` are lazily evaluated the first time they are accessed; they only
- run queries when the result of the query is requested. This means that 
- chaining several temporary `RLMResults` to sort and filter your data does not 
+ run queries when the result of the query is requested. This means that
+ chaining several temporary `RLMResults` to sort and filter your data does not
  perform any extra work processing the intermediate state.
 
  Once the results have been evaluated or a notification block has been added,
@@ -201,7 +201,7 @@ NS_ASSUME_NONNULL_BEGIN
  which rows in the results collection were added, removed or modified. If a
  write transaction did not modify any objects in the results collection,
  the block is not called at all. See the `RLMCollectionChange` documentation for
- information on how the changes are reported and an example of updating a 
+ information on how the changes are reported and an example of updating a
  `UITableView`.
 
  If an error occurs the block will be called with `nil` for the results
@@ -275,7 +275,7 @@ NS_ASSUME_NONNULL_BEGIN
 
  @warning You cannot use this method on `RLMObject`, `RLMArray`, and `NSData` properties.
 
- @param property The property whose maximum value is desired. Only properties of types `int`, `float`, `double`, and 
+ @param property The property whose maximum value is desired. Only properties of types `int`, `float`, `double`, and
                  `NSDate` are supported.
 
  @return The maximum value of the property, or `nil` if the Results are empty.
@@ -332,7 +332,7 @@ NS_ASSUME_NONNULL_BEGIN
 /**
  `RLMLinkingObjects` is an auto-updating container type. It represents a collection of objects that link to its
  parent object.
- 
+
  For more information, please see the "Inverse Relationships" section in the
  [documentation](https://realm.io/docs/objc/latest/#relationships).
  */

+ 2 - 2
Libraries external/Realm/Realm.framework/Headers/RLMSchema.h

@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 /**
  An `NSArray` containing `RLMObjectSchema`s for all object types in the Realm.
- 
+
  This property is intended to be used during migrations for dynamic introspection.
 
  @see `RLMObjectSchema`
@@ -57,7 +57,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 /**
  Looks up and returns an `RLMObjectSchema` for the given class name in the Realm.
- 
+
  If there is no object of type `className` in the schema, an exception will be thrown.
 
  @param className   The object class name.

+ 1 - 1
Libraries external/Realm/Realm.framework/Headers/RLMSyncConfiguration.h

@@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 /**
  The URL of the remote Realm upon the Realm Object Server.
- 
+
  @warning The URL cannot end with `.realm`, `.realm.lock` or `.realm.management`.
  */
 @property (nonatomic, readonly) NSURL *realmURL;

+ 12 - 2
Libraries external/Realm/Realm.framework/Headers/RLMSyncCredentials.h

@@ -82,8 +82,18 @@ extern RLMIdentityProvider const RLMIdentityProviderCloudKit;
                                register:(BOOL)shouldRegister;
 
 /**
- Construct and return special credentials representing a token that can be directly used to open a Realm. The identity
- is used to uniquely identify the user across application launches.
+ Construct and return special credentials representing a token that can
+ be directly used to open a Realm. The identity is used to uniquely identify
+ the user across application launches.
+
+ @warning The custom user identity will be deprecated in a future release.
+
+ @warning Do not specify a user identity that is the URL of an authentication
+          server.
+
+ @warning When passing an access token credential into any of `RLMSyncUser`'s
+          login methods, you must always specify the same authentication server
+          URL, or none at all, every time you call the login method.
  */
 + (instancetype)credentialsWithAccessToken:(RLMServerToken)accessToken identity:(NSString *)identity;
 

+ 1 - 1
Libraries external/Realm/Realm.framework/Headers/RLMSyncManager.h

@@ -83,7 +83,7 @@ typedef void(^RLMSyncErrorReportingBlock)(NSError *, RLMSyncSession * _Nullable)
 
 /**
  Whether SSL certificate validation should be disabled.
- 
+
  Once this value is set (either way), it will be used as the default value for SSL
  validation when initializing new sync configuration values. A given configuration's
  SSL validation setting can still be overriden from the global default by setting it

+ 32 - 4
Libraries external/Realm/Realm.framework/Headers/RLMSyncPermissionValue.h

@@ -32,7 +32,7 @@ typedef NS_ENUM(NSUInteger, RLMSyncAccessLevel) {
     RLMSyncAccessLevelNone          = 0,
     /**
      User can only read the contents of the Realm.
-     
+
      @warning Users who have read-only access to a Realm should open the
               Realm using `+[RLMRealm asyncOpenWithConfiguration:callbackQueue:callback:]`.
               Attempting to directly open the Realm is an error; in this
@@ -52,7 +52,7 @@ NS_ASSUME_NONNULL_BEGIN
  A value representing a permission granted to the specified user(s) to access the specified Realm(s).
 
  `RLMSyncPermissionValue` is immutable and can be accessed from any thread.
- 
+
  See https://realm.io/docs/realm-object-server/#permissions for general documentation.
  */
 @interface RLMSyncPermissionValue : NSObject
@@ -82,7 +82,7 @@ NS_ASSUME_NONNULL_BEGIN
  Create a new sync permission value, for use with permission APIs.
 
  @param path        The Realm Object Server path to the Realm whose permission should be modified
-                    (e.g. "/path/to/realm"). Pass "*" to apply to all Realms managed by the server.
+                    (e.g. "/path/to/realm"). Pass "*" to apply to all Realms managed by the user.
  @param userID      The identity of the user who should be granted access to the Realm at `path`.
                     Pass "*" to apply to all users managed by the server.
  @param accessLevel The access level to grant.
@@ -91,12 +91,40 @@ NS_ASSUME_NONNULL_BEGIN
                            userID:(NSString *)userID
                       accessLevel:(RLMSyncAccessLevel)accessLevel;
 
+/**
+ Create a new sync permission value, for use with permission APIs.
+
+ @param path        The Realm Object Server path to the Realm whose permission should be modified
+                    (e.g. "/path/to/realm"). Pass "*" to apply to all Realms managed by the user.
+ @param username    The username (often an email address) of the user who should be granted access
+                    to the Realm at `path`.
+ @param accessLevel The access level to grant.
+ */
+- (instancetype)initWithRealmPath:(NSString *)path
+                         username:(NSString *)username
+                      accessLevel:(RLMSyncAccessLevel)accessLevel;
+
 /**
  The identity of the user to whom this permission is granted, or "*"
- if all users are granted this permission.
+ if all users are granted this permission. Nil if the permission is
+ defined in terms of a key-value pair.
  */
 @property (nullable, nonatomic, readonly) NSString *userId;
 
+/**
+ If the permission is defined in terms of a key-value pair, the key
+ describing the type of criterion used to determine what users the
+ permission applies to. Otherwise, nil.
+ */
+@property (nullable, nonatomic, readonly) NSString *key;
+
+/**
+ If the permission is defined in terms of a key-value pair, a string
+ describing the criterion value used to determine what users the
+ permission applies to. Otherwise, nil.
+ */
+@property (nullable, nonatomic, readonly) NSString *value;
+
 /**
  When this permission object was last updated.
  */

+ 1 - 1
Libraries external/Realm/Realm.framework/Headers/RLMSyncSession.h

@@ -124,7 +124,7 @@ NS_ASSUME_NONNULL_BEGIN
 
  Multiple blocks can be registered with the same session at once. Each block
  will be invoked on a side queue devoted to progress notifications.
- 
+
  If the session has already received progress information from the
  synchronization subsystem, the block will be called immediately. Otherwise, it
  will be called as soon as progress information becomes available.

+ 60 - 2
Libraries external/Realm/Realm.framework/Headers/RLMSyncUser.h

@@ -18,7 +18,9 @@
 
 #import <Foundation/Foundation.h>
 
-@class RLMSyncUser, RLMSyncCredentials, RLMSyncPermissionValue, RLMSyncPermissionResults, RLMSyncSession, RLMRealm;
+#import "RLMSyncCredentials.h"
+
+@class RLMSyncUser, RLMSyncUserInfo, RLMSyncCredentials, RLMSyncPermissionValue, RLMSyncPermissionResults, RLMSyncSession, RLMRealm;
 
 /**
  The state of the user object.
@@ -47,6 +49,10 @@ typedef void(^RLMPermissionStatusBlock)(NSError * _Nullable);
 /// Exactly one of the two arguments will be populated.
 typedef void(^RLMPermissionResultsBlock)(RLMSyncPermissionResults * _Nullable, NSError * _Nullable);
 
+/// A block type used to asynchronously report results of a user info retrieval.
+/// Exactly one of the two arguments will be populated.
+typedef void(^RLMRetrieveUserBlock)(RLMSyncUserInfo * _Nullable, NSError * _Nullable);
+
 NS_ASSUME_NONNULL_BEGIN
 
 /**
@@ -173,6 +179,23 @@ NS_SWIFT_UNAVAILABLE("Use the full version of this API.");
  */
 - (void)changePassword:(NSString *)newPassword forUserID:(NSString *)userID completion:(RLMPasswordChangeStatusBlock)completion;
 
+#pragma mark - Administrator API
+
+/**
+ Given a Realm Object Server authentication provider and a provider identifier for a user
+ (for example, a username), look up and return user information for that user.
+
+ @param providerUserIdentity    The username or identity of the user as issued by the authentication provider.
+                                In most cases this is different from the Realm Object Server-issued identity.
+ @param provider                The authentication provider that manages the user whose information is desired.
+ @param completion              Completion block invoked when request has completed or failed.
+                                The callback will be invoked on a background queue provided
+                                by `NSURLSession`.
+ */
+- (void)retrieveInfoForUser:(NSString *)providerUserIdentity
+           identityProvider:(RLMIdentityProvider)provider
+                 completion:(RLMRetrieveUserBlock)completion;
+
 // This set of permissions APIs uses immutable `RLMSyncPermissionValue` objects to
 // retrieve and apply permissions. It is intended to replace the set of APIs which
 // directly access Realms and Realm model objects to work with permissions.
@@ -245,6 +268,41 @@ NS_SWIFT_UNAVAILABLE("Use the full version of this API.");
 /// :nodoc:
 + (instancetype)new __attribute__((unavailable("RLMSyncUser cannot be created directly")));
 
-NS_ASSUME_NONNULL_END
+@end
+
+/**
+ A data object representing information about a user that was retrieved from a user lookup call.
+ */
+@interface RLMSyncUserInfo : NSObject
+
+/**
+ The authentication provider which manages the user represented by this user info instance.
+ */
+@property (nonatomic, readonly) RLMIdentityProvider provider;
+
+/**
+ The username or identity issued to this user by the authentication provider.
+ */
+@property (nonatomic, readonly) NSString *providerUserIdentity;
+
+/**
+ The identity issued to this user by the Realm Object Server.
+ */
+@property (nonatomic, readonly) NSString *identity;
+
+/**
+ Whether the user is flagged on the Realm Object Server as an administrator.
+ */
+@property (nonatomic, readonly) BOOL isAdmin;
+
+#pragma mark - Miscellaneous
+
+/// :nodoc:
+- (instancetype)init __attribute__((unavailable("RLMSyncUserInfo cannot be created directly")));
+
+/// :nodoc:
++ (instancetype)new __attribute__((unavailable("RLMSyncUserInfo cannot be created directly")));
 
 @end
+
+NS_ASSUME_NONNULL_END

+ 30 - 3
Libraries external/Realm/Realm.framework/Headers/RLMSyncUtil.h

@@ -29,6 +29,9 @@ extern NSString *const kRLMSyncPathOfRealmBackupCopyKey;
 /// A user info key for use with `RLMSyncErrorClientResetError`.
 extern NSString *const kRLMSyncInitiateClientResetBlockKey;
 
+/// A user info key for use with `RLMSyncErrorPermissionDeniedError`.
+extern NSString *const kRLMSyncInitiateDeleteRealmBlockKey;
+
 /**
  The error domain string for all SDK errors related to errors reported
  by the synchronization manager error handler, as well as general sync
@@ -56,7 +59,7 @@ typedef RLM_ERROR_ENUM(NSInteger, RLMSyncError, RLMSyncErrorDomain) {
     /**
      An error that indicates that the response received from the
      authentication server was malformed.
-     
+
      @warning This error is deprecated, and has been replaced by
               `RLMSyncAuthErrorBadResponse`.
      */
@@ -68,7 +71,7 @@ typedef RLM_ERROR_ENUM(NSInteger, RLMSyncError, RLMSyncErrorDomain) {
     /// An error that indicates a problem with a specific user.
     RLMSyncErrorClientUserError         = 5,
 
-    /** 
+    /**
      An error that indicates an internal, unrecoverable problem
      with the underlying synchronization engine.
      */
@@ -95,7 +98,7 @@ typedef RLM_ERROR_ENUM(NSInteger, RLMSyncError, RLMSyncErrorDomain) {
      The client reset process can be initiated in one of two ways. The block provided in the
      `userInfo` dictionary under `kRLMSyncInitiateClientResetBlockKey` can be called to
      initiate the reset process. This block can be called any time after the error is
-     received, but should only be called if and when your app closes and invalidates every
+     received, but should only be called after your app closes and invalidates every
      instance of the offending Realm on all threads (note that autorelease pools may make this
      difficult to guarantee).
 
@@ -118,6 +121,30 @@ typedef RLM_ERROR_ENUM(NSInteger, RLMSyncError, RLMSyncErrorDomain) {
      error domain.
      */
     RLMSyncErrorUnderlyingAuthError     = 8,
+
+    /**
+     An error that indicates the user does not have permission to perform an operation
+     upon a synced Realm. For example, a user may receive this error if they attempt to
+     open a Realm they do not have at least read access to, or write to a Realm they only
+     have read access to.
+     
+     This error may also occur if a user incorrectly opens a Realm they have read-only
+     permissions to without using the `asyncOpen()` APIs.
+
+     A Realm that suffers a permission denied error is, by default, flagged so that its
+     local copy will be deleted the next time the application starts.
+     
+     The `userInfo` dictionary contains a block under the key
+     `kRLMSyncInitiateDeleteRealmBlockKey`, which can be used to request that the file be
+     deleted immediately instead. This block can be called any time after the error is
+     received to immediately delete the Realm file, but should only be called after your
+     app closes and invalidates every instance of the offending Realm on all threads (note
+     that autorelease pools may make this difficult to guarantee).
+
+     @warning It is strongly recommended that, if a Realm has encountered a permission denied
+              error, its files be deleted before attempting to re-open it.
+     */
+    RLMSyncErrorPermissionDeniedError   = 9,
 };
 
 /// An error which is related to authentication to a Realm Object Server.

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


+ 4 - 2
Libraries external/Realm/Realm.framework/Modules/module.modulemap

@@ -7,15 +7,17 @@ framework module Realm {
     explicit module Private {
         header "RLMAccessor.h"
         header "RLMArray_Private.h"
+        header "RLMCollection_Private.h"
         header "RLMListBase.h"
+        header "RLMObject_Private.h"
         header "RLMObjectBase_Dynamic.h"
+        header "RLMObjectBase_Private.h"
         header "RLMObjectSchema_Private.h"
         header "RLMObjectStore.h"
-        header "RLMObject_Private.h"
         header "RLMOptionalBase.h"
         header "RLMProperty_Private.h"
-        header "RLMRealmConfiguration_Private.h"
         header "RLMRealm_Private.h"
+        header "RLMRealmConfiguration_Private.h"
         header "RLMResults_Private.h"
         header "RLMSchema_Private.h"
         header "RLMSyncConfiguration_Private.h"

+ 4 - 4
Libraries external/Realm/Realm.framework/PrivateHeaders/RLMObjectSchema_Private.h

@@ -54,15 +54,15 @@ NS_ASSUME_NONNULL_BEGIN
  This method is useful only in specialized circumstances, for example, when accessing objects
  in a Realm produced externally. If you are simply building an app on Realm, it is not recommended
  to use this method as an [RLMObjectSchema](RLMObjectSchema) is generated automatically for every [RLMObject](RLMObject) subclass.
- 
+
  Initialize an RLMObjectSchema with classname, objectClass, and an array of properties
- 
+
  @warning This method is useful only in specialized circumstances.
- 
+
  @param objectClassName     The name of the class used to refer to objects of this type.
  @param objectClass         The Objective-C class used when creating instances of this type.
  @param properties          An array of RLMProperty instances describing the managed properties for this type.
- 
+
  @return    An initialized instance of RLMObjectSchema.
  */
 - (instancetype)initWithClassName:(NSString *)objectClassName objectClass:(Class)objectClass properties:(NSArray *)properties;

+ 2 - 2
Libraries external/Realm/Realm.framework/PrivateHeaders/RLMObjectStore.h

@@ -58,14 +58,14 @@ id _Nullable RLMGetObject(RLMRealm *realm, NSString *objectClassName, id _Nullab
 RLMObjectBase *RLMCreateObjectInRealmWithValue(RLMRealm *realm, NSString *className,
                                                id _Nullable value, bool createOrUpdate)
 NS_RETURNS_RETAINED;
-    
+
 
 //
 // Accessor Creation
 //
 
 
-// switch List<> properties from being backed by unmanaged RLMArrays to RLMArrayLinkView
+// switch List<> properties from being backed by unmanaged RLMArrays to RLMManagedArray
 void RLMInitializeSwiftAccessorGenerics(RLMObjectBase *object);
 
 #ifdef __cplusplus

+ 11 - 1
Libraries external/Realm/Realm.framework/PrivateHeaders/RLMObject_Private.h

@@ -81,6 +81,16 @@ typedef void (^RLMObjectNotificationCallback)(NSArray<NSString *> *_Nullable pro
                                               NSError *_Nullable error);
 FOUNDATION_EXTERN RLMNotificationToken *RLMObjectAddNotificationBlock(RLMObjectBase *obj, RLMObjectNotificationCallback block);
 
+// Returns whether the class is a descendent of RLMObjectBase
+FOUNDATION_EXTERN BOOL RLMIsObjectOrSubclass(Class klass);
+
+// Returns whether the class is an indirect descendant of RLMObjectBase
+FOUNDATION_EXTERN BOOL RLMIsObjectSubclass(Class klass);
+
+// For unit testing purposes, allow an Objective-C class named FakeObject to also be used
+// as the base class of managed objects. This allows for testing invalid schemas.
+FOUNDATION_EXTERN void RLMSetTreatFakeObjectAsRLMObject(BOOL flag);
+
 // Get ObjectUil class for objc or swift
 FOUNDATION_EXTERN Class RLMObjectUtilClass(BOOL isSwift);
 
@@ -94,7 +104,7 @@ FOUNDATION_EXTERN const NSUInteger RLMDescriptionMaxDepth;
 + (nullable NSDictionary<NSString *, NSDictionary<NSString *, NSString *> *> *)linkingObjectsPropertiesForClass:(Class)cls;
 
 + (nullable NSArray<NSString *> *)getGenericListPropertyNames:(id)obj;
-+ (nullable NSDictionary<NSString *, NSString *> *)getLinkingObjectsProperties:(id)object;
++ (nullable NSDictionary<NSString *, NSDictionary<NSString *, NSString *> *> *)getLinkingObjectsProperties:(id)object;
 
 + (nullable NSDictionary<NSString *, NSNumber *> *)getOptionalProperties:(id)obj;
 + (nullable NSArray<NSString *> *)requiredPropertiesForClass:(Class)cls;

+ 4 - 6
Libraries external/Realm/Realm.framework/PrivateHeaders/RLMProperty_Private.h

@@ -24,7 +24,6 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-BOOL RLMPropertyTypeIsNullable(RLMPropertyType propertyType);
 BOOL RLMPropertyTypeIsComputed(RLMPropertyType propertyType);
 FOUNDATION_EXTERN void RLMValidateSwiftPropertyName(NSString *name);
 
@@ -76,8 +75,7 @@ static inline NSString *RLMTypeToString(RLMPropertyType type) {
                                  instance:(RLMObjectBase *)objectInstance;
 
 - (instancetype)initSwiftListPropertyWithName:(NSString *)name
-                                         ivar:(Ivar)ivar
-                              objectClassName:(nullable NSString *)objectClassName;
+                                     instance:(id)object;
 
 - (instancetype)initSwiftOptionalPropertyWithName:(NSString *)name
                                           indexed:(BOOL)indexed
@@ -116,11 +114,11 @@ static inline NSString *RLMTypeToString(RLMPropertyType type) {
  This method is useful only in specialized circumstances, for example, in conjunction with
  +[RLMObjectSchema initWithClassName:objectClass:properties:]. If you are simply building an
  app on Realm, it is not recommened to use this method.
- 
+
  Initialize an RLMProperty
- 
+
  @warning This method is useful only in specialized circumstances.
- 
+
  @param name            The property name.
  @param type            The property type.
  @param objectClassName The object type used for Object and Array types.

+ 4 - 0
Libraries external/Realm/Realm.framework/PrivateHeaders/RLMSchema_Private.h

@@ -44,6 +44,10 @@ NS_ASSUME_NONNULL_BEGIN
 // schema based upon all currently registered object classes
 + (instancetype)partialSharedSchema;
 
+// private schema based upon all currently registered object classes.
+// includes classes that are excluded from the default schema.
++ (instancetype)partialPrivateSharedSchema;
+
 // class for string
 + (nullable Class)classForString:(NSString *)className;
 

+ 3 - 0
Libraries external/Realm/Realm.framework/PrivateHeaders/RLMSyncUtil_Private.h

@@ -25,6 +25,7 @@
 typedef NS_ENUM(NSUInteger, RLMSyncSystemErrorKind) {
     // Specific
     RLMSyncSystemErrorKindClientReset,
+    RLMSyncSystemErrorKindPermissionDenied,
     // General
     RLMSyncSystemErrorKindClient,
     RLMSyncSystemErrorKindConnection,
@@ -57,7 +58,9 @@ extern NSString *const kRLMSyncErrorStatusCodeKey;
 extern NSString *const kRLMSyncIdentityKey;
 extern NSString *const kRLMSyncPasswordKey;
 extern NSString *const kRLMSyncPathKey;
+extern NSString *const kRLMSyncTokenKey;
 extern NSString *const kRLMSyncProviderKey;
+extern NSString *const kRLMSyncProviderIDKey;
 extern NSString *const kRLMSyncRegisterKey;
 extern NSString *const kRLMSyncUnderlyingErrorKey;
 

BIN
Libraries external/Realm/Realm.framework/Realm


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


BIN
Libraries external/Realm/RealmSwift.framework/RealmSwift