I have an app that normally exists as a System Preference Pane. To get it to
work in an app, and share the same code as the prefPane, I built a small
"host" app that simply loads the prefPane (a Mach-O bundle) with:

[self setPaneObject:[[[paneClass alloc] initWithBundle:paneBundle]
autorelease]];    
if ([paneObject loadMainView])
{
    [paneObject willSelect];
        
     // Add view to window and adjust size
     [window setContentSize:[[paneObject mainView] frame].size];
     [window setContentView:[paneObject mainView]];
     [window center];
     [window makeKeyAndOrderFront:self];
        
     [paneObject didSelect];
}


Both the app and the .bundle are codesigned. The .bundle resides within the
host app's package and the whole thing is sandboxed.

It works fine on my system, but is there any reason Apple will not approve
of this? The Mach-O code bundle gets loaded into the main app and becomes
part of it.

Has anyone submitted something to the App Store that works like this?

Thanks,

Trygve



_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to