Skip to main content

Migrating from v1.6.0 to v1.7.0

Overview

v1.7.0 requires BlinkReceipt >= 1.70.1. It removes the SDK-rendered header from store-specific and carousel-group offer lists, and updates how you bootstrap BlinkEngage and enable monetization on receipt scans.

Breaking changes from v1.6.0:

  1. Offer list title behavior changed. Store-specific and carousel-group offer lists now use the navigation bar title only. The title is the selected store or group name.
  2. Header appearance keys removed. Theme keys that styled the removed header are no longer available.
  3. BlinkEngage bootstrap ordering. Call BlinkEngageSDK.start(debugMode:) at launch before any BRScanManager.shared() calls, then configure BlinkReceipt keys and BlinkEngageSDK.shared.
  4. enableBlinkEngage moved to BRScanOptions. BlinkReceipt no longer exposes BRScanManager.enableBlinkEngage. Set enableBlinkEngage on the BRScanOptions instance you pass into each scan session.

Existing Theme implementations that switch over the removed keys will no longer compile. Code that still sets BRScanManager.shared().enableBlinkEngage will no longer compile against BlinkReceipt 1.70.1.


1. SDK bootstrap: call start(debugMode:) first

If your app already calls BlinkEngageSDK.start(debugMode:), ensure it runs before any BRScanManager.shared() access when adopting BlinkReceipt 1.70.1.

// v1.6.0 — do not use this order with BlinkReceipt 1.70.1+
BRScanManager.shared().licenseKey = "YOUR-BLINKRECEIPT-LICENSE-KEY"
BRScanManager.shared().prodIntelKey = "YOUR-BLINKRECEIPT-PRODINTEL-KEY"
BRScanManager.shared().enableBlinkEngage = true // removed from BRScanManager
// v1.7.0 — call once at launch, before any BRScanManager.shared() or BlinkEngageSDK.shared use
BlinkEngageSDK.start(debugMode: false) // use `true` for development builds only

BRScanManager.shared().licenseKey = "YOUR-BLINKRECEIPT-LICENSE-KEY"
BRScanManager.shared().prodIntelKey = "YOUR-BLINKRECEIPT-PRODINTEL-KEY"

BlinkEngageSDK.shared.user.emailHash = "hashed_email"
// … rewardConfig, appearance, eventCallback, etc.
warning

Calling BlinkEngageSDK.shared before BlinkEngageSDK.start(debugMode:) triggers a precondition failure. From Objective-C, use [BlinkEngageSDK startWithDebugMode:NO].


2. Enable BlinkEngage per scan session

BlinkReceipt 1.70.1 moves monetization activation from the scan manager to per-session scan options.

// v1.6.0 — set once in app delegate (no longer available in BlinkReceipt 1.70.1):
BRScanManager.shared().enableBlinkEngage = true

func startScan() {
let scanOptions = BRScanOptions()
BRScanManager.shared().startStaticCamera(
from: self,
cameraType: .standard,
scanOptions: scanOptions,
with: self
)
}
// v1.7.0 — set per scan session:
func startScan() {
let scanOptions = BRScanOptions()
scanOptions.enableBlinkEngage = true

BRScanManager.shared().startStaticCamera(
from: self,
cameraType: .standard,
scanOptions: scanOptions,
with: self
)
}

Set scanOptions.enableBlinkEngage = true on every scan session that should run the BlinkEngage post-scan flow (loading screen, receipt summary, rewards). Leave it false (the default) for scans that should not trigger monetization.

API and ordering changes

Removed / old API (v1.6.0)Replacement (v1.7.0 + BlinkReceipt 1.70.1)Notes
BRScanManager.shared().enableBlinkEngagescanOptions.enableBlinkEngage on BRScanOptionsPer scan session; default is false.
BlinkReceipt configured before BlinkEngageSDK.start(debugMode:)BlinkEngageSDK.start(debugMode:) firstRequired launch order with BlinkReceipt 1.70.1.

3. Offer list title behavior

In v1.6.0, store-specific and carousel-group offer lists displayed a header inside the screen, including the selected store or group name and a subtitle with the number of offers (e.g. "6 offers").

In v1.7.0, the selected store or group name appears in the navigation bar title. The offer count is no longer shown.

No code changes are required for this behavior change unless your Theme references one of the removed appearance keys below.


4. Removed theme keys

Remove these cases from your Theme.color(forKey:) or Theme.fontName(forKey:) implementations:

Removed keyWhere to remove it
AppearanceColorKey.offerWallHeaderBackgroundcolor(forKey:)
AppearanceColorKey.offerWallHeaderTitleLabelcolor(forKey:)
AppearanceColorKey.offerWallHeaderSubtitleLabelcolor(forKey:)
AppearanceColorKey.offerWallHeaderBackButtonIconcolor(forKey:)
AppearanceFontNameKey.offerWallHeaderTitleLabelfontName(forKey:)
AppearanceFontNameKey.offerWallHeaderSubtitleLabelfontName(forKey:)

There are no replacement keys. These values no longer affect any visible SDK UI.

note

Match enum cases by name, not by raw integer value. Removing these cases in v1.7.0 shifted the raw values of subsequent AppearanceColorKey and AppearanceFontNameKey cases.


At a glance

APIChange
BRScanManager.shared().enableBlinkEngageRemoved — use scanOptions.enableBlinkEngage per scan session
AppearanceColorKey.offerWallHeaderBackgroundRemoved — no replacement
AppearanceColorKey.offerWallHeaderTitleLabelRemoved — no replacement
AppearanceColorKey.offerWallHeaderSubtitleLabelRemoved — no replacement
AppearanceColorKey.offerWallHeaderBackButtonIconRemoved — no replacement
AppearanceFontNameKey.offerWallHeaderTitleLabelRemoved — no replacement
AppearanceFontNameKey.offerWallHeaderSubtitleLabelRemoved — no replacement