I have an error Thread 1: signal SIGABRT Could you help me ?

Hi, I'm new to Swift and app development so please do not hate me.

Here's my code:

    @IBAction func equalsTap(_ sender: Any) {

        if(validInput()){

            let checkedWorkingForPercent = workings.replacingOccurrences(of: "%", with: "*0.01")

            let expression = NSExpression(format: checkedWorkingForPercent)

            let result = expression.expressionValue(with: nil, context: nil) as! Double

            let resultString = formatResult(result: result)

            calculatorResults.text = resultString

            

        }

        else {

        }

    }

And I get an error Thread 1: signal SIGABRT at the line let result = expression.expression...

Could you help me, please?

Answered by Romain-Buisset in 712484022

Yeah, it's Xcode version 13.3.1

is this xcode13.3.1???

Accepted Answer

Yeah, it's Xcode version 13.3.1

The error just disappeared.

What app do you use

I have an error Thread 1: signal SIGABRT Could you help me ?
 
 
Q