Andrew Watson
01/17/2024, 9:45 PMdef
file. I have this setup in gradle:
ios {
compilations.getByName("main") {
cinterops {
val observer by creating {
defFile(project.file("src/nativeInterop/cinterop/observer.def"))
packageName("com.kashif.common")
compilerOpts("-I/src/nativeInterop/cinterop")
includeDirs {
allHeaders("src/nativeInterop/cinterop")
}
}
}
}
}
However when I try to consume the Protocol I'm generating from the def file, it's not importable. I figure I'm missing something basic; any clues?Andrew Watson
01/17/2024, 9:47 PMlanguage = Objective-C
---
#import <Foundation/Foundation.h>
@protocol NSObjectObserver
@required
- (void)observeValueForKeyPath:(NSString *)keyPath
ofObject:(id)object
change:(NSDictionary<NSKeyValueChangeKey, id> *)change
context:(void *)context;
@end;
Andrew Watson
01/17/2024, 9:50 PMkotlin.mpp.enableCInteropCommonization=true
to my gradle.propertiesAlex Dmitriev
01/24/2024, 5:54 AMenableCInteropCommonization
does, been trying it on and off for my case with no effect. Cool that it helped yours.