This commit is contained in:
Pavel Tikhonenko
2020-11-08 16:10:18 +03:00
parent 5438a00daf
commit 02fb917b54
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ public enum IARError: Error
case hashValidation
case signatureValidation(SignatureValidationFailureReason)
case bundleIdentifierVerification
case bundleVersionVefirication
case bundleVersionVerification
}
/// The underlying reason the signature validation error occurred.
+3 -3
View File
@@ -61,19 +61,19 @@ public extension InAppReceipt
guard let v = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String,
v == appVersion else
{
throw IARError.validationFailed(reason: .bundleVersionVefirication)
throw IARError.validationFailed(reason: .bundleVersionVerification)
}
#elseif os(iOS) || os(watchOS) || os(tvOS)
guard let v = Bundle.main.infoDictionary?["CFBundleVersion"] as? String,
v == appVersion else
{
throw IARError.validationFailed(reason: .bundleVersionVefirication)
throw IARError.validationFailed(reason: .bundleVersionVerification)
}
#elseif os(macOS)
guard let v = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String,
v == appVersion else
{
throw IARError.validationFailed(reason: .bundleVersionVefirication)
throw IARError.validationFailed(reason: .bundleVersionVerification)
}
#endif
#endif