xcode lauch Arbuments - return Null in final Build -
i finished mac os x app xcode allows launched paraneter used build url query web service etc...
so after reading around, can solution, 2eviroment " variables used method this...
so went sheme, aded environment variable value, , tried era .m file, construct url web view
as control instance set window title contain argument
in xcode works far flawlessly, after building app, save desktop, open terminal , send this:
open -a monstar.app --args "searchkey=test"
the "search key" variable searched , grabbed value, in final build, doesn't work,
the part read variable title, returns "null" string , web view url, uses predefined variable set in xcode sheme
in .m file use code read variables:
nsstring *string1, *string2, *mystring, *pre, *arg1, *arg2,*title; arg1 = [[[nsprocessinfo processinfo] environment] objectforkey:@"searchkey"];
i tried use "arguments" instead of environment, throws error in xcode...
can help? thx
Comments
Post a Comment