danielsaidi / MockingKit

MockingKit is a Swift SDK that lets you easily mock protocols and classes in `Swift`.
MIT License
87 stars 7 forks source link

Mock doesn't work in Xcode 12 #9

Closed danielsaidi closed 4 years ago

danielsaidi commented 4 years ago

In Xcode 12, the memory address of a function is new every time it's called.

This makes registering results, inspecting calls etc. not work, since a function doesn't get a fixed memory address.

If we manage to solve this in a better way, we will probably solve the other bugs as well.

danielsaidi commented 4 years ago

I managed to solve this with a new MockReference type that uniquely identifies a function.