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]: contentCards.subscribeToUpdates not receiving callback #17

Closed materik closed 2 years ago

materik commented 2 years ago

Platform

iOS

Platform Version

iOS 16

Braze SDK Version

5.5.0

Xcode Version

Xcode 14.0

Computer Processor

Apple (M1)

Repro Rate

100%

Steps To Reproduce

  1. Setup a content card campaign in Braze web client
  2. Open the app and see a content card be loaded
  3. Subscribe to updates with the contentCards.subscribeToUpdates
  4. Update the content card campaign with new title for the content card and send immediately
  5. Not receiving any callback in subscribeToUpdates (With a strong reference to cancellable)

Expected Behavior

Receiving a callback when the campaign is updated in the web client

Actual Incorrect Behavior

No callback is received from contentCards.subscribeToUpdates. Have to restart the app to have the new changes show up.

Verbose Logs

No response

Additional Information

No response

lowip commented 2 years ago

Hi @materik,

Braze only automatically refreshes Content Cards in the following scenarios:

The Braze SDK will not automatically sync the latest campaigns from the Braze dashboard outside these scenarios. You can always request a refresh via the requestRefresh(_:) method.

The behavior you expect is not supported by the SDK, feel free to file a product feedback (more info here)

Thanks,

materik commented 2 years ago

Thanks for clarifying @lowip