Home Help Center

IceTouch bidir communication and ICEIdentity

[Deleted User][Deleted User] Uwe ArztOrganization: Uwe ArztProject: Home Automation
Hi all,

i am trying to set up Bidirectional Communication from IceTouch. Here is the code:
// callbacks
ICEObject* cb = [HomeControlLightCallback objectWithDelegate:self];
ICEIdentity* client = [ICEIdentity identity:[ICEUtil generateUUID] category:nil];
NSLog(@"%@ %@ %@", client, client.name, client.category);
id<ICEObjectAdapter> adapter = [appDelegate.communicator createObjectAdapter:@""];
[adapter add:cb identity:client];
[adapter activate];
[[hclightprx ice_getConnection] setAdapter:adapter];
[hclightprx registerLightCallbacks:client];

This code works fine, when i am running in the simulator and my server is localhost. When i am on my device, i get an Error when i add my callback with the identity to my adapter:
<ICEIdentity: 0x41c930> 59FF6D56-3C59-40F1-813F-0A1BAC5C06F1 (null)
*** -[ICEIdentity identity]: unrecognized selector sent to instance 0x41c930
NSException: *** -[ICEIdentity identity]: unrecognized selector sent to instance 0x41c930

What 's wrong with my code? Is there somewhere an example for bidir Communication with IceTouch for testing/debugging?

BTW: Would it be possible to ship DebugLibs with IceTouch?




  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff

    This error typically occurs if the linker -ObjC option is missing when linking the executable. In theory, the Xcode plugin from the Ice Touch 1.0 distribution adds this option automatically when building with the iPhone SDK so you don't have to add it manually (in the "Other Linker Flags" field of the target settings). How did you install Ice Touch?

    If you want a debug build, you can re-compile Ice Touch from source.

Sign In or Register to comment.