I have used Facebook AppEvents in which I am getting error:-
AppEvents.logEvent(.completedRegistration, parameters: [AppEvents.ParameterName.registrationMethod.rawValue: "customerId"])
I have used Facebook AppEvents in which I am getting error:-
AppEvents.logEvent(.completedRegistration, parameters: [AppEvents.ParameterName.registrationMethod.rawValue: "customerId"])
AppEvents class from Facebook is now singleton class, so to use the methods of AppEvents class you have to add shared between class and method name so solution for this is use:
Instead of using AppEvents.logEvent use AppEvents.shared.logEvent.
AppEvents.shared.logEvent(.completedRegistration, parameters: [AppEvents.ParameterName.registrationMethod.rawValue: "customerId"])
Also, please remove .rawValue to avoid error Cannot convert '[String : Any]' to expected argument type '[AppEvents.ParameterName : Any]'.
You can check this answer.