Code Monkey home page Code Monkey logo

customxcodefileheadertemplate's Introduction

Custom Xcode file header template

Introduction

Custom Xcode 9+ file header template in order to be able to personalize the full username (author) on file creation.

Based on: https://oleb.net/blog/2017/07/xcode-9-text-macros/#text-macros-reference

You can also search "Customize text macros" in Xcode Help section for more official info.

Instructions

  1. Download IDETemplateMacros.plist file (or create a new one, see the link above)

  2. Copy the IDETemplateMacros.plist on one of the following locations:

    • Project user data: <ProjectName>.xcodeproj/xcuserdata/[username].xcuserdatad/IDETemplateMacros.plist.
    • Project shared data: <ProjectName>.xcodeproj/xcshareddata/IDETemplateMacros.plist
    • Workspace user data: <WorkspaceName>.xcworkspace/xcuserdata/[username].xcuserdatad/IDETemplateMacros.plist.
    • Workspace shared data: <WorkspaceName>.xcworkspace/xcshareddata/IDETemplateMacros.plist.
    • User Xcode data: ~/Library/Developer/Xcode/UserData/IDETemplateMacros.plist.
  3. Edit CUSTOMFULLUSERNAME variable

  4. Restart Xcode and create a new file with the new header

For this example, the file has been copied to User Xcode data. ~/Library/Developer/Xcode/UserData/IDETemplateMacros.plist.

Example

The following template, when CUSTOMFULLUSERNAME = "epeuva"


//  ___FILENAME___
//  ___PRODUCTNAME___
//
//  Created by ___CUSTOMFULLUSERNAME___ on ___DATE___
//  ___COPYRIGHT___
//

generates:

//
//  ViewController.h
//  exampleProject
//
//  Created by epeuva on 23/07/2018.
//  Copyright © 2018 epeuva. All rights reserved.
//

customxcodefileheadertemplate's People

Contributors

epeuva avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.