The App Store approval guidelines is pretty clear that the use of non-public 
API is grounds for rejection.  NSToolbarView is undocumented, and therefore 
doing anything that depends on that class or its (undocumented) behavior would 
seem like grounds for rejection.  This would include adding a category to 
replace a method (which is fraught with peril regardless - categories aren't 
designed to replace existing methods, since you can't guarantee the loading 
order of categories from OS release to OS release - including minor updates), 
subclassing, method swizzling, or even testing to see if an object is one of 
those undocumented classes.

And even if it gets accepted, there is no guarantee that when you need to make 
an emergency update to fix some critical bug that somehow slipped through or 
later arose that you'd get accepted that time.

On Aug 25, 2011, at 11:46 PM, Indragie Karunaratne wrote:

> Is there any other way to do this aside from what I'm doing right now? As far 
> as I know, I have two choices:
> 
> a) Use this method and risk something breaking
> b) Write an NSToolbar clone
> 
> I know the risks, but if I could get this to pass through Mac App Store 
> submission then I'd rather deal with possibility of something breaking later 
> on that than to rewrite NSToolbar. The one last thing I can think of is to 
> use the ObjC runtime to retain the original implementation, swizzle hitTest: 
> and check whether my view is under the cursor, and if not, just call the 
> original implementation. However, method swizzling always feels like a dirty 
> workaround so I'm not sure if it would be much better than this (and if it 
> would be acceptable in the MAS).

Glenn Andreas                      gandr...@gandreas.com 
The most merciful thing in the world ... is the inability of the human mind to 
correlate all its contents - HPL

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to