2

I am getting "The app references non-public selectors: connectionDidDisconnect:" when uploading my app to iTines. How do I find which module calls such selector?

My app uses Twilio Client library that was wrapped for mono via Monotouch binding project where I export connectionDidDisconnect: as ConnectionDidDisconnect in TCConnectionDelegate wrapper.

    [BaseType (typeof (NSObject))]
[Model]
public interface TCConnectionDelegate 
{
    //@required
     //some code was removed
    /** The TCConnection has just disconnected. 
    @param connection The TCConnection has just disconnected.
    @returns None
    */
    //-(void)connectionDidDisconnect:(TCConnection*)connection;
    [Export ("connectionDidDisconnect:")]
    [Abstract]
    void ConnectionDidDisconnect(TCConnection xonn);

}

The code works just fine. Only when I upload my app to iTunes I am getting that error.

Does Twilio lib call private selector connectionDidDisconnect: or something is wrong in my definition?

I will appreciate any help.

alecd4
  • 309
  • 2
  • 13
  • I can't find the string `connectionDidDisconnect` in any of Apple's public or private shared libraries in the iOS 6.0 SDK. – rob mayoff Nov 13 '12 at 05:47

1 Answers1

2

I believe Apple does a simple string search in the binary to check for private selectors. This means that any usage of the string connectionDidDisconnect: may cause Apple to reject your app.

One way to check if the Twilio library contains a particular string is to use the strings tool from a terminal:

$ strings Twilio.dll | grep connectionDidDisconnect
Rolf Bjarne Kvinge
  • 19,253
  • 2
  • 42
  • 86
  • This is what I thought. Apple doesn't have ability to find what method/class that selector belongs to. My app executable contains string "connectionDidDisconnect:" – alecd4 Nov 13 '12 at 22:26
  • This string is also in libTwilioClient.a library for ios apps that I've got from Twilio. connectionDidDisconnect is a callback in delegate that Twilio expects my app to implement. Assuming that Apple will reject my app what is the solution here? – alecd4 Nov 14 '12 at 00:16
  • alecd4: Maybe contact Twilio so that they can change the name of their selector? – Rolf Bjarne Kvinge Nov 14 '12 at 11:30