I'm trying to call in my native iOS code (in swift) from React Native JavaScript.
Here's my JS snippet:
const identity = {
customerEmail: user.email,
customerName: `${user.firstName} ${user.lastName}`,
};
ChatModule.setupIdentity(identity);
Here's my native implementation:
@objc
func setupIdentity(customer: Dictionary<String, String>) {
let identity = Identity.createAnonymous(name: customer["name"], email: customer["email"])
Zendesk.instance?.setIdentity(identity)
}
While both implementations specific to their platforms are right and compile, I can't call into the native module and I'm sure it's related to the method signature being different between react native side and iOS native code.
I was wondering how do I send the correct type over? So it calls into the method properly. Otherwise, right now I'm getting ChatModule.setupIdentity
is not a method.