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

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -