objective c - Relaunching application via NSTask ignores LSMinimumSystemVersionByArchitecture -


I'm running into a problem with relaunching my application on 10.5. In my Info.plist, I have LSMinimumSystemVersionByArchitecture, so that the application will run in 64-bit x86_64 and 32-bit i386, PPC, and PPC 64.

I have a priority in the app, which is the Doc icon & amp; NSStatusItem, and it prompts the user to relaunch the app after changing the settings using the following code:

  id fullPath = [[NSBundle mainBundle] executable path]; NSArray * arg = [NSArray arrayWithObjects: zero]; [NSTK Launch Task With Launchpath: Fullpath Argument: Arg]; [NSAPP termination: Self];  

When it is executed at 10.5, but it relaunches the application in 64-bit which is not the desired result for me Do I collect and read docs because LS * The keys are not read when the app is launched through the command line

Is there any way around this? I tried to do something like that, which used to work on 10.6, but at 10.5 it chanted me that "the launch path is unavailable". ([NSAP is ONSONO Lonopard Orbetter] is a category which checks the Epkit version number.)

 ID path = [[NSBindal main bundle] executable path]; NSString * fullPath = zero; If (! [NSApp isOnSnowLeopardOrBetter]) fullPath = [NSString stringWithFormat: @ "/ usr / bin / arch -i386 -ppc% @", path]; Second full path = path; NSArray * arg = [NSArray arrayWithObjects: zero]; [NSTK Launch Task With Launchpath: Fullpath Argument: Arg]; [NSAPP termination: Self];  

You should use methods instead, which takes information . For example, use the - (BOOL) launch application: (NSString *) .


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -