Pregunta

Similar to an existing question but with some more specifics.

I'm trying to setup the Sphero Unity Plugin from the Unity Asset Store but can't seem to run even the bundled HelloWorld sample on a device. The app will crash as soon it connects to a Sphero. Looking at the debug output the issue seems to be coming from the handleRobotOnline function in RKUNBridge.mm in the Libraries folder, specifically:

RKDeviceMessageEncoder *encoder = [RKDeviceMessageEncoder encodeWithRootObject:notification]; 
receiveDeviceMessageCallback([[encoder stringRepresentation] UTF8String]);

It appears to be an issue with keyedRepresentation. Error is:

[__NSDictionaryM RKJSONRepresentation]: unrecognized selector

I've been attempting to debug it myself but haven't really gotten anywhere.

I'm using iOS 6.0 on a 4th gen ipad, unity v4.1.2, and xcode v4.6. Any suggestions would be fantastic, thanks!

¿Fue útil?

Solución

The Sphero Unity Plugin has a post process build script in the Editor directory that you want to use when building to an XCode Project. The error you are experiencing is because of a missing linker flag.

Add:

-all_load

to your build settings in XCode, and the error should go away. You may also have to add -ObjC linker flag.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top