Kolos65 / Mockable

A Swift macro driven auto-mocking library.
MIT License
249 stars 18 forks source link

Support generating `NSObject` mocked definition #78

Closed markst closed 1 month ago

markst commented 1 month ago

Is there a mechanism in order to have generated Mocks conform or inherit from NSObject.

'CarplayCoordinatorProtocol' requires that 'MockCarplayCoordinatorProtocol' inherit from 'NSObject'

Type 'MockCarplayCoordinatorProtocol' does not conform to protocol 'CarplayCoordinatorProtocol'
Kolos65 commented 1 month ago

Due to macro limitations, protocol inheritance is not supported by default. We could however handle the special case of NSObjectProtocol inheritance as this issue will be common I assume.

Kolos65 commented 1 month ago

@markst This is now handled in 0.0.11