Skip to content

[BUG]"{\"Err\":\"Invalid execution context JSON: expected ident at line 1 column 2\"}" #376

@songzhiming

Description

@songzhiming

`

struct AAA: Codable {
    var totalMoveGoalsMet: Int
}
class BB: HostContext {
    var aaa: AAA
    func computedProperty(name: String, args: String, callback: ResultCallback) {
        callback.onResult(result: aaa.totalMoveGoalsMet.string)
    }
        
    func deviceProperty(name: String, args: String, callback: ResultCallback) {
        callback.onResult(result: "")
    }     
}

func test()  {
    let str = evaluateWithContext(definition: "totalMoveGoalsMet == 3500", context: BB(aaa: AAA(totalMoveGoalsMet: 4000)))
} 

`
New issue checklist

  • I have reviewed the README and documentation
  • I have searched existing issues and this is not a duplicate
  • I have attempted to reproduce the issue and include an example project.

General information

  • Superwall version:
  • iOS version(s):
  • CocoaPods/Carthage version (if applicable):
  • Xcode version:
  • Devices/Simulators affected:
  • Reproducible in the demo project? (Yes/No):
  • Related issues:

Describe the bug

A clear and concise description of what the bug is. The more detail you can provide the faster our team will be able to triage and resolve the issue.

Steps to reproduce

Please also include a description of expected vs. actual behaviour

Other Information

e.g. stacktraces, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions