Reputation: 139
I am trying to implement Keen.IO analytics for a Unity3d IOS Application. I went through the Keen.IO docs, integrated the library into the xcode project generated by Unity3D, and built successfully.
However when I try to make a simple straightforward "AddEvent" call from the AppController methods, I get this exception.
2014-05-22 18:04:20.591 Adding event to collection: testEvent1
2014-05-22 18:04:20.594 [__NSDictionaryM JSONDataWithOptions:serializeUnsupportedClassesUsingDelegate:selector:error:]: unrecognized selector sent to instance 0x34737e0
2014-05-22 18:04:20.596 Exception: -[__NSDictionaryM JSONDataWithOptions:serializeUnsupportedClassesUsingDelegate:selector:error:]: unrecognized selector sent to instance 0x34737e0
I am registering the KeenClient in the applicationDidBecomeActive() method (which works fine)and Calling AddEvent() in applicationDidEnterBackground() method with a simple NSDictionary:
NSDictionary *event = [NSDictionary dictionaryWithObjectsAndKeys:@"first view", @"view_name", @"going to", @"action", nil];
[[KeenClient sharedClient] addEvent:event toEventCollection:@"testEvent1" error:nil];
It looks like the Keen.IO Library code is raising this exception but I am suspecting if it is something to do with the Unity generated xcode project.
Any help from someone familiar is appreciated.
Upvotes: 2
Views: 284
Reputation: 5423
Another approach would be to integrate the .NET Keen Client, altho I've been trying and running into library compatibility issues. Specifically around System.Numerics. However, your Unity/Mono/.NET foo may be stronger than mine.
Upvotes: 0
Reputation: 1532
Cross-posted from https://groups.google.com/forum/#!topic/keen-io-devs/hJ776FCa0DA.
It looks like you may be using an older version of the Keen IO iOS SDK that uses JSONKit for JSON serialization. The newest version uses Apple's NSJSONSerialization which shouldn't have this problem. Can you try downloading the latest universal binary / using the latest version from cocoapods?
Upvotes: 1