Home

Awesome

This repository aims to share some useful resources for Xcode and other Developer Tools.

File Templates for Xcode

This folder contains some File Templates so you can have a nice and homogeneous organization of your code in all your files.

LibraryWithRsrc : Static Library with Resource Bundle

This is an example of how to create a Xcode projet that generate both a static library and a resource bundle.

The aim of this project is to show how you can have a library that provide both functional code but also resources like XIB files, PNG files, xcdatamodels, and even Localized strings, without the need for you to copy each and every single resource in your application project.

There are a lot of advantages in this practice:

Once you have implemented a simple method in your library main class that returns an NSBundle object that will represent the resource bundle generated by the library (see demo project), you can use all the standard methods of NSBundle like pathForResource:ofType: and localizedStringForKey:value:table: to retrieve those resources.

For images, the +[UIImage imageNamed:inBundle:] method is unfortunately a private method, but the demo project provides a workaround (see the UIImage+Bundle.h category in the demo project).

ObjcSubscriptingSupport.h

This file allows support for Objective-C Subscripting for SDKs prior to iOS SDK 6 and OSX SDK 10.7:

If you compile your code with those older SDKs and need subscripting support anyway, simply include this file to have the definitions.

TODOMacros.h

A header defining a lot of useful macros like TODO(x), FIXME(x), NOTE(x) to generate nice warnings to let you know you will have to do some more work in that part of your code.

This is much more efficient that simply using "TODO" comments for example, because it generate a warning that you can't forget about (whereas a simple "TODO" comment will be forgotten quite quickly in practice, we all know that…) and that directly locate the part of the code that need more work to be done later.

Xcode3

Legacy templates and Text Macros (snippets) for Xcode3. Now obsolete.