Xcode-Tips

Xcode-Tips

1.Plugin

1.xcode11,已经把插件放在了appstore,Xcode Extension

Xcode 8+安装Alcatraz插件管理器 https://blog.csdn.net/zhongtiankai/article/details/72598467

1、获取DVTPlugInCompatibilityUUID

$ defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID

2、将DVTPlugInCompatibilityUUID添加到插件里
$ find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add ************(第一步获取的DVTPlugInCompatibilityUUID)
————————————————
版权声明:本文为CSDN博主「米豆腐」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/zhongtiankai/article/details/72598467

sudo gem install update_xcode_plugins

update_xcode_plugins

update_xcode_plugins —unsign

2.Xcode11.1需要 MacOS10.14.4

1.下载了 10.14.6,已经出了 10.15Catalina,但是不支持 32 位程序.

2.校验 Sha1

shasum /path/to/file

3.10.14.6Mojave Sha1

6613EA71FEFE3CD2F0140AF4F983C9689E12E78F

3.10.15 Catalina Sha1 下载

0FBF4FE56969D8A4F3CFC446CD31123449CCB62E

已安装 10.14.6

3.安装 Xcode10 的Theme

1
cp /Volumes/480/Apps/Xcode/xcode-10-default-dark-theme-master/Xcode\ 10\ Dark.xccolortheme ~/Library/Developer/Xcode/UserData/FontAndColorThemes/

4.gitee验证

Snip20191126_3

  1. 添加用户和邮箱
1
2
git config --global user.name "gitee邮箱"
git config --global user.email "gitee邮箱"

5.合起函数 ⌘ + ALT + SHIFT + + ⃪

显示合并条

Snip20191127_1

6.Add a key binding

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Go to this folder which contains dark side of the force:

Xcode 4.2 or prior: /Developer/Library/PrivateFrameworks/IDEKit.framework/Resources
Xcode 4.3 or later: /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources.
Open IDETextKeyBindingSet.plist.

Add a new dictionary and a new command item as the screenshot below (name them what you want): Editing the plist

That's: selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:

Restart Xcode and go to Preferences - Key Bindings, search for your command.

Set a key combination for the command: Key Bindings

Finally unleashed the power of key bindings on Xcode... Enjoy it!
1
/Volumes/Mojave/Users/heavenyu/Downloads/Xcode-beta.app/Contents/Frameworks/IDEKit.framework/Resources

not working.

7.Xcode9.2 can’t open preference by CMD + ,

opening Xcode Xcode-server can open it.

8.console colors

  1. added 10-black-default theme it’s white by default
  2. ti’s in colors.

9.iPhone11 模拟器上下空白 设置launch screen file

10.Xcode中的Code Snippets默认放在下面的目录中:

1
~/Library/Developer/Xcode/UserData/CodeSnippets

11.xcode-10-default-dark-theme

## Installation

Create the custom themes folder:

1
~/Library/Developer/Xcode/UserData/FontAndColorThemes/

Move “Xcode 10 Dark.xccolortheme” file to this custom themes folder.

12.AllignmentForXcode

Settings

13.CocoaPod

1
2
3
4
5
6
7
8
9
10
11
12
13
14
git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git  ~/.cocoapods/repos/trunk
cd ~/.cocoapods/repos
mv ./trunk ./master
cd master
git init
git remote add origin https://github.com/CocoaPods/Specs
pod repo update
//清华现在提供1.6.2,升级1.9.1:
sudo gem install -n /usr/local/bin cocoapods
//装完卡,换回清华repo
git remote remove origin
git remote add origin https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
git remote add trunk https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
pod repo update

总是断线,换了清华的git地址,满速下载完成.

安装完要把trunk改为master

测试命令

1
pod search AFNetworking

第一次显示:Creating search index for spec repo ‘master’..完成后:

1
2
3
AFNetworking (4.0.1)
A delightful networking framework for Apple platforms.
pod 'AFNetworking', '~> 4.0.1'

还要在Podfie添加:

1
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'

12Charleshttps://www.zzzmode.com/mytools/charles/

手机打开此网站下载证书,查看描述文件

1
https://chls.pro/ssl

设置->通用->关于本机->证书信任设置-> 找到charles proxy custom root certificate然后信任该证书即可.

13.xcode打开10000行json卡死

/Volumes/480/Projects/gitee/Record/Record/Classes/Expand(扩展)/Const(常量)/DCNotificationCenterName.h:18:1: Unknown type name ‘UIKIT_EXTERN’

14.拿到工程,先按podfile.lock设置podfile,防止升级版本后出错

15.show only errors

16.断点放在结果那里,可以直接看出什么问题.

17.签名错误 no profile found

1
2
3
4
build setting 
sign
code signing entitlement
delete it