Skip to main content

tnk_ppi_hyb 1.0.0 copy "tnk_ppi_hyb: ^1.0.0" to clipboard
tnk_ppi_hyb: ^1.0.0 copied to clipboard

TNK hybrid offerwall SDK for Flutter (Android, iOS) with full-screen and embedded offerwall, placement ad lists, reward events and point queries.

tnk_ppi_hyb #

Flutter plugin for the TNK hybrid offerwall SDK. It opens the full-screen offerwall, jumps straight to an ad, reads points, delivers reward and offerwall events to Dart, shows placements (a curated ad list inside your own screen) either drawn by the SDK or as data you draw yourself, and embeds the whole offerwall inside one of your screens (for example a bottom tab).

Platform Native SDK
Android com.tnkfactory.ad:hrwd 1.0.19
iOS TnkPpiHyb 1.0.9 (Swift Package Manager or CocoaPods)

Requirements #

Minimum Why
Flutter / Dart 3.41 / 3.11 (declared in pubspec.yaml) The iOS Swift Package Manager plugin layout (FlutterFramework dependency) needs Flutter 3.41. Pigeon 30 needs Dart 3.11.
Android minSdk 21, compileSdk 35 or newer, JDK 17 Requirements of the TNK Android SDK. The plugin itself is built with compileSdk 36.
iOS 15.0 Requirement of the TNK iOS SDK.

What has been tested. The declared Flutter minimum above comes from the plugin layout, not from a test run: every build and test so far used Flutter 3.47 (Dart 3.13). Android builds were checked with Android Gradle Plugin (AGP) 9.1 and 8.11.1 (Gradle 8.14, Kotlin 2.2, the oldest that Flutter 3.47 accepts), JDK 17 or 21. AGP 8.6.0 (Gradle 8.7, Kotlin 2.0) builds only when you add --android-skip-build-dependency-validation to flutter build. Flutter 3.47 warns that it will soon drop support for AGP 8.x; that is Flutter's own plan.

The plugin ships both a Package.swift and a podspec, and the example app builds in both modes. See "iOS: Swift Package Manager or CocoaPods" below.

Install #

dependencies:
  tnk_ppi_hyb: ^1.0.0

Android: add the Maven repository #

The SDK is served from a public Maven repository. Add it to the app's repositories (the allprojects { repositories { ... } } block of android/build.gradle(.kts)), because Gradle resolves the plugin's dependency with the app's repositories:

maven {
    url = uri("https://repository.tnkad.net:8443/repository/public/")
    content { includeGroup("com.tnkfactory.ad") }
}

The content filter limits this repository to the TNK group, so no other dependency is looked up there. Without the repository the app build fails with Could not find com.tnkfactory.ad:hrwd:1.0.19.

Keep MainActivity a plain FlutterActivity. No Activity declaration is needed in your manifest; the SDK brings its own.

The plugin gives the SDK's offerwall Activity (com.tnkfactory.ad.hrwd.webview.TnkOfferwallActivity) a theme without an ActionBar (light, and dark when the device is in dark mode), because the offerwall draws its own header. To use your own theme for it, declare the Activity in your manifest with tools:replace="android:theme" (add xmlns:tools="http://schemas.android.com/tools" to <manifest>); without tools:replace the manifest merge fails with a theme conflict.

<activity
    android:name="com.tnkfactory.ad.hrwd.webview.TnkOfferwallActivity"
    android:theme="@style/MyOfferwallTheme"
    tools:replace="android:theme" />

Android: together with the legacy tnk_flutter_rwd plugin #

While the legacy plugin is still in the app, declare the TNK repository without the content { includeGroup("com.tnkfactory.ad") } filter. The filter would hide the legacy SDK com.tnkfactory:rwd and its dependency groupie, and the build fails with Could not find com.tnkfactory:rwd. Declare it after google() and mavenCentral(). Once the legacy plugin is removed, put the content filter back.

Leave the legacy Activity declaration (com.tnkfactory.ad.AdWallActivity, declared by the legacy plugin's manifest) as it is. Do not remove it: without it the legacy showAdList and showAdListWithPlacement fail (the legacy plugin catches the error and returns a failure; the app does not crash).

With both plugins in the app:

  • The legacy showAdList and showAdListWithPlacement open the legacy offerwall.
  • TnkPpiHybSdk.openOfferwall opens the hybrid offerwall.
  • When the legacy offerwall closes, offerwallClosed does not fire: the legacy offerwall is not a screen of the hybrid SDK.

Check this setup on a real device before you release.

iOS: Swift Package Manager or CocoaPods #

The plugin brings the iOS SDK (TnkPpiHyb 1.0.9) with it. Which package manager builds your app depends on your Flutter version:

  • Flutter 3.44 and newer: Swift Package Manager is the default. Nothing to do.

  • Flutter 3.41 to 3.43: Swift Package Manager is off by default, so the app builds with CocoaPods and stays on the SDK versions CocoaPods can deliver. To receive later iOS SDK versions, switch the app to Swift Package Manager by adding this to the app's pubspec.yaml (project level, not the global flutter config):

    flutter:
      config:
        enable-swift-package-manager: true
    
  • CocoaPods mode: the SDK pod is resolved from CocoaPods trunk, which becomes read-only on 2026-12-02. The plugin's podspec accepts TnkPpiHyb 1.0.9 or a later 1.0.x version (~> 1.0.9, below 1.1). SDK versions released after the read-only date are delivered through Swift Package Manager only.

  • Updating: with Swift Package Manager, run flutter pub upgrade tnk_ppi_hyb; the new plugin version brings the SDK version it needs. With CocoaPods, after you upgrade the plugin, if pod install reports a version conflict for TnkPpiHyb (Podfile.lock still holds the old version), run cd ios && pod update TnkPpiHyb.

  • Do not add TnkPpiHyb to your app yourself, neither as pod 'TnkPpiHyb' in the Podfile nor as the Xcode package dependency ios-ppi-hyb-sdk. The plugin brings it; adding it again can put the SDK in twice or tie it to a different version.

iOS: together with the legacy tnk_flutter_rwd plugin #

The legacy plugin imports TnkRwdSdk2 and this plugin imports TnkPpiHyb. Keeping both plugins in one iOS app has not been verified. If part of your app must stay on the legacy plugin, ask your TNK contact before you migrate. Privacy consent given through the legacy SDK carries over to the hybrid SDK once, the first time you use it; later changes are not reflected in the other SDK.

iOS: Info.plist usage descriptions #

The offerwall is the same web screen as in the native iOS SDK, so the same three descriptions are required in your app's ios/Runner/Info.plist. Use wording that fits your app:

<key>NSUserTrackingUsageDescription</key>
<string>Your advertising identifier is used to deliver and measure offerwall rewards.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Photos are used to attach images to an offerwall inquiry.</string>
<key>NSCameraUsageDescription</key>
<string>The camera is used to take a photo to attach to an offerwall inquiry.</string>
  • NSUserTrackingUsageDescription: shown in the tracking permission prompt. Without it the prompt may not appear, or the app can exit when you call requestTrackingAuthorization().
  • NSPhotoLibraryUsageDescription: used when the user attaches an image to an inquiry in the offerwall.
  • NSCameraUsageDescription: used when the user picks "take a photo" in the same attach screen. Without it iOS terminates the app at that moment.

Use #

import 'package:flutter/widgets.dart';
import 'package:tnk_ppi_hyb/tnk_ppi_hyb.dart';

WidgetsFlutterBinding.ensureInitialized(); // needed when you call it before runApp
await TnkPpiHybSdk.initialize(
  androidAppId: '<android app id>',
  iosAppId: '<ios app id>',
);
await TnkPpiHybSdk.setUserName('user-id');
await TnkPpiHybSdk.openOfferwall(extraParams: {'theme': 'dark'});

final sub = TnkPpiHybSdk.offerwallClosed.listen((_) async {
  final info = await TnkPpiHybSdk.getTotalPoint();
  if (info == null || !info.isSuccess || info.adCount == 0) {
    if (info?.retCode == TotalPointInfo.retCodePrivacyNotAgreed) {
      // not agreed yet: query again after the user agrees
    }
    // hide the point text
    return;
  }
  // show info.pointAmount (info.adCount ads)
});
  • Before the user agrees to the privacy terms, the SDK does not call the server and returns a failed result with retCode == TotalPointInfo.retCodePrivacyNotAgreed (-3), so the example above hides the point text like any other failure. Query again after the user agrees.

  • rewards and events register the SDK listener on the first subscription and remove it when the last subscription is cancelled.

  • events is for advanced use and debugging only. The event names and payloads are defined by the offerwall and can change without notice, and a payload can contain an advertisement URL. In a release build do not write events to logs or send them to outside services. Use rewards to react to rewards.

  • The Futures of openOfferwall, adDetail, adJoin and adAction complete when the screen is requested. Use offerwallClosed to know when the user came back.

  • Call openOfferwall, adDetail, adJoin and adAction while the app is visible. They throw a PlatformException when there is no screen to start from: on Android no_activity (no Activity is attached to the Flutter engine; while the app is in the background the call can also succeed without an exception and the system may block the screen from starting), on iOS no_presenter (no visible window, or the app is in the background).

  • offerwallClosed works on Android and iOS. Neither SDK has a public close callback, so the plugin detects the close itself (Android: the SDK Activity ends; iOS: the presenting view controller appears again). The platforms differ in which screens count: Android reports every SDK full-screen screen, whoever opened it; iOS reports only screens opened through this plugin's methods (including a handleScheme link that opens a new screen).

  • enableLogging is for debug builds (enableLogging(kDebugMode)); the SDK log contains the advertising ID and the offerwall address.

  • initialize treats an empty app ID like a missing one on both platforms.

  • The plugin owns the SDK's reward and event listeners. Do not set them from your own native code, or the plugin's streams stop receiving.

  • setGDPR is passed through. If you never call it, the SDKs use different defaults (Android -1, iOS 0). The plugin does not change that.

  • Several Flutter engines in one process (add-to-app) are not supported; the SDK keeps one listener per process.

Placements #

A placement is one curated list of ads that you put inside your own screen. Two ways to use it:

Widget: the SDK draws the list #

final controller = TnkPlacementController();

ListView(children: [
  // ... your widgets ...
  TnkPlacementView(
    placementId: '<placement id>',
    layoutKey: 'DEFAULT',      // or FEED_SWIPE, BOX, ... (optional)
    theme: 'dark',             // 'light' | 'dark' | null = follow the device
    filterIds: const [1, 2],   // optional
    handleMoreClick: false,    // true: the app handles "more" (see below)
    controller: controller,
    onLoaded: (info) => debugPrint('ads: ${info.count}'),
    onFailed: (code) => debugPrint('failed: $code'),
    onItemClicked: (appId, appName) {},
    onItemClosed: (appId) => controller.refresh(), // show the result of a join
    onMoreClicked: () {},
    onHeightChanged: (height) {},
  ),
]);
  • Height. The widget needs a bounded width (a ListView child is fine). It has height 0 before the placement is loaded, when it has no ads and when the load failed; after that it follows the content. onHeightChanged reports the height in logical pixels (Android dp, iOS pt) and is called once per change, including the change to 0. The Android SDK does not report a collapse itself; the plugin makes Android collapse and report 0 like iOS.
  • Gestures. A vertical drag scrolls your Flutter scroll view. A horizontal drag goes to the SDK (swipe layouts such as FEED_SWIPE).
  • Changing settings. A new placementId, layoutKey, theme or filterIds loads the placement again (the widget collapses first). handleMoreClick changes the answer to "more" without loading again.
  • "More". The SDK needs the answer on the native side at once, so it cannot wait for Dart: handleMoreClick: true means the app handles it (the SDK opens nothing, you get onMoreClicked); false (default) means the SDK opens the offerwall home (you still get onMoreClicked).
  • Controller. controller.refresh() loads the list again without collapsing (the SDK ignores it while loading and loads again after a failure). controller.clickItem(appId) runs a click like a tap and returns (success, code) once. Before the widget has created its native view, and after it was removed, refresh() does nothing and clickItem returns (false, -1) (the SDK's answer for a placement that is not loaded). A widget kept alive off screen also accepts clickItem, so call it only when the user tapped a list that is visible. Use one controller per widget.
  • By default the widget stays alive when it scrolls out of a lazy list (ListView, ListView.builder, GridView, PageView), so the placement is not loaded again when it comes back. The native view stays in memory while it is kept. In a long list with many placements, pass keepAlive: false to let Flutter drop the widget when it is far out of view; it then loads again when it comes back. A kept widget also keeps the outer lazy-list item that holds it (for example a PageView or TabBarView page that contains the list); pass keepAlive: false if you do not want that. keepAlive has no effect outside a lazy list or in a list built with addAutomaticKeepAlives: false.
  • If you change the member on the same screen with setUserName, a kept widget keeps showing the list it loaded before; give the widget a new Key so it is built again.
  • Android and iOS only. On other platforms the widget stays empty and calls onFailed(-1).
  • On Android the widget is a texture-layer platform view (initSurfaceAndroidView); it scrolled more smoothly than hybrid composition in our comparison. When the Activity is re-created or replaced while the engine is kept (for example a rotation without configChanges, or a new screen on a cached engine in an add-to-app app), the widget keeps its place and loads again in the new Activity: onLoaded is called again and the height follows the new load (the widget keeps its last height until then). If a detail screen was open at that moment, its onItemClosed does not arrive. While no Activity is attached the widget is empty and controller.clickItem returns (false, -1). The screens the SDK opens after a tap start from your Activity, in your app's task.

Data only: you draw the list #

final data = await TnkPpiHybSdk.loadPlacementData('<placement id>', theme: 'light');
for (final ad in data.adList) {
  // draw ad.appName, ad.imageUrl, ad.point ... and, in the item's tap callback:
  //   onTap: () async {
  //     final result = await data.clickItem(ad.appId);   // (success, code)
  //   }
}

data.itemClosed.listen((appId) => data.refresh()); // the screen of a click closed
data.loaded.listen((info) { /* data was refreshed: draw data.adList again */ });
await data.dispose();                             // when you do not need it
  • loadPlacementData throws TnkPlacementException with code (-2 no answer in 5 seconds or, as a safety net, in 20 seconds; -1 network or other error, also when the Android screen went away for good while loading; otherwise the server code) when the load fails; no handle is left behind. A placement with no ads is not an error (count == 0). It throws a PlatformException when there is no screen to attach the hidden SDK view to (no_activity on Android, no_presenter on iOS). Call it while the app is visible.
  • Each handle keeps a hidden SDK view (Android: GONE in the current Activity; iOS: hidden, height 0, in the key window) until dispose(). Handles are independent. When the Android Activity is re-created (a configuration change with an engine that is kept), the handle gets a new hidden view with the new Activity and loads again with the same settings; the result arrives on loaded (or failed). If a detail screen was open at that moment, its itemClosed does not arrive; a clickItem call in between returns (false, -1), and a first loadPlacementData still in progress completes with the new load's result. When the Activity goes away for good, or the engine detaches, the views are released and the handle's calls return their "not loaded" answers; a later Activity does not revive the handle (call loadPlacementData again).
  • refresh() completes when the request was sent; listen to loaded for the new list (and failed when a later load fails).
  • pubInfo has 7 fields, each ad (TnkPlacementAdItem) has 19. They are for building the screen; do not use them for reward or billing decisions.

Check on a real device #

Check your placement layouts on a real device before you release.

Click only as the answer to a user action #

clickItem (controller and data) runs the same click as a user tap and calls onItemClicked / itemClosed. Call it only in response to a user action (for example a tap on the list your app draws). Do not call it automatically, such as when the screen appears or right after the list arrives. success only means the screen started to open, not that the user joined or got a reward.

Coming from the legacy tnk_flutter_rwd plugin #

Legacy Now
getPlacementJsonData(id) TnkPpiHybSdk.loadPlacementData(id) (typed adList and pubInfo, not JSON)
onItemClick(appId) (String → int) data.clickItem(appId) (returns (success, code))
app_id / app_nm / img_url appId / appName / imageUrl (and new iconUrl)
pnt_amt / org_amt / pnt_unit point / originalPoint / pointUnit (and new pointText)
prd_price / org_prd_price / sale_dc_rate price / originalPrice / discountRate
multi_yn / cmpn_type / cmpn_type_name / like_yn isMultiMission / campaignType / campaignTypeName / likeYn
(none) new: actionId, filterId, isLink, actionDesc
PlacementPubInfo TnkPlacementPubInfo (placementId, adType, title, moreLabel, customData, pointUnit, layoutKey; no ctype_surl)

Platform differences #

  • Android does not report a collapse of the widget (also not when a refresh turns into a full load); the plugin does (see Height). Both platforms give the Dart app the same events.
  • onHeightChanged values are dp (Android) and pt (iOS): both are Flutter logical pixels.

Currently not supported: maxHeight and verticalScrollEnabled #

The SDKs have these two options (the list scrolls inside a fixed height, and at its end the scroll passes to the outer scroll view). The plugin does not expose them. The SDK's inner scroll hands off to a native parent scroll view, not to a Flutter scroll view, so these options are currently not supported. The widget always takes the height of its content.

Embedded offerwall #

TnkOfferwallView puts the whole offerwall inside one of your screens, for example one tab of a bottom navigation bar. openOfferwall still opens it full screen; use the widget when the offerwall should be part of your own layout.

final controller = TnkOfferwallController();

// One tab of your app. The top of the screen is the status bar, so keep the widget in a SafeArea.
SafeArea(
  bottom: false,
  child: TnkOfferwallView(
    extraParams: const {'hideHeader': '1'}, // optional: hide the offerwall's own header
    handleBackButton: tabIsSelected,         // see "Back button" below
    onCloseRequested: () {
      // The offerwall asked to close. Your app decides what that means.
    },
    controller: controller,                  // optional
  ),
)
Argument Meaning
extraParams Query parameters added to the offerwall address (for example hideHeader, theme). Default null: nothing. Do not pass SDK reserved keys. A change of content loads the offerwall again; the same content in a new map does not.
onCloseRequested Called when the offerwall asks to be closed. See "Close" below.
handleBackButton Android only. Default true. See "Back button" below.
keepAlive Default true: the widget keeps its native view when a lazy list or PageView scrolls it out of view, so the offerwall is not loaded again (same meaning as for TnkPlacementView).
controller TnkOfferwallController: isAttached, and goBack() which goes one step back inside the offerwall and returns whether it did (false before the native view exists and after the widget was removed).
  • Size. The widget fills the space it is given, so it needs a bounded width and height (an Expanded, a SizedBox, a tab body). Do not put it in an unbounded ListView.
  • Loaded once. The offerwall loads once, not again when you switch tabs. On iOS it loads when the widget's native view is created. On Android it loads when the widget is first drawn on screen: a widget you build ahead in a tab that is not shown (for example in an IndexedStack) loads when that tab is first shown. Create the widget when the tab is first selected, or build it ahead, and keep it in an IndexedStack (or PageView) so the page and scroll position stay. Call TnkPpiHybSdk.initialize (and setUserName) before the widget is built: it loads as soon as it can.
  • Close. Offerwall screens that have a close button (the header, a consent screen you refuse, the "close" button of a network error dialog) only call onCloseRequested. The plugin never closes your screen or app, on both platforms. Without a callback the request is ignored. (Without this the Android SDK would finish the host Activity, which closes a Flutter app.)
  • Load again. The widget keeps its page. After you change the member with setUserName, and after the "close" of a network error dialog (the SDK empties the web view first, then onCloseRequested arrives), the tab would keep showing the old member's session or stay blank. To show the offerwall again in those cases, build the widget again with a new Key, as for the placement widget. controller.reload() is not provided yet.
  • Back button (Android). While the widget is the visible one and the offerwall has somewhere to go back to (its web history, or a layer such as a detail screen that the offerwall opened itself), the hardware back button and the back gesture go to the offerwall first, one step at a time. At the first screen the widget does not take part, and your app's own back handling runs (for example leaving the screen or the app). handleBackButton: false never intercepts. The widget checks TickerMode to see whether it is hidden, but an IndexedStack child that is not shown is still enabled, so with an IndexedStack pass handleBackButton: <this tab is selected>. controller.goBack() does the same step from your own code. The offerwall tells the plugin about its history asynchronously, so a back press right after a page change can still go to your app once. The other direction: when the widget takes a back press, a PopScope of your own on the same route is also called, with didPop == false (Flutter tells every PopScope of the route when one of them blocks the pop). A "press back again to exit" counter in that callback therefore also counts the presses the offerwall took. There is no public API yet that tells your app whether the offerwall has somewhere to go back to (a possible follow-up).
  • Gestures. All touches on the widget go to the native web view (vertical scroll, horizontal swipes inside the offerwall, and on iOS the edge swipe back). A Flutter scroll view around the widget does not scroll from touches on it.
  • Safe area. The widget does not inset the offerwall for the status bar or the notch (the iOS SDK has no public setting for it). Put it in a SafeArea.
  • Deep links. While the widget has loaded its offerwall, TnkPpiHybSdk.handleScheme hands a tnkscheme:// link to this view instead of opening a new screen, also when its tab is hidden. On iOS that is from the creation of the native view. On Android it is only after the widget was first drawn: before that (a widget built ahead in a tab never shown) the link is not taken and handleScheme opens the full-screen offerwall. Switch to the offerwall tab first, then call handleScheme. On Android, right after switching to a tab that was never shown, a link can still open the full-screen offerwall (the offerwall is created with the first frame that shows it).
  • Rewards. Rewards earned inside the widget arrive on TnkPpiHybSdk.rewards as for the full-screen offerwall.
  • Android status bar. When the offerwall page switches between light and dark, the Android SDK sets the status bar icon color of your app window. Flutter does not know about that change. It sends its own SystemUiOverlayStyle (an AppBar, or SystemChrome.setSystemUIOverlayStyle) again only when that style changes or when the app comes back to the foreground, so the icon color the SDK set can stay until then.
  • Android file attach. The SDK can only offer the file chooser of an <input type="file"> (for example a photo in an inquiry) when the host Activity is a ComponentActivity. A plain FlutterActivity is not one, so the chooser does nothing; use FlutterFragmentActivity as the base class of your MainActivity if your users need it. The rest of the widget works with either.
  • Android Activity changes. When the Activity is re-created or replaced while the engine is kept (a rotation without configChanges, a new screen on a cached engine), the widget keeps its place and loads the offerwall again in the new Activity (the page and scroll position are lost). The view follows the app's pause and resume. When the widget is removed or the engine detaches, the SDK view is released (a widget that was never drawn on Android has created none).
  • Platform differences. goBack() on iOS goes back through the web history only (the SDK's goBackIfPossible); on Android it also closes a layer the offerwall opened itself. iOS has no hardware back button, so handleBackButton does nothing there. On Android the embedded offerwall is a hybrid composition platform view (initExpensiveAndroidView), unlike the placement widget, which is a texture-layer view (initSurfaceAndroidView). The offerwall scrolls inside its own WebView, and in our measurement hybrid composition was about as smooth as the native SDK while the texture layer dropped many frames on fast scrolls; a placement is scrolled by your Flutter list, where the texture layer was smoother. The cost of hybrid composition: while the offerwall is on screen, Flutter composes its frames on the platform thread, and below Android 10 it also copies every frame through main memory, so heavy Flutter animations on the same screen can drop frames.
  • Android and iOS only. On other platforms the widget stays empty.

Not provided #

Not in the hybrid SDK at all (contact your TNK account manager if you need one): point balance, purchase and withdrawal, close-screen methods, custom UI settings. These were part of the legacy tnk_flutter_rwd plugin.

Example app #

cd example
flutter run --dart-define=TNK_APP_ID=<your app id>
# or per platform: --dart-define=TNK_ANDROID_APP_ID=... --dart-define=TNK_IOS_APP_ID=...

The app ID is never stored in the repository; without a define the placeholder YOUR_APP_ID is used. The example has two bottom tabs: "Home" (all the plugin calls) and "Offerwall" (the embedded TnkOfferwallView with hideHeader=1, created when the tab is first selected). --dart-define=TNK_INITIAL_TAB=offerwall starts on the Offerwall tab. The "Placement" screen takes --dart-define=TNK_PLACEMENT_ID=<id> (and optionally TNK_PLACEMENT_SWIPE_ID, TNK_PLACEMENT_DARK=true). The app ID must match the package name or bundle ID it was issued for. The offerwall does not open on Android emulators or virtual devices. Use a real device.

Developing this plugin #

  • Messages between Dart and the platforms are generated by Pigeon. Edit pigeons/messages.dart, then run dart run pigeon --input pigeons/messages.dart && dart format lib/src/messages.g.dart. Pigeon does not format its Dart output, so the second command is part of the procedure: the committed file is the formatted one (dart format --output=none --set-exit-if-changed . must pass). Never edit *.g.dart, Messages.g.kt or Messages.g.swift by hand.

  • flutter analyze and flutter test (plugin root and example/).

  • cd example && flutter build apk --debug and flutter build ios --simulator --debug.

  • To build the example with CocoaPods, add this to example/pubspec.yaml (project level, no global setting needed):

    flutter:
      config:
        enable-swift-package-manager: false
    
  • Swift Package Manager derives the plugin's package identity from the name of the directory that holds pubspec.yaml. When you build this repository's example/ with Swift Package Manager, keep the checkout directory named tnk_ppi_hyb; otherwise Xcode stops with unable to override package 'tnk_ppi_hyb' because its identity '<dir>' doesn't match. An app outside this repository is not affected: a plugin folder named like the pub cache (tnk_ppi_hyb-1.0.0) and a git: dependency were both built with Swift Package Manager.

  • Android unit tests: cd example/android && ./gradlew :tnk_ppi_hyb:testDebugUnitTest.

License #

The MIT license in LICENSE applies to this plugin's code only. The TNK native SDKs it uses (com.tnkfactory.ad:hrwd on Android, TnkPpiHyb on iOS) are distributed under their own licenses.

0
likes
160
points
72
downloads

Documentation

API reference

Publisher

verified publishertnkfactory.com

Weekly Downloads

TNK hybrid offerwall SDK for Flutter (Android, iOS) with full-screen and embedded offerwall, placement ad lists, reward events and point queries.

Homepage

Topics

#ads #advertising #monetization #offerwall #rewards

License

MIT (license)

Dependencies

flutter, meta

More

Packages that depend on tnk_ppi_hyb

Packages that implement tnk_ppi_hyb