On Cocos2d-x iOS project compilation fails with errors

When I create Single View Application and follow these steps: https://backendless.com/backend-as-a-service/quick-start-guide-for-ios/ I succeed. But when I create a Cocos2d-x iOS project from scratch and do the same things I get the following errors:

CommLibiOS/include/Types.h

+(void)try:(void(^)())try catch:(void(^)(id exception))catch finally:(void(^)())finally;
+(void)try:(void(^)())try catch:(void(^)(id exception))catch;

Expected ‘;’ after method prototype

And in another file: lib/backendless/include/DataPermission.h

typedef enum data_permission_operation DataPermissionOperation;

ISO C++ forbids forward references to ‘enum’ types

How can fix it?

Hi,

Can you give me your project, or some sample project which reproduces this problem - I will study it.
My email - slavav@themidnightcoders.com

  1. I removed the forward references to ‘enum’ types - you can get the fixed lib from github: https://github.com/Backendless/ios-SDK

  2. You can switch off these methods of Types class in Types.h file, for example :

#if 0

+(void)try:(void(^)())try catch:(void(^)(id exception))catch finally:(void(^)())finally;

+(void)try:(void(^)())try catch:(void(^)(id exception))catch;

#endif

@Vyacheslav thank you very much. I will try the solution and write a feedback.

Vyacheslav, I have used your changes on master branch (https://github.com/Backendless/ios-SDK/commit/92fdeb265557fb8f2eedf4eacc45b0d3af7559f8) and also added this fix as you have mentioned above:

#if 0
+(void)try:(void(^)())try catch:(void(^)(id exception))catch finally:(void(^)())finally;
+(void)try:(void(^)())try catch:(void(^)(id exception))catch;
#endif

and it worked, thanks! Will you include it to the next release of the SDK? Why didn’t you add the #if 0 .... part above to your last commit as well?

The swift implementation needs for these methods.

Vyacheslav, I mean if there is a general solution to include into the SDK so that other users will now need this hack.