SwiftSandbox's recent timeline updates
SwiftSandbox

SwiftSandbox

V2EX member #134955, joined on 2015-08-25 11:41:29 +08:00
I've been coding iOS apps since 2008, when the first iPhone was released. I started one of the first iOS developer blogs (iOSDeveloperTips.com) and recently started a free, weekly, Swift developer Newsletter (http://SwiftSandbox.io).
SwiftSandbox's recent replies
Aug 26, 2015
Replied to a topic by cxq iDev MAC App 开发, 能不能运行 mac 本地的脚本?
Enter the code inside a Mac app and you can read the command line parameters. Is that what you are looking for help with?
Here is a another list of iOS best practices: https://github.com/futurice/ios-good-practices
Aug 25, 2015
Replied to a topic by cxq iDev MAC App 开发, 能不能运行 mac 本地的脚本?
To read Mac app command line arguments:

NSUserDefaults *standardDefaults = [NSUserDefaults standardUserDefaults];
NSString *strArg = [standardDefaults stringForKey:@"str"];
NSInteger intArg = [standardDefaults integerForKey:@"x"];

// Examples: here is command line with app and two parameters
yourApp -str "StringArg" -x 99
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   914 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 23ms · UTC 20:28 · PVG 04:28 · LAX 13:28 · JFK 16:28
♥ Do have faith in what you're doing.