Download

Stable Releases

The disk images countain source code and binaries. Usually the releases can be used on newer systems, too. For example, OCMock 3.1, built with Xcode 6.2 using the OS X 10.10 and iOS 8.2 SDKs, can also be built with Xcode 7 its newer SDKs.

Release Build SDKs Deployment Targets Date File
OCMock 3.5 macOS 10.14, iOS 13.2, tvOS 13.2, watchOS 6.1 OS X 10.8, iOS 8.0, tvOS 9.0, watchOS 4.0 17-Nov-2019 ocmock-3.5.dmg
Recent changes:
  • Added macro to tell the mock to ignore non-object arguments.
  • Added checks, which throw an expection if no interaction happens with a mock object inside the stub/expect/reject/verify macros. This helps in cases where by accident the real object is used in these macros.
  • Changed stopMocking so that arguments will be forcibly released to break retain cycles. This MAY cause some existing tests to fail. However, it was always bad practice to use a mock after calling stopMocking.
  • Added checks, which throw an exception when stopMocking has been called and afterwards an attempt is made to use functionality that will definitely not work after stopMocking has been called.
  • Changed stub so that return value is not retained if the value is the mock itself, because that creates a retain cycle.
  • Added support for watchOS
more...
OCMock 3.4.3 macOS 10.14, iOS 12.1, tvOS 12.1 OS X 10.8, iOS 8.0, tvOS 9.0 4-Nov-2018 ocmock-3.4.3.dmg
OCMock 2.2.4 OS X 10.9, iOS 7.1 OS X 10.6, iOS 5 4-Apr-2014 ocmock-2.2.4.dmg

Source code

The source code for OCMock is available on GitHub

   https://github.com/erikdoe/ocmock

It is built and tests are run by Travis CI. The current status is shown above on the right. If this isn't showing passing, chances are the code is currently not building correctly and we're busy trying to fix it. In all other cases, a local build from source should work.

License for OCMock 3.x

Copyright (c) 2004-2019 Erik Doernenburg and contributors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

License for OCMock 1.x and 2.x

Copyright (c) 2004 - 2014 by Mulle Kybernetik. All rights reserved.

Permission to use, copy, modify and distribute this software and its documentation is hereby granted, provided that both the copyright notice and this permission notice appear in all copies of the software, derivative works or modified versions, and any portions thereof, and that both notices appear in supporting documentation, and that credit is given to Mulle Kybernetik in all documents and publicity pertaining to direct or indirect use of this code or its derivatives.

THIS IS EXPERIMENTAL SOFTWARE AND IT IS KNOWN TO HAVE BUGS, SOME OF WHICH MAY HAVE SERIOUS CONSEQUENCES. THE COPYRIGHT HOLDER ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION. THE COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE OR OF ANY DERIVATIVE WORK.