my-first-realm-app icon indicating copy to clipboard operation
my-first-realm-app copied to clipboard

Bug in ObjectPermissions

Open benjaminledet opened this issue 7 years ago • 2 comments

Steps & Code to Reproduce

Login with a nickname Uninstall / Reinstall the app Login with the same nickname

Code Sample

  /**
    Returns the class-wide permissions for the named class.

     - parameter cls: The name of an Object subclass to get the permissions for.
     - returns: The class-wide permissions for the named class.
     - requires: className must name a class in this Realm's schema.
     - requires: This must only be called on a partially-synced Realm.
    */
 public func permissions(forClassNamed className: String) -> List<Permission> {
        let classPermission = object(ofType: ClassPermission.self, forPrimaryKey: className)!
        return classPermission.permissions
    }
Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value

Also, 3 permissions are added and a new partial path with the same user capture d ecran 2018-04-11 a 13 25 57 capture d ecran 2018-04-11 a 13 26 48

Version of Realm and tooling

Realm version(s): 3.3.0 & 3.3.2 XCode version: Xcode 9.3 Which device OS version and device: iPhone 8 (11.3)

benjaminledet avatar Apr 11 '18 11:04 benjaminledet

Any update on this ? I am having same issue on the iOS app , Xcode 9.4.1, I am not able to login with same user after app reinstall

Pavan-Concur avatar Nov 16 '18 22:11 Pavan-Concur

Same issue. Can somebody help ?

Blackening999 avatar Dec 14 '18 21:12 Blackening999