I'm encountering an error while building an SDK, which states: "Cannot find protocol declaration for 'TransactionHandlerDelegate'; did you mean 'TransactionDelegate'?"
The TransactionHandlerDelegate mentioned in this error is part of a custom framework created by us outside the framework where the error is occurring. This delegate declaration is public.
Context:
1. The TransactionHandlerDelegate protocol is part of a custom
framework developed by us.
2.It's declared as public for accessibility.
3.The error occurs in a different framework where the SDK is being integrated.
4.The SDK targets compatibility with MAUI apps (potentially using Sharpie bindings).
Additionally, here's the code snippet for the TransactionHandlerDelegate declaration:
import Foundation
@objc public protocol TransactionHandlerDelegate: AnyObject {
func onTransactionSucceeded(transactionStatus: TransactionStatus, data: Any?)
func onTransactionProgressUpdate(transactionStatus: TransactionStatus,
terminalStatus: TerminalConnectionStatus,
description: String,
data: Any?)
func onReceiveTransactionData(status: TransactionStatus,
data: Any?,
additionalData: [String: Any])
func onTransactionFailed(status: TransactionStatus,
terminalStatus: TerminalConnectionStatus,
error: String,
data: Any?)
}
Any insights into resolving this error would be greatly appreciated. Thank you!
The excercise of adding the @objc we are eaddig for swift objective C interoprabilty since the SDK that we develop need to be accessed from MAUI app, since the sharpie bind is not working directly on Swift Implementation.
