You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem trying to send a request and I get the following error message:
Bridge is not set. This is probably because you've explicitly synthesized the bridge in ElectrodeBridgeTransceiver, even though it's inherited from RCTEventEmitter.
I am trying to use the ElectrodeRequestProcessor from a Swift file, imported in my AppDelegate.m inside of the ErnRunner.xcodeproj of my electrode-native project.
Somehow registering to an event coming from JS works well, but then when I am trying to send an event I run into the above mentioned error.
The relevant Swift code:
@objc public static func sendRequest(payload: String) {
let requestProcessor = ElectrodeRequestProcessor<String, String, String>(
requestName: "communication.native",
requestPayload: payload,
respClass: String.self,
responseItemType: String.self,
responseCompletionHandler: { responseMessage, failureMessage in
if let failure = failureMessage {
print("Request to JS failed \(failure.message)")
} else {
if let responseMessageString = responseMessage as? String {
print("Request response from JS \(responseMessageString)")
}
}
}
)
requestProcessor.execute()
}
I have a problem trying to send a request and I get the following error message:
I am trying to use the
ElectrodeRequestProcessor
from a Swift file, imported in myAppDelegate.m
inside of theErnRunner.xcodeproj
of my electrode-native project.Somehow registering to an event coming from JS works well, but then when I am trying to send an event I run into the above mentioned error.
The relevant Swift code:
The relevant obj-c code:
Somehow in the real project (importing the miniapp) the same code works well, though I can see 2 main differences:
To try to deny/confirm the latest, I added some delay (30s) before trying to send the request, but I get the same error.
If you have any ideas on how to troubleshoot and fix I would be glad, and hope I did not write too much non-sense, I am really new to iOS development.
The text was updated successfully, but these errors were encountered: