1

my example code is here and my fault is under the line thanks for advices.

enter image description here

1 Answers1

1

This issue is dynamic and each time there is something for which compiler will complain.

I think given line of code in viewDidLoad causing problem. Don't know compiler why complaining.

But if you comment this line of code then error will get removed. Try once by removing this line.

If it works, then try to work around this line.

currencyFormatter.currencyCode = (Locale.current as NSLocale).displayName(forKey: NSLocale.Key.currencySymbol, value: NSLocale.Key.currencyCode)

Here is segmentation fault thread, but each one has its own solution, there is no universal solution for this error.

Best luck!!!

Community
  • 1
  • 1
technerd
  • 14,144
  • 10
  • 61
  • 92