Skip to content

Flutter Bidmad_Plugin 1.0.0 Migration Guide[ENG]

bidmad edited this page Mar 31, 2022 · 2 revisions

Flutter Bidmad_Plugin 1.0.0 Migration Guide


This document guides you how to update the Flutter bidmad_plugin from version 0.9.2 or lower to version 1.0.0.

Version 1.0.0 or above now supports the automated plugin registration.
Because of the automated plugin registration support, the manual plugin registration codes must be removed for proper plugin support. If you previously used Bidmad Plugin with version lower than 1.0.0, please follow the migration guide below.


Android

  1. Remove below syntax in build.gradle : app

    repositories {
         google()
         jcenter()
         maven { url "http://devrepo.kakao.com:8088/nexus/content/groups/public/" } //Adfit
         maven {
             url "s3://repo.cauly.net/releases"
             credentials(AwsCredentials) {
                 accessKey "AKIAWRZUK5MFKYVSUOLB"
                 secretKey "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"
             }
         } //Cauly
         maven { url "https://bidmad-sdk.s3.amazonaws.com/" } //bidmad
         maven { url "https://sdk.tapjoy.com/" } //Tapjoy
         maven { url "https://artifact.bytedance.com/repository/pangle" } //Pangle
         maven { url "https://jitpack.io" } //Adpie
     }
    
     dependencies {
         implementation 'com.adop.sdk:bidmad-androidx:1.14.2'
     }
     
  2. Remove FlutterCommon and BinaryMessenger declared in MainActivity.

    *version 0.9.2 or lower MainActivity Settings

     class MainActivity: FlutterActivity() {
         private var binaryMessenger: BinaryMessenger? = null //Removed when migrating to version 1.0.0.
         private var common : FlutterCommon? = null //Removed when migrating to version 1.0.0.
    
         override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
             GeneratedPluginRegistrant.registerWith(flutterEngine);
    
             binaryMessenger = flutterEngine.dartExecutor.binaryMessenger //Removed when migrating to version 1.0.0.
    
             common = FlutterCommon(this, flutterEngine) //Removed when migrating to version 1.0.0.
             common!!.initChannel(binaryMessenger) //Removed when migrating to version 1.0.0.
         }
     }
    

iOS

  1. Delete Podfile and Podfile.lock.
    Bidmad-Migration-Guide-Flutter
  2. Delete the registration codes in AppDelegate file, as below.
    Bidmad-Migration-Guide-Flutter
  3. Follow the import guide in the section 2.1 ~ 2.3 below.