3

Recently I have updated my Xcode to 6.0.1 from v 5.1.1. While during validation of my current Cocos2d v3.1 project the iTunes store was showing me the warning

iTunes Store operation failed.
The app references non-public selectors in Payload/<AppName>.app/<AppName>:tableView:heightForRowAtIndex:

Validation Warning

Is there any way out to resolve this validation warning?

Sauvik Dolui
  • 5,520
  • 3
  • 34
  • 44

1 Answers1

3

Oh,it was due to the CCTableView class in Cocos2d 3.1 library. There is a method name - (float) tableView:(CCTableView*)tableView heightForRowAtIndex:(NSUInteger) index; in CCTableViewDataSource declared in CCTableView.h. Probably this method is also declared in some other class and CCTableView.m was calling this method by invoking [dataSource respondsToSelector:@selector(tableView:heightForRowAtIndex:)];.

I have changed the method name by declaring it as - (float) ccTableView:(CCTableView*)tableView heightForRowAtIndex:(NSUInteger) index; in CCTableViewDataSource and changed the corresponding invocation in CCTableView.m file by replacing [dataSource respondsToSelector:@selector(tableView:heightForRowAtIndex:)]; by [dataSource respondsToSelector:@selector(ccTableView:heightForRowAtIndex:)]; and [_dataSource tableView:self heightForRowAtIndex:i]; by [_dataSource ccTableView:self heightForRowAtIndex:i];.

Sauvik Dolui
  • 5,520
  • 3
  • 34
  • 44
  • 1
    Cool I will do this too. Let's hope the Cocos2D team fixes it too... although it looks like some script at ITC is at fault really... – Jonny Oct 06 '14 at 10:55
  • Just renaming the discussed method solved my issue, iTunes connect validated my app successfully. What is the present status of your app? Is it facing the same validity warning from iTunes Connect? – Sauvik Dolui Oct 06 '14 at 13:33
  • 1
    Yes, it's a warning/issue that stems from lack of namespaces. I renamed the staff and no name collision happen. Here is another question/answer explaining this: http://stackoverflow.com/questions/19378484/the-app-references-non-public-selectors-in-payload-appname-app-app-name-dec – Jonny Oct 07 '14 at 01:53
  • Will apple reject app if I just leave this warning as is? – Loc Pham Jan 19 '15 at 18:09
  • @LocPham I have previously submitted ipa with validation warning, and Apple has not rejected it. But it's always suggested to resolve each and every validation warning. – Sauvik Dolui Jan 20 '15 at 07:07
  • My app got rejected because of this – amol-c Jan 24 '15 at 06:54
  • Make sure if you use XCode's refactor > replace functionality that you go through and double-check for the @selector calls, for example: `dataSource respondsToSelector:@selector(tableView:heightForRowAtIndex:)` – Gabriel Adauto Mar 14 '15 at 00:02