iOS Development Guidelines
  • Introduction
  • 规范
    • 0. 介绍
    • 1. 序言
    • 2. 代码命名规范
      • 2.1. 代码命名基础
      • 2.2. 方法(Method)命名
      • 2.3. 函数(Function)命名
      • 2.4. 属性(Property)与数据类型命名
      • 2.5. 其它命名规范
      • 2.6. 可接受缩略名
    • 3. 代码格式规范
      • 3.1. 代码注释格式
      • 3.2. 代码结构与排版
    • 4. 开发实践
      • 4.1. Objective-C保留字
    • 5. Xcode工程结构
    • 6. 版本控制
      • 6.1. Git基本配置
      • 6.2. Git分支模型
      • 6.3. SVN源代码管理规范
      • 6.4. SVN的标准目录结构
    • 7. 附录
      • 7.1. Xcode扩展插件
      • 7.2. 第三方开源库
    • 8. 参考
    • 9. iOS开发优化
  • Swift编码规范
  • Objective-C新特性
  • iOS生命周期
  • Apple 官方设计指南
    • iOS 人机交互指南
      • 概览 - 设计理念
      • 概览 - iOS 10 新功能
      • 概览 - 接口要素
      • 交互 - 3D Touch
      • 交互 - 辅助功能
      • 交互 - 音频
      • 交互 - 身份验证
      • 交互 - 数据输入
      • 交互 - 反馈
      • 交互 - 文件处理
      • 交互 - 初次启动体验
      • 交互 - 手势
      • 交互 - 加载
      • 交互 - 模态
      • 交互 - 导航
      • 交互 - 评分和评论
      • 交互 - 请求权限
      • 交互 - 设置
      • 交互 - 术语
      • 交互 - 撤销与重做
      • 系统功能 - 多任务
      • 系统功能 - 通知
      • 系统功能 - 打印
      • 系统功能 - 快速预览
      • 系统功能 - Siri
      • 系统功能 - TV 供应商
      • 可视化设计 - 动画
      • 可视化设计 - 品牌化
      • 可视化设计 - 颜色
      • 可视化设计 - 布局
      • 图像 - 应用图标
  • Apple 官方开发指南
    • App 发布指南
      • 待完善
    • Cocoa 代码指南
      • 代码命名基础
      • 方法命名
      • 函数命名
      • 属性和数据类型命名
      • 可接受的缩写词和首字母缩写词
      • 针对框架开发者的技术细节
    • 核心蓝牙编程指南
      • 待完善
  • iOS 杂谈
    • Auto Layout 是怎么进行自动布局的性能如何
    • App 启动速度的优化与监控
    • 多人的大项目,架构怎么设计更合理
    • 链接器:符号是怎么绑定到地址上的
    • App 如何通过注入动态库的方式实现极速编译调试
    • 静态分析工具的选择
    • Clang的App 提质
    • 无侵入的埋点方案如何实现
    • 包大小:如何从资源和代码层面实现全方位瘦身
    • iOS 崩溃千奇百怪如何全面监控
    • 如何利用 RunLoop 原理去监控卡顿
    • 临近 OOM,如何获取详细内存分配信息,分析内存问题
    • 日志监控:怎样获取 App 中的全量日志
    • 性能监控:衡量 App 质量的那把尺
    • 远超想象的多线程的那些坑
    • 怎么减少 App 电量消耗
    • 除了 Cocoa,iOS还可以用哪些 GUI 框架开发
    • 细说 iOS 响应式框架变迁,哪些思想可以为我所用
    • 如何构造酷炫的物理效果和过场动画效果
    • A/B 测试:验证决策效果的利器
    • 怎样构建底层的发布和订阅事件总线
    • 如何提高 JSON 解析的性能
    • 如何用 Flexbox 思路开发?跟自动布局比,Flexbox 好在哪
    • 怎么应对各种富文本表现需求
    • 如何在 iOS 中进行面向测试驱动开发和面向行为驱动开发
    • 如何制定一套适合自己团队的 iOS 编码规范
    • iOS 系统内核 XNU:App 如何加载
    • iOS 黑魔法 Runtime Method Swizzling 背后的原理
    • libffi:动态调用和定义 C 函数
    • iOS 是怎么管理内存的
    • 如何编写 Clang 插件
    • 打通前端与原生的桥梁:JavaScriptCore 能干哪些事情
    • React Native、Flutter 等,这些跨端方案怎么选
    • 原生布局转到前端布局,开发思路有哪些转变
    • iOS原生、大前端和Flutter分别是怎么渲染的
    • 剖析使 App 具有动态化和热更新能力的方案
  • Flutter
    • 0.Flutter学习笔记以及问题记录
    • 1.Dart基础快速入门
    • 2.什么是声明式UI
    • 3.Flutter入门基础知识
    • 4.项目结构、资源、依赖和本地化
    • 6.布局与列表
    • 7.状态管理
    • 8.路由与导航
    • 9.手势检测及触摸事件处理
    • 9.线程和异步UI
    • 10.主题和文字处理
    • 11.表单输入与富文本
    • 12.调用硬件、第三方服务以及平台交互、通知
    • 13.基于Http实现网络操作
    • 14.图片控件开发详解
    • 15.异步:Future与FutureBuilder实用技巧
    • 16.APP首页框架搭建-Scaffold与PageView
