views:

2526

answers:

5

Hi,

my app was rejected because of the non-public APIs

"3.3.1 Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs."

The following non-public APIs are included in your application: lineHeight previousViewController

"

What can I do? I used the three20-P31 version, but it is still rejected.

Thx for help

+1  A: 

This is bad news. The three20 guys had removed what they thought was all uses of private APIs (firstResponder on window) and some private instance members of UITouch.

lineHeight is defined as a category on UIFont. The only reference I can find to lineHeight in the header dumps is for the category DOMCSS2Properties of DOMCSSStyleDeclaration. This is a private class. So looks like a false positive in the static analysis.

previousViewController is define in a category of UIViewController. Again this is a member of UIViewController that is not exposed.

It's not good news. What this means is that when you are naming your members in categories you have to make sure you don't clash with any private names defined by Apple. Does not sem right to me? Or perhaps I am misunderstanding?

UPDATE: I just ran Erica's apiscanner tool on our three20 based app and got the following output:

Examining 152 class methods, 2038 instance methods, and 342 functions

Potential public framework issues:
[AddressBookUI]initialize override via AudioToolbox
ALERT: -cancel: matches framework AddressBookUI.
[AddressBookUI]description override via AudioToolbox
[AddressBookUI]identifier override via AddressBook
[AddressBookUI]label override via AddressBook
[AddressBookUI]mailComposeController:didFinishWithResult:error: override via MessageUI
ALERT: -messageFont matches framework AddressBookUI.
[AddressBookUI]name override via AddressBook
[AddressBookUI]numberOfSectionsInTableView: override via CoreData
[AddressBookUI]path override via AudioToolbox
ALERT: -performDefaultAction matches framework AddressBookUI.
[AddressBookUI]reload override via MediaPlayer
[AddressBookUI]resume override via AVFoundation
[AddressBookUI]save override via AddressBook
ALERT: -saveState matches framework AddressBookUI.
[AddressBookUI]search override via CFNetwork
[AddressBookUI]sectionIndexTitlesForTableView: override via CoreData
ALERT: -selectedCell matches framework AddressBookUI.
[AddressBookUI]setHighlighted: override via CoreAudio
[AddressBookUI]setIdentifier: override via CoreAudio
[AddressBookUI]setNeedsLayout override via QuartzCore
[AddressBookUI]setPlaceholder: override via CoreAudio
[AddressBookUI]setShowsCancelButton: override via CoreData
[AddressBookUI]setStringValue: override via CoreAudio
[AddressBookUI]setTableView: override via CoreData
[AddressBookUI]storeType override via CoreData
[AddressBookUI]tableView override via CoreData
[AddressBookUI]tableView:numberOfRowsInSection: override via CoreData
[AddressBookUI]tableView:sectionForSectionIndexTitle:atIndex: override via CoreData
[AddressBookUI]tableView:titleForHeaderInSection: override via CoreData
[AddressBookUI]text override via AddressBook
[AddressBookUI]title override via AudioToolbox
ALERT: dyld_stub_binding_helper() matches framework AVFoundation.
[CoreData]connect override via AudioToolbox
[CoreData]index override via AddressBook
[CoreData]initWithURL: override via AVFoundation
[CoreData]object override via AVFoundation
[CoreData]release override via AudioToolbox
[CoreData]reset override via AudioToolbox
[CoreData]retain override via CFNetwork
[CoreData]setURL: override via AddressBookUI
[CoreData]setUserInfo: override via AudioToolbox
[CoreData]timestamp override via AudioToolbox
[CoreData]URL override via AVFoundation
[CoreData]userInfo override via CFNetwork
[CoreFoundation]setSelector: override via AudioToolbox
[CoreFoundation]kCFRunLoopDefaultMode override via AudioToolbox
[CoreLocation]coordinate override via AudioToolbox
[CoreLocation]location override via AudioToolbox
[CoreLocation]x override via AVFoundation
[CoreLocation]y override via AVFoundation
[Foundation]cancel override via AddressBookUI
[Foundation]method override via AVFoundation
[Foundation]position override via AVFoundation
[Foundation]protocol override via AVFoundation
[Foundation]request override via AudioToolbox
[Foundation]response override via CFNetwork
[Foundation]result override via AVFoundation
[Foundation]scheme override via AudioToolbox
[Foundation]setCachePolicy: override via CoreAudio
[Foundation]setSuspended: override via CoreData
[Foundation]NSCocoaErrorDomain override via CoreData
[GameKit]dismiss override via AddressBookUI
[GameKit]icon override via MessageUI
[GameKit]layout override via AudioToolbox
[GameKit]layoutIfNeeded override via QuartzCore
[GameKit]origin override via AudioToolbox
[GameKit]setAnimating: override via CoreData
[GameKit]setIcon: override via AddressBookUI
[GameKit]setResult: override via AddressBookUI
ALERT: -statusView matches framework GameKit.
ALERT: +sharedCache matches framework MapKit.
[MapKit]color override via CoreGraphics
[MapKit]direction override via AudioToolbox
[MapKit]distance override via AudioToolbox
ALERT: -flushRequestQueue matches framework MapKit.
[MapKit]height override via CoreAudio
[MapKit]image override via AddressBook
ALERT: -locationManager:didFailWithError: matches framework MapKit.
[MapKit]mode override via AddressBookUI
[MapKit]offset override via AVFoundation
[MapKit]setBounds: override via AddressBookUI
[MapKit]setEnabled: override via AudioToolbox
[MapKit]setMode: override via AddressBookUI
[MapKit]setOffset: override via AddressBookUI
[MapKit]setPosition: override via AddressBookUI
[MapKit]setScrollEnabled: override via CoreAudio
[MapKit]setSelected: override via AudioToolbox
[MapKit]setSize: override via AddressBookUI
[MapKit]setSubtitle: override via AudioToolbox
[MapKit]setView: override via AddressBookUI
[MapKit]setZoomEnabled: override via CoreAudio
[MapKit]size override via AudioToolbox
[MapKit]view override via AddressBookUI
[MediaPlayer]bounds override via AudioToolbox
[MediaPlayer]display override via AddressBook
ALERT: -fadeOut matches framework MediaPlayer.
[MediaPlayer]item override via AddressBook
[MediaPlayer]items override via AudioToolbox
[MediaPlayer]orientation override via CoreLocation
[MediaPlayer]padding override via AudioToolbox
ALERT: -scrollToTop matches framework MediaPlayer.
[MediaPlayer]selected override via AddressBookUI
[MediaPlayer]setDuration: override via AddressBookUI
[MediaPlayer]setOrientation: override via CoreAudio
ALERT: -setOrientation:animated: matches framework MediaPlayer.
[MediaPlayer]setPadding: override via AudioToolbox
[MediaPlayer]setViewController: override via AddressBookUI
[MessageUI]content override via AudioToolbox
ALERT: -contentType matches framework MessageUI.
ALERT: -send: matches framework MessageUI.
[MessageUI]setContent: override via AudioToolbox
[MessageUI]setIsLoading: override via CoreData
[MessageUI]setSubject: override via AudioToolbox
[MessageUI]setText: override via AddressBookUI
[MessageUI]subject override via CoreGraphics
ALERT: -subjectField matches framework MessageUI.
[QuartzCore]frame override via AudioToolbox
[QuartzCore]level override via AVFoundation
[QuartzCore]mask override via CoreGraphics
[QuartzCore]setMask: override via AddressBookUI
[QuartzCore]setStyle: override via AddressBookUI
[UIKit]shape override via QuartzCore
[UIKit]animating override via MapKit
[UIKit]beginUpdates override via CoreData
ALERT: -childCount matches framework UIKit.
[UIKit]control override via AVFoundation
[UIKit]controller override via AddressBookUI
[UIKit]destination override via AudioToolbox
[UIKit]highlighted override via MapKit
ALERT: -initWithController: matches framework UIKit.
ALERT: -initWithNode: matches framework UIKit.
[UIKit]node override via AudioToolbox
[UIKit]numberOfRowsInSection: override via CoreData
ALERT: -phoneNumber matches framework UIKit.
ALERT: -previousViewController matches framework UIKit.
[UIKit]progress override via CFNetwork
[UIKit]setColor: override via AddressBookUI
[UIKit]setContentInset: override via CoreData
[UIKit]setContentMode: override via CoreAudio
[UIKit]setControl: override via AudioToolbox
[UIKit]setCurrentPage: override via CoreAudio
[UIKit]setDataSource: override via CoreAudio
[UIKit]setDestination: override via CoreAudio
[UIKit]setFont: override via AddressBookUI
[UIKit]setInset: override via AddressBookUI
[UIKit]setItems: override via AddressBookUI
[UIKit]setLineBreakMode: override via CoreAudio
[UIKit]setMinimumFontSize: override via CoreData
[UIKit]setNumberOfLines: override via CoreAudio
[UIKit]setNumberOfPages: override via CoreAudio
[UIKit]setObject: override via AddressBookUI
[UIKit]setOrigin: override via AddressBookUI
[UIKit]setProgress: override via AudioToolbox
[UIKit]setReturnKeyType: override via CoreAudio
[UIKit]setRowHeight: override via CoreData
[UIKit]setShadowColor: override via CoreAudio
[UIKit]setShadowOffset: override via CoreData
[UIKit]setStatusBarStyle: override via CoreAudio
[UIKit]setTabBar: override via AddressBookUI
[UIKit]setTableViewStyle: override via CoreAudio
[UIKit]setTextAlignment: override via CoreAudio
[UIKit]setTextColor: override via CoreData
[UIKit]setTintColor: override via CoreData
[UIKit]setWidth: override via AddressBookUI
[UIKit]setX: override via AddressBook
[UIKit]setY: override via AVFoundation
ALERT: -startTapTimer: matches framework UIKit.
ALERT: -stopAnimation: matches framework UIKit.
[UIKit]userData override via AudioToolbox

After Public Frameworks Scan:
    4 whitelisted class methods, 1 blacklisted class methods
    322 whitelisted instance methods, 21 blacklisted instance methods
    115 whitelisted functions, 1 blacklisted functions

Potential private framework issues:
[ActorKit]queue override via AudioToolbox
[ActorKit]send override via AddressBookUI
[AppSupport]hostname override via CFNetwork
[AppSupport]setHostname: override via AudioToolbox
[Calendar]setUrl: override via AddressBookUI
ALERT: -tomorrow matches private framework CalendarUI.
ALERT: -initWithDelegate: matches private framework Celestial.
[Celestial]setQueue: override via AddressBookUI
ALERT: -initWithText: matches private framework ChatKit.
[ChatKit]refresh override via AVFoundation
[ChatKit]setIsAnimating: override via CoreAudio
[ChatKit]setRecipients: override via CoreAudio
ALERT: -addText: matches private framework CoreTelephony.
[CoreTelephony]setContentType: override via CoreAudio
[DataAccess]body override via CFNetwork
[DataAccess]children override via CoreData
[DataAccess]from override via AVFoundation
ALERT: -httpMethod matches private framework DataAccess.
ALERT: -initWithQuery: matches private framework DataAccess.
[DataAccess]parent override via AddressBookUI
[DataAccess]setBody: override via AddressBookUI
[DataAccess]setFrom: override via AddressBookUI
[DataAccess]setTo: override via AddressBook
[DataAccess]to override via AVFoundation
ALERT: -userAgent matches private framework DataAccess.
ALERT: -addChild: matches private framework DAVKit.
[DAVKit]setUserAgent: override via CoreData
[GMM]parameters override via AudioToolbox
[GMM]radius override via CoreGraphics
[GMM]setAuthor: override via AddressBookUI
[GMM]setDirection: override via CoreData
[GMM]setParameters: override via CoreAudio
[GMM]setRadius: override via AddressBookUI
[GMM]setRequest: override via AudioToolbox
[GMM]setSearchResults: override via CoreAudio
ALERT: -initWithData:encoding:options:error: matches private framework iCalendar.
ALERT: -initWithData:options:error: matches private framework iCalendar.
ALERT: +mainQueue matches private framework iTunesStore.
ALERT: -cacheKey matches private framework iTunesStore.
ALERT: -expirationDate matches private framework iTunesStore.
ALERT: -imageURL matches private framework iTunesStore.
ALERT: -initWithIdentifier: matches private framework iTunesStore.
[iTunesStore]kind override via AudioToolbox
[iTunesStore]setButtons: override via AudioToolbox
[iTunesStore]setResponse: override via AudioToolbox
ALERT: -createDataSource matches private framework iTunesStoreUI.
ALERT: -deleteRowAtIndexPath: matches private framework iTunesStoreUI.
ALERT: -loadingView matches private framework iTunesStoreUI.
ALERT: -locationManager:didUpdateToLocation:fromLocation: matches private framework iTunesStoreUI.
ALERT: -removeItemAtIndexPath: matches private framework iTunesStoreUI.
[iTunesStoreUI]setSections: override via AudioToolbox
ALERT: -textForFieldAtIndex: matches private framework iTunesStoreUI.
[iWorkImport]bottom override via CoreGraphics
[iWorkImport]cells override via CoreGraphics
ALERT: -columnCount matches private framework iWorkImport.
[iWorkImport]header override via AudioToolbox
[iWorkImport]left override via AudioToolbox
[iWorkImport]right override via AVFoundation
ALERT: -rowCount matches private framework iWorkImport.
[iWorkImport]setBottom: override via AddressBookUI
[iWorkImport]setHeader: override via AddressBookUI
[iWorkImport]setLeft: override via AddressBookUI
[iWorkImport]setRight: override via AddressBookUI
[iWorkImport]setTop: override via AddressBookUI
[iWorkImport]spacing override via CoreGraphics
[iWorkImport]top override via AVFoundation
ALERT: -childAtIndex: matches private framework Message.
[Message]headers override via AudioToolbox
ALERT: -logout matches private framework Message.
ALERT: +elementWithName: matches private framework MobileQuickLook.
ALERT: +elementWithName:stringValue: matches private framework MobileQuickLook.
ALERT: -insertChild:atIndex: matches private framework MobileQuickLook.
ALERT: -rootElement matches private framework MobileQuickLook.
ALERT: -rootName matches private framework MobileQuickLook.
[MobileQuickLook]setPointSize: override via CoreData
[MobileQuickLook]setVerticalAlignment: override via CoreData
ALERT: -XMLString matches private framework MobileQuickLook.
ALERT: -attributeForName: matches private framework OfficeImport.
[OfficeImport]color1 override via CoreGraphics
[OfficeImport]color2 override via CoreGraphics
[OfficeImport]highlight override via AddressBookUI
ALERT: -isModified matches private framework OfficeImport.
[OfficeImport]map override via AudioToolbox
[OfficeImport]next override via AudioToolbox
ALERT: -pageHeight matches private framework OfficeImport.
ALERT: -pageWidth matches private framework OfficeImport.
[OfficeImport]setColor1: override via AddressBookUI
[OfficeImport]setColor2: override via AddressBookUI
[OfficeImport]setColumnCount: override via CoreAudio
[OfficeImport]setHeight: override via AddressBookUI
[OfficeImport]setHighlight: override via CoreData
[OfficeImport]setShadow: override via AddressBookUI
[OfficeImport]setSpacing: override via AudioToolbox
[OfficeImport]setTransition: override via CoreAudio
[OfficeImport]shadow override via CoreGraphics
[OfficeImport]shape override via QuartzCore
[OfficeImport]transition override via CoreData
[OfficeImport]URI override via CoreData
ALERT: -initWithPhoto: matches private framework PhotoLibrary.
ALERT: -updatePlaceholder matches private framework PhotoLibrary.
[Preferences]loading override via AudioToolbox
ALERT: -addRequest: matches private framework ProtocolBuffer.
[ProtocolBuffer]requests override via AudioToolbox
[Symbolication]className override via CoreData
[Symbolication]setNext: override via AddressBookUI
[UIAccessibility]element override via AudioToolbox
ALERT: -nextAction matches private framework VoiceServices.
[WebCore]blur override via CoreGraphics
ALERT: -caption matches private framework WebCore.
ALERT: -firstChild matches private framework WebCore.
ALERT: -lastChild matches private framework WebCore.
ALERT: -lineHeight matches private framework WebCore.
ALERT: -localName matches private framework WebCore.
ALERT: -nextSibling matches private framework WebCore.
ALERT: -outerHTML matches private framework WebCore.
ALERT: -outerText matches private framework WebCore.
ALERT: -parentNode matches private framework WebCore.
ALERT: -previousSibling matches private framework WebCore.
ALERT: -screenX matches private framework WebCore.
ALERT: -screenY matches private framework WebCore.
[WebCore]setCaption: override via AddressBookUI
[WebCore]setClassName: override via CoreData
[WebCore]setMargin: override via AddressBookUI
[WebCore]setShape: override via AddressBookUI
ALERT: -contentFrame matches private framework WebKit.
ALERT: -parentFrame matches private framework WebKit.
ALERT: -showStatus: matches private framework WebKit.
ALERT: -failWithError: matches private framework YouTube.

