0

What is the equivalent of NSExpression to evaluate numeric expressions on the server using Swift ? Is there a library that enable that ?

I'm getting this error when trying to use NSExpression on Linux:

fatal error: init(format:_:) is not yet implemented: file Foundation/NSExpression.swift, line 140

franck
  • 2,995
  • 3
  • 17
  • 28

1 Answers1

3

NSExpression does not provide an initializer that just takes a format. Maybe you were going for

init(format: String, argumentArray: [Any])

or

init(format: String, arguments: CVaListPointer)

EDITED

As of 2016.12.27, most methods in NSExpression - including the init methods - have not yet been implemented.

Mike JS Choi
  • 1,081
  • 9
  • 19