Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Objective-C Cocoa utility functions/methods I can't live without (mirrored from bitbucket.org)
Objective-C M C
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
vendor/google-toolbox-for-mac Add missing files (for MYNetwork)
CollectionUtils.h Added some CF utilities to CollectionUtils (cfSetObj, cfretain...)
CollectionUtils.m Allow Assert calls to be disabled by #defining MY_BLOCK_ASSERTS
ConcurrentOperation.h Add missing files (for MYNetwork)
ConcurrentOperation.m Add missing files (for MYNetwork)
ExceptionUtils.h Updated copyright years.
ExceptionUtils.m Fixed an issue in ExceptionUtils.m reported by Xcode 5.1
LICENSE.txt Create LICENSE.txt
Logging.h Logging improvements
Logging.m Logging improvements
MYAnonymousIdentity.h Changed MYGetCertificatePublicKeyDigest to MYGetCertificateDigest
MYAnonymousIdentity.m Changed MYGetCertificatePublicKeyDigest to MYGetCertificateDigest
MYBlockUtils.h MYBlockUtils: Added MYThrottledBlock and MYBatchedBlock
MYBlockUtils.m MYBlockUtils: Added MYThrottledBlock and MYBatchedBlock
MYBuffer.h Added MYBuffer.
MYBuffer.m Added warning to MYBuffer on an input-stream read error
MYData.h Fixed bug in MYLengthOfVarUInt
MYData.m Fixed an int-size warning in MYData
MYDynamicObject.h Made MYDynamicObject work with object types that include protocol names
MYDynamicObject.m MYDynamicObject: Fixed regression with properties of type "id"
MYErrorUtils.h Added -[NSError my_hasDomain:code:]
MYErrorUtils.m Added -[NSError my_hasDomain:code:]
MYReadWriteLock.h
MYReadWriteLock.m MYReadWriteLock: Doc-comments and additional error checking
MYRegexUtils.h Fixed some copyrights.
MYRegexUtils.m Fixed some copyrights.
MYStreamUtils.h Added MYStreamUtils
MYStreamUtils.m Added MYStreamUtils
MYURLHandler.h Fixed some copyrights.
MYURLHandler.m Fixed some copyrights.
MYURLUtils.h Added .my_proxySettings to MYURLUtils
MYURLUtils.m Added a missing #import to MYURLUtils.m.
MYUtilities.xcconfig Removed some obsolete build settings from the xcconfig file
MYUtilities_Debug.xcconfig First commit into git. A subset of the files in Mercurial revision 31…
MYUtilities_Prefix.pch Add missing files (for MYNetwork)
MYUtilities_Release.xcconfig First commit into git. A subset of the files in Mercurial revision 31…
ObjDelta.h Made MYDynamicObject work with object types that include protocol names
ObjDelta.m Made MYDynamicObject work with object types that include protocol names
README.md License clarification and some updates.
Target.h Updated copyright years.
Target.m Updated copyright years.
Test.h Test: Unit tests now need to be enabled by #defining MY_ENABLE_TESTS
Test.m Test: Unit tests now need to be enabled by #defining MY_ENABLE_TESTS
Test_Assertions.m Broke assertion handlers out of Test.m into new Test_Assertions.m
setObjToARC.rb Added -[Target retainTargets]. Added setObjToARC conversion utility.

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.