Conversation
|
@Eradash thanks for the effort.
:) |
|
The problem comes with the callback... The method can't be marked with |
|
@Eradash can you please show how you're calling the library function from your objective c? |
|
My class is implementing the new - (void)biometricResultOK {
}
- (void)biometricErrorWithError:(enum AuthenticationErrorOBJC)error {
}
- (void)authenticate:(UITapGestureRecognizer *)gesture {
[BioMetricAuthenticator authenticateWithPasscodeWithReason:@"Test" cancelTitle:@"Cancel test" completion:self];
} |
|
@Eradash why do you want to go with the protocol approach? I agree that may be swift completion with result type is not accessible from the objc, Converting or making it reverse compatible with objc is not a good solution though. |
|
I'm quite new to Objective C and Swift, and this solution was the fastest and easiest way for me to make the library works |
|
|
This will create a real mess in every project in objc that wants to implement your library. It creates a other file were code can be, and debugging and maintainability are affected. I don't intend to make the switch to Swift in my project, and I think I'm not the only one only for a library. |
I needed to use this library inside an Objective-C project. This is the modifications I've done to make it work.