Private API Troubles

Discussion in 'Mac Programming' started by Blakeasd, Mar 11, 2011.

  1. Blakeasd macrumors 6502a

    Dec 29, 2009
    I have been rejected from the app store for using a private API. I don't know what the problem is as I didn't deliberately use it. This is what they said:

    The use of non-public APIs can lead to a poor user experience should these APIs change in the future, and is therefore not permitted. The app includes 'NSTokenAttachmentCell._tacFlags' from the framework <AppKit.framework>.

    If you have defined a method in your source code with the same name as this API, we suggest altering your method name so that it no longer collides with Apple's private API to avoid your application being flagged in future submissions.

    Alternatively, this API may reside in a static library included with your application. If you do not have access to the library's source, you may be able to search the compiled binary using “strings” or “otool” command line tools. The “strings” tool can output a list of the methods that the library calls and “otool -ov” will output the Objective-C class structures and their defined methods. These techniques can help you narrow down where the problematic code resides.

    For discrete code-level questions, you may wish to consult with Apple Developer Technical Support at <>. Depending on your questions, be sure to include any symbolicated crash logs, screenshots, or steps to reproduce the issues you’ve encountered.

    To appeal this review, please submit a request to the App Review Board at <>.

    Here is the code I think they are talking about:

    	[weightField setStringValue:@"--"];
    	[milesField setStringValue:@"--"];
    	[calsBurned setStringValue:@"--"];
    	int weight = [weightField intValue];
    	int runningTotal = weight * 0.75;
    	int miles = [milesField intValue];
    	int caloriesBurned = miles * runningTotal;
    	[calsBurned setIntValue:caloriesBurned];
    	int weight = [weightField intValue];
    	int runningTotal = weight * 0.53;
    	int miles = [milesField intValue];
    	int caloriesBurned = miles * runningTotal;
    	[calsBurned setIntValue:caloriesBurned];
    	[helpPanel orderOut:nil];

    Can someone please tell me what is wrong?
  2. Catfish_Man macrumors 68030


    Sep 13, 2001
    Portland, OR
    The code you listed certainly does not appear to use _tacFlags. Is it possible a library you're using does?
  3. balamw Moderator


    Staff Member

    Aug 16, 2005
    New England
  4. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    Please explain why you think it's that code.

    You haven't shown the types of the following variables:

    If one or more of those variables is from a 3rd-party toolkit, then we'd have to know what type they are in order to figure out what might be wrong.
  5. Blakeasd thread starter macrumors 6502a

    Dec 29, 2009
    Thanks @balamw. My first app has been approved!

Share This Page