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]: InAppMessageView can be dismissed by tap gesture by default #29

Closed tomisacat closed 1 year ago

tomisacat commented 1 year ago

Platform

iOS

Platform Version

iOS 16.0

Braze SDK Version

5.6.3

Xcode Version

Xcode 14.1

Computer Processor

Apple (M1)

Repro Rate

100%

Steps To Reproduce

Example:

  1. Configure Braze with In-App Message.
  2. Run the app.

Expected Behavior

InAppMessageView and its subclass can ONLY be dismissed by tap X or custom button configured in Braze console

Actual Incorrect Behavior

InAppMessageView and its subclass can be dismissed by tapping any point of the view.

Verbose Logs

No response

Additional Information

No response

tomisacat commented 1 year ago

It's cumbersome to inherit InAppMessageView and disable tapGesture or pressGesture. The behavior should be disabled by default as user can dismiss the view by tapping X.

tomisacat commented 1 year ago

Just found I can implement func inAppMessage(_ ui: BrazeInAppMessageUI, didPresent message: Braze.InAppMessage, view: InAppMessageView) and disable this behavior without inheriting InAppMessageView.

lowip commented 1 year ago

Hi @tomisacat,

Please see our In-App Message UI Customization article.

The section relevant for your use case is Dismiss modal and full messages on background tap.