3 Replies Latest reply on Jan 31, 2014 4:21 AM by Tomek Ziolkowski

    How to import Rhodes.h in an extension?

    Jon Tara

      I am writing a Rhodes extension for iOS, and need to get a pointer to the current webView in Objective-C code.

       

      I believe this is the code I want:

       

      UIWebView *webView = [ [Rhodes sharedInstance] mainView ] getWebView:-1 ];

       

      However, I'm uncertain of the path needed from an extension to import Rhodes.h, which I need to import

      in order to access the Rhodes sharedInstance.

       

      My extension is working, and does some other things, all in Objective-C. I import RhoLog.h like this:

       

      #import "logging/RhoLog.h"

       

      RhoLog.h is found in platform/shared/logging.

       

      OK, I figured out I can include it like this:

       

      #import "../iphone/Classes/Rhodes.h"

       

      However, then there are errors due to other files included from Rhodes.h and the pathing is wrong. It can't find Appmanager.h.

      I'm guessing I have to add to the import path?

       

      Is it possible to import Rhodes.h in an extension?

       

      Other ways(s) to access the Rhodes instance from an extension?