xcode5 - xcode, argument set but being ignored when launched from device -
i have argument setup on 1 of apps. when app launched xcode, argument passed fine, can see being outputted console.
when app launched phone, not xcode, argument missing, returns 0 on following code
nsprocessinfo *proc = [nsprocessinfo processinfo]; nsarray *args = [proc arguments]; if([args count] > 1) { nsstring *myarg = [args objectatindex: 1]; if([myarg isequaltostring:@"proversion"]) [appdata setispro:true]; } nslog(@"is pro: %hhd", [appdata ispro]);
in scheme, argument set in product->run apple library says
solved problem using preprocessor macro defined in build settings instead
Comments
Post a Comment