Archived

This forum has been archived. Please start a new discussion on GitHub.

IceStorm with Ice Touch

I am trying to create a clock publisher with Ice Touch for the IceStorm Clock example. I am not sure how to connect to the TopicManager and retrieve the "time" topic. Any help would be appreciated.

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Unfortunately, we don't make it very easy to use IceStorm with Ice Touch applications as we don't provide a library with compiled IceStorm generated code. So this is something you need to do in your project.

    I've attached a modified IceStorm.ice file which is self-contained and that you can add to your application Xcode project. After adding the file to your project, you will need to go to project settings and click on the project target to show the target setting tabs. Next, click on the "Build Phases" tab and under "Compile Sources" double-click on the IceStorm.ice file and add the "--ice" compiler flag.

    Once this is done, Xcode should automatically compile IceStorm.ice using the slice2objc compiler and you should be able to include IceStorm.h to get the Objective-C generated code for IceStorm.

    To obtain the topic proxy for the clock demo, the following code should work:
        #include <IceStorm.h>
    
        ...
    
        ICEObjectPrx* p = [communicator stringToProxy:@"DemoIceStorm/TopicManager:default -p 10000"];
        IceStormTopicManagerPrx* m = [IceStormTopicManagerPrx uncheckedCast:p];
        IceStormTopicPrx* topic = [m retrieve:@"time"];
       
        ...
    

    We will consider providing IceStorm generated code in upcoming Ice Touch versions.

    Cheers,
    Benoit.
  • Aha. It works as advertised now. Thanks for the prompt reply Benoit.