erikdoe / ocmock

Mock objects for Objective-C
http://ocmock.org
Apache License 2.0
2.16k stars 606 forks source link

Allow compilation with old deployment targets. #345

Closed sdefresne closed 7 years ago

sdefresne commented 7 years ago

The function object_isClass is only available starting from macOS 10.10 and iOS 8.0 SDKs. To allow targeting older systems (i.e. if the deployment target is older), add an alternate implementation.

The implementation is based on the one used by the Swift runtime: https://github.com/apple/swift/pull/11467/commits/0475307c08

Fixes issue #344.