shi11 / RemoteControls

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

iOS build failed #22

Closed OSVFreeDom closed 8 years ago

OSVFreeDom commented 8 years ago

Hi, When I try to compile after modify the MainViewController.m I have this error in MainViewController.m : "No visible @interface for 'RemoteControls' declares the selector 'setWebView:'

and this error in RemoteControls.m : "No visible @interface for 'UIView' declares the selector 'stringByEvaluatingJavaScriptFromString:'

in the - (void)receiveRemoteEvent:(UIEvent *)receivedEvent function .

Please help me I'm don't find any solutions.

Thanks

shi11 commented 8 years ago

Are you importing RemoteControls.h? See the Readme.

#import "RemoteControls.h"

OSVFreeDom commented 8 years ago

Yes I do everything in Readme

shi11 commented 8 years ago

I'm not sure, perhaps this will point you in the right direction, http://stackoverflow.com/questions/10387330/no-visible-interface-for

kylesziv commented 8 years ago

I'm actually getting this error too.

Looks like this plugin had the same issue: https://github.com/EddyVerbruggen/cordova-plugin-3dtouch/commit/bed52b3b226afab7f83d3fc8f03609ab1894834d

Seems like it has to do with the latest Cordova Version and the plugin's support for it?

OSVFreeDom commented 8 years ago

I worked for some fix but no result, I need to release the app quickly to my client Can you help me please ? Thanks

shi11 commented 8 years ago

Can you both please share more details about your environment. On Sun, Feb 28, 2016 at 12:04 PM philip65 notifications@github.com wrote:

I worked for some fix but no result, I need to release the app quickly to my client Can you help me please ? Thanks

— Reply to this email directly or view it on GitHub https://github.com/shi11/RemoteControls/issues/22#issuecomment-189907050 .

OSVFreeDom commented 8 years ago

I work on : Cordova CLI: 6.0.0 OS: Mac OS X El Capitan Node Version: v4.2.6 Xcode version: Xcode 7.3 Build version 7D141l (for Xcode I have 7.3 & 7.2)

Ask me if you need more informations. Thanks

shi11 commented 8 years ago

What version of iOS are you compiling against? On Sun, Feb 28, 2016 at 9:13 PM philip65 notifications@github.com wrote:

I work on : Cordova CLI: 6.0.0 OS: Mac OS X El Capitan Node Version: v4.2.6 Xcode version: Xcode 7.3 Build version 7D141l (for Xcode I have 7.3 & 7.2)

Ask me if you need more informations. Thanks

— Reply to this email directly or view it on GitHub https://github.com/shi11/RemoteControls/issues/22#issuecomment-189997848 .

OSVFreeDom commented 8 years ago

iOS 9.2

shi11 commented 8 years ago

Ok apparently this is an issue with cordova ios@4.0.0 and up.

This is the temp fix: cordova platform remove ios cordova platform add ios@3.9.2

This issue helped me find the answer: https://github.com/Telerik-Verified-Plugins/PushNotification/issues/71

to check your version of cordova ios you can do this: cordova platform ls

ghenry22 commented 8 years ago

Looks like the self.webview statements in the ios code and those added to the mainviewcontroller.m cause it to throw up. I have a fork of the plugin updated in a similar way to the linked post and that is fine but I don't know how to handle the self.webview statements that are added into the mainviewcontroller.m file?

Any thoughts?

jcesarmobile commented 8 years ago

My pull request should fix the issue https://github.com/shi11/RemoteControls/pull/23

ghenry22 commented 8 years ago

I have done a first test with IOS@4.1.0 and the updated plugin as per PR #23 and all works correctly in the emulator. I will test on a real device later today when I have access to a spare IOS device.

ghenry22 commented 8 years ago

Huge thank you to @jcesarmobile !

shi11 commented 8 years ago

Finally closing this issue. Big thanks @jcesarmobile !!