Powered by GitBook
On this page
  • Xcode Editor Extension
  • The list

Was this helpful?

  1. 规范
  2. 7. 附录

7.1. Xcode扩展插件

Previous7. 附录Next7.2. 第三方开源库

Last updated 5 years ago

Was this helpful?

Xcode Editor Extension

New Xcode extensions for the source editor let you customize your coding experience. Use extensions to navigate within your editor’s text, and select, modify, and transform your code. Bind your favorite extensions to a keyboard shortcut to make common reformatting tasks a snap. Xcode includes a new template so you can easily create editor extensions and distribute them on the Mac App Store, or sign your extensions with your Developer ID to share them online. And because extensions run in a separate process, Xcode stays safe and stable.

Xcode 8 开始支持一套官方的扩展 API,第一个支持的扩展类型就是源码编辑器的扩展。另一方面, Xcode 采用了系统完整性保护功能(即 SIP) 。这意味着想要将代码注入到 Xcode 进程已经不可能了,现在也只能在无正式签名的Xcode中生效了。因此在Xcode 8后应该使用Editor Extension,下面推荐一些第三方Xcode扩展。

  • - an open-source Xcode Source Editor extension for creating Swift code from JSON-formatted text.

  • - a flexible, fast, customizable tool which allows you to generate swift code based on JSON file.

  • - allows you to convert Objective-C code to Swift right from Xcode.

  • - "legal" Xcode Plugin for inserting code in super duper fast lazy way.

  • - Xcode editor extension for swift code generation.

  • - Xcode editor extension that adds an ability to post and edit github issues through comment templates

  • - An amazing Xcode Source Editor extension to align regular code.

  • -This Xcode source editor extension align your assignment statement.

  • - An Xcode Source Editor extension to clean the closure syntax.

  • - Xcode Source Editor Extension based tools to improve the text editing experience of Xcode 8 and provide extensions with simple code.

  • - A Xcode Source Editor Extension that searches external sources

  • - SwiftLint for Xcode is a Xcode Extension that was created to run SwiftLint.

  • - Xcode Source Editor Extension for C Style Comment /**/

  • - Xcode's source editor extension to duplicate selected line or lines.

  • - Convert [[AnObject method1] method2] to AnObject.method1.method2 with Xcode Extension

  • - Bring some convenient editor shortcuts to Xcode using Xcode Source Editor Extension, inspired from AppCode.

  • - Navigate to many places from Xcode

  • - An Xcode source editor extension that makes working with color easier

  • - Strimmer is an Xcode 8 Source Code Extension that quickly strips all trailing whitespace from the current file.

  • - Jumpy is an Xcode source editor extension for jumping across multiple lines of code.

  • - Xcode 8 Extension - Figlet Font Titles

  • - Proof of concept for Xcode 8 source extensions; generate a Swift init from current selection

  • - Comment lines.

  • - Visual Studio Comment Selection and Uncomment Selection for Xcode 8 extension.

  • - It then breaks apart any String declarations it founds by splitting the selection based off " and then wrap the resulting String inside NSLocalizedString.

  • - A Proof-Of-Concept implementation of the new Xcode Source Editor Extension

  • - Same as above.

  • - Sort text or code lines from a text selection. An Xcode extension by .

  • - Xcode source extension to help with some SwiftLint rules

  • - BDD Shortcuts is an Xcode 8+ plugin that adds handy shortcuts for Swift and BDD frameworks such as Cedar, Quick, Kiwi or Specta.

  • - XCode source editor extension for quick navigating

  • - Xcode Source Editor Extension to remove or modify the top comment of a file

  • - Example of Xcode Source Editor Extension

  • - A small "sudden" example of Xcode source code extension

  • - Xcode Source Editor Extension for clang-format

  • - The first command uses multiple selections to select every text range in your file that it believes is violating a whitespace rule. If a line contains a zero-length problem (missing whitespace or missing indent) then the whole line will be selected.

  • - Select the current scope / block.

  • - Replace entire files with literals

  • - An Xcode formatter plug-in to format your swift code

  • - Moves cursor to next line after commenting/uncommenting current line (like AppCode).

  • - This Xcode 8 Source Code Extension will generate a Swift initializer based on the lines you've selected.

  • - Add imports from anywhere in the code.

  • - Xcode 8 Source Code Extension will generate conformance to Swift Equatable protocol based on type and fields selection.

  • - Generates MARK comments from protocol conformance in class declaration.

  • - Autocompletes @property statements with desired type.

  • - Identifies IBOutlets, IBActions, Super Classes, Properties (and more) and MARK them.

  • - A Xcode Source Editor Extension to quickly add a method implementation with comment from selected text

  • - A Xcode Source Editor Extension to sort your header imports and remove duplicates, similar to iSort.

  • - An Xcode Source Editor Extension providing convenient line manipulation such like line deletion and duplication.

  • - Generates NSCopying, isEquals, hash, and more.

  • - A few 'Handy' Xcode commands (insert code placeholder, multi-line comment, etc.)

  • - Xcode Source Editor Extension that helps to localize Swift and Objective-C source files

  • - Xcode Source Editor Extension that sends code to GitHub's

  • - Create Xcode playgrounds from your menu bar.

  • - Add hundreds of ASCII cows to your source code

  • - Generate the type declaration in your file based on the file name

  • - Instant switch with selected enum cases

  • - Xcode extension which allows you copying the code with special formatting quotes for social (Slack, Telegram)

  • - This application adds two feature that Tabify and Untabify to Xcode Source Editor.

  • - Converts UIColor, NSColor, UIImage to literals

  • - An Xcode 8._x _Source Editor extension for simplifying common pragma driven tasks

  • - Automatically creates NSCoding-implementations from properties

  • - Duplicate lines as comment

  • - A Xcode Source Editor extension to translate selected text into other language.

  • - A Xcode Source Editor extension to translate selected variable or method between PascalCase, camelCase and snake_case.

  • - A Xcode Source Editor extension to generate lazy getter methods from property.

  • - A Xcode Source Editor extension to duplicate line, delete line, join lines and more.

  • - Swift parser + Spy generator.

  • - Xcode Source extension for delivering enums and variables from enum cases, see

