Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Secrets of launch arguments (iOS)
Search
Kishikawa Katsumi
January 15, 2014
Programming
16
13k
Secrets of launch arguments (iOS)
Tips of launch arguments for iOS development.
Kishikawa Katsumi
January 15, 2014
Tweet
Share
More Decks by Kishikawa Katsumi
See All by Kishikawa Katsumi
iOSDC 2024 SMBファイル共有をSwiftで実装する
kishikawakatsumi
1
120
Enhancing Applications with Accessibility API
kishikawakatsumi
3
2.9k
Mastering SwiftSyntax
kishikawakatsumi
3
5k
My SwiftData Review
kishikawakatsumi
7
1.3k
Swift Expression Macros: a practical introduction
kishikawakatsumi
3
1.8k
Xcode Cloudの評価
kishikawakatsumi
2
1.2k
Regular expressions basics/正規表現の基本
kishikawakatsumi
7
700
家のいろいろな数値を計測する
kishikawakatsumi
4
2.1k
GitHub Actionsでテストの結果をわかりやすく表示する
kishikawakatsumi
1
930
Other Decks in Programming
See All in Programming
いつか使える ObjectSpace / Maybe useful ObjectSpace
euglena1215
2
140
メモリ最適化を究める!iOSアプリ開発における5つの重要なポイント
yhirakawa333
0
410
Rubyのobject_id
qnighy
6
1.3k
Lessons by WebAssembly app in production on CDN Edge Computing Service
tetsuharuohzeki
0
210
Perl 5 OOP機構30年史 - Perl 5's OOP Mechanism over the past 30 years
moznion
0
120
Crafting Cross-Platform Adventures: Building a Game Engine with Kotlin Multiplatform
dwursteisen
0
120
2024 컴포즈 정원사
jisungbin
0
150
RAGの回答精度評価用のQAデータセットを生成AIに作らせた話
kurahara
0
250
Go1.23で入った errorsパッケージの小さなアプデ
kuro_kurorrr
2
390
The Sequel to a Dream of Ruby Parser's Grammar
ydah
1
220
connect-go で面倒くささと戦う / 2024-08-27 #newmo_layerx_go
izumin5210
2
650
ECMAScript、Web標準の型はどう管理されているか / How ECMAScript and Web standards types are maintained
petamoriken
3
390
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
401
65k
A Philosophy of Restraint
colly
202
16k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2k
Code Reviewing Like a Champion
maltzj
517
39k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
29
2.6k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
248
20k
Robots, Beer and Maslow
schacon
PRO
157
8.2k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Documentation Writing (for coders)
carmenintech
65
4.3k
The Brand Is Dead. Long Live the Brand.
mthomps
53
38k
Building Your Own Lightsaber
phodgson
101
6k
From Idea to $5000 a Month in 5 Months
shpigford
379
46k
Transcript
4FDSFUTPGMBVODIBSHVNFOUT J04
None
#import <UIKit/UIKit.h> ! #import "AppDelegate.h" ! int main(int argc, char
* argv[]) { @autoreleasepool { return UIApplicationMain( argc, argv, nil, NSStringFromClass([AppDelegate class])); } }
int main(int argc, char * argv[]) w BSHDDPOUBJOTUIFOVNCFSPGBSHVNFOUT w BSHWJTBBSSBZPGBSHVNFOUT
int main(int argc, char * argv[]) { @autoreleasepool { for
(int count = 0; count < argc; count++) { NSLog(@"argv[%d] = %s", count, argv[count]); } ! return UIApplicationMain( argc, argv, nil, NSStringFromClass([AppDelegate class])); } } => argv[0] = /Users/kishikawakatsumi/Library/Application Support/iPhone Simulator/7.0.3-64/Applications/ 55179656-7577-4C46-AE05-6D83E25EC2CD/Arguments.app/Arguments argv[1] = foo argv[2] = bar
/41SPDFTT*OGP
- (void)viewDidLoad { [super viewDidLoad]; NSProcessInfo *processInfo = [NSProcessInfo processInfo];
! NSLog(@"%@", processInfo.arguments); } => ( "/Users/kishikawakatsumi/Library/Application Support/iPhone Simulator/7.0.3-64/Applications/55179656-7577-4C46- AE05-6D83E25EC2CD/Arguments.app/Arguments", foo, bar )
/46TFS%FGBVMUT
$POWFOUJPOT LFZWBMVFLFZ5XPXPSE w BLFZTUBSUTXJUI w 2VPUFWBMVFTJGNPSFUIBOPOFXPSET
None
- (void)viewDidLoad { [super viewDidLoad]; NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
NSLog(@"%@", [userDefaults stringForKey:@"foo"]); NSLog(@"%@", [userDefaults stringForKey:@"baz"]); } => bar qux quux
None
- (void)viewDidLoad { [super viewDidLoad]; NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
NSLog(@"%d", [userDefaults boolForKey:@"boolArg"]); NSLog(@"%d", [userDefaults integerForKey:@"intArg"]); NSLog(@"%f", [userDefaults floatForKey:@"floatArg"]); NSLog(@"%@", [userDefaults stringForKey:@"stringArg"]); } => 1 18 3.141590 foo bar
$BOQBTTNPSFDPNQMFY EBUBUZQFT
"SSBZ BSSBZ"SH GPP CBS CB[
None
- (void)viewDidLoad { [super viewDidLoad]; NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
NSLog(@"%@", [userDefaults objectForKey:@"arrayArg"]); } => ( foo, bar, baz )
%JDUJPOBSZ EJDU"SH\GPPCBSCB[RVY^ => { baz = qux; foo = bar;
}
1MJTUGPSNBU \GPPCBSCB[RVY^ GPP CBS CB[ "SSBZ %JDUJPOBSZ
.PSFDPNQMFYFYBNQMF QMJTU"SH\GPPCBSBSSBZ GPP \CBSCB[^ ^ => { array = (
foo, { bar = baz; } ); foo = bar; }
9.-QMJTUGPSNBU YNM"SHlEJDULFZGPPLFZTUSJOHCBS TUSJOHLFZCB[LFZTUSJOHRVYTUSJOHEJDU => { baz = qux; foo =
bar; }
5IFNBHJDUSJDLPG b"QQMF-BOHVBHFT FT ` IUUQOTIJQTUFSDPNMBVODIBSHVNFOUTBOEFOWJSPONFOUWBSJBCMFT
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; NSLog(@"%@", [userDefaults dictionaryRepresentation]); => {
... ! AppleLanguages = ( ja, en, fr, ... ); ! ... ! }
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; NSLog(@"%@", [userDefaults dictionaryRepresentation]); => {
... ! AppleLanguages = ( es ); ! ... ! } b"QQMF-BOHVBHFT FT `NFBOT PWFSSJEJOH/46TFS%FGBVMUTUFNQPSBSJMZ b FT `JTBSSBZPGMBOHVBHFDPEFT