Skip to content
Objective-C Cocoa utility functions/methods I can't live without (mirrored from bitbucket.org)
Objective-C Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Tests
vendor/google-toolbox-for-mac
CollectionUtils+Old.h
CollectionUtils+Old.m
CollectionUtils.h
CollectionUtils.m
ConcurrentOperation.h
ConcurrentOperation.m
ExceptionUtils.h
ExceptionUtils.m
LICENSE.txt
Logging.h
Logging.m
MYAction.h
MYAction.m
MYAnonymousIdentity.h
MYAnonymousIdentity.m
MYBackgroundMonitor.h
MYBackgroundMonitor.m
MYBlockUtils.h
MYBlockUtils.m
MYBuffer+Zip.h
MYBuffer+Zip.m
MYBuffer.h
MYBuffer.m
MYData.h
MYData.m
MYDynamicObject.h
MYDynamicObject.m
MYErrorUtils.h
MYErrorUtils.m
MYLogging.h
MYLogging.m
MYReadWriteLock.h
MYReadWriteLock.m
MYRegexUtils.h
MYRegexUtils.m
MYStreamUtils.h
MYStreamUtils.m
MYURLHandler.h
MYURLHandler.m
MYURLUtils.h
MYURLUtils.m
MYUtilities.xcconfig
MYUtilities_Debug.xcconfig
MYUtilities_Prefix.pch
MYUtilities_Release.xcconfig
MYZip.h
MYZip.m
ObjDelta.h
ObjDelta.m
README.md
Target.h
Target.m
Test.h
Test.m
Test_Assertions.m
setObjToARC.rb

README.md

MYUtilities

Objective-C utilities for Cocoa programming on Mac OS X and iPhone

by Jens Alfke jens@mooseyard.com

These are useful things I've built over the years and can't live without. All of this code is released under a BSD license; see the file LICENSE.txt.

(This Git repo is a continuation of the earlier Mercurial repo at Bitbucket.org, which is by now quite out of date.)

The core parts are:

CollectionUtils

A grab-bag of shortcuts for working with Foundation classes, mostly collections. Some of it has been made obsolete by the recent addition of Objective-C object literal support, but there's still a lot of useful stuff.

Logging

Everyone seems to build their own logging utility; this is mine. The main nice feature is that you can log different categories of messages, and individually enable/disable output for each category by setting user defaults or command-line arguments. There's also a separate Warn() function that you can set a breakpoint on, which is itself a lifesaver during development.

Test

My own somewhat oddball unit test system. I like being able to put unit tests in the same source file as the code they test. The tests run at launch time (if a command-line flag is set) not in a separate build phase. You can set dependencies between tests to get some control over the order in which they run. The output is IMHO easier to read than SenTest's.

Something went wrong with that request. Please try again.