Alcatraz 插件管理器 (Deprecated)

安装

在终端输入下面命令

curl -fsSL https://raw.github.com/alcatraz/Alcatraz/master/Scripts/install.sh | sh

成功之后会给你一杯啤酒

Alcatraz successfully installed!!1!🍻 Please restart your Xcode.

然后重启一下Xcode。就可以看到在Menu — Windows 看到Package Manager,打开它,然后就长这个样子

里面有三种东西:Plugins(插件),Color Themes(颜色主题),Templates(模板)

选择你想要的东西,点击==INSTALL==按钮开始安装,完成之后会显示红色的==REMOVE==按钮。

卸载

打开终端粘贴下面的命令:

rm -rf ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin

删除掉Alcatraz安装的所有插件:

rm -rf ~/Library/Application\ Support/Alcatraz/

常用插件

Alcatraz里面常用插件说明

插件

用途

注释辅助插件,主要用于收集并列出项目中的TODO,FIXME,`???

为CocoaPods添加了一个菜单项

添加引用文件有时候非常麻烦,如果你需要引入一个pod头文件,Xcode自带的自动补全自然帮不了你,这时候你可以用Peckham插件解决这个问题。Command+Control+P解决所有的引入

代替Xcode的autocomplete,它利用模式匹配算法来解决问题。

使用它和你的Git库同步,如果你想手动导入一个Snippet需要很麻烦的步骤,通过这个插件你只需要点击几下鼠标。

输入三个斜线“\/\/\/”,自动生成规范化的注释

可以在当前的窗口内创建一个代码迷你地图,并在屏幕上高亮提示

代码对齐,Shift + Cmd + X

经常输入大段文本的时候,如果文本里面有各种换行和特殊字符,经常会让人很头疼,有了HOStringSense,再也不不用为这个问题犯愁了,顺便附送字数统计功能。

代码里的那些冷冰冰的颜色数值,到底时什么颜色?如果你经常遇到这个问题,每每不得不运行下模拟器去看看,那么这个插件绝对不容错过。更彪悍的是你甚至可以点击显示的颜色面板,直接通过系统的ColorPicker来自动生成对应颜色代码,再也不用做各种颜色代码转换了!

CLang代码格式化

代码、图片、文件搜索利器,快捷键CMD + SHIFT +X

Xcode更新后插件不能用的解决办法

运行下面的命令

find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID`

