braze-inc / braze-swift-sdk

Braze SDK for the Apple ecosystem, including: iOS, macOS, iPadOS, visionOS, tvOS
https://www.braze.com
Other
52 stars 19 forks source link

[Bug]: ContentCardUIViewController default attributes are let - therefore we cannot modify them #144

Closed stefanosgavriil-sarmis closed 3 weeks ago

stefanosgavriil-sarmis commented 4 weeks ago

Platform

iOS

Platform Version

18.0.1

Braze SDK Version

9.3.1

Xcode Version

Version 15.2 (15C500b)

Computer Processor

Apple (M1)

Repro Rate

100%

Steps To Reproduce

You cannot modify the default ContentCardUI at all (e.g. cornerRadius) since the default-property is a let and not a var.

Expected Behavior

defaults should not be let, so we can modify them.

Actual Incorrect Behavior

If you want to modify the default cornerradius for ContentCards eg. BrazeContentCardUI.ViewController.Attributes.defaults.cellAttributes.cornerRadius you can't modify it, because the defaults are let.

It works for example BrazeInAppMessageUI.ModalView.Attributes.defaults.dismissOnBackgroundTap = true because the defaults is var.

Verbose Logs

-

Additional Information

-

hokstuff commented 4 weeks ago

Hi @stefanosgavriil-sarmis,

Thanks for raising this! We have noted to make this change internally and will be in touch once it is released.

jerielng commented 3 weeks ago

Hey @stefanosgavriil-sarmis, this has now been updated in version 11.2.0! Feel free to reach back out if you have further questions. Thanks!