Breaking News
Home / iOS / iOS Isuses / Coco2d 2x upgrade error – Cannot find protocol declaration

Coco2d 2x upgrade error – Cannot find protocol declaration

Issue

On upgrading to cocos2d 2.x for 1.x, the project fails to compile and the following two errors are displayed:

1) Cannot find protocol declaration for CCTargetTouchDelegate

2) Cannot find protocol declaration for CCStandardTouchDelegate

Solution

In cocos2d 2.x the delegates class names have been renamed as follows:

CCTargetedTouchDelegate -> CCTouchOneByOneDelegate

CCStandardTouchDelegate -> CCTouchAllAtOnceDelegate

So simply change all places and replace old delegate names with new ones throughout your project classes.

[pb_builder]

Check Also

local variable ‘build_data’ referenced before assignment : TestFlight Error : Failed to upload build.

Scenario Trying to upload build to TestFlight fails in the end. Error local variable ‘build_data’ …

Advertisment ad adsense adlogger