Cuckoo icon indicating copy to clipboard operation
Cuckoo copied to clipboard

How to stub a objc method with a `error:(NSError **)errPtr` parameter?

Open ziilive opened this issue 1 year ago • 1 comments

Objc method declare like:

- (BOOL)connectToHost:(NSString*)host onPort:(uint16_t)port error:(NSError **)errPtr;

Bridged to swift:

func connectTo(host: on port:) throws -> Bool

So how do stub a method like this?

ziilive avatar May 24 '24 12:05 ziilive

Hey @ziilive, unfortunately I'm not really well-versed in the Obj-C mocking part, so I can't help here, perhaps someone from the community might know.

MatyasKriz avatar May 30 '24 11:05 MatyasKriz