• Stars
    star
    104
  • Rank 330,604 (Top 7 %)
  • Language
    Shell
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Xcode project template

Vokal Xcode Project Templates

Maintained by @bryanluby

This repo contains Objective-C and Swift templates to start up a new Vokal project. These templates are a good start, but don't produce a ready-to-go project. Be sure to follow the steps in After creating a project each time you use one of these templates. Also note that creating the Xcode project is just one step in the process of setting up a new project; consult that documentation before following instructions here.

For people outside of Vokal: you'll need to make some adjustments after creating your project from these templates. In particular, you'll need to remove our private podspec repo from the Podfile, and update the certificate repo in fastlane/Matchfile. If you have issues beyond that, feel free to drop us a note.

Maintaining these templates

Apple doesn't have documentation on managing templates like this, but there is a third-party guide for Xcode 4 that's still mostly correct for Xcode 11.

If you're updating the templates, you'll note that there are Vokal-fied versions of several templates in this project - this is to facilitate making sure that certain stock files which would otherwise be created are not created. These were forked from the Xcode 7 templates, but as of Xcode 11, the base template had not changed significantly from the one included in 7.

Note that you may need to grab updated versions of these templates from the belly of Xcode when a new version of Xcode is released. As of Xcode 11, these templates can be found at the following paths:

  • Projects: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/iOS
  • Aggregate target: /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/Project Templates/Base/Other/Aggregate.xctemplate

You'll also note that we have separate templates for Swift and Objective-C - there were several features for the Swift template which simply did not work at all without ripping it out into a separate template. Common code is within the Vokal-Cocoa Touch Application Base.xctemplate folder.

Installation

To install or update the templates in Xcode:

  • Clone or download this repository
  • On the command line, cd into the Xcode-Template directory and run ./install.sh
  • Launch Xcode and create a new project. Confirm you see a Vokal category under iOS, as seen below.

After Creating A Project

1. Remove unnecessary references

  • Open up the .xcodeproj file.

  • Remove the Non-iOS Resources folder from the Xcode project by selecting that folder in the sidebar, right clicking, then selecting delete from the menu, then selecting "Remove References" in the dialog that pops up:

  • Using this same method, remove the reference to the Scripts folder as well.

  • Remove the references to the .gitkeep files which were used to create the folder/group hierarchy, but leave the groups themselves:

  • Once those files are removed your groups should look like this:

2. If You Added The Starter Network Utility

If you chose to include the Starter Network Utility when creating the project, you get a bunch of tests for free! The bad news is that templates are dumb, so you have to move them around.

  • Remove the references in "MoveToTestTarget" in the same way you did the Non-iOS resources.

  • Go into the folder hierarchy and find the MoveToTestTarget folder. Select all these files and move them to the top-level of the test target directory. Then add these files to the test target by dragging them into Xcode:

NOTE: For the VOKMockData folder make sure you've selected "Create folder references" so the mock data is added properly.

You can then delete the MoveToTestTarget folder from the filesystem as the test stuff has been moved over.

3. Cocoapod setup

  • Close the project window in Xcode.

  • On the command line, run bundle install. This will ensure that the correct version of CocoaPods is installed, along with the necessary gems for the build and test scripts that run on Travis, so that you can run them locally later on if needed. It will also generate Gemfile.lock, which should be committed so that the same versions of those gems will be installed on Travis. If this command fails, check that you have RubyGems and Bundler installed.

  • On the command line, run bundle exec pod install. Be sure to launch the project from the newly-created .xcworkspace file.

4. For All Projects

  • For Objective-C projects, the Objective-Clean run script is already installed for you and the settings file is already in place. For Swift projects, SwiftLint is set up similarly. Fix any warnings that either utility generates when you build the workspace. If you get an error about Objective-Clean not being found, download and install the app following the full instructions in our Objective-Clean docs.

  • Create a git repository if one has not already been created: git init

  • Commit the initial template files: git add . && git commit -m "Add initial project files from template"

  • Hit ⌘-U to run the tests. The tests should fail since you haven't set anything up yet.

  • Double-check the Travis configuration and add secure keys as needed. See our Travis documentation for the full details on that. This step can be handled later, since most of the information needed for this probably isn't available yet.

  • Find and address all the TODO:s in the boilerplate code.

Notes On Scripts

All scripts added to a given project will be added to the [project]/Scripts folder.

Build or Run scripts (designed to be run in conjunction with every single build or run which takes place within a given workspace) have been added to the appropriate placeβ€”either a post-build action or a Run Script Build Phase.

Scripts tied to code generation are added to Run Script Build Phases in the Code Generation Scripts target. This target must be run manually to generate boilerplate code.

For Objective-C projects, this target runs the scripts for Cat2Cat and Mogenerator. For Swift, it only runs Mogenerator, since R.swift serves the same purpose as Cat2Cat in Swift projects.

Adjust the run scripts in this target as necessary. For example, if your project isn't using Core Data, you can remove the Mogenerator script build phase. You can also add additional build phases if you need to run other scripts.

