├── applovin_max ├── ios │ ├── Assets │ │ └── .gitkeep │ ├── Classes │ │ ├── AppLovinMAXAdViewFactory.h │ │ ├── AppLovinMAXAdView.h │ │ ├── AppLovinMAX.h │ │ ├── AppLovinMAXAdViewFactory.m │ │ └── AppLovinMAXAdView.m │ ├── .gitignore │ └── applovin_max.podspec ├── android │ ├── settings.gradle │ ├── .gitignore │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ └── applovin │ │ │ └── applovin_max │ │ │ ├── AppLovinMAXAdViewFactory.java │ │ │ └── AppLovinMAXAdView.java │ └── build.gradle ├── example │ ├── README.md │ ├── android │ │ ├── gradle.properties │ │ ├── app │ │ │ ├── src │ │ │ │ ├── main │ │ │ │ │ ├── res │ │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── drawable │ │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ │ ├── drawable-v21 │ │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ │ ├── values │ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ │ └── values-night │ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── java │ │ │ │ │ │ └── com │ │ │ │ │ │ │ └── applovin │ │ │ │ │ │ │ └── example │ │ │ │ │ │ │ └── MainActivity.java │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ ├── debug │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── profile │ │ │ │ │ └── AndroidManifest.xml │ │ │ └── build.gradle │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ └── gradle-wrapper.properties │ │ ├── .gitignore │ │ ├── settings.gradle │ │ └── build.gradle │ ├── ios │ │ ├── Runner │ │ │ ├── Assets.xcassets │ │ │ │ ├── Contents.json │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ ├── 120.png │ │ │ │ │ ├── 152.png │ │ │ │ │ ├── 167.png │ │ │ │ │ ├── 180.png │ │ │ │ │ ├── 20.png │ │ │ │ │ ├── 29.png │ │ │ │ │ ├── 40.png │ │ │ │ │ ├── 58.png │ │ │ │ │ ├── 60.png │ │ │ │ │ ├── 76.png │ │ │ │ │ ├── 80.png │ │ │ │ │ ├── 87.png │ │ │ │ │ ├── 1024.png │ │ │ │ │ ├── 120-1.png │ │ │ │ │ ├── 40-1.png │ │ │ │ │ ├── 40-2.png │ │ │ │ │ ├── 58-1.png │ │ │ │ │ ├── 80-1.png │ │ │ │ │ └── Contents.json │ │ │ │ └── logo.imageset │ │ │ │ │ ├── square_logo_nontransparent.png │ │ │ │ │ ├── square_logo_nontransparent@2x.png │ │ │ │ │ ├── square_logo_nontransparent@3x.png │ │ │ │ │ └── Contents.json │ │ │ ├── AppDelegate.h │ │ │ ├── main.m │ │ │ ├── AppDelegate.m │ │ │ ├── Base.lproj │ │ │ │ ├── Main.storyboard │ │ │ │ └── LaunchScreen.storyboard │ │ │ └── Info.plist │ │ ├── Flutter │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ └── AppFrameworkInfo.plist │ │ ├── Runner.xcodeproj │ │ │ ├── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ │ └── IDEWorkspaceChecks.plist │ │ │ ├── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ │ └── Runner.xcscheme │ │ │ └── project.pbxproj │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── .gitignore │ │ └── Podfile │ ├── .gitignore │ ├── pubspec.yaml │ ├── analysis_options.yaml │ └── lib │ │ └── main.dart ├── analysis_options.yaml ├── README.md ├── .gitignore ├── pubspec.yaml ├── LICENSE ├── .metadata ├── lib │ ├── src │ │ ├── enums.dart │ │ ├── ad_classes.dart │ │ ├── targeting_data.dart │ │ ├── max_ad_view.dart │ │ └── ad_listeners.dart │ └── applovin_max.dart └── CHANGELOG.md ├── README.md ├── .github └── ISSUE_TEMPLATE │ ├── config.yml │ ├── feature_request.yml │ └── bug_report.yml ├── LICENSE └── .gitignore /applovin_max/ios/Assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /applovin_max/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'applovin_max' 2 | -------------------------------------------------------------------------------- /applovin_max/example/README.md: -------------------------------------------------------------------------------- 1 | # AppLovin MAX Flutter Plugin Demo 2 | 3 | Demo app for the AppLovin MAX Flutter Plugin. 4 | -------------------------------------------------------------------------------- /applovin_max/example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /applovin_max/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .cxx 10 | -------------------------------------------------------------------------------- /applovin_max/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /applovin_max/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | # Additional information about this file can be found at 4 | # https://dart.dev/guides/language/analysis-options 5 | -------------------------------------------------------------------------------- /applovin_max/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /applovin_max/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /applovin_max/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /applovin_max/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /applovin_max/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/120-1.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/40-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/40-1.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/40-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/40-2.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/58-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/58-1.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/80-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/80-1.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/logo.imageset/square_logo_nontransparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/logo.imageset/square_logo_nontransparent.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/logo.imageset/square_logo_nontransparent@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/logo.imageset/square_logo_nontransparent@2x.png -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/logo.imageset/square_logo_nontransparent@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rivafarabi/AppLovin-MAX-Flutter/master/applovin_max/example/ios/Runner/Assets.xcassets/logo.imageset/square_logo_nontransparent@3x.png -------------------------------------------------------------------------------- /applovin_max/example/android/app/src/main/java/com/applovin/example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.applovin.example; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity 6 | extends FlutterActivity 7 | { 8 | } 9 | -------------------------------------------------------------------------------- /applovin_max/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /applovin_max/README.md: -------------------------------------------------------------------------------- 1 | # AppLovin MAX Flutter Plugin 2 | AppLovin MAX Flutter Plugin for Android and iOS. 3 | 4 | ## Documentation 5 | Check out our integration docs [here](https://dash.applovin.com/documentation/mediation/flutter/getting-started/integration). 6 | 7 | ## License 8 | MIT 9 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /applovin_max/example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip 7 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /applovin_max/example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AppLovin MAX Flutter Plugin 2 | AppLovin MAX Flutter Plugin for Android and iOS. 3 | 4 | ## Documentation 5 | Check out our integration docs [here](https://dash.applovin.com/documentation/mediation/flutter/getting-started/integration). 6 | 7 | ## Downloads 8 | See [pub.dev](https://pub.dev/packages/applovin_max) for the latest releases of the plugin. 9 | 10 | ## License 11 | MIT 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: Documentation 4 | url: https://dash.applovin.com/documentation/mediation/flutter/getting-started/integration 5 | about: Documentation for the AppLovin MAX Flutter Plugin 6 | - name: Support 7 | url: https://monetization-support.applovin.com/hc/en-us 8 | about: Answers to common questions and support for AppLovin MAX 9 | -------------------------------------------------------------------------------- /applovin_max/ios/Classes/AppLovinMAXAdViewFactory.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppLovinMAXAdViewFactory.h 3 | // applovin_max 4 | // 5 | // Created by Thomas So on 7/17/22. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface AppLovinMAXAdViewFactory : NSObject 14 | 15 | - (instancetype)initWithMessenger:(id)messenger; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /applovin_max/example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 7 | { 8 | [GeneratedPluginRegistrant registerWithRegistry: self]; 9 | 10 | // Override point for customization after application launch. 11 | return [super application: application didFinishLaunchingWithOptions: launchOptions]; 12 | } 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /applovin_max/example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /applovin_max/example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /applovin_max/example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: Feature Request 2 | description: Request an enhancement 3 | labels: [enhancement] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | *Before requesting, search our [existing issues](https://github.com/AppLovin/AppLovin-MAX-Flutter/issues?q=is%3Aissue) and [changelog](https://github.com/AppLovin/AppLovin-MAX-Flutter/releases) to see if the feature has already been addressed.* 9 | - type: textarea 10 | attributes: 11 | label: "Feature Description" 12 | validations: 13 | required: true 14 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "square_logo_nontransparent.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "square_logo_nontransparent@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "square_logo_nontransparent@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /applovin_max/ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | /Flutter/ephemeral/ 38 | /Flutter/flutter_export_environment.sh -------------------------------------------------------------------------------- /applovin_max/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 26 | /pubspec.lock 27 | **/doc/api/ 28 | .dart_tool/ 29 | .packages 30 | build/ 31 | -------------------------------------------------------------------------------- /applovin_max/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: applovin_max 2 | description: AppLovin MAX Flutter Plugin for Android and iOS - with support for interstitial ads, rewarded ads, banners, and MRECs. 3 | version: 2.3.2 4 | homepage: https://github.com/AppLovin/AppLovin-MAX-Flutter 5 | 6 | environment: 7 | sdk: ">=2.17.1 <3.0.0" 8 | flutter: ">=2.5.0" 9 | 10 | dependencies: 11 | flutter: 12 | sdk: flutter 13 | plugin_platform_interface: ^2.0.2 14 | 15 | dev_dependencies: 16 | flutter_test: 17 | sdk: flutter 18 | flutter_lints: ^2.0.0 19 | 20 | flutter: 21 | plugin: 22 | platforms: 23 | android: 24 | package: com.applovin.applovin_max 25 | pluginClass: AppLovinMAX 26 | ios: 27 | pluginClass: AppLovinMAX 28 | -------------------------------------------------------------------------------- /applovin_max/example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /applovin_max/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /applovin_max/android/build.gradle: -------------------------------------------------------------------------------- 1 | group 'com.applovin.applovin_max' 2 | version '1.0' 3 | 4 | buildscript { 5 | repositories { 6 | google() 7 | mavenCentral() 8 | } 9 | 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:7.1.2' 12 | } 13 | } 14 | 15 | rootProject.allprojects { 16 | repositories { 17 | google() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | apply plugin: 'com.android.library' 23 | 24 | android { 25 | compileSdkVersion 31 26 | 27 | compileOptions { 28 | sourceCompatibility JavaVersion.VERSION_1_8 29 | targetCompatibility JavaVersion.VERSION_1_8 30 | } 31 | 32 | defaultConfig { 33 | minSdkVersion 16 34 | } 35 | 36 | dependencies { 37 | api 'com.applovin:applovin-sdk:11.6.0' 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /applovin_max/ios/Classes/AppLovinMAXAdView.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppLovinMAXAdView.h 3 | // applovin_max 4 | // 5 | // Created by Thomas So on 7/17/22. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface AppLovinMAXAdView : NSObject 15 | 16 | - (instancetype)initWithFrame:(CGRect)frame 17 | viewId:(int64_t)viewId 18 | adUnitId:(NSString *)adUnitId 19 | adFormat:(MAAdFormat *)adFormat 20 | placement:(nullable NSString *)placement 21 | customData:(nullable NSString *)customData 22 | messenger:(id)messenger 23 | sdk:(ALSdk *)sdk; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /applovin_max/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Web related 36 | lib/generated_plugin_registrant.dart 37 | 38 | # Symbolication related 39 | app.*.symbols 40 | 41 | # Obfuscation related 42 | app.*.map.json 43 | 44 | # Android Studio will place build artifacts here 45 | /android/app/debug 46 | /android/app/profile 47 | /android/app/release 48 | -------------------------------------------------------------------------------- /applovin_max/ios/applovin_max.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. 3 | # Run `pod lib lint applovin_max.podspec` to validate before publishing. 4 | # 5 | Pod::Spec.new do |s| 6 | s.authors = 'AppLovin Corporation' 7 | s.name = 'applovin_max' 8 | s.version = '2.3.2' 9 | s.summary = 'AppLovin MAX Flutter Plugin' 10 | s.description = <<-DESC 11 | AppLovin MAX Flutter Plugin 12 | DESC 13 | s.homepage = 'https://www.applovin.com/' 14 | s.license = { :file => '../LICENSE' } 15 | s.source = { :path => '.' } 16 | s.source_files = 'Classes/**/*' 17 | s.public_header_files = 'Classes/**/*.h' 18 | s.platform = :ios, '9.0' 19 | s.static_framework = true 20 | s.dependency 'Flutter' 21 | s.dependency 'AppLovinSDK', '11.6.0' 22 | 23 | # Flutter.framework does not contain a i386 slice. 24 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } 25 | end 26 | -------------------------------------------------------------------------------- /applovin_max/example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: applovin_max_example 2 | description: Demonstrates how to use the AppLovin MAX plugin. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | environment: 9 | sdk: ">=2.17.1 <3.0.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | 15 | applovin_max: 16 | # When depending on this package from a real application you should use: 17 | # applovin_max: ^x.y.z 18 | # See https://dart.dev/tools/pub/dependencies#version-constraints 19 | # The example app is bundled with the plugin so we use a path dependency on 20 | # the parent directory to use the current plugin's version. 21 | path: ../ 22 | 23 | cupertino_icons: ^1.0.2 24 | 25 | dev_dependencies: 26 | flutter_test: 27 | sdk: flutter 28 | 29 | flutter_lints: ^2.0.0 30 | 31 | flutter: 32 | uses-material-design: true 33 | -------------------------------------------------------------------------------- /applovin_max/example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /applovin_max/example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 AppLovin Corporation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /applovin_max/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 AppLovin Corporation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /applovin_max/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 8 | channel: stable 9 | 10 | project_type: plugin 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 17 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 18 | - platform: android 19 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 20 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 21 | - platform: ios 22 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 23 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 24 | 25 | # User provided section 26 | 27 | # List of Local paths (relative to this file) that should be 28 | # ignored by the migrate tool. 29 | # 30 | # Files that are not part of the templates will be ignored by default. 31 | unmanaged_files: 32 | - 'lib/main.dart' 33 | - 'ios/Runner.xcodeproj/project.pbxproj' 34 | -------------------------------------------------------------------------------- /applovin_max/ios/Classes/AppLovinMAX.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #define DEVICE_SPECIFIC_ADVIEW_AD_FORMAT ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) ? MAAdFormat.leader : MAAdFormat.banner 5 | 6 | @interface AppLovinMAX : NSObject 7 | 8 | /** 9 | * Shared instance of this plugin. 10 | */ 11 | @property (nonatomic, strong, readonly, class) AppLovinMAX *shared; 12 | 13 | /** 14 | * The instance of the AppLovin SDK the module is using. 15 | */ 16 | @property (nonatomic, weak, readonly) ALSdk *sdk; 17 | 18 | /** 19 | * Utility method for sending ad events through the Flutter channel into Dart. 20 | */ 21 | - (void)sendEventWithName:(NSString *)name ad:(MAAd *)ad channel:(FlutterMethodChannel *)channel; 22 | 23 | /** 24 | * Utility method for sending generic events through the Flutter channel into Dart. 25 | */ 26 | - (void)sendEventWithName:(NSString *)name body:(NSDictionary *)body channel:(FlutterMethodChannel *)channel; 27 | 28 | /** 29 | * Utility method for sending error events through the Flutter channel into Dart. 30 | */ 31 | - (void)sendErrorEventWithName:(NSString *)name forAdUnitIdentifier:(NSString *)adUnitIdentifier withError:(MAError *)error; 32 | 33 | + (void)log:(NSString *)format, ...; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 32 | end 33 | 34 | post_install do |installer| 35 | installer.pods_project.targets.each do |target| 36 | flutter_additional_ios_build_settings(target) 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /applovin_max/example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /applovin_max/example/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /applovin_max/lib/src/enums.dart: -------------------------------------------------------------------------------- 1 | /// Represents an AdView ad position. 2 | enum AdViewPosition { 3 | topCenter("top_center"), 4 | topRight("top_right"), 5 | centered("centered"), 6 | centerLeft("center_left"), 7 | centerRight("center_right"), 8 | bottomLeft("bottom_left"), 9 | bottomCenter("bottom_center"), 10 | bottomRight("bottom_right"); 11 | 12 | /// @nodoc 13 | final String value; 14 | 15 | /// @nodoc 16 | const AdViewPosition(this.value); 17 | } 18 | 19 | /// 20 | /// Represents whether or not the consent dialog should be shown for this user. 21 | /// 22 | /// The state where no such determination could be made is represented by [ConsentDialogState.unknown]. 23 | /// 24 | enum ConsentDialogState { 25 | /// 26 | /// The consent dialog state could not be determined. This is likely due to the SDK failing to initialize. 27 | /// 28 | unknown, 29 | 30 | /// 31 | /// This user should be shown a consent dialog. 32 | /// 33 | applies, 34 | 35 | /// 36 | /// This user should not be shown a consent dialog. 37 | /// 38 | doesNotApply 39 | } 40 | 41 | /// 42 | /// Represents content ratings for the ads shown to users. 43 | /// 44 | /// They correspond to IQG Media Ratings. 45 | /// 46 | enum AdContentRating { 47 | none(0), 48 | allAudiences(1), 49 | everyoneOverTwelve(2), 50 | matureAudiences(3); 51 | 52 | /// @nodoc 53 | final int value; 54 | 55 | /// @nodoc 56 | const AdContentRating(this.value); 57 | } 58 | 59 | /// 60 | /// Represents gender. 61 | /// 62 | enum UserGender { 63 | unknown('U'), 64 | female('F'), 65 | male('M'), 66 | other('O'); 67 | 68 | /// @nodoc 69 | final String value; 70 | 71 | /// @nodoc 72 | const UserGender(this.value); 73 | } 74 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CADisableMinimumFrameDurationOnPhone 6 | 7 | CFBundleDevelopmentRegion 8 | $(DEVELOPMENT_LANGUAGE) 9 | CFBundleDisplayName 10 | AppLovin MAX 11 | CFBundleExecutable 12 | $(EXECUTABLE_NAME) 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | applovin_max_example 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | $(FLUTTER_BUILD_NAME) 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | $(CURRENT_PROJECT_VERSION) 27 | LSRequiresIPhoneOS 28 | 29 | UILaunchStoryboardName 30 | LaunchScreen 31 | UIMainStoryboardFile 32 | Main 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /applovin_max/example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1000000' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | defaultConfig { 38 | applicationId "com.applovin.enterprise.apps.demoapp" 39 | minSdkVersion flutter.minSdkVersion 40 | targetSdkVersion flutter.targetSdkVersion 41 | versionCode flutterVersionCode.toInteger() 42 | versionName flutterVersionName 43 | multiDexEnabled true 44 | } 45 | 46 | buildTypes { 47 | release { 48 | // Signing with the debug keys for now, so `flutter run --release` works. 49 | signingConfig signingConfigs.debug 50 | } 51 | } 52 | 53 | dependencies { 54 | 55 | } 56 | } 57 | 58 | flutter { 59 | source '../..' 60 | } 61 | -------------------------------------------------------------------------------- /applovin_max/lib/src/ad_classes.dart: -------------------------------------------------------------------------------- 1 | /// Represents an ad that has been served by AppLovin MAX. 2 | class MaxAd { 3 | /// The ad unit ID for which this ad was loaded. 4 | final String adUnitId; 5 | /// The ad network from which this ad was loaded. 6 | final String networkName; 7 | /// The ad’s revenue amount, or 0 if no revenue amount exists. 8 | final double revenue; 9 | /// The creative ID tied to the ad, if any. You can report creative issues to the corresponding ad network using this ID. 10 | final String creativeId; 11 | /// The DSP network that provided the loaded ad when the ad is served through AppLovin Exchange. 12 | final String dspName; 13 | /// The placement name that you assign when you integrate each ad format. 14 | final String placement; 15 | /// The underlying waterfall of ad responses. 16 | final Map waterfall; 17 | 18 | /// @nodoc 19 | MaxAd(this.adUnitId, this.networkName, this.revenue, this.creativeId, this.dspName, this.placement, this.waterfall); 20 | 21 | @override 22 | String toString() { 23 | return '[MaxAd adUnitId: $adUnitId, networkName: $networkName, revenue: $revenue, dspName: $dspName, creativeId: $creativeId, placement: $placement, waterfall: $waterfall]'; 24 | } 25 | } 26 | 27 | /// Represents a reward given to the user. 28 | class MaxReward { 29 | /// The rewarded amount. 30 | final int amount; 31 | /// The reward label. 32 | final String label; 33 | 34 | /// @nodoc 35 | MaxReward(this.amount, this.label); 36 | 37 | @override 38 | String toString() { 39 | return '[MaxReward amount: $amount, label: $label]'; 40 | } 41 | } 42 | 43 | /// Encapsulates various data for MAX load and display errors. 44 | class MaxError { 45 | /// The error code for the error. 46 | final int code; 47 | /// The error message for the error. 48 | final String message; 49 | /// The underlying waterfall of ad responses. 50 | final Map waterfall; 51 | 52 | /// @nodoc 53 | MaxError(this.code, this.message, this.waterfall); 54 | 55 | @override 56 | String toString() { 57 | return '[MaxError code: $code, message: $message, waterfall: $waterfall]'; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /applovin_max/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## Versions 2 | 3 | ## 2.3.2 4 | * Depends on Android SDK v11.6.0 and iOS SDK v11.6.0. 5 | * Add support for waterfall info API. 6 | * Add support for `AppLovinMAX.setLocationCollectionEnabled(bool enabled)` API. 7 | ## 2.3.1 8 | * Fix banner/MREC widget ad issue on Android. (https://github.com/AppLovin/AppLovin-MAX-Flutter/issues/32) 9 | ## 2.3.0 10 | * Depends on Android SDK v11.5.5 and iOS SDK v11.5.5. 11 | * Add support for App Open ads. 12 | * Add support for passing additional data. 13 | ## 2.2.0 14 | * Depends on Android SDK v11.5.3 and iOS SDK v11.5.3. 15 | * Add support for ad revenue callbacks. 16 | ## 2.1.0 17 | * Depends on Android SDK v11.5.2 and iOS SDK v11.5.1. 18 | * Add API to enable or disable the Creative Debugger `AppLovinMAX.setCreativeDebuggerEnabled(...)`. 19 | * Add API documentation. 20 | * Fix warnings from `flutter analyze`. 21 | ## 2.0.0 22 | * Add support for rendering banners [docs](https://dash.applovin.com/documentation/mediation/flutter/getting-started/banners#widget-method) and MRECs [docs](https://dash.applovin.com/documentation/mediation/flutter/getting-started/mrecs#widget-method) as widgets. 23 | ## 1.0.8 24 | * Fix impression counting for fullscreen ads on iOS. Fixes https://github.com/AppLovin/AppLovin-MAX-Flutter/issues/19. 25 | ## 1.0.7 26 | * Depends on Android SDK v11.4.4 and iOS SDK v11.4.3. 27 | ## 1.0.6 28 | * Add `s.static_framework = true` in `applovin_max.podspec`. Fixes https://github.com/AppLovin/AppLovin-MAX-Flutter/issues/10. 29 | ## 1.0.5 30 | * Fix linter warnings. 31 | * Fix `OnRewardedAdReceivedRewardEvent()` callback not being called on Android. Fixes https://github.com/AppLovin/AppLovin-MAX-Flutter/issues/14. 32 | ## 1.0.4 33 | * Add support for `AppLovinMAX.isInitialized()` API. 34 | * Add support for getting DSP name if the ad is served by AppLovin Exchange via `ad.dspName`. 35 | ## 1.0.3 36 | * Use `api` for Android AppLovin MAX SDK dependency. 37 | * Depends on Android SDK v11.4.3. 38 | ## 1.0.2 39 | * Fix `RewardededAdListener` typo to be `RewardedAdListener`. 40 | ## 1.0.1 41 | * Fix README. 42 | ## 1.0.0 43 | * Initial implementation for interstitials, rewarded videos, and programmatic banners & MRECs. 44 | -------------------------------------------------------------------------------- /applovin_max/ios/Classes/AppLovinMAXAdViewFactory.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppLovinMAXAdViewFactory.m 3 | // applovin_max 4 | // 5 | // Created by Thomas So on 7/17/22. 6 | // 7 | 8 | #import "AppLovinMAXAdViewFactory.h" 9 | #import "AppLovinMAXAdView.h" 10 | #import "AppLovinMAX.h" 11 | #import 12 | 13 | @interface AppLovinMAXAdViewFactory() 14 | @property (nonatomic, strong) id messenger; 15 | @end 16 | 17 | @implementation AppLovinMAXAdViewFactory 18 | 19 | - (instancetype)initWithMessenger:(id)messenger 20 | { 21 | self = [super init]; 22 | if ( self ) 23 | { 24 | self.messenger = messenger; 25 | } 26 | return self; 27 | } 28 | 29 | - (id)createArgsCodec 30 | { 31 | return [FlutterStandardMessageCodec sharedInstance]; 32 | } 33 | 34 | - (id)createWithFrame:(CGRect)frame viewIdentifier:(int64_t)viewId arguments:(id _Nullable)args 35 | { 36 | // Ensure plugin has been initialized 37 | ALSdk *sdk = AppLovinMAX.shared.sdk; 38 | if ( !sdk ) 39 | { 40 | [AppLovinMAX log: @"Failed to create MaxAdView widget - please ensure the AppLovin MAX plugin has been initialized by calling 'AppLovinMAX.initialize(...);'!"]; 41 | return nil; 42 | } 43 | 44 | NSString *adUnitId = args[@"ad_unit_id"]; 45 | NSString *adFormatStr = args[@"ad_format"]; 46 | MAAdFormat *adFormat = [adFormatStr isEqualToString: @"mrec"] ? MAAdFormat.mrec : DEVICE_SPECIFIC_ADVIEW_AD_FORMAT; 47 | 48 | [AppLovinMAX log: @"Creating MaxAdView widget with Ad Unit ID: %@", adUnitId]; 49 | 50 | // Optional params 51 | NSString *placement = args[@"placement"]; 52 | NSString *customData = args[@"customData"]; 53 | 54 | return [[AppLovinMAXAdView alloc] initWithFrame: (CGRect) { .size = adFormat.size } 55 | viewId: viewId 56 | adUnitId: adUnitId 57 | adFormat: adFormat 58 | placement: placement 59 | customData: customData 60 | messenger: self.messenger 61 | sdk: sdk]; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /applovin_max/android/src/main/java/com/applovin/applovin_max/AppLovinMAXAdViewFactory.java: -------------------------------------------------------------------------------- 1 | package com.applovin.applovin_max; 2 | 3 | import android.content.Context; 4 | 5 | import com.applovin.mediation.MaxAdFormat; 6 | import com.applovin.sdk.AppLovinSdk; 7 | 8 | import java.util.Map; 9 | 10 | import androidx.annotation.NonNull; 11 | import androidx.annotation.Nullable; 12 | import io.flutter.plugin.common.BinaryMessenger; 13 | import io.flutter.plugin.common.StandardMessageCodec; 14 | import io.flutter.plugin.platform.PlatformView; 15 | import io.flutter.plugin.platform.PlatformViewFactory; 16 | 17 | /** 18 | * Created by Thomas So on July 17 2022 19 | */ 20 | public class AppLovinMAXAdViewFactory 21 | extends PlatformViewFactory 22 | { 23 | private final BinaryMessenger messenger; 24 | 25 | public AppLovinMAXAdViewFactory(final BinaryMessenger messenger) 26 | { 27 | super( StandardMessageCodec.INSTANCE ); 28 | 29 | this.messenger = messenger; 30 | } 31 | 32 | @NonNull 33 | @Override 34 | public PlatformView create(@Nullable final Context context, final int viewId, final Object rawArgs) 35 | { 36 | // Ensure plugin has been initialized 37 | AppLovinSdk sdk = AppLovinMAX.getInstance().getSdk(); 38 | if ( sdk == null ) 39 | { 40 | AppLovinMAX.e( "Failed to create MaxAdView widget - please ensure the AppLovin MAX plugin has been initialized by calling 'AppLovinMAX.initialize(...);'!" ); 41 | return null; 42 | } 43 | 44 | Map args = (Map) rawArgs; 45 | 46 | String adUnitId = (String) args.get( "ad_unit_id" ); 47 | String adFormatStr = (String) args.get( "ad_format" ); 48 | MaxAdFormat adFormat = "mrec".equals( adFormatStr ) ? MaxAdFormat.MREC : AppLovinMAX.getDeviceSpecificBannerAdViewAdFormat( context ); 49 | 50 | AppLovinMAX.d( "Creating MaxAdView widget with Ad Unit ID: " + adUnitId ); 51 | 52 | // Optional params 53 | 54 | String placement = args.containsKey( "placement" ) ? (String) args.get( "placement" ) : null; 55 | String customData = args.containsKey( "customData" ) ? (String) args.get( "customData" ) : null; 56 | 57 | return new AppLovinMAXAdView( viewId, adUnitId, adFormat, placement, customData, messenger, sdk, context ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: Report a problem 3 | labels: [bug] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | *Before reporting, search our [existing issues](https://github.com/AppLovin/AppLovin-MAX-Flutter/issues?q=is%3Aissue) and [changelog](https://github.com/AppLovin/AppLovin-MAX-Flutter/releases) to see if the issue has already been addressed.* 9 | - type: input 10 | attributes: 11 | label: "MAX Plugin Version" 12 | placeholder: "e.g., 1.0.8" 13 | validations: 14 | required: true 15 | - type: input 16 | attributes: 17 | label: "Flutter Version" 18 | placeholder: "e.g., 3.0.5" 19 | validations: 20 | required: true 21 | - type: input 22 | attributes: 23 | label: "Device/Platform Info" 24 | description: "Is the problem affecting any specific devices or platforms?" 25 | placeholder: "e.g., Android 8.1, iOS 15, Google Pixel 5a, etc." 26 | validations: 27 | required: true 28 | - type: textarea 29 | attributes: 30 | label: "Current Behavior" 31 | description: "A concise description of what you're experiencing." 32 | validations: 33 | required: true 34 | - type: textarea 35 | attributes: 36 | label: "Expected Behavior" 37 | description: "A concise description of what you expected to happen." 38 | validations: 39 | required: false 40 | - type: textarea 41 | attributes: 42 | label: "How to Reproduce" 43 | description: "Step-by-step instructions, code snippets, or other details to reproduce the issue." 44 | validations: 45 | required: true 46 | - type: textarea 47 | attributes: 48 | label: "Additional Info" 49 | description: | 50 | - If applicable, include any info to provide further context, such as images, videos, or logs after [enabling verbose logging](https://dash.applovin.com/documentation/mediation/flutter/getting-started/advanced-settings#enable-verbose-logging). 51 | - If you don't want to post media publicly, please submit your file(s) in a [support request](https://support.applovin.com/hc/en-us/requests/new) with subject 'Issue #: ' after filing this issue with a note saying you will do so here. 52 | placeholder: "Tip: Attach files by clicking this area and dragging files in" 53 | validations: 54 | required: false 55 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "40-1.png", 5 | "idiom" : "iphone", 6 | "scale" : "2x", 7 | "size" : "20x20" 8 | }, 9 | { 10 | "filename" : "60.png", 11 | "idiom" : "iphone", 12 | "scale" : "3x", 13 | "size" : "20x20" 14 | }, 15 | { 16 | "filename" : "58.png", 17 | "idiom" : "iphone", 18 | "scale" : "2x", 19 | "size" : "29x29" 20 | }, 21 | { 22 | "filename" : "87.png", 23 | "idiom" : "iphone", 24 | "scale" : "3x", 25 | "size" : "29x29" 26 | }, 27 | { 28 | "filename" : "80.png", 29 | "idiom" : "iphone", 30 | "scale" : "2x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "filename" : "120.png", 35 | "idiom" : "iphone", 36 | "scale" : "3x", 37 | "size" : "40x40" 38 | }, 39 | { 40 | "filename" : "120-1.png", 41 | "idiom" : "iphone", 42 | "scale" : "2x", 43 | "size" : "60x60" 44 | }, 45 | { 46 | "filename" : "180.png", 47 | "idiom" : "iphone", 48 | "scale" : "3x", 49 | "size" : "60x60" 50 | }, 51 | { 52 | "filename" : "20.png", 53 | "idiom" : "ipad", 54 | "scale" : "1x", 55 | "size" : "20x20" 56 | }, 57 | { 58 | "filename" : "40-2.png", 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "20x20" 62 | }, 63 | { 64 | "filename" : "29.png", 65 | "idiom" : "ipad", 66 | "scale" : "1x", 67 | "size" : "29x29" 68 | }, 69 | { 70 | "filename" : "58-1.png", 71 | "idiom" : "ipad", 72 | "scale" : "2x", 73 | "size" : "29x29" 74 | }, 75 | { 76 | "filename" : "40.png", 77 | "idiom" : "ipad", 78 | "scale" : "1x", 79 | "size" : "40x40" 80 | }, 81 | { 82 | "filename" : "80-1.png", 83 | "idiom" : "ipad", 84 | "scale" : "2x", 85 | "size" : "40x40" 86 | }, 87 | { 88 | "filename" : "76.png", 89 | "idiom" : "ipad", 90 | "scale" : "1x", 91 | "size" : "76x76" 92 | }, 93 | { 94 | "filename" : "152.png", 95 | "idiom" : "ipad", 96 | "scale" : "2x", 97 | "size" : "76x76" 98 | }, 99 | { 100 | "filename" : "167.png", 101 | "idiom" : "ipad", 102 | "scale" : "2x", 103 | "size" : "83.5x83.5" 104 | }, 105 | { 106 | "filename" : "1024.png", 107 | "idiom" : "ios-marketing", 108 | "scale" : "1x", 109 | "size" : "1024x1024" 110 | } 111 | ], 112 | "info" : { 113 | "author" : "xcode", 114 | "version" : 1 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # Visual Studio Code related 20 | .classpath 21 | .project 22 | .settings/ 23 | .vscode/ 24 | 25 | # Flutter repo-specific 26 | /bin/cache/ 27 | /bin/internal/bootstrap.bat 28 | /bin/internal/bootstrap.sh 29 | /bin/mingit/ 30 | /dev/benchmarks/mega_gallery/ 31 | /dev/bots/.recipe_deps 32 | /dev/bots/android_tools/ 33 | /dev/devicelab/ABresults*.json 34 | /dev/docs/doc/ 35 | /dev/docs/flutter.docs.zip 36 | /dev/docs/lib/ 37 | /dev/docs/pubspec.yaml 38 | /dev/integration_tests/**/xcuserdata 39 | /dev/integration_tests/**/Pods 40 | /packages/flutter/coverage/ 41 | version 42 | analysis_benchmark.json 43 | 44 | # packages file containing multi-root paths 45 | .packages.generated 46 | 47 | # Flutter/Dart/Pub related 48 | **/doc/api/ 49 | .dart_tool/ 50 | .flutter-plugins 51 | .flutter-plugins-dependencies 52 | **/generated_plugin_registrant.dart 53 | .packages 54 | .pub-cache/ 55 | .pub/ 56 | build/ 57 | flutter_*.png 58 | linked_*.ds 59 | unlinked.ds 60 | unlinked_spec.ds 61 | 62 | # Android related 63 | **/android/**/gradle-wrapper.jar 64 | .gradle/ 65 | **/android/captures/ 66 | **/android/gradlew 67 | **/android/gradlew.bat 68 | **/android/local.properties 69 | **/android/**/GeneratedPluginRegistrant.java 70 | **/android/key.properties 71 | *.jks 72 | 73 | # iOS/XCode related 74 | **/ios/**/*.mode1v3 75 | **/ios/**/*.mode2v3 76 | **/ios/**/*.moved-aside 77 | **/ios/**/*.pbxuser 78 | **/ios/**/*.perspectivev3 79 | **/ios/**/*sync/ 80 | **/ios/**/.sconsign.dblite 81 | **/ios/**/.tags* 82 | **/ios/**/.vagrant/ 83 | **/ios/**/DerivedData/ 84 | **/ios/**/Icon? 85 | **/ios/**/Pods/ 86 | **/ios/**/.symlinks/ 87 | **/ios/**/profile 88 | **/ios/**/xcuserdata 89 | **/ios/.generated/ 90 | **/ios/Flutter/.last_build_id 91 | **/ios/Flutter/App.framework 92 | **/ios/Flutter/Flutter.framework 93 | **/ios/Flutter/Flutter.podspec 94 | **/ios/Flutter/Generated.xcconfig 95 | **/ios/Flutter/ephemeral 96 | **/ios/Flutter/app.flx 97 | **/ios/Flutter/app.zip 98 | **/ios/Flutter/flutter_assets/ 99 | **/ios/Flutter/flutter_export_environment.sh 100 | **/ios/ServiceDefinitions.json 101 | **/ios/Runner/GeneratedPluginRegistrant.* 102 | 103 | # macOS 104 | **/Flutter/ephemeral/ 105 | **/Pods/ 106 | **/macos/Flutter/GeneratedPluginRegistrant.swift 107 | **/macos/Flutter/ephemeral 108 | **/xcuserdata/ 109 | 110 | # Coverage 111 | coverage/ 112 | 113 | # Symbols 114 | app.*.symbols 115 | 116 | # Exceptions to above rules. 117 | !**/ios/**/default.mode1v3 118 | !**/ios/**/default.mode2v3 119 | !**/ios/**/default.pbxuser 120 | !**/ios/**/default.perspectivev3 121 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 122 | !/dev/ci/**/Gemfile.lock -------------------------------------------------------------------------------- /applovin_max/lib/src/targeting_data.dart: -------------------------------------------------------------------------------- 1 | import 'package:applovin_max/applovin_max.dart'; 2 | import 'package:flutter/services.dart'; 3 | 4 | /// Allows you to provide user or app data that will improve how we target ads. 5 | class TargetingData { 6 | /// @nodoc 7 | final MethodChannel _channel; 8 | 9 | /// @nodoc 10 | TargetingData(this._channel); 11 | 12 | /// The year of birth of the user. 13 | /// 14 | /// Set this property to zero or a less than zero to clear this value. 15 | /// 16 | set yearOfBirth(int value) { 17 | _channel.invokeMethod('setTargetingDataYearOfBirth', { 18 | 'value': value, 19 | }); 20 | } 21 | 22 | /// The gender of the user. 23 | /// 24 | /// Set this property to [UserGender.unknown] to clear this value. 25 | /// 26 | set gender(UserGender value) { 27 | if (value == UserGender.unknown || 28 | value == UserGender.female || 29 | value == UserGender.male || 30 | value == UserGender.other) { 31 | _channel.invokeMethod('setTargetingDataGender', { 32 | 'value': value.value, 33 | }); 34 | } 35 | } 36 | 37 | /// The maximum ad content rating shown to the user. 38 | /// 39 | /// Set this property to [AdContentRating.none] to clear this value. 40 | /// 41 | set maximumAdContentRating(AdContentRating value) { 42 | if (value == AdContentRating.none || 43 | value == AdContentRating.allAudiences || 44 | value == AdContentRating.everyoneOverTwelve || 45 | value == AdContentRating.matureAudiences) { 46 | _channel.invokeMethod('setTargetingDataMaximumAdContentRating', { 47 | 'value': value.value, 48 | }); 49 | } 50 | } 51 | 52 | /// The email of the user. 53 | /// 54 | /// Set this property to null to clear this value. 55 | /// 56 | set email(String? value) { 57 | _channel.invokeMethod('setTargetingDataEmail', { 58 | 'value': value, 59 | }); 60 | } 61 | 62 | /// The phone number of the user. Do not include the country calling code. 63 | /// 64 | /// Set this property to null to clear this value. 65 | /// 66 | set phoneNumber(String? value) { 67 | _channel.invokeMethod('setTargetingDataPhoneNumber', { 68 | 'value': value, 69 | }); 70 | } 71 | 72 | /// The keywords describing the application. 73 | /// 74 | /// Set this property to null to clear this value. 75 | /// 76 | set keywords(List? value) { 77 | _channel.invokeMethod('setTargetingDataKeywords', { 78 | 'value': value, 79 | }); 80 | } 81 | 82 | /// The interests of the user. 83 | /// 84 | /// Set this property to null to clear this value. 85 | /// 86 | set interests(List? value) { 87 | _channel.invokeMethod('setTargetingDataInterests', { 88 | 'value': value, 89 | }); 90 | } 91 | 92 | /// Clear all saved data from this class. 93 | void clearAll() { 94 | _channel.invokeMethod('clearAllTargetingData'); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /applovin_max/ios/Classes/AppLovinMAXAdView.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppLovinMAXAdView.m 3 | // applovin_max 4 | // 5 | // Created by Thomas So on 7/17/22. 6 | // 7 | 8 | #import "AppLovinMAXAdView.h" 9 | #import "AppLovinMAX.h" 10 | #import 11 | 12 | @interface AppLovinMAXAdView() 13 | @property (nonatomic, strong) FlutterMethodChannel *channel; 14 | @property (nonatomic, strong) MAAdView *adView; 15 | @end 16 | 17 | @implementation AppLovinMAXAdView 18 | 19 | - (instancetype)initWithFrame:(CGRect)frame 20 | viewId:(int64_t)viewId 21 | adUnitId:(NSString *)adUnitId 22 | adFormat:(MAAdFormat *)adFormat 23 | placement:(nullable NSString *)placement 24 | customData:(nullable NSString *)customData 25 | messenger:(id)messenger sdk:(ALSdk *)sdk 26 | { 27 | self = [super init]; 28 | if ( self ) 29 | { 30 | NSString *uniqueChannelName = [NSString stringWithFormat: @"applovin_max/adview_%lld", viewId]; 31 | self.channel = [FlutterMethodChannel methodChannelWithName: uniqueChannelName binaryMessenger: messenger]; 32 | 33 | self.adView = [[MAAdView alloc] initWithAdUnitIdentifier: adUnitId adFormat: adFormat sdk: sdk]; 34 | self.adView.frame = frame; 35 | self.adView.delegate = self; 36 | self.adView.revenueDelegate = self; 37 | 38 | self.adView.placement = placement; 39 | self.adView.customData = customData; 40 | 41 | [self.adView loadAd]; 42 | } 43 | return self; 44 | } 45 | 46 | - (UIView *)view 47 | { 48 | return self.adView; 49 | } 50 | 51 | #pragma mark - Ad Callbacks 52 | 53 | - (void)didLoadAd:(MAAd *)ad 54 | { 55 | [self sendEventWithName: @"OnAdViewAdLoadedEvent" ad: ad]; 56 | } 57 | 58 | - (void)didFailToLoadAdForAdUnitIdentifier:(NSString *)adUnitIdentifier withError:(MAError *)error 59 | { 60 | [[AppLovinMAX shared] sendErrorEventWithName: @"OnAdViewAdLoadFailedEvent" 61 | forAdUnitIdentifier: adUnitIdentifier 62 | withError: error]; 63 | } 64 | 65 | - (void)didClickAd:(MAAd *)ad 66 | { 67 | [self sendEventWithName: @"OnAdViewAdClickedEvent" ad: ad]; 68 | } 69 | 70 | - (void)didExpandAd:(MAAd *)ad 71 | { 72 | [self sendEventWithName: @"OnAdViewAdExpandedEvent" ad: ad]; 73 | } 74 | 75 | - (void)didCollapseAd:(MAAd *)ad 76 | { 77 | [self sendEventWithName: @"OnAdViewAdCollapsedEvent" ad: ad]; 78 | } 79 | 80 | - (void)didPayRevenueForAd:(MAAd *)ad 81 | { 82 | [self sendEventWithName: @"OnAdViewAdRevenuePaidEvent" ad: ad]; 83 | } 84 | 85 | - (void)didDisplayAd:(MAAd *)ad {} 86 | - (void)didFailToDisplayAd:(MAAd *)ad withError:(MAError *)error {} 87 | - (void)didHideAd:(MAAd *)ad {} 88 | 89 | - (void)sendEventWithName:(NSString *)name ad:(MAAd *)ad 90 | { 91 | [[AppLovinMAX shared] sendEventWithName: name ad: ad channel: self.channel]; 92 | } 93 | 94 | @end 95 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /applovin_max/android/src/main/java/com/applovin/applovin_max/AppLovinMAXAdView.java: -------------------------------------------------------------------------------- 1 | package com.applovin.applovin_max; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | 6 | import com.applovin.mediation.MaxAd; 7 | import com.applovin.mediation.MaxAdFormat; 8 | import com.applovin.mediation.MaxAdRevenueListener; 9 | import com.applovin.mediation.MaxAdViewAdListener; 10 | import com.applovin.mediation.MaxError; 11 | import com.applovin.mediation.ads.MaxAdView; 12 | import com.applovin.sdk.AppLovinSdk; 13 | 14 | import java.util.HashMap; 15 | import java.util.Map; 16 | 17 | import androidx.annotation.NonNull; 18 | import androidx.annotation.Nullable; 19 | import io.flutter.plugin.common.BinaryMessenger; 20 | import io.flutter.plugin.common.MethodChannel; 21 | import io.flutter.plugin.platform.PlatformView; 22 | 23 | /** 24 | * Created by Thomas So on July 17 2022 25 | */ 26 | public class AppLovinMAXAdView 27 | implements PlatformView, MaxAdViewAdListener, MaxAdRevenueListener 28 | { 29 | private final MethodChannel channel; 30 | private final MaxAdView adView; 31 | 32 | public AppLovinMAXAdView(final int viewId, final String adUnitId, final MaxAdFormat adFormat, @Nullable final String placement, @Nullable final String customData, final BinaryMessenger messenger, final AppLovinSdk sdk, final Context context) 33 | { 34 | String uniqueChannelName = "applovin_max/adview_" + viewId; 35 | channel = new MethodChannel( messenger, uniqueChannelName ); 36 | 37 | adView = new MaxAdView( adUnitId, adFormat, sdk, context ); 38 | adView.setListener( this ); 39 | adView.setRevenueListener( this ); 40 | 41 | adView.setPlacement( placement ); 42 | adView.setCustomData( customData ); 43 | 44 | adView.loadAd(); 45 | } 46 | 47 | @Nullable 48 | @Override 49 | public View getView() 50 | { 51 | return adView; 52 | } 53 | 54 | @Override 55 | public void onFlutterViewAttached(@NonNull final View flutterView) { } 56 | 57 | @Override 58 | public void onFlutterViewDetached() { } 59 | 60 | @Override 61 | public void dispose() 62 | { 63 | if ( adView != null ) 64 | { 65 | adView.destroy(); 66 | adView.setListener( null ); 67 | adView.setRevenueListener( null ); 68 | } 69 | } 70 | 71 | @Override 72 | public void onAdLoaded(final MaxAd ad) 73 | { 74 | sendEvent( "OnAdViewAdLoadedEvent", ad ); 75 | } 76 | 77 | @Override 78 | public void onAdLoadFailed(final String adUnitId, final MaxError error) 79 | { 80 | AppLovinMAX.getInstance().fireErrorCallback( "OnAdViewAdLoadFailedEvent", adUnitId, error ); 81 | } 82 | 83 | @Override 84 | public void onAdClicked(final MaxAd ad) 85 | { 86 | sendEvent( "OnAdViewAdClickedEvent", ad ); 87 | } 88 | 89 | @Override 90 | public void onAdExpanded(final MaxAd ad) 91 | { 92 | sendEvent( "OnAdViewAdExpandedEvent", ad ); 93 | } 94 | 95 | @Override 96 | public void onAdCollapsed(final MaxAd ad) 97 | { 98 | sendEvent( "OnAdViewAdCollapsedEvent", ad ); 99 | } 100 | 101 | @Override 102 | public void onAdDisplayed(final MaxAd ad) { } 103 | 104 | @Override 105 | public void onAdDisplayFailed(final MaxAd ad, final MaxError error) { } 106 | 107 | @Override 108 | public void onAdHidden(final MaxAd ad) { } 109 | 110 | @Override 111 | public void onAdRevenuePaid(final MaxAd ad) 112 | { 113 | sendEvent( "OnAdViewAdRevenuePaidEvent", ad ); 114 | } 115 | 116 | private void sendEvent(final String event, final MaxAd ad) 117 | { 118 | AppLovinMAX.getInstance().fireCallback( event, ad, channel ); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /applovin_max/lib/src/max_ad_view.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui' as ui; 2 | 3 | import 'package:applovin_max/applovin_max.dart'; 4 | import 'package:flutter/foundation.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter/services.dart'; 7 | import 'package:flutter/widgets.dart'; 8 | 9 | /// Represents an ad format. 10 | enum AdFormat { 11 | /// The banner ad. 12 | banner("banner"), 13 | /// The MREC ad. 14 | mrec("mrec"); 15 | 16 | /// @nodoc 17 | final String value; 18 | 19 | /// @nodoc 20 | const AdFormat(this.value); 21 | } 22 | 23 | const double _bannerWidth = 320; 24 | const double _bannerHeight = 50; 25 | const double _leaderWidth = 728; 26 | const double _leaderHeight = 90; 27 | const double _mrecWidth = 300; 28 | const double _mrecHeight = 250; 29 | 30 | /// Represents an AdView ad (Banner / MREC). 31 | class MaxAdView extends StatefulWidget { 32 | /// A string value representing the ad unit ID to load ads for. 33 | final String adUnitId; 34 | 35 | /// A string value representing the ad format to load ads for. Should be either [AdFormat.banner] or [AdFormat.mrec]. 36 | final AdFormat adFormat; 37 | 38 | /// A string value representing the placement name that you assign when you integrate each ad format, for granular reporting in ad events. 39 | final String? placement; 40 | 41 | /// A string value representing the customData name that you assign when you integrate each ad format, for granular reporting in ad events. 42 | final String? customData; 43 | 44 | /// The listener for various ad callbacks. 45 | final AdViewAdListener? listener; 46 | 47 | /// Creates a new ad view directly in the user's widget tree. 48 | /// 49 | /// * [Banner Widget Method](https://dash.applovin.com/documentation/mediation/flutter/getting-started/banners#widget-method) 50 | /// * [MREC Widget Method](https://dash.applovin.com/documentation/mediation/flutter/getting-started/mrecs#widget-method) 51 | const MaxAdView({ 52 | Key? key, 53 | required this.adUnitId, 54 | required this.adFormat, 55 | this.placement, 56 | this.customData, 57 | this.listener, 58 | }) : super(key: key); 59 | 60 | /// @nodoc 61 | @override 62 | State createState() => _MaxAdViewState(); 63 | } 64 | 65 | class _MaxAdViewState extends State { 66 | @override 67 | Widget build(BuildContext context) { 68 | if (defaultTargetPlatform == TargetPlatform.android) { 69 | return SizedBox( 70 | width: _getWidth(), 71 | height: _getHeight(), 72 | child: OverflowBox( 73 | alignment: Alignment.bottomCenter, 74 | child: AndroidView( 75 | viewType: "applovin_max/adview", 76 | creationParams: { 77 | "ad_unit_id": widget.adUnitId, 78 | "ad_format": widget.adFormat.value, 79 | }, 80 | creationParamsCodec: const StandardMessageCodec(), 81 | onPlatformViewCreated: _onMaxAdViewCreated, 82 | ), 83 | ), 84 | ); 85 | } else if (defaultTargetPlatform == TargetPlatform.iOS) { 86 | return SizedBox( 87 | width: _getWidth(), 88 | height: _getHeight(), 89 | child: OverflowBox( 90 | alignment: Alignment.bottomCenter, 91 | child: UiKitView( 92 | viewType: "applovin_max/adview", 93 | creationParams: { 94 | "ad_unit_id": widget.adUnitId, 95 | "ad_format": widget.adFormat.value, 96 | }, 97 | creationParamsCodec: const StandardMessageCodec(), 98 | onPlatformViewCreated: _onMaxAdViewCreated, 99 | ), 100 | ), 101 | ); 102 | } 103 | 104 | return Container(); 105 | } 106 | 107 | void _onMaxAdViewCreated(int id) { 108 | final MethodChannel channel = MethodChannel('applovin_max/adview_$id'); 109 | 110 | channel.setMethodCallHandler((call) async { 111 | var method = call.method; 112 | var arguments = call.arguments; 113 | 114 | var adUnitId = arguments["adUnitId"]; 115 | 116 | if ("OnAdViewAdLoadedEvent" == method) { 117 | widget.listener?.onAdLoadedCallback(AppLovinMAX.createAd(adUnitId, arguments)); 118 | } else if ("OnAdViewAdLoadFailedEvent" == method) { 119 | widget.listener?.onAdLoadFailedCallback(adUnitId, AppLovinMAX.createError(arguments)); 120 | } else if ("OnAdViewAdClickedEvent" == method) { 121 | widget.listener?.onAdClickedCallback(AppLovinMAX.createAd(adUnitId, arguments)); 122 | } else if ("OnAdViewAdExpandedEvent" == method) { 123 | widget.listener?.onAdExpandedCallback(AppLovinMAX.createAd(adUnitId, arguments)); 124 | } else if ("OnAdViewAdCollapsedEvent" == method) { 125 | widget.listener?.onAdCollapsedCallback(AppLovinMAX.createAd(adUnitId, arguments)); 126 | } else if ("OnAdViewAdRevenuePaidEvent" == method) { 127 | widget.listener?.onAdRevenuePaidCallback?.call(AppLovinMAX.createAd(adUnitId, arguments)); 128 | } 129 | }); 130 | } 131 | 132 | double _getWidth() { 133 | if (widget.adFormat == AdFormat.mrec) { 134 | return _mrecWidth; 135 | } else if (widget.adFormat == AdFormat.banner) { 136 | return _isTablet() ? _leaderWidth : _bannerWidth; 137 | } 138 | 139 | return -1; 140 | } 141 | 142 | double _getHeight() { 143 | if (widget.adFormat == AdFormat.mrec) { 144 | return _mrecHeight; 145 | } else if (widget.adFormat == AdFormat.banner) { 146 | return _isTablet() ? _leaderHeight : _bannerHeight; 147 | } 148 | 149 | return -1; 150 | } 151 | 152 | bool _isTablet() { 153 | final double devicePixelRatio = ui.window.devicePixelRatio; 154 | final ui.Size size = ui.window.physicalSize; 155 | final double width = size.width; 156 | final double height = size.height; 157 | 158 | if (devicePixelRatio < 2 && (width >= 1000 || height >= 1000)) { 159 | return true; 160 | } else if (devicePixelRatio == 2 && (width >= 1920 || height >= 1920)) { 161 | return true; 162 | } else { 163 | return false; 164 | } 165 | } 166 | } 167 | -------------------------------------------------------------------------------- /applovin_max/lib/src/ad_listeners.dart: -------------------------------------------------------------------------------- 1 | import 'package:applovin_max/applovin_max.dart'; 2 | 3 | /// Defines a base listener to be notified about ad events. 4 | abstract class AdListener { 5 | /// The SDK invokes this method when a new ad has been loaded. 6 | final Function(MaxAd ad) onAdLoadedCallback; 7 | /// The SDK invokes this method when an ad could not be retrieved. 8 | final Function(String adUnitId, MaxError error) onAdLoadFailedCallback; 9 | /// The SDK invokes this method when the ad is clicked. 10 | final Function(MaxAd ad) onAdClickedCallback; 11 | /// The SDK invokes this method when a revenue event is detected for the ad. 12 | final Function(MaxAd ad)? onAdRevenuePaidCallback; 13 | 14 | /// @nodoc 15 | const AdListener({ 16 | required this.onAdLoadedCallback, 17 | required this.onAdLoadFailedCallback, 18 | required this.onAdClickedCallback, 19 | this.onAdRevenuePaidCallback, 20 | }); 21 | } 22 | 23 | /// Defines a fullscreen ad listener. 24 | abstract class FullscreenAdListener extends AdListener { 25 | /// The SDK invokes this method when the ad has been successfully displayed. 26 | final Function(MaxAd ad) onAdDisplayedCallback; 27 | /// The SDK invokes this method when the ad could not be displayed. 28 | final Function(MaxAd ad, MaxError error) onAdDisplayFailedCallback; 29 | /// The SDK invokes this method when the ad has been dismissed. 30 | final Function(MaxAd ad) onAdHiddenCallback; 31 | 32 | /// @nodoc 33 | const FullscreenAdListener({ 34 | required Function(MaxAd ad) onAdLoadedCallback, 35 | required Function(String adUnitId, MaxError error) onAdLoadFailedCallback, 36 | required Function(MaxAd ad) onAdClickedCallback, 37 | Function(MaxAd ad)? onAdRevenuePaidCallback, 38 | required this.onAdDisplayedCallback, 39 | required this.onAdDisplayFailedCallback, 40 | required this.onAdHiddenCallback, 41 | }) : super( 42 | onAdLoadedCallback: onAdLoadedCallback, 43 | onAdLoadFailedCallback: onAdLoadFailedCallback, 44 | onAdClickedCallback: onAdClickedCallback, 45 | onAdRevenuePaidCallback: onAdRevenuePaidCallback, 46 | ); 47 | } 48 | 49 | /// Defines an AdView ad (Banner / MREC) listener to be notified about ad view events. 50 | class AdViewAdListener extends AdListener { 51 | /// The SDK invokes this method when the [MaxAdView] has expanded to the full screen. 52 | final Function(MaxAd ad) onAdExpandedCallback; 53 | /// The SDK invokes this method when the [MaxAdView] has collapsed back to its original size. 54 | final Function(MaxAd ad) onAdCollapsedCallback; 55 | 56 | /// @nodoc 57 | const AdViewAdListener({ 58 | required Function(MaxAd ad) onAdLoadedCallback, 59 | required Function(String adUnitId, MaxError error) onAdLoadFailedCallback, 60 | required Function(MaxAd ad) onAdClickedCallback, 61 | Function(MaxAd ad)? onAdRevenuePaidCallback, 62 | required this.onAdExpandedCallback, 63 | required this.onAdCollapsedCallback, 64 | }) : super( 65 | onAdLoadedCallback: onAdLoadedCallback, 66 | onAdLoadFailedCallback: onAdLoadFailedCallback, 67 | onAdClickedCallback: onAdClickedCallback, 68 | onAdRevenuePaidCallback: onAdRevenuePaidCallback, 69 | ); 70 | } 71 | 72 | /// Defines an interstitial ad listener. 73 | class InterstitialListener extends FullscreenAdListener { 74 | /// @nodoc 75 | const InterstitialListener({ 76 | required Function(MaxAd ad) onAdLoadedCallback, 77 | required Function(String adUnitId, MaxError error) onAdLoadFailedCallback, 78 | required Function(MaxAd ad) onAdDisplayedCallback, 79 | required Function(MaxAd ad, MaxError error) onAdDisplayFailedCallback, 80 | required Function(MaxAd ad) onAdClickedCallback, 81 | required Function(MaxAd ad) onAdHiddenCallback, 82 | Function(MaxAd ad)? onAdRevenuePaidCallback, 83 | }) : super( 84 | onAdLoadedCallback: onAdLoadedCallback, 85 | onAdLoadFailedCallback: onAdLoadFailedCallback, 86 | onAdDisplayedCallback: onAdDisplayedCallback, 87 | onAdDisplayFailedCallback: onAdDisplayFailedCallback, 88 | onAdClickedCallback: onAdClickedCallback, 89 | onAdHiddenCallback: onAdHiddenCallback, 90 | onAdRevenuePaidCallback: onAdRevenuePaidCallback, 91 | ); 92 | } 93 | 94 | /// Defines a rewarded ad listener. 95 | class RewardedAdListener extends FullscreenAdListener { 96 | /// The SDK invokes this method when a reward was granted. 97 | final Function(MaxAd ad, MaxReward reward) onAdReceivedRewardCallback; 98 | 99 | /// @nodoc 100 | const RewardedAdListener({ 101 | required Function(MaxAd ad) onAdLoadedCallback, 102 | required Function(String adUnitId, MaxError error) onAdLoadFailedCallback, 103 | required Function(MaxAd ad) onAdDisplayedCallback, 104 | required Function(MaxAd ad, MaxError error) onAdDisplayFailedCallback, 105 | required Function(MaxAd ad) onAdClickedCallback, 106 | required Function(MaxAd ad) onAdHiddenCallback, 107 | Function(MaxAd ad)? onAdRevenuePaidCallback, 108 | required this.onAdReceivedRewardCallback, 109 | }) : super( 110 | onAdLoadedCallback: onAdLoadedCallback, 111 | onAdLoadFailedCallback: onAdLoadFailedCallback, 112 | onAdDisplayedCallback: onAdDisplayedCallback, 113 | onAdDisplayFailedCallback: onAdDisplayFailedCallback, 114 | onAdClickedCallback: onAdClickedCallback, 115 | onAdHiddenCallback: onAdHiddenCallback, 116 | onAdRevenuePaidCallback: onAdRevenuePaidCallback, 117 | ); 118 | } 119 | 120 | /// Defines an app open ad listener. 121 | class AppOpenAdListener extends FullscreenAdListener { 122 | /// @nodoc 123 | const AppOpenAdListener({ 124 | required Function(MaxAd ad) onAdLoadedCallback, 125 | required Function(String adUnitId, MaxError error) onAdLoadFailedCallback, 126 | required Function(MaxAd ad) onAdDisplayedCallback, 127 | required Function(MaxAd ad, MaxError error) onAdDisplayFailedCallback, 128 | required Function(MaxAd ad) onAdClickedCallback, 129 | required Function(MaxAd ad) onAdHiddenCallback, 130 | Function(MaxAd ad)? onAdRevenuePaidCallback, 131 | }) : super( 132 | onAdLoadedCallback: onAdLoadedCallback, 133 | onAdLoadFailedCallback: onAdLoadFailedCallback, 134 | onAdDisplayedCallback: onAdDisplayedCallback, 135 | onAdDisplayFailedCallback: onAdDisplayFailedCallback, 136 | onAdClickedCallback: onAdClickedCallback, 137 | onAdHiddenCallback: onAdHiddenCallback, 138 | onAdRevenuePaidCallback: onAdRevenuePaidCallback, 139 | ); 140 | } 141 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /applovin_max/example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:io' show Platform; 3 | import 'dart:math'; 4 | 5 | import 'package:applovin_max/applovin_max.dart'; 6 | import 'package:flutter/material.dart'; 7 | 8 | enum AdLoadState { notLoaded, loading, loaded } 9 | 10 | void main() { 11 | runApp(const MyApp()); 12 | } 13 | 14 | class MyApp extends StatefulWidget { 15 | const MyApp({Key? key}) : super(key: key); 16 | 17 | @override 18 | State createState() => _MyAppState(); 19 | } 20 | 21 | // Create constants 22 | const String _sdkKey = "YOUR_SDK_KEY"; 23 | 24 | final String _interstitialAdUnitId = Platform.isAndroid ? "ANDROID_INTER_AD_UNIT_ID" : "IOS_INTER_AD_UNIT_ID"; 25 | final String _rewardedAdUnitId = Platform.isAndroid ? "ANDROID_REWARDED_AD_UNIT_ID" : "IOS_REWARDED_AD_UNIT_ID"; 26 | final String _bannerAdUnitId = Platform.isAndroid ? "ANDROID_BANNER_AD_UNIT_ID" : "IOS_BANNER_AD_UNIT_ID"; 27 | final String _mrecAdUnitId = Platform.isAndroid ? "ANDROID_MREC_AD_UNIT_ID" : "IOS_MREC_AD_UNIT_ID"; 28 | 29 | // Create states 30 | var _isInitialized = false; 31 | var _interstitialLoadState = AdLoadState.notLoaded; 32 | var _interstitialRetryAttempt = 0; 33 | var _rewardedAdLoadState = AdLoadState.notLoaded; 34 | var _rewardedAdRetryAttempt = 0; 35 | var _isProgrammaticBannerCreated = false; 36 | var _isProgrammaticBannerShowing = false; 37 | var _isWidgetBannerShowing = false; 38 | var _isProgrammaticMRecCreated = false; 39 | var _isProgrammaticMRecShowing = false; 40 | var _isWidgetMRecShowing = false; 41 | 42 | var _statusText = ""; 43 | 44 | class _MyAppState extends State { 45 | @override 46 | void initState() { 47 | super.initState(); 48 | initializePlugin(); 49 | } 50 | 51 | // NOTE: Platform messages are asynchronous, so we initialize in an async method. 52 | Future initializePlugin() async { 53 | logStatus("Initializing SDK..."); 54 | 55 | Map? configuration = await AppLovinMAX.initialize(_sdkKey); 56 | if (configuration != null) { 57 | _isInitialized = true; 58 | 59 | logStatus("SDK Initialized: $configuration"); 60 | 61 | attachAdListeners(); 62 | } 63 | } 64 | 65 | void attachAdListeners() { 66 | /// Interstitial Ad Listeners 67 | AppLovinMAX.setInterstitialListener(InterstitialListener( 68 | onAdLoadedCallback: (ad) { 69 | _interstitialLoadState = AdLoadState.loaded; 70 | 71 | // Interstitial ad is ready to be shown. AppLovinMAX.isInterstitialAdReady(_interstitial_ad_unit_id) will now return 'true' 72 | logStatus('Interstitial ad loaded from ${ad.networkName}'); 73 | 74 | // Reset retry attempt 75 | _interstitialRetryAttempt = 0; 76 | }, 77 | onAdLoadFailedCallback: (adUnitId, error) { 78 | _interstitialLoadState = AdLoadState.notLoaded; 79 | 80 | // Interstitial ad failed to load 81 | // We recommend retrying with exponentially higher delays up to a maximum delay (in this case 64 seconds) 82 | _interstitialRetryAttempt = _interstitialRetryAttempt + 1; 83 | 84 | int retryDelay = pow(2, min(6, _interstitialRetryAttempt)).toInt(); 85 | logStatus('Interstitial ad failed to load with code ${error.code} - retrying in ${retryDelay}s'); 86 | 87 | Future.delayed(Duration(milliseconds: retryDelay * 1000), () { 88 | AppLovinMAX.loadInterstitial(_interstitialAdUnitId); 89 | }); 90 | }, 91 | onAdDisplayedCallback: (ad) { 92 | logStatus('Interstitial ad displayed'); 93 | }, 94 | onAdDisplayFailedCallback: (ad, error) { 95 | _interstitialLoadState = AdLoadState.notLoaded; 96 | logStatus('Interstitial ad failed to display with code ${error.code} and message ${error.message}'); 97 | }, 98 | onAdClickedCallback: (ad) { 99 | logStatus('Interstitial ad clicked'); 100 | }, 101 | onAdHiddenCallback: (ad) { 102 | _interstitialLoadState = AdLoadState.notLoaded; 103 | logStatus('Interstitial ad hidden'); 104 | }, 105 | onAdRevenuePaidCallback: (ad) { 106 | logStatus('Interstitial ad revenue paid: ${ad.revenue}'); 107 | }, 108 | )); 109 | 110 | /// Rewarded Ad Listeners 111 | AppLovinMAX.setRewardedAdListener(RewardedAdListener(onAdLoadedCallback: (ad) { 112 | _rewardedAdLoadState = AdLoadState.loaded; 113 | 114 | // Rewarded ad is ready to be shown. AppLovinMAX.isRewardedAdReady(_rewarded_ad_unit_id) will now return 'true' 115 | logStatus('Rewarded ad loaded from ${ad.networkName}'); 116 | 117 | // Reset retry attempt 118 | _rewardedAdRetryAttempt = 0; 119 | }, onAdLoadFailedCallback: (adUnitId, error) { 120 | _rewardedAdLoadState = AdLoadState.notLoaded; 121 | 122 | // Rewarded ad failed to load 123 | // We recommend retrying with exponentially higher delays up to a maximum delay (in this case 64 seconds) 124 | _rewardedAdRetryAttempt = _rewardedAdRetryAttempt + 1; 125 | 126 | int retryDelay = pow(2, min(6, _rewardedAdRetryAttempt)).toInt(); 127 | logStatus('Rewarded ad failed to load with code ${error.code} - retrying in ${retryDelay}s'); 128 | 129 | Future.delayed(Duration(milliseconds: retryDelay * 1000), () { 130 | AppLovinMAX.loadRewardedAd(_rewardedAdUnitId); 131 | }); 132 | }, onAdDisplayedCallback: (ad) { 133 | logStatus('Rewarded ad displayed'); 134 | }, onAdDisplayFailedCallback: (ad, error) { 135 | _rewardedAdLoadState = AdLoadState.notLoaded; 136 | logStatus('Rewarded ad failed to display with code ${error.code} and message ${error.message}'); 137 | }, onAdClickedCallback: (ad) { 138 | logStatus('Rewarded ad clicked'); 139 | }, onAdHiddenCallback: (ad) { 140 | _rewardedAdLoadState = AdLoadState.notLoaded; 141 | logStatus('Rewarded ad hidden'); 142 | }, onAdReceivedRewardCallback: (ad, reward) { 143 | logStatus('Rewarded ad granted reward'); 144 | }, onAdRevenuePaidCallback: (ad) { 145 | logStatus('Rewarded ad revenue paid: ${ad.revenue}'); 146 | })); 147 | 148 | /// Banner Ad Listeners 149 | AppLovinMAX.setBannerListener(AdViewAdListener(onAdLoadedCallback: (ad) { 150 | logStatus('Banner ad loaded from ${ad.networkName}'); 151 | }, onAdLoadFailedCallback: (adUnitId, error) { 152 | logStatus('Banner ad failed to load with error code ${error.code} and message: ${error.message}'); 153 | }, onAdClickedCallback: (ad) { 154 | logStatus('Banner ad clicked'); 155 | }, onAdExpandedCallback: (ad) { 156 | logStatus('Banner ad expanded'); 157 | }, onAdCollapsedCallback: (ad) { 158 | logStatus('Banner ad collapsed'); 159 | }, onAdRevenuePaidCallback: (ad) { 160 | logStatus('Banner ad revenue paid: ${ad.revenue}'); 161 | })); 162 | 163 | /// MREC Ad Listeners 164 | AppLovinMAX.setMRecListener(AdViewAdListener(onAdLoadedCallback: (ad) { 165 | logStatus('MREC ad loaded from ${ad.networkName}'); 166 | }, onAdLoadFailedCallback: (adUnitId, error) { 167 | logStatus('MREC ad failed to load with error code ${error.code} and message: ${error.message}'); 168 | }, onAdClickedCallback: (ad) { 169 | logStatus('MREC ad clicked'); 170 | }, onAdExpandedCallback: (ad) { 171 | logStatus('MREC ad expanded'); 172 | }, onAdCollapsedCallback: (ad) { 173 | logStatus('MREC ad collapsed'); 174 | }, onAdRevenuePaidCallback: (ad) { 175 | logStatus('MREC ad revenue paid: ${ad.revenue}'); 176 | })); 177 | } 178 | 179 | String getInterstitialButtonTitle() { 180 | if (_interstitialLoadState == AdLoadState.notLoaded) { 181 | return "Load Interstitial"; 182 | } else if (_interstitialLoadState == AdLoadState.loading) { 183 | return "Loading..."; 184 | } else { 185 | return "Show Interstitial"; // adLoadState.loaded 186 | } 187 | } 188 | 189 | String getRewardedButtonTitle() { 190 | if (_rewardedAdLoadState == AdLoadState.notLoaded) { 191 | return "Load Rewarded Ad"; 192 | } else if (_rewardedAdLoadState == AdLoadState.loading) { 193 | return "Loading..."; 194 | } else { 195 | return "Show Rewarded Ad"; // adLoadState.loaded 196 | } 197 | } 198 | 199 | String getProgrammaticBannerButtonTitle() { 200 | return _isProgrammaticBannerShowing ? 'Hide Programmatic Banner' : 'Show Programmatic Banner'; 201 | } 202 | 203 | String getWidgetBannerButtonTitle() { 204 | return _isWidgetBannerShowing ? 'Hide Widget Banner' : 'Show Widget Banner'; 205 | } 206 | 207 | String getProgrammaticMRecButtonTitle() { 208 | return _isProgrammaticMRecShowing ? 'Hide Programmatic MREC' : 'Show Programmatic MREC'; 209 | } 210 | 211 | String getWidgetMRecButtonTitle() { 212 | return _isWidgetMRecShowing ? 'Hide Widget MREC' : 'Show Widget MREC'; 213 | } 214 | 215 | void logStatus(String status) { 216 | /// ignore: avoid_print 217 | print(status); 218 | 219 | setState(() { 220 | _statusText = status; 221 | }); 222 | } 223 | 224 | @override 225 | Widget build(BuildContext context) { 226 | return MaterialApp( 227 | home: Scaffold( 228 | appBar: AppBar( 229 | title: const Text("AppLovin MAX Demo"), 230 | ), 231 | body: Column( 232 | crossAxisAlignment: CrossAxisAlignment.stretch, 233 | children: [ 234 | const SizedBox(height: 20), 235 | Text( 236 | '$_statusText\n', 237 | style: const TextStyle(fontSize: 20), 238 | textAlign: TextAlign.center, 239 | ), 240 | ElevatedButton( 241 | onPressed: _isInitialized 242 | ? () { 243 | AppLovinMAX.showMediationDebugger(); 244 | } 245 | : null, 246 | child: const Text("Mediation Debugger"), 247 | ), 248 | ElevatedButton( 249 | onPressed: (_isInitialized && _interstitialLoadState != AdLoadState.loading) 250 | ? () async { 251 | bool isReady = (await AppLovinMAX.isInterstitialReady(_interstitialAdUnitId))!; 252 | if (isReady) { 253 | AppLovinMAX.showInterstitial(_interstitialAdUnitId); 254 | } else { 255 | logStatus('Loading interstitial ad...'); 256 | _interstitialLoadState = AdLoadState.loading; 257 | AppLovinMAX.loadInterstitial(_interstitialAdUnitId); 258 | } 259 | } 260 | : null, 261 | child: Text(getInterstitialButtonTitle()), 262 | ), 263 | ElevatedButton( 264 | onPressed: (_isInitialized && _rewardedAdLoadState != AdLoadState.loading) 265 | ? () async { 266 | bool isReady = (await AppLovinMAX.isRewardedAdReady(_rewardedAdUnitId))!; 267 | if (isReady) { 268 | AppLovinMAX.showRewardedAd(_rewardedAdUnitId); 269 | } else { 270 | logStatus('Loading rewarded ad...'); 271 | _rewardedAdLoadState = AdLoadState.loading; 272 | AppLovinMAX.loadRewardedAd(_rewardedAdUnitId); 273 | } 274 | } 275 | : null, 276 | child: Text(getRewardedButtonTitle()), 277 | ), 278 | Row( 279 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 280 | children: [ 281 | ElevatedButton( 282 | onPressed: (_isInitialized && !_isWidgetBannerShowing) 283 | ? () async { 284 | if (_isProgrammaticBannerShowing) { 285 | AppLovinMAX.hideBanner(_bannerAdUnitId); 286 | } else { 287 | if (!_isProgrammaticBannerCreated) { 288 | // 289 | // Programmatic banner creation - banners are automatically sized to 320x50 on phones and 728x90 on tablets 290 | // 291 | AppLovinMAX.createBanner(_bannerAdUnitId, AdViewPosition.bottomCenter); 292 | 293 | // Set banner background color to black - PLEASE USE HEX STRINGS ONLY 294 | AppLovinMAX.setBannerBackgroundColor(_bannerAdUnitId, '#000000'); 295 | 296 | _isProgrammaticBannerCreated = true; 297 | } 298 | 299 | AppLovinMAX.showBanner(_bannerAdUnitId); 300 | } 301 | 302 | setState(() { 303 | _isProgrammaticBannerShowing = !_isProgrammaticBannerShowing; 304 | }); 305 | } 306 | : null, 307 | child: Text(getProgrammaticBannerButtonTitle()), 308 | ), 309 | ElevatedButton( 310 | onPressed: (_isInitialized && !_isProgrammaticBannerShowing) 311 | ? () async { 312 | setState(() { 313 | _isWidgetBannerShowing = !_isWidgetBannerShowing; 314 | }); 315 | } 316 | : null, 317 | child: Text(getWidgetBannerButtonTitle()), 318 | ) 319 | ], 320 | ), 321 | Row( 322 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 323 | children: [ 324 | ElevatedButton( 325 | onPressed: (_isInitialized && !_isWidgetMRecShowing) 326 | ? () async { 327 | if (_isProgrammaticMRecShowing) { 328 | AppLovinMAX.hideMRec(_mrecAdUnitId); 329 | } else { 330 | if (!_isProgrammaticMRecCreated) { 331 | AppLovinMAX.createMRec(_mrecAdUnitId, AdViewPosition.bottomCenter); 332 | 333 | _isProgrammaticMRecCreated = true; 334 | } 335 | 336 | AppLovinMAX.showMRec(_mrecAdUnitId); 337 | } 338 | 339 | setState(() { 340 | _isProgrammaticMRecShowing = !_isProgrammaticMRecShowing; 341 | }); 342 | } 343 | : null, 344 | child: Text(getProgrammaticMRecButtonTitle()), 345 | ), 346 | ElevatedButton( 347 | onPressed: (_isInitialized && !_isProgrammaticMRecShowing) 348 | ? () async { 349 | setState(() { 350 | _isWidgetMRecShowing = !_isWidgetMRecShowing; 351 | }); 352 | } 353 | : null, 354 | child: Text(getWidgetMRecButtonTitle()), 355 | ) 356 | ], 357 | ), 358 | if (_isWidgetBannerShowing) 359 | MaxAdView( 360 | adUnitId: _bannerAdUnitId, 361 | adFormat: AdFormat.banner, 362 | listener: AdViewAdListener(onAdLoadedCallback: (ad) { 363 | logStatus('Banner widget ad loaded from ${ad.networkName}'); 364 | }, onAdLoadFailedCallback: (adUnitId, error) { 365 | logStatus('Banner widget ad failed to load with error code ${error.code} and message: ${error.message}'); 366 | }, onAdClickedCallback: (ad) { 367 | logStatus('Banner widget ad clicked'); 368 | }, onAdExpandedCallback: (ad) { 369 | logStatus('Banner widget ad expanded'); 370 | }, onAdCollapsedCallback: (ad) { 371 | logStatus('Banner widget ad collapsed'); 372 | }, onAdRevenuePaidCallback: (ad) { 373 | logStatus('Banner widget ad revenue paid: ${ad.revenue}'); 374 | })), 375 | if (_isWidgetMRecShowing) 376 | MaxAdView( 377 | adUnitId: _mrecAdUnitId, 378 | adFormat: AdFormat.mrec, 379 | listener: AdViewAdListener(onAdLoadedCallback: (ad) { 380 | logStatus('MREC widget ad loaded from ${ad.networkName}'); 381 | }, onAdLoadFailedCallback: (adUnitId, error) { 382 | logStatus('MREC widget ad failed to load with error code ${error.code} and message: ${error.message}'); 383 | }, onAdClickedCallback: (ad) { 384 | logStatus('MREC widget ad clicked'); 385 | }, onAdExpandedCallback: (ad) { 386 | logStatus('MREC widget ad expanded'); 387 | }, onAdCollapsedCallback: (ad) { 388 | logStatus('MREC widget ad collapsed'); 389 | }, onAdRevenuePaidCallback: (ad) { 390 | logStatus('MREC widget ad revenue paid: ${ad.revenue}'); 391 | })), 392 | ], 393 | )), 394 | ); 395 | } 396 | } 397 | -------------------------------------------------------------------------------- /applovin_max/example/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 13 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 17 | 9E3DF16B4C650B620A6C3811 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D543804A2EA2AB631CD3A717 /* libPods-Runner.a */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXCopyFilesBuildPhase section */ 21 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 22 | isa = PBXCopyFilesBuildPhase; 23 | buildActionMask = 2147483647; 24 | dstPath = ""; 25 | dstSubfolderSpec = 10; 26 | files = ( 27 | ); 28 | name = "Embed Frameworks"; 29 | runOnlyForDeploymentPostprocessing = 0; 30 | }; 31 | /* End PBXCopyFilesBuildPhase section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | 0C537C78B796D15766F747E3 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 35 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 36 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 37 | 28F5FFD517592D69F699A889 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 38 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 39 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 40 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 41 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 42 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 43 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 44 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 46 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 47 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 48 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 49 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | D543804A2EA2AB631CD3A717 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | DBA2D2110F8E9D55E452880F /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | 9E3DF16B4C650B620A6C3811 /* libPods-Runner.a in Frameworks */, 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | /* End PBXFrameworksBuildPhase section */ 64 | 65 | /* Begin PBXGroup section */ 66 | 33D2638B6E89055C47A6E696 /* Pods */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | 28F5FFD517592D69F699A889 /* Pods-Runner.debug.xcconfig */, 70 | DBA2D2110F8E9D55E452880F /* Pods-Runner.release.xcconfig */, 71 | 0C537C78B796D15766F747E3 /* Pods-Runner.profile.xcconfig */, 72 | ); 73 | path = Pods; 74 | sourceTree = ""; 75 | }; 76 | 7CDA986F4D0439B570EDA01A /* Frameworks */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | D543804A2EA2AB631CD3A717 /* libPods-Runner.a */, 80 | ); 81 | name = Frameworks; 82 | sourceTree = ""; 83 | }; 84 | 9740EEB11CF90186004384FC /* Flutter */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 88 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 89 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 90 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 91 | ); 92 | name = Flutter; 93 | sourceTree = ""; 94 | }; 95 | 97C146E51CF9000F007C117D = { 96 | isa = PBXGroup; 97 | children = ( 98 | 9740EEB11CF90186004384FC /* Flutter */, 99 | 97C146F01CF9000F007C117D /* Runner */, 100 | 97C146EF1CF9000F007C117D /* Products */, 101 | 33D2638B6E89055C47A6E696 /* Pods */, 102 | 7CDA986F4D0439B570EDA01A /* Frameworks */, 103 | ); 104 | sourceTree = ""; 105 | }; 106 | 97C146EF1CF9000F007C117D /* Products */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 97C146EE1CF9000F007C117D /* Runner.app */, 110 | ); 111 | name = Products; 112 | sourceTree = ""; 113 | }; 114 | 97C146F01CF9000F007C117D /* Runner */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 118 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 119 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 120 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 121 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 122 | 97C147021CF9000F007C117D /* Info.plist */, 123 | 97C146F11CF9000F007C117D /* Supporting Files */, 124 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 125 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 126 | ); 127 | path = Runner; 128 | sourceTree = ""; 129 | }; 130 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 97C146F21CF9000F007C117D /* main.m */, 134 | ); 135 | name = "Supporting Files"; 136 | sourceTree = ""; 137 | }; 138 | /* End PBXGroup section */ 139 | 140 | /* Begin PBXNativeTarget section */ 141 | 97C146ED1CF9000F007C117D /* Runner */ = { 142 | isa = PBXNativeTarget; 143 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 144 | buildPhases = ( 145 | 24BD2852163F98B8C8B94675 /* [CP] Check Pods Manifest.lock */, 146 | 9740EEB61CF901F6004384FC /* Run Script */, 147 | 97C146EA1CF9000F007C117D /* Sources */, 148 | 97C146EB1CF9000F007C117D /* Frameworks */, 149 | 97C146EC1CF9000F007C117D /* Resources */, 150 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 151 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 152 | D5BA8E18AAE9433F335AA9CD /* [CP] Copy Pods Resources */, 153 | ); 154 | buildRules = ( 155 | ); 156 | dependencies = ( 157 | ); 158 | name = Runner; 159 | productName = Runner; 160 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 161 | productType = "com.apple.product-type.application"; 162 | }; 163 | /* End PBXNativeTarget section */ 164 | 165 | /* Begin PBXProject section */ 166 | 97C146E61CF9000F007C117D /* Project object */ = { 167 | isa = PBXProject; 168 | attributes = { 169 | LastUpgradeCheck = 1300; 170 | ORGANIZATIONNAME = ""; 171 | TargetAttributes = { 172 | 97C146ED1CF9000F007C117D = { 173 | CreatedOnToolsVersion = 7.3.1; 174 | }; 175 | }; 176 | }; 177 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 178 | compatibilityVersion = "Xcode 9.3"; 179 | developmentRegion = en; 180 | hasScannedForEncodings = 0; 181 | knownRegions = ( 182 | en, 183 | Base, 184 | ); 185 | mainGroup = 97C146E51CF9000F007C117D; 186 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 187 | projectDirPath = ""; 188 | projectRoot = ""; 189 | targets = ( 190 | 97C146ED1CF9000F007C117D /* Runner */, 191 | ); 192 | }; 193 | /* End PBXProject section */ 194 | 195 | /* Begin PBXResourcesBuildPhase section */ 196 | 97C146EC1CF9000F007C117D /* Resources */ = { 197 | isa = PBXResourcesBuildPhase; 198 | buildActionMask = 2147483647; 199 | files = ( 200 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 201 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 202 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 203 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 204 | ); 205 | runOnlyForDeploymentPostprocessing = 0; 206 | }; 207 | /* End PBXResourcesBuildPhase section */ 208 | 209 | /* Begin PBXShellScriptBuildPhase section */ 210 | 24BD2852163F98B8C8B94675 /* [CP] Check Pods Manifest.lock */ = { 211 | isa = PBXShellScriptBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | ); 215 | inputFileListPaths = ( 216 | ); 217 | inputPaths = ( 218 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 219 | "${PODS_ROOT}/Manifest.lock", 220 | ); 221 | name = "[CP] Check Pods Manifest.lock"; 222 | outputFileListPaths = ( 223 | ); 224 | outputPaths = ( 225 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | shellPath = /bin/sh; 229 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 230 | showEnvVarsInLog = 0; 231 | }; 232 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 233 | isa = PBXShellScriptBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | ); 237 | inputPaths = ( 238 | ); 239 | name = "Thin Binary"; 240 | outputPaths = ( 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | shellPath = /bin/sh; 244 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 245 | }; 246 | 9740EEB61CF901F6004384FC /* Run Script */ = { 247 | isa = PBXShellScriptBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | ); 251 | inputPaths = ( 252 | ); 253 | name = "Run Script"; 254 | outputPaths = ( 255 | ); 256 | runOnlyForDeploymentPostprocessing = 0; 257 | shellPath = /bin/sh; 258 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 259 | }; 260 | D5BA8E18AAE9433F335AA9CD /* [CP] Copy Pods Resources */ = { 261 | isa = PBXShellScriptBuildPhase; 262 | buildActionMask = 2147483647; 263 | files = ( 264 | ); 265 | inputFileListPaths = ( 266 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", 267 | ); 268 | name = "[CP] Copy Pods Resources"; 269 | outputFileListPaths = ( 270 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", 271 | ); 272 | runOnlyForDeploymentPostprocessing = 0; 273 | shellPath = /bin/sh; 274 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; 275 | showEnvVarsInLog = 0; 276 | }; 277 | /* End PBXShellScriptBuildPhase section */ 278 | 279 | /* Begin PBXSourcesBuildPhase section */ 280 | 97C146EA1CF9000F007C117D /* Sources */ = { 281 | isa = PBXSourcesBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 285 | 97C146F31CF9000F007C117D /* main.m in Sources */, 286 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 287 | ); 288 | runOnlyForDeploymentPostprocessing = 0; 289 | }; 290 | /* End PBXSourcesBuildPhase section */ 291 | 292 | /* Begin PBXVariantGroup section */ 293 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 294 | isa = PBXVariantGroup; 295 | children = ( 296 | 97C146FB1CF9000F007C117D /* Base */, 297 | ); 298 | name = Main.storyboard; 299 | sourceTree = ""; 300 | }; 301 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 302 | isa = PBXVariantGroup; 303 | children = ( 304 | 97C147001CF9000F007C117D /* Base */, 305 | ); 306 | name = LaunchScreen.storyboard; 307 | sourceTree = ""; 308 | }; 309 | /* End PBXVariantGroup section */ 310 | 311 | /* Begin XCBuildConfiguration section */ 312 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 313 | isa = XCBuildConfiguration; 314 | buildSettings = { 315 | ALWAYS_SEARCH_USER_PATHS = NO; 316 | CLANG_ANALYZER_NONNULL = YES; 317 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 318 | CLANG_CXX_LIBRARY = "libc++"; 319 | CLANG_ENABLE_MODULES = YES; 320 | CLANG_ENABLE_OBJC_ARC = YES; 321 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 322 | CLANG_WARN_BOOL_CONVERSION = YES; 323 | CLANG_WARN_COMMA = YES; 324 | CLANG_WARN_CONSTANT_CONVERSION = YES; 325 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 326 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 327 | CLANG_WARN_EMPTY_BODY = YES; 328 | CLANG_WARN_ENUM_CONVERSION = YES; 329 | CLANG_WARN_INFINITE_RECURSION = YES; 330 | CLANG_WARN_INT_CONVERSION = YES; 331 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 332 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 333 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 334 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 335 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 336 | CLANG_WARN_STRICT_PROTOTYPES = YES; 337 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 338 | CLANG_WARN_UNREACHABLE_CODE = YES; 339 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 340 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 341 | COPY_PHASE_STRIP = NO; 342 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 343 | ENABLE_NS_ASSERTIONS = NO; 344 | ENABLE_STRICT_OBJC_MSGSEND = YES; 345 | GCC_C_LANGUAGE_STANDARD = gnu99; 346 | GCC_NO_COMMON_BLOCKS = YES; 347 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 348 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 349 | GCC_WARN_UNDECLARED_SELECTOR = YES; 350 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 351 | GCC_WARN_UNUSED_FUNCTION = YES; 352 | GCC_WARN_UNUSED_VARIABLE = YES; 353 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 354 | MTL_ENABLE_DEBUG_INFO = NO; 355 | SDKROOT = iphoneos; 356 | SUPPORTED_PLATFORMS = iphoneos; 357 | TARGETED_DEVICE_FAMILY = "1,2"; 358 | VALIDATE_PRODUCT = YES; 359 | }; 360 | name = Profile; 361 | }; 362 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 363 | isa = XCBuildConfiguration; 364 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 365 | buildSettings = { 366 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 367 | CURRENT_PROJECT_VERSION = 1000000; 368 | DEVELOPMENT_TEAM = LUDVB6Z3BS; 369 | ENABLE_BITCODE = NO; 370 | INFOPLIST_FILE = Runner/Info.plist; 371 | LD_RUNPATH_SEARCH_PATHS = ( 372 | "$(inherited)", 373 | "@executable_path/Frameworks", 374 | ); 375 | PRODUCT_BUNDLE_IDENTIFIER = com.applovin.enterprise.apps.demoapp; 376 | PRODUCT_NAME = "$(TARGET_NAME)"; 377 | VERSIONING_SYSTEM = "apple-generic"; 378 | }; 379 | name = Profile; 380 | }; 381 | 97C147031CF9000F007C117D /* Debug */ = { 382 | isa = XCBuildConfiguration; 383 | buildSettings = { 384 | ALWAYS_SEARCH_USER_PATHS = NO; 385 | CLANG_ANALYZER_NONNULL = YES; 386 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 387 | CLANG_CXX_LIBRARY = "libc++"; 388 | CLANG_ENABLE_MODULES = YES; 389 | CLANG_ENABLE_OBJC_ARC = YES; 390 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 391 | CLANG_WARN_BOOL_CONVERSION = YES; 392 | CLANG_WARN_COMMA = YES; 393 | CLANG_WARN_CONSTANT_CONVERSION = YES; 394 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 395 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 396 | CLANG_WARN_EMPTY_BODY = YES; 397 | CLANG_WARN_ENUM_CONVERSION = YES; 398 | CLANG_WARN_INFINITE_RECURSION = YES; 399 | CLANG_WARN_INT_CONVERSION = YES; 400 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 401 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 402 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 403 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 404 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 405 | CLANG_WARN_STRICT_PROTOTYPES = YES; 406 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 407 | CLANG_WARN_UNREACHABLE_CODE = YES; 408 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 409 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 410 | COPY_PHASE_STRIP = NO; 411 | DEBUG_INFORMATION_FORMAT = dwarf; 412 | ENABLE_STRICT_OBJC_MSGSEND = YES; 413 | ENABLE_TESTABILITY = YES; 414 | GCC_C_LANGUAGE_STANDARD = gnu99; 415 | GCC_DYNAMIC_NO_PIC = NO; 416 | GCC_NO_COMMON_BLOCKS = YES; 417 | GCC_OPTIMIZATION_LEVEL = 0; 418 | GCC_PREPROCESSOR_DEFINITIONS = ( 419 | "DEBUG=1", 420 | "$(inherited)", 421 | ); 422 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 423 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 424 | GCC_WARN_UNDECLARED_SELECTOR = YES; 425 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 426 | GCC_WARN_UNUSED_FUNCTION = YES; 427 | GCC_WARN_UNUSED_VARIABLE = YES; 428 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 429 | MTL_ENABLE_DEBUG_INFO = YES; 430 | ONLY_ACTIVE_ARCH = YES; 431 | SDKROOT = iphoneos; 432 | TARGETED_DEVICE_FAMILY = "1,2"; 433 | }; 434 | name = Debug; 435 | }; 436 | 97C147041CF9000F007C117D /* Release */ = { 437 | isa = XCBuildConfiguration; 438 | buildSettings = { 439 | ALWAYS_SEARCH_USER_PATHS = NO; 440 | CLANG_ANALYZER_NONNULL = YES; 441 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 442 | CLANG_CXX_LIBRARY = "libc++"; 443 | CLANG_ENABLE_MODULES = YES; 444 | CLANG_ENABLE_OBJC_ARC = YES; 445 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 446 | CLANG_WARN_BOOL_CONVERSION = YES; 447 | CLANG_WARN_COMMA = YES; 448 | CLANG_WARN_CONSTANT_CONVERSION = YES; 449 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 450 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 451 | CLANG_WARN_EMPTY_BODY = YES; 452 | CLANG_WARN_ENUM_CONVERSION = YES; 453 | CLANG_WARN_INFINITE_RECURSION = YES; 454 | CLANG_WARN_INT_CONVERSION = YES; 455 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 456 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 457 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 458 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 459 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 460 | CLANG_WARN_STRICT_PROTOTYPES = YES; 461 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 462 | CLANG_WARN_UNREACHABLE_CODE = YES; 463 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 464 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 465 | COPY_PHASE_STRIP = NO; 466 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 467 | ENABLE_NS_ASSERTIONS = NO; 468 | ENABLE_STRICT_OBJC_MSGSEND = YES; 469 | GCC_C_LANGUAGE_STANDARD = gnu99; 470 | GCC_NO_COMMON_BLOCKS = YES; 471 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 472 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 473 | GCC_WARN_UNDECLARED_SELECTOR = YES; 474 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 475 | GCC_WARN_UNUSED_FUNCTION = YES; 476 | GCC_WARN_UNUSED_VARIABLE = YES; 477 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 478 | MTL_ENABLE_DEBUG_INFO = NO; 479 | SDKROOT = iphoneos; 480 | SUPPORTED_PLATFORMS = iphoneos; 481 | TARGETED_DEVICE_FAMILY = "1,2"; 482 | VALIDATE_PRODUCT = YES; 483 | }; 484 | name = Release; 485 | }; 486 | 97C147061CF9000F007C117D /* Debug */ = { 487 | isa = XCBuildConfiguration; 488 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 489 | buildSettings = { 490 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 491 | CURRENT_PROJECT_VERSION = 1000000; 492 | DEVELOPMENT_TEAM = LUDVB6Z3BS; 493 | ENABLE_BITCODE = NO; 494 | INFOPLIST_FILE = Runner/Info.plist; 495 | LD_RUNPATH_SEARCH_PATHS = ( 496 | "$(inherited)", 497 | "@executable_path/Frameworks", 498 | ); 499 | PRODUCT_BUNDLE_IDENTIFIER = com.applovin.enterprise.apps.demoapp; 500 | PRODUCT_NAME = "$(TARGET_NAME)"; 501 | VERSIONING_SYSTEM = "apple-generic"; 502 | }; 503 | name = Debug; 504 | }; 505 | 97C147071CF9000F007C117D /* Release */ = { 506 | isa = XCBuildConfiguration; 507 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 508 | buildSettings = { 509 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 510 | CURRENT_PROJECT_VERSION = 1000000; 511 | DEVELOPMENT_TEAM = LUDVB6Z3BS; 512 | ENABLE_BITCODE = NO; 513 | INFOPLIST_FILE = Runner/Info.plist; 514 | LD_RUNPATH_SEARCH_PATHS = ( 515 | "$(inherited)", 516 | "@executable_path/Frameworks", 517 | ); 518 | PRODUCT_BUNDLE_IDENTIFIER = com.applovin.enterprise.apps.demoapp; 519 | PRODUCT_NAME = "$(TARGET_NAME)"; 520 | VERSIONING_SYSTEM = "apple-generic"; 521 | }; 522 | name = Release; 523 | }; 524 | /* End XCBuildConfiguration section */ 525 | 526 | /* Begin XCConfigurationList section */ 527 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 528 | isa = XCConfigurationList; 529 | buildConfigurations = ( 530 | 97C147031CF9000F007C117D /* Debug */, 531 | 97C147041CF9000F007C117D /* Release */, 532 | 249021D3217E4FDB00AE95B9 /* Profile */, 533 | ); 534 | defaultConfigurationIsVisible = 0; 535 | defaultConfigurationName = Release; 536 | }; 537 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 538 | isa = XCConfigurationList; 539 | buildConfigurations = ( 540 | 97C147061CF9000F007C117D /* Debug */, 541 | 97C147071CF9000F007C117D /* Release */, 542 | 249021D4217E4FDB00AE95B9 /* Profile */, 543 | ); 544 | defaultConfigurationIsVisible = 0; 545 | defaultConfigurationName = Release; 546 | }; 547 | /* End XCConfigurationList section */ 548 | }; 549 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 550 | } 551 | -------------------------------------------------------------------------------- /applovin_max/lib/applovin_max.dart: -------------------------------------------------------------------------------- 1 | import 'package:applovin_max/src/ad_classes.dart'; 2 | import 'package:applovin_max/src/ad_listeners.dart'; 3 | import 'package:applovin_max/src/enums.dart'; 4 | import 'package:applovin_max/src/targeting_data.dart'; 5 | import 'package:flutter/services.dart'; 6 | 7 | export 'package:applovin_max/src/ad_classes.dart'; 8 | export 'package:applovin_max/src/ad_listeners.dart'; 9 | export 'package:applovin_max/src/enums.dart'; 10 | export 'package:applovin_max/src/targeting_data.dart'; 11 | export 'package:applovin_max/src/max_ad_view.dart'; 12 | 13 | /// Represents the AppLovin SDK. 14 | class AppLovinMAX { 15 | /// The current version of the SDK. 16 | static const version = "2.3.2"; 17 | 18 | /// @nodoc 19 | static MethodChannel channel = const MethodChannel('applovin_max'); 20 | 21 | /// The targeting data object for you to provide user or app data that will improve how we target ads. 22 | static final TargetingData targetingData = TargetingData(channel); 23 | 24 | static AdViewAdListener? _bannerAdListener; 25 | static AdViewAdListener? _mrecAdListener; 26 | static InterstitialListener? _interstitialListener; 27 | static RewardedAdListener? _rewardedAdListener; 28 | static AppOpenAdListener? _appOpenAdListener; 29 | 30 | /// @nodoc 31 | /// 32 | /// Disabled dartdoc. 33 | AppLovinMAX() ; 34 | 35 | /// Initializes the SDK. 36 | /// 37 | /// [Initialize the SDK](https://dash.applovin.com/documentation/mediation/flutter/getting-started/integration#initialize-the-sdk) 38 | static Future initialize(String sdkKey) { 39 | channel.setMethodCallHandler((MethodCall call) async { 40 | var method = call.method; 41 | var arguments = call.arguments; 42 | 43 | var adUnitId = arguments["adUnitId"]; 44 | 45 | /// Banner Ad Events 46 | if ("OnBannerAdLoadedEvent" == method) { 47 | _bannerAdListener?.onAdLoadedCallback(createAd(adUnitId, arguments)); 48 | } else if ("OnBannerAdLoadFailedEvent" == method) { 49 | _bannerAdListener?.onAdLoadFailedCallback(adUnitId, createError(arguments)); 50 | } else if ("OnBannerAdClickedEvent" == method) { 51 | _bannerAdListener?.onAdClickedCallback(createAd(adUnitId, arguments)); 52 | } else if ("OnBannerAdExpandedEvent" == method) { 53 | _bannerAdListener?.onAdExpandedCallback(createAd(adUnitId, arguments)); 54 | } else if ("OnBannerAdCollapsedEvent" == method) { 55 | _bannerAdListener?.onAdCollapsedCallback(createAd(adUnitId, arguments)); 56 | } else if ("OnBannerAdRevenuePaid" == method) { 57 | _bannerAdListener?.onAdRevenuePaidCallback?.call(createAd(adUnitId, arguments)); 58 | } 59 | 60 | /// MREC Ad Events 61 | else if ("OnMRecAdLoadedEvent" == method) { 62 | _mrecAdListener?.onAdLoadedCallback(createAd(adUnitId, arguments)); 63 | } else if ("OnMRecAdLoadFailedEvent" == method) { 64 | _mrecAdListener?.onAdLoadFailedCallback(adUnitId, createError(arguments)); 65 | } else if ("OnMRecAdClickedEvent" == method) { 66 | _mrecAdListener?.onAdClickedCallback(createAd(adUnitId, arguments)); 67 | } else if ("OnMRecAdExpandedEvent" == method) { 68 | _mrecAdListener?.onAdExpandedCallback(createAd(adUnitId, arguments)); 69 | } else if ("OnMRecAdCollapsedEvent" == method) { 70 | _mrecAdListener?.onAdCollapsedCallback(createAd(adUnitId, arguments)); 71 | } else if ("OnMRecAdRevenuePaid" == method) { 72 | _mrecAdListener?.onAdRevenuePaidCallback?.call(createAd(adUnitId, arguments)); 73 | } 74 | 75 | /// Interstitial Ad Events 76 | else if ("OnInterstitialLoadedEvent" == method) { 77 | _interstitialListener?.onAdLoadedCallback.call(createAd(adUnitId, arguments)); 78 | } else if ("OnInterstitialLoadFailedEvent" == method) { 79 | _interstitialListener?.onAdLoadFailedCallback(adUnitId, createError(arguments)); 80 | } else if ("OnInterstitialClickedEvent" == method) { 81 | _interstitialListener?.onAdClickedCallback.call(createAd(adUnitId, arguments)); 82 | } else if ("OnInterstitialDisplayedEvent" == method) { 83 | _interstitialListener?.onAdDisplayedCallback.call(createAd(adUnitId, arguments)); 84 | } else if ("OnInterstitialAdFailedToDisplayEvent" == method) { 85 | _interstitialListener?.onAdDisplayFailedCallback(createAd(adUnitId, arguments), createError(arguments)); 86 | } else if ("OnInterstitialHiddenEvent" == method) { 87 | _interstitialListener?.onAdHiddenCallback.call(createAd(adUnitId, arguments)); 88 | } else if ("OnInterstitialAdRevenuePaid" == method) { 89 | _interstitialListener?.onAdRevenuePaidCallback?.call(createAd(adUnitId, arguments)); 90 | } 91 | 92 | /// Rewarded Ad Events 93 | else if ("OnRewardedAdLoadedEvent" == method) { 94 | _rewardedAdListener?.onAdLoadedCallback.call(createAd(adUnitId, arguments)); 95 | } else if ("OnRewardedAdLoadFailedEvent" == method) { 96 | _rewardedAdListener?.onAdLoadFailedCallback(adUnitId, createError(arguments)); 97 | } else if ("OnRewardedAdClickedEvent" == method) { 98 | _rewardedAdListener?.onAdClickedCallback.call(createAd(adUnitId, arguments)); 99 | } else if ("OnRewardedAdDisplayedEvent" == method) { 100 | _rewardedAdListener?.onAdDisplayedCallback.call(createAd(adUnitId, arguments)); 101 | } else if ("OnRewardedAdFailedToDisplayEvent" == method) { 102 | _rewardedAdListener?.onAdDisplayFailedCallback(createAd(adUnitId, arguments), createError(arguments)); 103 | } else if ("OnRewardedAdHiddenEvent" == method) { 104 | _rewardedAdListener?.onAdHiddenCallback.call(createAd(adUnitId, arguments)); 105 | } else if ("OnRewardedAdReceivedRewardEvent" == method) { 106 | var reward = MaxReward(arguments["rewardAmount"], arguments["rewardLabel"]); 107 | _rewardedAdListener?.onAdReceivedRewardCallback(createAd(adUnitId, arguments), reward); 108 | } else if ("OnRewardedAdRevenuePaid" == method) { 109 | _rewardedAdListener?.onAdRevenuePaidCallback?.call(createAd(adUnitId, arguments)); 110 | } 111 | 112 | /// App Open Ad Events 113 | else if ("OnAppOpenAdLoadedEvent" == method) { 114 | _appOpenAdListener?.onAdLoadedCallback.call(createAd(adUnitId, arguments)); 115 | } else if ("OnAppOpenAdLoadFailedEvent" == method) { 116 | _appOpenAdListener?.onAdLoadFailedCallback(adUnitId, createError(arguments)); 117 | } else if ("OnAppOpenAdClickedEvent" == method) { 118 | _appOpenAdListener?.onAdClickedCallback.call(createAd(adUnitId, arguments)); 119 | } else if ("OnAppOpenAdDisplayedEvent" == method) { 120 | _appOpenAdListener?.onAdDisplayedCallback.call(createAd(adUnitId, arguments)); 121 | } else if ("OnAppOpenAdFailedToDisplayEvent" == method) { 122 | _appOpenAdListener?.onAdDisplayFailedCallback(createAd(adUnitId, arguments), createError(arguments)); 123 | } else if ("OnAppOpenAdHiddenEvent" == method) { 124 | _appOpenAdListener?.onAdHiddenCallback.call(createAd(adUnitId, arguments)); 125 | } else if ("OnAppOpenAdRevenuePaid" == method) { 126 | _appOpenAdListener?.onAdRevenuePaidCallback?.call(createAd(adUnitId, arguments)); 127 | } 128 | }); 129 | 130 | return channel.invokeMethod('initialize', { 131 | 'plugin_version': version, 132 | 'sdk_key': sdkKey, 133 | }); 134 | } 135 | 136 | /// @nodoc 137 | static MaxAd createAd(String adUnitId, dynamic arguments) { 138 | return MaxAd( 139 | adUnitId, 140 | arguments["networkName"], 141 | arguments["revenue"], 142 | arguments["creativeId"], 143 | arguments["dspName"], 144 | arguments["placement"], 145 | Map.from(arguments["waterfall"]), 146 | ); 147 | } 148 | 149 | /// @nodoc 150 | static MaxError createError(dynamic arguments) { 151 | return MaxError( 152 | arguments["errorCode"], 153 | arguments["errorMessage"], 154 | Map.from(arguments["waterfall"]), 155 | ); 156 | } 157 | 158 | /// Checks if the SDK has fully been initialized without errors. 159 | static Future isInitialized() { 160 | return channel.invokeMethod('isInitialized'); 161 | } 162 | 163 | /// Displays the Mediation Debugger. 164 | /// 165 | /// Mediation Debugger is a suite of testing tools. 166 | /// These tools help you integrate and launch faster with MAX. 167 | /// You can use them to confirm the validity of network integrations. 168 | /// This ensures that you can successfully load and show ads, among other things. 169 | /// 170 | /// [Mediation Debugger](https://dash.applovin.com/documentation/mediation/flutter/testing-networks/mediation-debugger) 171 | static void showMediationDebugger() { 172 | channel.invokeMethod('showMediationDebugger'); 173 | } 174 | 175 | // 176 | // PRIVACY APIs 177 | // 178 | 179 | /// Returns an integer that encodes the state of the consent dialog. 180 | /// 181 | /// To learn more about how this information is encoded in the integer, see [ConsentDialogState]. 182 | /// 183 | /// [Consent Flags in GDPR and Other Regions](https://dash.applovin.com/documentation/mediation/flutter/getting-started/privacy#consent-flags-in-gdpr-and-other-regions) 184 | static Future getConsentDialogState() { 185 | return channel.invokeMethod('getConsentDialogState'); 186 | } 187 | 188 | /// Sets whether or not the user has provided consent for interest-based advertising. 189 | /// 190 | /// [Consent Flags in GDPR and Other Regions](https://dash.applovin.com/documentation/mediation/flutter/getting-started/privacy#consent-flags-in-gdpr-and-other-regions) 191 | static void setHasUserConsent(bool hasUserConsent) { 192 | channel.invokeMethod('setHasUserConsent', { 193 | 'value': hasUserConsent, 194 | }); 195 | } 196 | 197 | /// Checks if the user has set a consent flag. 198 | /// 199 | /// [Consent Flags in GDPR and Other Regions](https://dash.applovin.com/documentation/mediation/flutter/getting-started/privacy#consent-flags-in-gdpr-and-other-regions) 200 | static Future hasUserConsent() { 201 | return channel.invokeMethod('hasUserConsent'); 202 | } 203 | 204 | /// Marks the user as age-restricted. 205 | /// 206 | /// [Prohibition on Personal Information from Children](https://dash.applovin.com/documentation/mediation/flutter/getting-started/privacy#prohibition-on-personal-information-from-children) 207 | static void setIsAgeRestrictedUser(bool isAgeRestrictedUser) { 208 | channel.invokeMethod('setIsAgeRestrictedUser', { 209 | 'value': isAgeRestrictedUser, 210 | }); 211 | } 212 | 213 | /// Checks if the user is age-restricted. 214 | /// 215 | /// [Prohibition on Personal Information from Children](https://dash.applovin.com/documentation/mediation/flutter/getting-started/privacy#prohibition-on-personal-information-from-children) 216 | static Future isAgeRestrictedUser() { 217 | return channel.invokeMethod('isAgeRestrictedUser'); 218 | } 219 | 220 | /// Sets true to indicate that the user has opted out of interest-based advertising. 221 | /// 222 | /// Or, sets false to indicate that the user has not opted out of interest-based advertising. 223 | /// 224 | /// [California Consumer Privacy Act (“CCPA”)](https://dash.applovin.com/documentation/mediation/flutter/getting-started/privacy#california-consumer-privacy-act-(%E2%80%9Cccpa%E2%80%9D)) 225 | static void setDoNotSell(bool isDoNotSell) { 226 | channel.invokeMethod('setDoNotSell', { 227 | 'value': isDoNotSell, 228 | }); 229 | } 230 | 231 | /// Returns true if the user has opted out of interest-based advertising. 232 | /// 233 | /// Or, returns false if the user has not opted out of interest-based advertising. 234 | /// 235 | /// [California Consumer Privacy Act (“CCPA”)](https://dash.applovin.com/documentation/mediation/flutter/getting-started/privacy#california-consumer-privacy-act-(%E2%80%9Cccpa%E2%80%9D)) 236 | static Future isDoNotSell() { 237 | return channel.invokeMethod('isDoNotSell'); 238 | } 239 | 240 | // 241 | // GENERAL PUBLIC API 242 | // 243 | 244 | /// Sets the internal user ID for the current user to a string value of your choice. 245 | /// 246 | /// MAX passes this internal user ID back to you via the {USER_ID} macro in its MAX S2S Rewarded Callback requests. 247 | /// 248 | /// [Setting an Internal User ID](https://dash.applovin.com/documentation/mediation/s2s-rewarded-callback-api#setting-an-internal-user-id) 249 | static void setUserId(String userId) { 250 | channel.invokeMethod('setUserId', { 251 | 'value': userId, 252 | }); 253 | } 254 | 255 | /// Sets whether to begin video ads in a muted state or not. 256 | /// 257 | /// Note that this functionality is not available for all networks. 258 | /// 259 | /// [Mute Audio](https://dash.applovin.com/documentation/mediation/flutter/getting-started/advanced-settings#mute-audio) 260 | static void setMuted(bool muted) { 261 | channel.invokeMethod('setMuted', { 262 | 'value': muted, 263 | }); 264 | } 265 | 266 | /// Enables verbose logging for the SDK. 267 | /// 268 | /// [Enable Verbose Logging](https://dash.applovin.com/documentation/mediation/flutter/getting-started/advanced-settings#enable-verbose-logging) 269 | static void setVerboseLogging(bool enabled) { 270 | channel.invokeMethod('setVerboseLogging', { 271 | 'value': enabled, 272 | }); 273 | } 274 | 275 | /// Whether the creative debugger will be displayed on fullscreen ads after flipping the device screen down twice. Defaults to true. 276 | /// 277 | /// [Enable Creative Debugger](https://dash.applovin.com/documentation/mediation/flutter/testing-networks/creative-debugger) 278 | static void setCreativeDebuggerEnabled(bool enabled) { 279 | channel.invokeMethod('setCreativeDebuggerEnabled', { 280 | 'value': enabled, 281 | }); 282 | } 283 | 284 | /// @nodoc 285 | static void setTestDeviceAdvertisingIds(List advertisingIdentifiers) { 286 | channel.invokeMethod('setTestDeviceAdvertisingIds', { 287 | 'value': advertisingIdentifiers, 288 | }); 289 | } 290 | 291 | /// Whether or not the AppLovin SDK will collect the device location. Defaults to true. 292 | /// 293 | /// [Location Passing](https://dash.applovin.com/documentation/mediation/flutter/getting-started/data-passing#location-passing) 294 | static void setLocationCollectionEnabled(bool enabled) { 295 | channel.invokeMethod('setLocationCollectionEnabled', { 296 | 'value': enabled, 297 | }); 298 | } 299 | 300 | // 301 | // BANNERS 302 | // 303 | 304 | /// Sets an [AdViewAdListener] listener with which you can receive notifications about ad events. 305 | static void setBannerListener(AdViewAdListener listener) { 306 | _bannerAdListener = listener; 307 | } 308 | 309 | /// Creates a banner using your [adUnitId] at the specified [AdViewPosition] position. 310 | /// 311 | /// [Creating a Banner](https://dash.applovin.com/documentation/mediation/flutter/getting-started/banners#creating-a-banner) 312 | static void createBanner(String adUnitId, AdViewPosition position) { 313 | channel.invokeMethod('createBanner', { 314 | 'ad_unit_id': adUnitId, 315 | 'position': position.value, 316 | }); 317 | } 318 | 319 | /// Sets a background color for the banner with the specified [adUnitId]. 320 | /// 321 | /// Only hex strings ('#xxxxxx') are accepted. 322 | static void setBannerBackgroundColor(String adUnitId, String hexColorCodeString) { 323 | channel.invokeMethod('setBannerBackgroundColor', { 324 | 'ad_unit_id': adUnitId, 325 | 'hex_color_code': hexColorCodeString, 326 | }); 327 | } 328 | 329 | /// Sets an ad placement name for the banner with the specified [adUnitId]. 330 | /// 331 | /// [Setting an Ad Placement Name](https://dash.applovin.com/documentation/mediation/features/s2s-impression-revenue-api#setting-an-ad-placement-name) 332 | static void setBannerPlacement(String adUnitId, String placement) { 333 | channel.invokeMethod('setBannerPlacement', { 334 | 'ad_unit_id': adUnitId, 335 | 'placement': placement, 336 | }); 337 | } 338 | 339 | /// Updates the banner position with the specified [adUnitId]. 340 | static void updateBannerPosition(String adUnitId, AdViewPosition position) { 341 | channel.invokeMethod('updateBannerPosition', { 342 | 'ad_unit_id': adUnitId, 343 | 'position': position.value, 344 | }); 345 | } 346 | 347 | /// Sets an extra parameter to the banner with the specified [adUnitId]. 348 | /// 349 | /// For example, pass "adaptive_banner" and "false" to this method as the key/value pair 350 | /// to disable Adaptive Banners for the specified [adUnitId. 351 | /// 352 | /// [Adaptive Banners](https://dash.applovin.com/documentation/mediation/flutter/getting-started/banners#adaptive-banners) 353 | static void setBannerExtraParameter(String adUnitId, String key, String value) { 354 | channel.invokeMethod('setBannerExtraParameter', { 355 | 'ad_unit_id': adUnitId, 356 | 'key': key, 357 | 'value': value, 358 | }); 359 | } 360 | 361 | /// Shows the banner with the specified [adUnitId]. 362 | /// 363 | /// [Displaying a Banner](https://dash.applovin.com/documentation/mediation/flutter/getting-started/banners#displaying-a-banner) 364 | static void showBanner(String adUnitId) { 365 | channel.invokeMethod('showBanner', { 366 | 'ad_unit_id': adUnitId, 367 | }); 368 | } 369 | 370 | /// Hides the banner with the specified [adUnitId]. 371 | /// 372 | /// [Displaying a Banner](https://dash.applovin.com/documentation/mediation/flutter/getting-started/banners#displaying-a-banner) 373 | static void hideBanner(String adUnitId) { 374 | channel.invokeMethod('hideBanner', { 375 | 'ad_unit_id': adUnitId, 376 | }); 377 | } 378 | 379 | /// Cleans up system resources allocated for the banner. 380 | static void destroyBanner(String adUnitId) { 381 | channel.invokeMethod('destroyBanner', { 382 | 'ad_unit_id': adUnitId, 383 | }); 384 | } 385 | 386 | // 387 | // MRECs 388 | // 389 | 390 | /// Sets an [AdViewAdListener] listener with which you can receive notifications about ad events. 391 | static void setMRecListener(AdViewAdListener listener) { 392 | _mrecAdListener = listener; 393 | } 394 | 395 | /// Creates an MREC using your [adUnitId] at the specified [AdViewPosition] position. 396 | /// 397 | /// [Programmatic Method](https://dash.applovin.com/documentation/mediation/flutter/getting-started/mrecs#programmatic-method) 398 | static void createMRec(String adUnitId, AdViewPosition position) { 399 | channel.invokeMethod('createMRec', { 400 | 'ad_unit_id': adUnitId, 401 | 'position': position.value, 402 | }); 403 | } 404 | 405 | /// Sets an ad placement name for the MREC with the specified [adUnitId]. 406 | /// 407 | /// [Setting an Ad Placement Name](https://dash.applovin.com/documentation/mediation/features/s2s-impression-revenue-api#setting-an-ad-placement-name) 408 | static void setMRecPlacement(String adUnitId, String placement) { 409 | channel.invokeMethod('setMRecPlacement', { 410 | 'ad_unit_id': adUnitId, 411 | 'placement': placement, 412 | }); 413 | } 414 | 415 | /// Updates the MREC position with the specified [adUnitId]. 416 | static void updateMRecPosition(String adUnitId, AdViewPosition position) { 417 | channel.invokeMethod('updateMRecPosition', { 418 | 'ad_unit_id': adUnitId, 419 | 'position': position.value, 420 | }); 421 | } 422 | 423 | /// Shows the MREC with the specified [adUnitId]. 424 | static void showMRec(String adUnitId) { 425 | channel.invokeMethod('showMRec', { 426 | 'ad_unit_id': adUnitId, 427 | }); 428 | } 429 | 430 | /// Hides the MREC with the specified [adUnitId]. 431 | static void hideMRec(String adUnitId) { 432 | channel.invokeMethod('hideMRec', { 433 | 'ad_unit_id': adUnitId, 434 | }); 435 | } 436 | 437 | /// Cleans up system resources allocated for the MREC. 438 | static void destroyMRec(String adUnitId) { 439 | channel.invokeMethod('destroyMRec', { 440 | 'ad_unit_id': adUnitId, 441 | }); 442 | } 443 | 444 | // 445 | // Interstitials 446 | // 447 | 448 | /// Sets an [InterstitialListener] listener with which you can receive notifications about ad events. 449 | static void setInterstitialListener(InterstitialListener listener) { 450 | _interstitialListener = listener; 451 | } 452 | 453 | /// Loads an interstitial ad using your [adUnitId]. 454 | /// 455 | /// [Loading an Interstitial Ad](https://dash.applovin.com/documentation/mediation/flutter/getting-started/interstitials#loading-an-interstitial-ad) 456 | static void loadInterstitial(String adUnitId) { 457 | channel.invokeMethod('loadInterstitial', { 458 | 'ad_unit_id': adUnitId, 459 | }); 460 | } 461 | 462 | /// Check if the ad is ready to be shown with the specified [adUnitId]. 463 | static Future isInterstitialReady(String adUnitId) { 464 | return channel.invokeMethod('isInterstitialReady', { 465 | 'ad_unit_id': adUnitId, 466 | }); 467 | } 468 | 469 | /// Shows the interstitial ad with the specified [adUnitId]. 470 | /// 471 | /// [Showing an Interstitial Ad](https://dash.applovin.com/documentation/mediation/flutter/getting-started/interstitials#showing-an-interstitial-ad) 472 | static void showInterstitial(String adUnitId, {placement, customData}) { 473 | channel.invokeMethod('showInterstitial', { 474 | 'ad_unit_id': adUnitId, 475 | 'placement': placement, 476 | 'custom_data': customData, 477 | }); 478 | } 479 | 480 | /// Sets an extra parameter to the interstitial ad with the specified [adUnitId]. 481 | static void setInterstitialExtraParameter(String adUnitId, String key, String value) { 482 | channel.invokeMethod('setInterstitialExtraParameter', { 483 | 'ad_unit_id': adUnitId, 484 | 'key': key, 485 | 'value': value, 486 | }); 487 | } 488 | 489 | // 490 | // Rewarded Ads 491 | // 492 | 493 | /// Sets a [RewardedAdListener] listener with which you can receive notifications about ad events. 494 | static void setRewardedAdListener(RewardedAdListener listener) { 495 | _rewardedAdListener = listener; 496 | } 497 | 498 | /// Loads a rewarded ad using your [adUnitId]. 499 | /// 500 | /// [Loading a Rewarded Ad](https://dash.applovin.com/documentation/mediation/flutter/getting-started/rewarded-ads#loading-a-rewarded-ad) 501 | static void loadRewardedAd(String adUnitId) { 502 | channel.invokeMethod('loadRewardedAd', { 503 | 'ad_unit_id': adUnitId, 504 | }); 505 | } 506 | 507 | /// Check if the ad is ready to be shown with the specified [adUnitId]. 508 | static Future isRewardedAdReady(String adUnitId) { 509 | return channel.invokeMethod('isRewardedAdReady', { 510 | 'ad_unit_id': adUnitId, 511 | }); 512 | } 513 | 514 | /// Shows the rewarded ad with the specified [adUnitId]. 515 | /// 516 | /// [Showing a Rewarded Ad](https://dash.applovin.com/documentation/mediation/flutter/getting-started/rewarded-ads#showing-a-rewarded-ad) 517 | static void showRewardedAd(String adUnitId, {placement, customData}) { 518 | channel.invokeMethod('showRewardedAd', { 519 | 'ad_unit_id': adUnitId, 520 | 'placement': placement, 521 | 'custom_data': customData, 522 | }); 523 | } 524 | 525 | /// Sets an extra parameter to the rewarded ad with the specified [adUnitId]. 526 | static void setRewardedAdExtraParameter(String adUnitId, String key, String value) { 527 | channel.invokeMethod('setRewardedAdExtraParameter', { 528 | 'ad_unit_id': adUnitId, 529 | 'key': key, 530 | 'value': value, 531 | }); 532 | } 533 | 534 | // 535 | // App Open Ad 536 | // 537 | 538 | /// Sets a [AppOpenAdListener] listener with which you can receive notifications about ad events. 539 | static void setAppOpenAdListener(AppOpenAdListener listener) { 540 | _appOpenAdListener = listener; 541 | } 542 | 543 | /// Check if the ad is ready to be shown with the specified [adUnitId]. 544 | static Future isAppOpenAdReady(String adUnitId) { 545 | return channel.invokeMethod('isAppOpenAdReady', { 546 | 'ad_unit_id': adUnitId, 547 | }); 548 | } 549 | 550 | /// Loads an app open ad using your [adUnitId]. 551 | static void loadAppOpenAd(String adUnitId) { 552 | channel.invokeMethod('loadAppOpenAd', { 553 | 'ad_unit_id': adUnitId, 554 | }); 555 | } 556 | 557 | /// Shows the app open ad with the specified [adUnitId]. 558 | static void showAppOpenAd(String adUnitId, {placement, customData}) { 559 | channel.invokeMethod('showAppOpenAd', { 560 | 'ad_unit_id': adUnitId, 561 | 'placement': placement, 562 | 'custom_data': customData, 563 | }); 564 | } 565 | 566 | /// Sets an extra parameter to the rewarded ad with the specified [adUnitId]. 567 | static void setAppOpenAdExtraParameter(String adUnitId, String key, String value) { 568 | channel.invokeMethod('setAppOpenAdExtraParameter', { 569 | 'ad_unit_id': adUnitId, 570 | 'key': key, 571 | 'value': value, 572 | }); 573 | } 574 | } 575 | --------------------------------------------------------------------------------