Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 60f1b27ec4 | |||
| 6f15dda97a | |||
| f7c3e26500 | |||
| 61794a63e3 |
@@ -1754,6 +1754,7 @@
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ideasoncanvas.AppReceiptValidator;
|
||||
PRODUCT_NAME = AppReceiptValidator;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
@@ -1786,6 +1787,7 @@
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ideasoncanvas.AppReceiptValidator;
|
||||
PRODUCT_NAME = AppReceiptValidator;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
|
||||
@@ -62,11 +62,14 @@ extension AppReceiptValidator.Parameters {
|
||||
|
||||
case installedInMainBundle
|
||||
case data(Data)
|
||||
case dynamic(() -> Data?)
|
||||
|
||||
public func loadData() -> Data? {
|
||||
switch self {
|
||||
case .data(let data):
|
||||
return data
|
||||
case .dynamic(let maker):
|
||||
return maker()
|
||||
case .installedInMainBundle:
|
||||
guard let receiptUrl = Bundle.main.appStoreReceiptURL else { return nil }
|
||||
guard (try? receiptUrl.checkResourceIsReachable()) ?? false else { return nil }
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
import AppReceiptValidator.OpenSSL
|
||||
import Foundation
|
||||
|
||||
// swiftlint:disable file_length
|
||||
|
||||
/// Apple guide: https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Introduction.html
|
||||
///
|
||||
/// Original inspiration for the Code: https://github.com/andrewcbancroft/SwiftyLocalReceiptValidator/blob/master/ReceiptValidator.swift
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[](https://github.com/Carthage/Carthage)
|
||||

|
||||

|
||||

|
||||
[](LICENSE)
|
||||
[](https://travis-ci.org/IdeasOnCanvas/AppReceiptValidator)
|
||||
[](https://twitter.com/hannesoid)
|
||||
|
||||
Reference in New Issue
Block a user