Override the Native In-App Payments SDK Dependency Version

September 9, 2021 ยท View on GitHub

The Flutter Plugin for In-App Payments SDK by default loads a specific version of iOS and Android In-App Payments SDK.

You can override the default In-App Payments SDK versions by following this guidance.

iOS

  1. Open the ios/Podfile file, add the $sqipVersion variable and specify your desired version.

    # Uncomment this line to define a global platform for your project
    platform :ios, '12.0'
    
    # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
    ENV['COCOAPODS_DISABLE_STATS'] = 'true'
    
    # specify the version of SquareInAppPaymentsSDK
    $sqipVersion = '1.7.1'
    
  2. Remove the ios/Podfile.lock and build your project again.

    rm ios/Podfile.lock
    flutter run
    

Android

  1. Open the android/build.gradle file, add the sqipVersion variable and specify your desired version.

    allprojects {
        repositories {
            google()
            jcenter()
        }
    }
    
    // add the override here
    ext {
        sqipVersion = '1.7.1'
    }
    
  2. Clean the build and build your project again.

    flutter clean
    flutter run