https://github.com/1998code/antifraudkit-for-swift
A Powerful Light-Weight Swift Toolkit to prevent Fraud Purchase (Side-load) and Jailbreak. Designed with SwiftUI.
https://github.com/1998code/antifraudkit-for-swift
Last synced: 7 months ago
JSON representation
A Powerful Light-Weight Swift Toolkit to prevent Fraud Purchase (Side-load) and Jailbreak. Designed with SwiftUI.
- Host: GitHub
- URL: https://github.com/1998code/antifraudkit-for-swift
- Owner: 1998code
- License: mit
- Created: 2022-12-25T12:07:54.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-21T17:32:06.000Z (over 2 years ago)
- Last Synced: 2025-05-27T11:09:35.868Z (8 months ago)
- Language: Swift
- Homepage:
- Size: 309 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# AntiFraudKit
[](https://github.com/1998code/AntiFraudKit-for-Swift/actions/workflows/swift.yml)
### 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



## 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.

### Major Usage
1. Import the framework
```swift
import AntiFraudKit
```
2. 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:
```swift
@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
```
3. Then, paste this code inside body or any some View.
```swift
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.
4. (Optional) If you wish to detect Jailbreak Status, be sure to add this key to ```Info.plist```

```xml
cydia
```
## Possible Conflict
If you use other sheets, e.g., SwiftNewKit, be sure to hide it before AntiFraudKit runs.
```swift
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
------------- | ------------
 | 
Ask for Signin | Login Error | Skip Alert on macOS
------------- | ------------ | -------------------
|
| 
## Demo
Path: `./Demo` (Xcode Project in SwiftUI)
## License
MIT