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:
- 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.
- Header appearance keys removed. Theme keys that styled the removed header are no longer available.
- BlinkEngage bootstrap ordering. Call
BlinkEngageSDK.start(debugMode:)at launch before anyBRScanManager.shared()calls, then configure BlinkReceipt keys andBlinkEngageSDK.shared. enableBlinkEngagemoved toBRScanOptions. BlinkReceipt no longer exposesBRScanManager.enableBlinkEngage. SetenableBlinkEngageon theBRScanOptionsinstance 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.
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().enableBlinkEngage | scanOptions.enableBlinkEngage on BRScanOptions | Per scan session; default is false. |
BlinkReceipt configured before BlinkEngageSDK.start(debugMode:) | BlinkEngageSDK.start(debugMode:) first | Required 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 key | Where to remove it |
|---|---|
AppearanceColorKey.offerWallHeaderBackground | color(forKey:) |
AppearanceColorKey.offerWallHeaderTitleLabel | color(forKey:) |
AppearanceColorKey.offerWallHeaderSubtitleLabel | color(forKey:) |
AppearanceColorKey.offerWallHeaderBackButtonIcon | color(forKey:) |
AppearanceFontNameKey.offerWallHeaderTitleLabel | fontName(forKey:) |
AppearanceFontNameKey.offerWallHeaderSubtitleLabel | fontName(forKey:) |
There are no replacement keys. These values no longer affect any visible SDK UI.
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
| API | Change |
|---|---|
BRScanManager.shared().enableBlinkEngage | Removed — use scanOptions.enableBlinkEngage per scan session |
AppearanceColorKey.offerWallHeaderBackground | Removed — no replacement |
AppearanceColorKey.offerWallHeaderTitleLabel | Removed — no replacement |
AppearanceColorKey.offerWallHeaderSubtitleLabel | Removed — no replacement |
AppearanceColorKey.offerWallHeaderBackButtonIcon | Removed — no replacement |
AppearanceFontNameKey.offerWallHeaderTitleLabel | Removed — no replacement |
AppearanceFontNameKey.offerWallHeaderSubtitleLabel | Removed — no replacement |