改变调试控制台颜色,这个插件配合使用效果非常好

Alcatraz
The list
JSON-to-Swift-Converter
JSON2Swift
Swiftify Xcode extension
EasyCode-Xcode
CodeGenerator
GithubIssuesExtension
XAlign
Alignment
CleanClosureXcode
xTextHandler
Xcode-Search
SwiftLintForXcode
XcodeCComment
Duplicate Line
Dotify
XcodeEditorPlus
XcodeWay
XcodeColorSense2
strimmer
Jumpy
SETools
GenerateSwiftInit
XTExtension
VS-Key-Bindings-For-Xcode
Localizer
EmojifySourceEditorExtension
EmojifyApplication
xcsort
@battlmonstr
SwiftLintXcodePlugin
BDDShortcuts
Jump
XcodeTopComment
PAXcodePlugin
XcodeExtension-TotsuzenNoShi
ClangFormatter
CwlWhitespace
DemoXcodeExtension
TestXcodeSourceExtensions
Swimat
FastCommentLine
SwiftInitializerGenerator
Import☝️
XcodeEquatableGenerator
Mark
Propertizer
Eric’s Mark
Quick Add
CleanHeaders-Xcode
FBXCodeExtension
Basics
HandyXcode
LocalizedString
Xgist
Gist
PlayAlways
CodeCows
DeclareType
Switch Enum Case Generator
XShared
TabifyIndents
Literals
Pragmatic
Xcode-NSCoding
LineEscapeEx
LanguageTranslator
NamingTranslator
CodeGenerator
MGTextPlus
Rubicon
BExtension
this article
其它Extension
XToDo
CocoaPods plugin
Peckham
FuzzyAutocomplete
ACCodeSnippetRepository
XcodeColors
CocoaLumberjack
VVDocumenter
SCXcodeMiniMap
XAlign
HOStringSense
OMColorSense
ClangFormat
CodePilot