iOS入门 调试与打包
一、调试手段
1、日志
NSLog(@"hello");
NSLog(@"%@",@"tt");
NSLog(@"test click %@",@"format");
%@
格式化符号有哪些?
2、断点及LLDB
断点:XCode 打断点跟Android 断点一样
LLDB:LLDB 指令 -p
输出值+类型值+引用名+内存地址
(lldb) p sender
(UIButton *) $0 = 0x00007f7d93a08a60
LLDB 指令 -po
(lldb) po sender
<UIButton: 0x7f7d93a08a60; frame = (178 254; 59 31); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x600001c67d40>> configuration=<UIButtonConfiguration: 0x60000206ab00> baseStyle=plain macStyle=automatic buttonSize=medium cornerStyle=dynamic title=<0x600001c3efa0>:'TEST' contentInsets=default imagePlacement=leading imagePadding=0 titlePadding=1 titleAlignment=automatic automaticallyUpdateForSelection background=<UIBackgroundConfiguration: 0x600002974e40; Base Style = Custom; cornerRadius = 5.95; backgroundColor = UIExtendedGrayColorSpace 0 0>
LLDB 指令 -expression
3、查看UI层级
4、打包
1.必须要有苹果开发者账户
2.创建证书(每个应用都需要创建)
3.Archive编译并导出ipa
4。上传App Store
直接xcode上传
打包上架流程
通过Transporter上传