Skip to content

Xcode code snippets for the Swift Composable Architecture (TCA)

License

Notifications You must be signed in to change notification settings

x-0o0/snippets-composable-architecture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

snippets-composable-architecture

Xcode code snippets for the Swift Composable Architecture (TCA)

Table of Contents

Overview

feature

Creates snippets for the reducer, view and preview for a feature

Figure.1 Figure.2
Screenshot 2023-09-25 at 11 51 38 PM Screenshot 2023-09-25 at 11 51 46 PM

testfeature

Creates scenario test method for a feature. You should use the completion inside of the test class.

Figure.1 Figure.2
Screenshot 2023-09-25 at 11 52 21 PM Screenshot 2023-09-25 at 11 52 30 PM

How to use

한국어

  1. 다음 경로에 자동으로 ReducerView, Preview 까지 생성하는 코드 스니펫 파일이 있습니다.
/XcodeSnippets/FeatureTemplate.codesnippet
  1. 터미널을 열고 다음 명령어를 실행하여 Xcode에 코드 스니펫 관리 폴더를 엽니다.
$ open Library/Developer/Xcode/UserData/CodeSnippets/
  1. 폴더에 코드 스니펫 파일을 복사 붙여넣기 합니다.

  2. Xcode를 실행한 후 .swift 파일에서 feature 를 입력하면 자동완성 목록에 뜨는 걸 확인할 수 있습니다.

IMPORTANT Xcode 를 실행중이라면 종료 후 재시작합니다.

English

  1. You have an auto-generated code snippet file at the following path:
/XcodeSnippets/FeatureTemplate.codesnippet
  1. Open your terminal and execute the following command to open the code snippet management folder in Xcode:
$ open Library/Developer/Xcode/UserData/CodeSnippets/
  1. Copy and paste the code snippet file into this folder.

  2. After opening Xcode, if it's running, please restart it. Then, when you type feature in a .swift file, you will see it in the auto-completion list.

中文

  1. 您在以下路径有一个自动生成的代码片段文件:
/XcodeSnippets/FeatureTemplate.codesnippet
  1. 打开终端并执行以下命令,以打开Xcode中的代码片段管理文件夹:
$ open Library/Developer/Xcode/UserData/CodeSnippets/
  1. 复制并粘贴代码片段文件到这个文件夹中。

  2. 在打开Xcode后,如果它正在运行,请重新启动它。然后,在.swift文件中键入feature,您将在自动完成列表中看到它。

日本語

  1. 次のパスに自動生成されたコードスニペットファイルがあります。
/XcodeSnippets/FeatureTemplate.codesnippet
  1. ターミナルを開き、Xcodeのコードスニペット管理フォルダを開くには、次のコマンドを実行してください。
$ open Library/Developer/Xcode/UserData/CodeSnippets/
  1. コードスニペットファイルをこのフォルダにコピーして貼り付けます。

  2. Xcodeを開いた後、実行中であれば終了し、再起動してください。その後、.swiftファイルでfeatureを入力すると、自動補完リストに表示されるはずです。