Reputation: 103
Is it feasible to have a .app within an XCode project and then launch that when certain conditions are met?
As a more general overview, I'm looking to create a 'wrapper' for an existing app. As a basic example, imagine you were given an app, with no code/project access (just the compiled app), and wanted to add a splash screen (that isn't the use but for this it doesn't make a difference), how would you achieve this (if it's possible)?
Upvotes: 0
Views: 40
Reputation: 103
Simple once I'd thought about it. Include your .app in the bundle. The following will launch a .app within your apps bundle:
NSString *appPath = [[NSBundle mainBundle] pathForResource:@"appName" ofType:@"app"];
[[NSWorkspace sharedWorkspace] launchApplication:appPath];
Upvotes: 1