Private API Troubles

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

  1. Blakeasd macrumors 6502a

    Joined:
    Dec 29, 2009
    #1
    Hello,
    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 <http://developer.apple.com/support/resources/technicalsupport/>. 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 <http://developer.apple.com/appstore/resources/approval/contact.html>.


    Here is the code I think they are talking about:

    Code:
    
    -(IBAction)reset:(id)sender{
    	[weightField setStringValue:@"--"];
    	[milesField setStringValue:@"--"];
    	[calsBurned setStringValue:@"--"];
    
    }
    -(IBAction)ran:(id)sender{
    	int weight = [weightField intValue];
    	int runningTotal = weight * 0.75;
    	int miles = [milesField intValue];
    	int caloriesBurned = miles * runningTotal;
    	[calsBurned setIntValue:caloriesBurned];
    
    }
    -(IBAction)walked:(id)sender{
    	int weight = [weightField intValue];
    	int runningTotal = weight * 0.53;
    	int miles = [milesField intValue];
    	int caloriesBurned = miles * runningTotal;
    	[calsBurned setIntValue:caloriesBurned];
    
    }
    
    -(IBAction)quitHelp:(id)sender{
    
    	[helpPanel orderOut:nil];
    
    }
    
    
    

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

    Catfish_Man

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

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #3
  4. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    Location:
    Brobdingnag
    #4
    Please explain why you think it's that code.

    You haven't shown the types of the following variables:
    weightField
    milesField
    calsBurned
    helpPanel

    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

    Joined:
    Dec 29, 2009
    #5
    Thanks @balamw. My first app has been approved!
     

Share This Page