Adding this line to my App import AlgoliaSearch returns this error:
2017-05-08 22:35:07.814593 XXXXXX[6255:2627487] -[__NSDictionaryI length]: unrecognized selector sent to instance 0x1702f0980 2017-05-08 22:35:07.816565 XXXXXX[6255:2627487] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryI length]: unrecognized selector sent to instance 0x1702f0980' * First throw call stack: (0x192f351b8 0x19196c55c 0x192f3c268 0x192f39270 0x192e3280c 0x1015c8608 0x10158d72c 0x10194a198 0x1001f6c24 0x1001f8c9c 0x100091fd4 0x1003973d4 0x100397690 0x1003be2c0 0x101a5d258 0x101a5d218 0x101a62280 0x192ee2810 0x192ee03fc 0x192e0e2b8 0x1948c2198 0x198e557fc 0x198e50534 0x10013c734 0x191df15b8) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
The line of code it is referring to is as below:
self.ref.child("users").observeSingleEventOfType(.Value, withBlock: { (snapshot) in
for user in snapshot.children{
var numVids = NSDictionary()
if ((user.hasChild("videos")) == true){
--> numVids = user.value["videos"] as! NSDictionary
}
}
As soon as I remove the import Algolia module the error is removed, I have tried changing the version of the module and even switching to use the objc version but the error was the same.
Anyone seen something like this before?