shi11 / RemoteControls

cordova 3 plugin for interacting with ios7 remote controls and metadata
57 stars 41 forks source link

Xcode 5.1.1 reports "Use of undeclared identifier" won't compile #1

Closed fireproof closed 9 years ago

fireproof commented 10 years ago

UPDATE: needed to add #import "RemoteControls.h" to top of /Classes/MainViewController.m (but plugin still doesn't seem to work)

This is the modification I made to MainViewController.m (hopefully per your instructions):

-  (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    [[RemoteControls remoteControls]
     setWebView:self.webView];
}

- (void)remoteControlReceivedWithEvent:(UIEvent *)receivedEvent
{
    [[RemoteControls remoteControls]
     receiveRemoteEvent:receivedEvent];
}
shi11 commented 9 years ago

Hi, so sorry, I just noticed this issue. Did you figure it out?

yourbuddyconner commented 9 years ago

I've got this same issue! When trying to build my cordova project the build fails with "Use of undeclared identifier 'RemoteControls'"

It takes issue with the same block of code as posted above, mine looks identical.

The files are all in the right place and RemoteControls.m is in the build order in xCode...

shi11 commented 9 years ago

hi, sorry, did you see his update?

UPDATE: needed to add #import "RemoteControls.h" to top of /Classes/MainViewController.m (but plugin still doesn't seem to work)

yourbuddyconner commented 9 years ago

Is that what you did in your implementation to get it working? It seemed as though he didn't have much success doing that so I wasn't sure.

shi11 commented 9 years ago

Yup, if you're seeing the "undeclared intentifier" error than declaring it by importing the RemoteControls.h file should solve that problem.