I searched everywhere, even on some dubious sites with warning messages about viruses that never disappear, and I can't figure it out.
I am just trying to filter the Results<T> object by date:
let messages = realm.objects(RMChatMessage).filter("timestamp > \(date)) AND (timestamp <= \(to))"))
And whenever this line is launched, it calls the following:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to parse the format string "timestamp > 1970-01-01 00:00:00 +0000"' *** First throw call stack: ( 0 CoreFoundation 0x000000010fba8c65 __exceptionPreprocess + 165 1 libobjc.A.dylib 0x000000011174ebb7 objc_exception_throw + 45 2 Foundation 0x000000010ffb66bd _qfqp2_performParsing + 8495 3 Foundation 0x000000010ffb4526 +[NSPredicate predicateWithFormat:arguments:] + 46 ...
I tried using NSDateFormatter with formats like yyyy-MM-dd hh:mm:ss or date.description using NSPredicate(format:...) instead of Result<T>.filter(...) etc., but nothing succeeded.
Is this some bug in Realm?
source share