IOS compilation error: no visible @interface for 'CDVCommandDelegateImpl' declares selector 'execute:'

After updating to the latest version of Cordoba ( 3.6.3 ), I get this error when running the cordova build ios command.

Mistake:

 /Volumes/local.uhmuhm.net/projectxxx/htdocs/phonegap/src/Projectxxx/platforms/ios/Projectxxx/Classes/MainViewController.m:154:19: error: no visible @interface for 'CDVCommandDelegateImpl' declares the selector 'execute:' return [super execute:command]; 

Additional Information:

  • Installed platforms: android 3.6.3, ios 3.6.3

  • I'm on the latest version of xcode (6.0.1)

  • It all started after updating Cordoba to 3.6.3 (I used to work with 3.4.1)

Any idea on how to solve this problem?

enter image description here

+42
ios objective-c iphone cordova
Sep 22 '14 at 2:03
source share
4 answers

Based on what Nazar said, the only difference in value when creating a new application and comparing the existing platforms/ios/Classes folder was to remove the execute method from MainViewController.m .

file diff

This clears the build error for me.

+44
Sep 24 '14 at 16:52
source share

I fixed the same problem with

 cordova platform remove ios cordova platform add ios 
+29
Sep 22 '14 at 18:16
source share

Run cordova create with the new version of the cord to create a new project, and then copy the AppDelegate and MainViewController on top of the files in your "old" project. After that, the error disappeared.

+13
Sep 22 '14 at 18:06
source share

I had the same problem today. I found that the CordovaLib / Classes / CDVCommandDelegateImpl.m file does not have this:

 - (BOOL)execute:(CDVInvokedUrlCommand*)command { return [_commandQueue execute:command]; } 

as it was in the same file in the latest version of Cordova 3.5.0. So I added this snippet, as well as the corresponding declaration in the file CDVCommandDelegateImpl.h:

 - (BOOL)execute:(CDVInvokedUrlCommand*)command; 

And now my application is working! Not sure if this is a good solution, but if it works, then it's good enough :)

+3
Sep 22 '14 at 15:17
source share



All Articles