Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12141

Cannot find protocol declaration for 'TransactionHandlerDelegate'" (Swift/MAUI Interop)

$
0
0

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.

SDK-Swift.h

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).enter code here

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.


Viewing all articles
Browse latest Browse all 12141

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>