SkygearIO / skygear-SDK-iOS

Skygear SDK for iOS
https://skygear.io
Other
10 stars 28 forks source link

[SKYAsset] SKYAuthContainer does not handle an user record containing Asset #144

Closed howawong closed 6 years ago

howawong commented 6 years ago

In SkyAuthContainer.m saveCurrentUserAndAccessToken

if (_currentUser) {
            [[NSUserDefaults standardUserDefaults]
                setObject:[NSKeyedArchiver archivedDataWithRootObject:_currentUser]
                   forKey:@"SKYContainerCurrentUserRecord"];
        }

When user record contains anAsset field, Swift Example[42786:22490468] -[SKYAsset encodeWithCoder:]: unrecognized selector sent to instance 0x60000045a2b0 is thrown.

Expected Behaviour: user object can be saved via saveCurrentUserAndAccessToken.