Skip to content
Objective-C Cocoa utility functions/methods I can't live without (mirrored from bitbucket.org)
Objective-C Ruby
Find file
Failed to load latest commit information.
Tests Added MYAction
vendor/google-toolbox-for-mac Add missing files (for MYNetwork)
CollectionUtils+Old.h Converted many of the files to ARC. Pruned old stuff out of Collectio…
CollectionUtils+Old.m
CollectionUtils.h CollectionUtils: Added $castIfProtocol
CollectionUtils.m CollectionUtils: Added $castIfProtocol
ConcurrentOperation.h
ConcurrentOperation.m Add missing files (for MYNetwork)
ExceptionUtils.h Updated copyright years.
ExceptionUtils.m Converted many of the files to ARC. Pruned old stuff out of Collectio…
LICENSE.txt Create LICENSE.txt
Logging.h Changed return type of MYLoggingCallback from void to BOOL
Logging.m Changed return type of MYLoggingCallback from void to BOOL
MYAction.h Added MYAction
MYAction.m Added MYAction
MYAnonymousIdentity.h Changed MYGetCertificatePublicKeyDigest to MYGetCertificateDigest
MYAnonymousIdentity.m MYAnonymousIdentity: Updated the template cert to use SHA-256
MYBackgroundMonitor.h -[MYBackgroundMonitor endBackgroundTask] now returns BOOL
MYBackgroundMonitor.m -[MYBackgroundMonitor endBackgroundTask] now returns BOOL
MYBlockUtils.h MYBlockUtils: Added MYThrottledBlock and MYBatchedBlock
MYBlockUtils.m Converted many of the files to ARC. Pruned old stuff out of Collectio…
MYBuffer+Zip.h Added MYZip and MYBuffer+Zip
MYBuffer+Zip.m Updated copyrights & licenses in comments.
MYBuffer.h Updated copyrights & licenses in comments.
MYBuffer.m MYBuffer: Make sure input stream is open before reading
MYData.h Fixed bug in MYLengthOfVarUInt
MYData.m MYData: Fixed a sign-conversion warning
MYDynamicObject.h MYDynamicObject: Workaround for handling Swift-class-valued property …
MYDynamicObject.m MYDynamicObject: Workaround for handling Swift-class-valued property …
MYErrorUtils.h Added MYMapError to MYErrorUtils
MYErrorUtils.m
MYReadWriteLock.h MYReadWriteLock: Doc-comments and additional error checking
MYReadWriteLock.m MYReadWriteLock: Doc-comments and additional error checking
MYRegexUtils.h Fixed some copyrights.
MYRegexUtils.m Fixed some copyrights.
MYStreamUtils.h Updated copyrights & licenses in comments.
MYStreamUtils.m Converted many of the files to ARC. Pruned old stuff out of Collectio…
MYURLHandler.h
MYURLHandler.m Fixed some copyrights.
MYURLUtils.h Added .my_proxySettings to MYURLUtils
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
MYUtilities_Release.xcconfig First commit into git. A subset of the files in Mercurial revision 31…
MYZip.h Added MYZip and MYBuffer+Zip
MYZip.m Updated copyrights & licenses in comments.
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.m Test: Unit tests now need to be enabled by #defining MY_ENABLE_TESTS
Test_Assertions.m Converted many of the files to ARC. Pruned old stuff out of Collectio…
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.