Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capacitor/CAPPluginCall.swift:52: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value #3

Open
Baymax408 opened this issue Jul 24, 2024 · 0 comments

Comments

@Baymax408
Copy link

AppDelegate.swift
typealias JSObject = [String:Any]
let call = CAPPluginCall();
var ret = JSObject()

public func AlipayCall(_ code: String) {
    switch code {
        case "9000":
        ret["message"] = ALIPAY_RESPONSE_PAY_OK;
        ret["code"] = "9000";
        call.resolve(ret);

CAPPluginCall.swift
func resolve(_ data: PluginCallResultData = [:]) {
successHandler(CAPPluginCallResult(data), self) // error line
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant