Instantiating defaultParser on real device crashes. The fix I did is the following, plus instantiating via setDefaultParser(with: Configuration)
private static var _defaultParser: Parser?
public static var defaultParser: Parser {
get {
if _defaultParser == nil {
_defaultParser = Parser(with: Configuration.configuration(fromJSONResource: ConfigurationType.v3)!)
}
return _defaultParser!
}
set {
_defaultParser = newValue
}
}
Instantiating
defaultParseron real device crashes. The fix I did is the following, plus instantiating viasetDefaultParser(with: Configuration)