Closed mplorentz closed 6 years ago
Hmmm. This might be related to using method_exchangeImplementations
for swizzling the alloc
methods.
See these articles: https://blog.newrelic.com/2014/04/16/right-way-to-swizzle/ http://petersteinberger.com/blog/2014/a-story-about-swizzling-the-right-way-and-touch-forwarding/
I'm going to close this as a dupe of #80
Issue
Enabling and disabling RZBluetooth mocking is not working as I expect.
Steps to reproduce:
RZBEnableMock(true)
)RZBEnableMock(false)
)RZBEnableMock(true)
)CBPeripheralManager
Expected:
CBPeripheralManager.mock
is not nil. Actual:CBPeripheralManager.mock
is nil.Example
I've attached and example project. It is a mixed Objective-C/Swift framework project since that is how my current project is set up. You can demonstrate the issue by running the tests. RZBDisableMockExample.zip