appcues / appcues-ios-sdk

The Appcues iOS SDK
https://www.appcues.com/mobile
MIT License
8 stars 2 forks source link

Remove assertionFailures #468

Closed mmaatttt closed 1 year ago

mmaatttt commented 1 year ago

To be as safe as possible, remove places where assertionFailure would cause a crash in -Onone debug builds (https://developer.apple.com/documentation/swift/assertionfailure(_:file:line:)).

To not lose the message when encoding properties, I'm passing the logging instance through to the encoder from the Activity and Event models. I'm not the biggest fan of doing this, but I think it's worthwhile (and the parameter is optional).

I have a subsequent PR lined op that makes a generic Logging protocol that will let us intercept the logs to show in the debugger and test the log messages that get generated.