GitHub 저장소SethuSenthil/is-pirated

is-pirated

앱이 승인되지 않은 소스에서 설치되었는지 확인하세요

is-pirated 프로젝트 이미지
스타
9
포크
5
최근 푸시(UTC)
2023. 12. 12.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

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/id1546532666' 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

Sethu Narayan Senthil GitHub avatar
GitHub 작성자

Sethu Narayan Senthil ↗

PSU '25 • Full Stack Developer

CS @PennState & CEO of @Vibin-LLC™ & AI Engineer @IBMState College, PA
언어DartRubyKotlinSwiftObjective-C

분류

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개

  • url_launcher^6.1.2
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