# Add PinchSDK

# Prerequisites

The following criterias must be fulfilled to implement the SDK:

  • Minimum iOS target: 9.0
  • Minimum Android SDK version: 15
  • Minimum Android compile version: 28
  • Java 8+
Latest Update Current Stable Release
February 08, 2022 2.1.0

# Add dependency

Add this to your package's pubspec.yaml file:

# Install flutter package

You can install packages from the command line with flutter:

$ flutter pub get
1

# Gradle configuration

# Enable Java 8 byte code

If your project is not targeting or compiled with Java 8+, you have to edit your applications build.gradle to do so:

# Android

IMPORTANT

A runtime exception will be thrown if API key is missing during application launch.

In AndroidManifest.xml, add the following element as a child of the <application> element, by inserting it just before the closing </application> tag:

If your project utilizies ProGuard, add the following exception to your ProGuard definition:

-keepclassmembers class com.fluxloop.pinch.core.model.** { *; }
1

# iOS

After running flutter pub get, navigate to your projects ios directory and install the pods imported by the PinchSDK package, and open your runner project:

$ cd ios
$ pod install
$ open Runner.xcworkspace
1
2
3

In your AppDelegate didFinishLaunchingWithOptions add the following method call:

Add bluetooth-central to your applications background modes. This allows us to scan for eddystone data without having access to users location.

# Import it

Now in your Dart code, you can use:

import 'package:pinch/pinch.dart';
1