After Private Frameworks Scan:
    4 whitelisted class methods, 4 blacklisted class methods
    414 whitelisted instance methods, 73 blacklisted instance methods
    115 whitelisted functions, 1 blacklisted functions

Potential blacklist items:
    +sharedCache
    +mainQueue
    +elementWithName:
    +elementWithName:stringValue:
    -cancel:
    -messageFont
    -performDefaultAction
    -saveState
    -selectedCell
    -statusView
    -flushRequestQueue
    -locationManager:didFailWithError:
    -fadeOut
    -scrollToTop
    -setOrientation:animated:
    -contentType
    -send:
    -subjectField
    -childCount
    -initWithController:
    -initWithNode:
    -phoneNumber
    -previousViewController
    -startTapTimer:
    -stopAnimation:
    -tomorrow
    -initWithDelegate:
    -initWithText:
    -addText:
    -httpMethod
    -initWithQuery:
    -userAgent
    -addChild:
    -initWithData:encoding:options:error:
    -initWithData:options:error:
    -cacheKey
    -expirationDate
    -imageURL
    -initWithIdentifier:
    -createDataSource
    -deleteRowAtIndexPath:
    -loadingView
    -locationManager:didUpdateToLocation:fromLocation:
    -removeItemAtIndexPath:
    -textForFieldAtIndex:
    -columnCount
    -rowCount
    -childAtIndex:
    -logout
    -insertChild:atIndex:
    -rootElement
    -rootName
    -XMLString
    -attributeForName:
    -isModified
    -pageHeight
    -pageWidth
    -initWithPhoto:
    -updatePlaceholder
    -addRequest:
    -nextAction
    -caption
    -firstChild
    -lastChild
    -lineHeight
    -localName
    -nextSibling
    -outerHTML
    -outerText
    -parentNode
    -previousSibling
    -screenX
    -screenY
    -contentFrame
    -parentFrame
    -showStatus:
    -failWithError:
    dyld_stub_binding_helper()
lyonanderson
I see you've posted on the three20 group. Perhaps you should email the guys via github?. Also it's important that we get Apple's attention on this one. They really need to expose what their static analyser is doing.
lyonanderson
does it help to rename the "lineHeight" and "previousViewController"?
CuSoon
It should help in this case. The problem is, when do we stop? A few weeks ago people were getting rejected for other reasons with three20. Now this. The static analysis Apple is doing is not quite correct.
lyonanderson
+1  A: 

Rename the two selectors that are causing problems. How about "-cuSoonPreviousViewController" and "-cuSoonLineHeight"? That will stop them being flagged by the analyser. Refactor them from Xcode so that you also change any places where they get invoked.

Graham Lee
+6  A: 

We're going to push a couple commits that rename these methods in Three20. Look for them sometime this week.

These false-positives are indeed frustrating, though.

-Edit

I've sent an email and submitted a bug report about this issue. Playing method name whack-a-mole isn't exactly a scalable solution here.

featherless
+1 for the term "method name whack-a-mole"
Chris
Just received a response from Apple along the lines of "deal with it".
featherless
I've just committed this week's changes with the latest App Store fixes. Three20 should now be App Store-safe in its current revision.
featherless
Three20 at master:http://github.com/facebook/three20The Three20 roadmap:http://three20.info/blog/2009/12/the-three20-roadmap/
featherless
A: 

There seem to be a similar problem with Core Data managed objects.

Just got rejected for use of private API setThoroughfare: I have a managed object with an attribute named thoroughfare, and setThoroughfare is dynamically generated through the data model.

Nowhere in my code am I calling setThoroughfare on MKPlaceMark, which I think is what they are referring to.

Oskar
A: 

just use Three P31 version http://groups.google.com/group/three20/browse_thread/thread/a7f61c2cd72836ad

kami