chumbaq 0.1.0
chumbaq: ^0.1.0 copied to clipboard
Chumbaq Flutter SDK — deep linking, attribution, events, push, banners, and in-app messages
0.1.0 #
First release. A Flutter wrapper over the native Chumbaq SDKs — the offline event queue, session tracking, HTTP retries, install-referrer parsing and FCM integration all stay in native code, so a Flutter app behaves the same as a native one.
Android and iOS. Every module forwards to the native SDK on both
platforms. Three members stay Android-only and throw UnsupportedError on
iOS rather than answering emptily — ChumbaqPush.tokens (APNs hands the
device token to the host app, not to the plugin), registerMiPushToken (a
Xiaomi channel) and ChumbaqBannerCarousel (the PlatformView hosts
Android's native view). Calls on web and desktop throw, except for the
members listed in the README's platform-support table.
iOS packaging — breaking, deliberate #
ios/chumbaq.podspecis gone; the iOS plugin is a Swift package (ios/chumbaq/Package.swift). Nothing to enable on Flutter 3.44+, where Swift Package Manager is on by default; an older Flutter needsflutter config --enable-swift-package-manager. The native iOS SDK ships as a Swift package with no CocoaPods spec, so a pod cannot depend on it: a podspec would have left the plugin failing atimport ChumbaqCorewith "no such module", where having none makes Flutter say "The following plugin(s) are only compatible with Swift Package Manager" and name the fix. The podspec that was removed was unmodifiedflutter createboilerplate.- Swift sources moved from
ios/Classes/toios/chumbaq/Sources/chumbaq/, the layout Flutter's SPM support requires. Pigeon'sswiftOutfollows. - Minimum iOS is 14.0, level with the native SDK, where the removed podspec said 13.0. Flutter 3.47 migrates host projects to a deployment target of 15.0 anyway, so an app on a current Flutter is unaffected; an app pinned to iOS 13 is not supported.
- Builds against the published native SDKs:
com.chumbaq:*:0.1.0from Maven Central on Android, andchumbaq-ios-sdk0.1.0 through Swift Package Manager on iOS.
Deep links and attribution #
Chumbaq.init,identify,track,trackConversion,trackRevenue,resetandflush, forwarding to the native core SDK.Chumbaq.deepLinks— a broadcast stream of direct and deferred links. The native listener attaches on first subscribe and detaches on last cancel.matchDeferredDeepLink,getAttributedShortCodeandgetAttributedLinkIdfor claiming the click that led to an install.- A typed error hierarchy —
ChumbaqNotInitialized,ChumbaqInvalidConfig,ChumbaqNetworkError,ChumbaqApiError,ChumbaqUnknownError— mapped from the native codes rather than surfaced as rawPlatformExceptions.
Push notifications #
ChumbaqPush.init,registerToken,registerMiPushToken,unregisterToken,isInitializedandisRegistered.ChumbaqPush.tokens— a broadcast stream of Firebase token refreshes. Android only; see the platform note above.- Engagement reporting for all four event types the backend accepts:
reportNotificationReceived(delivered),reportNotificationImpression,reportNotificationClickedandreportNotificationDismissed. Each takes optionalmetadata. - An action-button tap can be attributed: pass
actionIdtoreportNotificationClickedand it is reported asmetadata.actionId, the key the native SDKs use. The call returns the pressed button's own deep link when it has one, and the campaign's destination otherwise. - A campaign's rich content is handed over as data —
carouselFrom,timerFrom,actionsFrom,imageUrlFrom— because the native SDK has already drawn the notification by the time Dart is running. Malformed content costs the extras, never the notification. - This SDK never intercepts a message. Firebase Messaging stays the app's, and the SDK reports what the app hands it.
In-app messages and banners #
ChumbaqMessages.onAppOpen,onScreenViewandonEventas trigger points, plus aneventsstream of lifecycle, button and custom events. The native SDK draws the message, so there is no Flutter widget to place.ChumbaqBanners.loadBannersandclearCache, andChumbaqBannerCarousel— aPlatformViewhosting the native carousel so it matches native Chumbaq banners exactly. The widget is Android-only and renders nothing on iOS;loadBannersworks on both.
Diagnostics #
ChumbaqDiagnostics, off by default. Almost nothing in this package throws at its caller, which means a misconfigured integration looks like a working one. Turning this on reports the failures and skips those paths otherwise swallow. No API key, push token or device fingerprint is ever logged.