I have to run my iOS app in simulator, providing some additional info on launch.
However, I can’t find a way to access argc/argv in my app. I thought I can find these somewhere in UIApplication, but I can’t. Then I’ve checked - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions, but launchOptions was nil.
Is there a way to get an access to command-line arguments in iOS application?
Save values in either a
plistwhich you read every startup, or in theNSUserDefaultsdictionary from a previous run, which you access at startup.If it must be external only, and argument-based only, set the arguments array from
NSProcessInfo: