View Issue Details

IDProjectCategoryView StatusLast Update
0019025LazarusLCLpublic2011-12-01 11:26
ReporterDavid GrayAssigned ToFelipe Monteiro de Carvalho 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.30Product Build 
Target VersionFixed in Version0.9.30.1 (SVN) 
Summary0019025: _NSGetCarbonMenu function in Carbon code causes Apple App Store rejection
DescriptionMy App Store app was rejected because Apple found the symbol _NSGetCarbonMenu in my binary. This function is apparently in Apple's private API and should not be used. I would think that any other app built with Lazarus would also suffer App Store rejection unless this can be fixed.

The call to _NSGetCarbonMenu only seems to appear in file carbontrayicon.inc and is used in one function, called IsMenuVisible.

Commenting out the function IsMenuVisible along with the external reference to _NSGetCarbonMenu just above it, plus the corresponding references to IsMenuVisible in function IstrayIconMenuVisible causes my app to successfully build with no reference to _NSGetCarbonMenu in the binary.
TagsNo tags attached.
Fixed in Revision30333
LazTarget0.99.0
WidgetsetCarbon
Attached Files

Activities

Felipe Monteiro de Carvalho

2011-03-31 08:34

developer   ~0046993

Well, Apple causes this by not making essential APIs available for developers. On the good side in this case it looks to me that we can implement IsMenuVisible with a PasCocoa call, so it should be safe to remove the use of this routine.

Felipe Monteiro de Carvalho

2011-04-17 08:34

developer   ~0047522

Ok, so it is not possible to implement this without this private API, see:

http://www.cocoabuilder.com/archive/cocoa/100570-checking-if-menu-is-visible.html

So the only solution is to ifdef it and take two options:

Either use the private API or leave unimplemented.

The only thing is that I am wondering what the best default value: AppStore compatible or implemented functionality?

Felipe Monteiro de Carvalho

2011-04-17 08:41

developer   ~0047523

Fixed in rev 30333

The API will only be used if CarbonUsePrivateAPIs is defined.

Felipe Monteiro de Carvalho

2011-04-17 08:42

developer   ~0047524

Please test and close if OK

Issue History

Date Modified Username Field Change
2011-03-29 21:26 David Gray New Issue
2011-03-29 21:26 David Gray Widgetset => Carbon
2011-03-30 22:04 Vincent Snijders LazTarget => 0.99.0
2011-03-30 22:04 Vincent Snijders Assigned To => Felipe Monteiro de Carvalho
2011-03-30 22:04 Vincent Snijders Status new => assigned
2011-03-30 22:04 Vincent Snijders Target Version => 0.99.0
2011-03-31 08:34 Felipe Monteiro de Carvalho Note Added: 0046993
2011-04-17 08:34 Felipe Monteiro de Carvalho Note Added: 0047522
2011-04-17 08:41 Felipe Monteiro de Carvalho Fixed in Revision => 30333
2011-04-17 08:41 Felipe Monteiro de Carvalho Status assigned => resolved
2011-04-17 08:41 Felipe Monteiro de Carvalho Fixed in Version => 0.9.30.1 (SVN)
2011-04-17 08:41 Felipe Monteiro de Carvalho Resolution open => fixed
2011-04-17 08:41 Felipe Monteiro de Carvalho Note Added: 0047523
2011-04-17 08:42 Felipe Monteiro de Carvalho Note Added: 0047524
2011-12-01 11:26 Marc Weustink Status resolved => closed