0

I have following ObjC protocol

# import <Foundation/Foundation.h>

@protocol FutureObjC

- (void)setValue: (NSObject *_Nullable)data NS_SWIFT_NAME(setValue(_:));
- (void)setError: (NSError *_Nullable*_Nullable)error NS_SWIFT_NAME(setError(_:));

@end

And an ObjCpp method of some class, that accepts object conforming this protocol

- (void)__method:(_Nonnull id<FutureObjC>)future
{
    [future setValue: nil];
}

But I get compilation error, that there is no such method in protocol

/Users/ga.igumnov/work/sdk/build/x86_64/test/tests/test-sbis-djinni-static/src/async/djinni/objcpp/TestSBISDjinniAsync/DSAsyncTestInterface+Private.mm:94:13: error: instance method 'setValue:' not found ; did you mean 'getValue:'?
   94 |     [future setValue: nil];
      |             ^

What am I doing wrong?

1 Answer 1

0

It happens, when you have only forward declaration of protocol, but no real include to it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.