Swiftpack.co - 1998code/AntiFraudKit-for-Swift as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by 1998code.
1998code/AntiFraudKit-for-Swift 2.5.1
A Powerful Light-Weight Swift Toolkit to prevent Fraud Purchase (Side-load) and Jailbreak. Designed with SwiftUI.
⭐️ 4
🕓 1 year ago
iOS macOS watchOS
.package(url: "https://github.com/1998code/AntiFraudKit-for-Swift.git", from: "2.5.1")

AntiFraudKit

Swift

Accelerated by Apple SwiftUI & StoreKit

Aims

Provide an easy integration and UI for Apple Developers to protect the copyright for their app.

Features

  • Check App Store Purchase Receipt
  • Temporary Skip Checking
  • Serverless Design
  • Anti-Jailbreak

Version

GitHub release (latest by date) GitHub release (latest by date including pre-releases)

Environment

Xcode Local

Tested on Latest Compatible
iOS 16 16
iPadOS 16 16
macOS 13 13

Get Started

Guide

Coming Soon 🤗

Basic Setup

Add https://github.com/1998code/AntiFraudKit-for-Swift to package and switch to main branch to get the latest development update. CleanShot 2022-12-26 at 11 21 07@2x

Major Usage

  1. Import the framework
import AntiFraudKit
  1. Add States before body or any some View.
State Type Default Remark
appStoreURL String "https://apps.apple.com/app/betterappicons/id1532627187" Suggest user to download via App Store
purchasedVersion String "" Return Purchased Version
purchasedDate String "" Return Purchased Version
maxSkip Int 3 Set Max Skip Times in case your user may not be able to verify at that moment
allowJailbreak Bool false Prevent user to tweak your app/game in a JB environment

Samples:

@State var appStoreURL: String = "https://apps.apple.com/app/betterappicons/id1532627187"
@State var purchasedVersion: String = ""
@State var purchasedDate: String = ""
@State var maxSkip: Int = 3
@State var allowJailbreak: Bool = false
  1. Then, paste this code inside body or any some View.
if #available(iOS 16, macOS 13, *) {
  ATFraud(appStoreURL: $appStoreURL, purchasedVersion: $purchasedVersion, purchasedDate: $purchasedDate, maxSkip: $maxSkip, allowJailbreak: $allowJailbreak)
}

Instead of using seperate states, inline binding works too.

  1. (Optional) If you wish to detect Jailbreak Status, be sure to add this key to Info.plist
CleanShot 2022-12-25 at 22 45 17@2x
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
	<string>cydia</string>
</array>
</plist>

Possible Conflict

If you use other sheets, e.g., SwiftNewKit, be sure to hide it before AntiFraudKit runs.

if (purchasedDate || purchasedVersion) {
  SwiftNEW(...
}
  • AntiFraudKit's show priority MUST always be higher than any other sheet!

Developer Note

  • Please report bugs in Issues section.
  • If you want to discuss future roadmap or contribution, please find on Discussions.

Preview

Light Dark
IMG_6A0BAFDBBAB2-2 IMG_6A0BAFDBBAB2-1
Ask for Signin Login Error Skip Alert on macOS
CleanShot 2022-12-25 at 21 46 46@2x CleanShot 2022-12-25 at 21 46 58@2x CleanShot 2022-12-25 at 22 11 39@2x

Demo

Path: ./Demo (Xcode Project in SwiftUI)

License

MIT

GitHub

link
Stars: 4
Last commit: 48 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics