패키지, 저장소 및 앱 카테고리 검색

GitHub 저장소ironsource-mobile/Flutter-SDK

Flutter-SDK

ironsource-mobile/Flutter-SDK open-source repository details.

Flutter-SDK 프로젝트 이미지
스타
9
포크
43
최근 푸시(UTC)
2026. 4. 19.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

Unity LevelPlay Flutter Plugin

A bridge plugin for LevelPlay SDKs.

Getting Started

Installation

flutter pub get unity_levelplay_mediation

Android Configuration

  • The LevelPlay SDK dependency is included in the plugin, so you do not have to add manually to your build.gradle.
Gradle Dependencies Required
  • Play Services dependencies must be added to PROJECT_ROOT/android/app/build.gradle.
// PROJECT_ROOT/android/app/build.gradle
dependencies {
  ...
    implementation 'com.google.android.gms:play-services-appset:16.0.2'
    implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
    implementation 'com.google.android.gms:play-services-basement:18.3.0'
}

iOS Configuration

  • The LevelPlay SDK pod is included in the plugin, so you do not have to add it to your Podfile.
SKAdNetwork Support

Add the SKAN ID of IronSource Network on info.plist

<key>SKAdNetworkItems</key>
<array>
   <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>su67r6k2v3.skadnetwork</string>
   </dict>
</array>
App Transport Security Settings

Set NSAllowsArbitraryLoads: true on info.plist to allow http as some mediated networks require http calls. (Note: LevelPlay Network calls are all encrypted.)

Note:

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>
App Tracking Transparency (ATT) Prompt

TODO: Remove or keep this?

Implement the ATT prompt to request user authorization for app-related data.

  • Note: This is not part of LevelPlay SDK but a bridge for AppTrackingTransparency ATTrackingManager.
  • You have to add NSUserTrackingUsageDescription to your info.plist if you intend to call this API.
Future<void> checkATT() async {
  final currentStatus = await ATTrackingManager.getTrackingAuthorizationStatus();
  if (currentStatus == ATTStatus.NotDetermined) {
    final returnedStatus = await ATTrackingManager.requestTrackingAuthorization();
    print('ATTStatus returned: $returnedStatus');
  }
  return;
}

Read more about Apple's ATT and user privacy guideline here.

General Usage

Implement Listeners
LevelPlayRewardedAdListener
class LevelPlayRewardedAdListenerClass with LevelPlayRewardedAdListener {
  @override
  void onAdLoaded(LevelPlayAdInfo adInfo) {
    // Provided when the ad is successfully loaded
  }

  @override
  void onAdLoadFailed(LevelPlayAdError error) {
    // Provided when the ad fails to load. Ad Unit information is included
  }

  @override
  void onAdDisplayed(LevelPlayAdInfo adInfo) {
    // Provided when the ad is displayed. This is equivalent to an impression
  }

  @override
  void onAdDisplayFailed(LevelPlayAdError error, LevelPlayAdInfo adInfo) {
    // Provided when the ad fails to be displayed
  }

  @override
  void onAdClicked(LevelPlayAdInfo adInfo) {
    // Provided when the user clicks on the ad
  }

  @override
  void onAdClosed(LevelPlayAdInfo adInfo) {
    // Provided when the ad is closed
  }

  @override
  void onAdInfoChanged(LevelPlayAdInfo adInfo) {
    // Provided when the ad info is updated. Available when another ad has loaded, and includes a higher CPM/Rate
  }

  @override
  void onAdRewarded(LevelPlayReward reward, LevelPlayAdInfo adInfo) {
    // The user completed to watch the video, and should be rewarded. 
    // The reward parameter will include the reward data.
  }
}
LevelPlayInterstitialAdListener
class LevelPlayInterstitialAdListenerClass with LevelPlayInterstitialAdListener {
  @override
  void onAdLoaded(LevelPlayAdInfo adInfo) {
    // Provided when the ad is successfully loaded
  }

  @override
  void onAdLoadFailed(LevelPlayAdError error) {
    // Provided when the ad fails to load. Ad Unit information is included
  }

  @override
  void onAdDisplayed(LevelPlayAdInfo adInfo) {
    // Provided when the ad is displayed. This is equivalent to an impression
  }

  @override
  void onAdDisplayFailed(LevelPlayAdError error, LevelPlayAdInfo adInfo) {
    // Provided when the ad fails to be displayed
  }
  
  @override
  void onAdClicked(LevelPlayAdInfo adInfo) {
    // Provided when the user clicks on the ad
  }

  @override
  void onAdClosed(LevelPlayAdInfo adInfo) {
    // Provided when the ad is closed
  }

  @override
  void onAdInfoChanged(LevelPlayAdInfo adInfo) {
    // Provided when the ad info is updated. Available when another ad has loaded, and includes a higher CPM/Rate
  }
}
LevelPlayBannerAdViewListener
class LevelPlayBannerAdViewListenerClass with LevelPlayBannerAdViewListener {
  @override
  void onAdLoaded(LevelPlayAdInfo adInfo) {
    // Ad was loaded successfully 
  }

  @override
  void onAdLoadFailed(LevelPlayAdError error) {
    // Ad load failed
  }

  @override
  void onAdDisplayed(LevelPlayAdInfo adInfo) {
    // Ad was displayed and visible on screen
  }

  @override
  void onAdDisplayFailed(LevelPlayAdInfo adInfo, LevelPlayAdError error) {
    // Ad failed to be displayed on screen
  }
  
  @override
  void onAdClicked(LevelPlayAdInfo adInfo) {
    // Ad was clicked
  }

  @override
  void onAdExpanded(LevelPlayAdInfo adInfo) {
    // Ad is opened on full screen
  }

  @override
  void onAdCollapsed(LevelPlayAdInfo adInfo) {
    // Ad is restored to its original size
  }

  @override
  void onAdLeftApplication(LevelPlayAdInfo adInfo) {
    // User pressed on the ad and was navigated out of the app 
  }
}
LevelPlayNativeAdListener
class LevelPlayNativeAdListenerClass with LevelPlayNativeAdListener {
  @override
  void onAdLoaded(LevelPlayNativeAd nativeAd, AdInfo adInfo) {
    // Invoked each time a native ad was loaded.
  }

  @override
  void onAdLoadFailed(LevelPlayNativeAd nativeAd, IronSourceError error) {
    // Invoked when the native ad loading process has failed.
  }

  @override
  void onAdImpression(LevelPlayNativeAd nativeAd, AdInfo adInfo) {
    // Invoked each time the first pixel is visible on the screen
  }
  
  @override
  void onAdClicked(LevelPlayNativeAd nativeAd, AdInfo adInfo) {
    // Invoked when end user clicked on the native ad
  }
}
Initialize the plugin
Future<void> init() async {
  final appKey = '[YOUR_APP_KEY]';
  final userId = '[YOUR_USER_ID]';
  try {
    final initRequest = LevelPlayInitRequest.builder(configState.appKey)
        .withUserId(userId)
        .build();
    await LevelPlay.init(initRequest: initRequest, initListener: this);
  } on PlatformException catch (e) {
    print(e);
  }
}
Show Ads Example
LevelPlayRewardedVideo
final LevelPlayRewardedAd _rewardedAd = LevelPlayRewardedAd(adUnitId: [YOUR_AD_UNIT]);

@override
void initState() {
  super.initState();
  _rewardedAd.setListener([YOUR_LISTENER]);
}

void _loadRewarded() {
  _rewardedAd.loadAd();
}

Future<void> _showRewarded() async {
  if (await _rewardedAd.isAdReady()) {
    _rewardedAd.showAd(placement: [YOUR_PLACEMENT]);
  }
}

// Rest of the class
LevelPlayInterstitial
final LevelPlayInterstitialAd _interstitialAd = LevelPlayInterstitialAd(adUnitId: [YOUR_AD_UNIT]);

@override
void initState() {
  super.initState();
  _interstitialAd.setListener([YOUR_LISTENER]);
}

void _loadInterstitial() {
  _interstitialAd.loadAd();
}

Future<void> _showInterstitial() async {
  if (await _interstitialAd.isAdReady()) {
    _interstitialAd.showAd(placement: [YOUR_PLACEMENT]);
  }
}

// Rest of the class
LevelPlayBanner
final _bannerKey = GlobalKey<LevelPlayBannerAdViewState>();
final _adSize = LevelPlayAdSize.BANNER;
final _adUnitId = 'YOUR_AD_UNIT_ID';
final _placementName = 'YOUR_PLACEMENT';

void _loadAd() {
  _bannerKey.currentState?.loadAd();
  // or store LevelPlayBannerAdView in variable and call '_bannerAdView.loadAd();'
}

@override
Widget build(BuildContext context) {
  return
    LevelPlayBannerAdView(
      key: _bannerKey,
      adUnitId: _adUnitId,
      adSize: _adSize,
      listener: this,
      placementName: _placementName,
      onPlatformViewCreated: () {
        _loadAd();
      },
    );
}
LevelPlayNativeAd
LevelPlayNativeAd? _nativeAd;

@override
void initState() {
  super.initState();
  _nativeAd = LevelPlayNativeAd.builder()
      .withPlacementName(_placementName)
      .withListener(this)
      .build();
}

@override
Widget build(BuildContext context) {
  return
    LevelPlayNativeAdView(
      height: _height,
      width: _width,
      nativeAd: _nativeAd,
      templateType: _templateType,
    );
}

Refer to the example app for the more detailed implementation sample.

Note:

  • Make sure to read the official documents at [LevelPlay Knowledge Center](TODO: replace with the real KC link) for proper usage.
  • Some configurations must be done before initialization.
  • LevelPlayBannerListener is deprecated - Please use LevelPlayBannerAdViewListener with LevelPlayBannerAdView instead.
  • LevelPlayInterstitialListener is deprecated - Please use LevelPlayInterstitialAdListener with LevelPlayInterstitialAd instead.

Mediation

  • You can use the LevelPlay's mediation feature by adding adapters/SDKs to your project.
  • Some networks require additional configurations.
  • Make sure to use the compatible adapter versions.

Android

Make sure to follow LevelPlay Knowledge Center document for additional setup.

  • Add dependencies to YOUR_PROJECT/android/app/build.gradle
  • Add required settings to YOUR_PROJECT/android/app/src/main/AndroidManifest.xml

iOS

Make sure to follow LevelPlay Knowledge Center document for additional setup.

  • Add pod dependencies to YOUR_PROJECT/ios/Podfile: target 'Runner'
  • Add required settings to YOUR_PROJECT/ios/Runner/info.plist

Note:

use_frameworks! :linkage => :static
ironSource Mobile GitHub avatar
GitHub 작성자

ironSource Mobile ↗

언어Objective-CDartKotlinRubyCSwift

사용 중인 의존성

의존성 목록 6 개

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