活动监视器
,搜索download
,点击进入详情,选择打开的文件和端口正在安装
App,可以删除下载的缓存/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File\ Templates/Source
~/Library/Developer/Xcode/UserData
没有代码块的路径~/Library/Developer/Xcode/UserData/CodeSnippets
有代码块的路径~/Library/Developer/Xcode/Archives/
~/Library/Developer/Xcode/DerivedData/
~/Library/MobileDevice/
~/Library/Developer/Xcode/DerivedData/Build/Products
$(SRCROOT)
$(PROJECT_DIR)
$(TARGET_NAME)
$(TARGET_NAME)/Supporting Files/Project.entitlements
$(SRCROOT)代表的时项目根目录下 $(PROJECT_DIR)代表的是整个项目
PS:往项目添加文件时,例如.a等,要先show in finder ,复制到项目中,然后再拖到xcode项目中
而有时,我们的.a不在工程目录中,比如在工程的父目录上,可以写成:$(SRCROOT)/../YSKit/libWeChatSDK。其中/../ 就是指向父目录。
https://www.cnblogs.com/muyushifang07/p/4460688.html
/Library/Developer/CoreSimulator/Profiles/Runtimes/
直接进入可以删除
~/Library/Developer/Xcode/Archives/
,1、保存路径:
~/Library/Developer/Xcode/UserData/CodeSnippets
Tips:选中代码,然后单击选中的地方,等鼠标变成箭头就可以进行拖动代码了
2、代码块设置
添加操作:选中代码,单击,长按,然后拖动到右下角代码块区域
变量的使用:<#xxxName#>
Example:<#mark#>、<#type#>、<#value#>
<#xxxName#> 快速打开代码块所在文件夹: open ~/Library/Developer/Xcode/UserData/CodeSnippets
上面这个目录是你添加了自定义代码块之后才会出现
代码块命名规则说明:
// MARK: - XX
Xcode_Beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
,导出最新版本的iOS设备镜像文件/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
defaults write com.apple.dt.Xcode IDEIndexDisable 1
defaults write com.apple.dt.Xcode IDEIndexDisable 0
defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES
defaults write com.apple.dt.Xcode PBXNumberOfParallelBuildSubtasks 8
/Users/yourusername/Library/Developer/Xcode/DerivedData ~/Library/Developer/Xcode/DerivedData ~/Desktop/Xcode.app
清除 Archives rm -rf ~/Library/Developer/Xcode/Archives/*
清除 DerivedData rm -rf ~/Library/Developer/Xcode/DerivedData/*
查看 Provisioning Profiles 文件夹 ~/Library/MobileDevice/ open .
很多设置Xcode已经默认了
可以检查出比较耗时的方法
在 Build Settings --> Other Swift Flags 中加入
xcodebuild clean -scheme Amy
使用快捷键:cmd + T
注释快捷键:Command + option + /
注释失效-Xcode快捷键 注释快捷键失效的问题
添加读写权限:sudo chmod 777 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File\ Templates/Source
拷贝模板到相应目录:sudo cp -R /Users/yourusername/Desktop/GuowenWang.xctemplate /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File\ Templates/Source
使用脚本来执行保存操作:
$ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File Templates/Source
命令行拷贝 XXX.xctemplate 到 Xcode 中:
$ sudo cp -R /Users/yourusername/Desktop/XXX.xctemplate /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File\ Templates/Source
如果想随时修改模板,需要给自己的模板路径添加权限
$ sudo chown -R "$USER”:admin 路径
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSAppleMusicUsageDescription</key>
<string>"XXX-App"需要您的同意,才能访问媒体资料库</string>
<key>NSMicrophoneUsageDescription</key>
<string>"XXX-App"需要您的同意,聊天时才能访问麦克风 </string>
<key>NSPhotoLibraryUsageDescription</key>
<string>"XXX-App"需要您的同意,上传头像,聊天时才能访问相册 </string>
<key>NSCameraUsageDescription</key>
<string>"XXX-App"需要经过您的同意,上传头像,用户评价才能访问相机 </string>
<key>NSLocationAlwaysUsageDescription</key>
<string>"XXX-App"需要经过您的同意,才能始终访问位置,用于查询附近服务信息和导航</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>"XXX-App"需要经过您的同意,才能在使用期间获取您的位置,查询附近服务信息,添加地址和导航</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>"XXX-App"需要经过您的同意,才能在使用期间获取您的位置,查询附近服务信息,添加地址和导航</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>iosamap</string>
<string>baidumap</string>
<string>wechat</string>
<string>weixin</string>
<string>sinaweibohd</string>
<string>sinaweibo</string>
<string>sinaweibosso</string>
<string>weibosdk</string>
<string>weibosdk2.5</string>
<string>mqqapi</string>
<string>mqq</string>
<string>mqqOpensdkSSoLogin</string>
<string>mqqconnect</string>
<string>mqqopensdkdataline</string>
<string>mqqopensdkgrouptribeshare</string>
<string>mqqopensdkfriend</string>
<string>mqqopensdkapi</string>
<string>mqqopensdkapiV2</string>
<string>mqqopensdkapiV3</string>
<string>mqqopensdkapiV4</string>
<string>mqzoneopensdk</string>
<string>wtloginmqq</string>
<string>wtloginmqq2</string>
<string>mqqwpa</string>
<string>mqzone</string>
<string>mqzonev2</string>
<string>mqzoneshare</string>
<string>wtloginqzone</string>
<string>mqzonewx</string>
<string>mqzoneopensdkapiV2</string>
<string>mqzoneopensdkapi19</string>
<string>mqzoneopensdkapi</string>
<string>mqqbrowser</string>
<string>mttbrowser</string>
<string>alipay</string>
<string>alipayshare</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLIconFile</key>
<string></string>
<key>CFBundleURLName</key>
<string>weixin</string>
<key>CFBundleURLSchemes</key>
<array>
<string>wx0abcf149bf24a596</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string></string>
<key>CFBundleURLSchemes</key>
<array>
<string>alipayabcf149bf4a596</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>WLSH</string>
<key>CFBundleURLSchemes</key>
<array>
<string>wlsh</string>
</array>
</dict>
</array>