lytics / ios-sdk

MIT License
0 stars 0 forks source link

Initialize with assertionFailure Function #99

Closed mgacy closed 1 year ago

mgacy commented 1 year ago

Initializes Lytics with an assertionFailure() function since Swift.assertionFailure() is not testable. The default value for this is the Swift function but when testing we can instead pass a closure to that fulfills an expectation.

This adds a hasStarted() method to reduce some of the boilerplate associated with the assertion failure messages.

Finally, it adds checks that the instances has started in a couple places where they were missing.