Version History

  • 1.x: works with Swift 2.2 and 2.3 in Xcode 7 or 8
  • 2.x: works with Swift 3 in Xcode 8
  • 3.x: works with Swift 4 in Xcode 9
  • 4.x: works with Swift 4.2 in Xcode 10
  • 5.x: works with Swift 5.0 in Xcode 10.2
  • 6.x: works with Swift 5.1 in Xcode 11

More Repositories

1

pg-table-markdown

A command line tool that generates markdown documentation for Postgres tables in a given schema
Python
76
star
2

Android-Lint-Checks

Custom Lint checks for Android development.
Java
60
star
3

VolleyBall

A Dagger Injectable Mockable Volley Module
Java
54
star
4

Cat2Cat

Creates a category on UIImage from Asset Catalogs in order to reduce typos and enable auto-complete with image names.
Objective-C
46
star
5

Mocktrofit

Mocking Client for Retrofit
Java
43
star
6

android-res-gen

Automatic res exporter plugin for android projects
Groovy
24
star
7

XcodeAutoBasher

An Xcode plugin to run a given script any time a given folder or its children have changes.
Objective-C
22
star
8

VOKMockUrlProtocol

A url protocol that parses and returns fake responses with mock data
Objective-C
18
star
9

Vokoder

A lightweight core data stack with efficient importing and exporting on the side.
Objective-C
16
star
10

VOKMultiImagePicker-iOS

A multiple image picker using PhotoKit.
Objective-C
12
star
11

cvr

Code Coverage
JavaScript
8
star
12

jacoco-parse

Javascript parser for Jacoco Coverage reports
JavaScript
7
star
13

VOKBenkode

An Objective-C library for encoding/decoding objects using Bencoding. MIT-licensed.
Objective-C
7
star
14

VOKCoreDataManager

Vokal's core data manger's core files. Now maintained in the Vokoder repo
6
star
15

android_database_helper

Java
6
star
16

VIDropDownMenu

VIDropDownMenu is an example of a basic drop-down menu implementation.
Objective-C
6
star
17

CoreDataManager-iOS

PROJECT MOVED
Objective-C
5
star
18

Soundie-iOS

SoundCloud app.
Objective-C
5
star
19

NetworkUtility-iOS

Objective-C
5
star
20

VOKUtilities

Assorted category and utility classes for iDevelopment
Objective-C
4
star
21

components

VOKAL's preferred libraries and tools
4
star
22

VIReceiptFormatter

VIReceiptFormatter easily creates sales receipts to print or view.
Objective-C
4
star
23

angular-mobile-app-redirect

JavaScript
4
star
24

svg-shield

Easy SVG shields (badges) for node with custom text and colors.
JavaScript
4
star
25

SwiftSnake-tvOS

Snake game for tvOS - 2015 Fall Hack days project
Swift
3
star
26

angular-datetime

Angular directives for date and time pickers
JavaScript
3
star
27

vokal-ng-api

Vokal's common AngularJS API service.
JavaScript
3
star
28

yeep

Pure JS sound effects with Web Audio
JavaScript
3
star
29

s3same

Creates unique-per-repo AWS credentials for Travis CI artifact uploading to S3
Python
3
star
30

cobertura-parse

Parse cobertura results file and return JSON
JavaScript
3
star
31

MH4U-Dex

Joseph Goldberg's apprentice project.
Objective-C
2
star
32

golang-cover-parse

Parse Go cover results file to JavaScript Object
JavaScript
2
star
33

Mobile-Web-Templates-Node

JavaScript
2
star
34

android_frameworks_base

Java
2
star
35

UIImage-Resize

a repo of http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/
Objective-C
2
star
36

vip

Vokal Image Proxy is a lightweight image proxy designed for easy resizing and caching of images for mobile applications.
Go
2
star
37

XcodeSnippets

A repository of useful Swift and Objective-C Xcode snippets.
Shell
2
star
38

deckbuilder-api

A tool to track your Hearthstone collection and decks.
Python
2
star
39

MapCraft-Android

Minecraft Map Viewer for Android
Java
2
star
40

majora

JavaScript
1
star
41

Minecraft-player-location-reporter

Bukkit plugin that reports online player locations
Java
1
star
42

css-reset

CSS reset and normalize for fresh web projects.
CSS
1
star
43

vokal-console

Node.js-based web console application
JavaScript
1
star
44

q

A worker queue for processing jobs concurrently in Go.
Go
1
star
45

TrueColors-Android

Gradle plugin to generate Android resources from TrueColors file
Groovy
1
star
46

PeopleManager-iOS

Manage your people in the office! (Vokal Hack Days, fall 2015)
Objective-C
1
star
47

angular-svg-radial

JavaScript
1
star
48

go-loggly

Loggly logging package for Go
Go
1
star
49

vanilla-apollo-client-with-express

A very minimal example of using apollo-client for a GraphQL client and graphql-server-express for a server
JavaScript
1
star
50

route-auth

Easy to use Angular route authorization provider
JavaScript
1
star
51

Minecraft-online-player-list

Go
1
star
52

Android-DateTimePicker

A 4.0+ clone of https://android.googlesource.com/platform/frameworks/opt/datetimepicker/
Java
1
star