Giter Site home page Giter Site logo

sethusenthil / is-pirated Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 4.0 76 KB

Check if your app is installed from an unauthorized source

Home Page: https://pub.dev/packages/is_pirated

License: MIT License

Kotlin 17.20% Ruby 18.97% Swift 12.54% Objective-C 5.95% Dart 45.34%
flutter dart pubdev piracy

is-pirated's Introduction

is_pirated ๐Ÿดโ€โ˜ ๏ธ

Pub Version

Check if your app is installed from an unauthorized source

On Android API 29 and below, uses Context.getInstallerPackageName()

On Android API 30 and above, uses PackageManager.getInstallSourceInfo()

On iOS, parses Bundle.main.appStoreReceiptURL

Installing

Add to your pubspec.yaml

dependencies:
  is_pirated: <version>

Example

IsPirated isPirated = await getIsPirated();

print(isPirated.status);
// false - (iOS) if installed from AppStore or TestFlight, (Android) if installed from PlayStore
// true - if installed without authorization or receipt (Via ABD, APK, IPA)

//full example
IsPirated isPirated = await getIsPirated(debugOverride: true, openStoreListing: true, appStoreId: '546532666', playStoreIdentifier: 'tikmoji.sethusenthil.com');
//debugOverride will disable installer integrity checking on debug mode (recommended setting after you finish setting up this lib!)
//openStoreListing will auto open your appstore or playstore listing depending on the platform

Options for .getIsPirated()

Name Description
debugOverride bool
Default set to false. Override unauthorized installation checking when on debug mode. Set this to true after configuring this library.
openStoreListing bool
Default set to false. Open the AppStore or PlayStore listing if isPirated.status = true. Must set appStoreId & playStoreIdentifier for this to take any effect on its respective platform.
appStoreId String
The AppStore App Id for your app so openStoreListing can open your store listing. You can find it in the url of your app: 'https://apps.apple.com/us/app/tikmoji/id**1546532666**' Must set openStoreListing true.
playStoreIdentifier String
The PlayStore App Store Identifier for your app so it can open your listing on the PlayStore. You can find this in your manifest or your PlayStore URL: https://play.google.com/store/apps/details?id=**com.sethusenthil.tikmoji**
closeApp bool
Default set to false. Closes and quits out of your app if isPirated.status = true. If openStoreListing is set to true, it will open your store listing before quitting. Note that getIsPirated() may not return a value if set to true because the Dart VM will likely be terminated before.

Credits

Inspired and heavely based on https://github.com/caiopo/flutter-installer-info

is-pirated's People

Contributors

sethusenthil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

is-pirated's Issues

Wrong README examples

Hello,

Just to tell you that the README shows wrong info

print(isPirated.status);
// true - (iOS) if installed from AppStore or TestFlight, (Android) if installed from PlayStore
// false - if installed without authorization or receipt (Via ABD, APK, IPA)

Compared to the source code

bool isItPirated = false;
//Return True if installed WITHOUT proper store autherositaion
//Retuns False if installed through proper app store

I guess false and true should be swapped.

Package Installer

for Android , Package Installer is currently not showing as isPirated even though it is not Google Play Store

so basically the plugin does not detect Install Source : Package Installer as an illegal installation source and gives isPirated.status false

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.