This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.

The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Successful build of TPInAppReceipt with Swift 6.0 for macOS (SPM).

Swift 6 data race errors: 4

Build Command

env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete

Build Log

========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/tikhop/TPInAppReceipt.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/tikhop/TPInAppReceipt
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at e135055 Merge pull request #122 from tikhop/develop
Cloned https://github.com/tikhop/TPInAppReceipt.git
Revision (git rev-parse @):
e135055eaeba5a52874b7f9b290f42890cbe981f
SUCCESS checkout https://github.com/tikhop/TPInAppReceipt.git at master
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $workDir
https://github.com/tikhop/TPInAppReceipt.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/8] Write sources
[0/8] Copying PrivacyInfo.xcprivacy
[3/8] Write sources
[3/8] Copying AppleIncRootCertificate.cer
[5/8] Copying StoreKitTestCertificate.cer
[5/8] Copying PrivacyInfo.xcprivacy
[7/8] Write swift-version-6F35C1178C84523A.txt
[9/23] Compiling ASN1Swift ASN1Serialization.swift
[10/23] Compiling ASN1Swift ASN1Templates.swift
[11/24] Compiling ASN1Swift Foundation+ASN1Coder.swift
[12/24] Compiling ASN1Swift ASN1Decoder+Utils.swift
[13/24] Compiling ASN1Swift ASN1Decoder.swift
[14/24] Compiling ASN1Swift DecodingError+Extensions.swift
[15/24] Compiling ASN1Swift ASN1Types.swift
[16/24] Compiling ASN1Swift ASN1Decoder+Unboxing.swift
[17/24] Compiling ASN1Swift ASN1Decoder+UnkeyedDecodingContainer.swift
[18/24] Compiling ASN1Swift ASN1Decoder+KeyedDecodingContainer.swift
[19/24] Compiling ASN1Swift ASN1Decoder+SingleValueContainer.swift
[20/24] Emitting module ASN1Swift
[21/24] Compiling ASN1Swift PKCS7.swift
[22/24] Compiling ASN1Swift ASN1Coder.swift
[23/24] Compiling ASN1Swift ASN1Decoder+Extras.swift
[24/24] Compiling ASN1Swift resource_bundle_accessor.swift
[25/36] Compiling TPInAppReceipt Initialization.swift
[26/37] Compiling TPInAppReceipt resource_bundle_accessor.swift
[27/37] Compiling TPInAppReceipt InAppReceipt.swift
[28/37] Compiling TPInAppReceipt InAppReceipt+ASN1Decodable.swift
[29/37] Compiling TPInAppReceipt InAppReceiptPayload.swift
[30/37] Compiling TPInAppReceipt Validation.swift
[31/37] Compiling TPInAppReceipt Bundle+Extension.swift
[32/37] Compiling TPInAppReceipt Data+Extension.swift
[33/37] Compiling TPInAppReceipt Date+Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Date+Extension.swift:28:17: warning: var 'rfc3339DateFormatter' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
26 | }
27 |
28 | fileprivate var rfc3339DateFormatter: ISO8601DateFormatter = {
   |                 |- warning: var 'rfc3339DateFormatter' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
   |                 |- note: convert 'rfc3339DateFormatter' to a 'let' constant to make 'Sendable' shared state immutable
   |                 |- note: annotate 'rfc3339DateFormatter' with '@MainActor' if property should only be accessed from the main actor
   |                 `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
29 | 	let formatter = ISO8601DateFormatter()
30 | 	formatter.formatOptions = .withInternetDateTime
/Users/admin/builder/spi-builder-workspace/Sources/Extras.swift:15:17: warning: var 'refreshSession' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 13 |
 14 | @available(watchOSApplicationExtension 6.2, *)
 15 | fileprivate var refreshSession: RefreshSession?
    |                 |- warning: var 'refreshSession' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                 |- note: convert 'refreshSession' to a 'let' constant to make 'Sendable' shared state immutable
    |                 |- note: annotate 'refreshSession' with '@MainActor' if property should only be accessed from the main actor
    |                 `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 16 |
 17 | @available(tvOS 12.0, *)
/Users/admin/builder/spi-builder-workspace/Sources/Extras.swift:228:4: warning: capture of 'self' with non-sendable type 'RefreshSession?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
191 |
192 | @available(watchOSApplicationExtension 6.2, *)
193 | fileprivate class RefreshSession : NSObject, SKRequestDelegate
    |                   `- note: class 'RefreshSession' does not conform to the 'Sendable' protocol
194 | {
195 |     private let receiptRefreshRequest = SKReceiptRefreshRequest()
    :
226 |     {
227 |         DispatchQueue.main.async { [weak self] in
228 | 			self?.completion?(error)
    |    `- warning: capture of 'self' with non-sendable type 'RefreshSession?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
229 |         }
230 |         receiptRefreshRequest.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/Extras.swift:228:4: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
226 |     {
227 |         DispatchQueue.main.async { [weak self] in
228 | 			self?.completion?(error)
    |    |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |    `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
229 |         }
230 |         receiptRefreshRequest.cancel()
[34/37] Compiling TPInAppReceipt Extras.swift
/Users/admin/builder/spi-builder-workspace/Sources/Date+Extension.swift:28:17: warning: var 'rfc3339DateFormatter' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
26 | }
27 |
28 | fileprivate var rfc3339DateFormatter: ISO8601DateFormatter = {
   |                 |- warning: var 'rfc3339DateFormatter' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
   |                 |- note: convert 'rfc3339DateFormatter' to a 'let' constant to make 'Sendable' shared state immutable
   |                 |- note: annotate 'rfc3339DateFormatter' with '@MainActor' if property should only be accessed from the main actor
   |                 `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
29 | 	let formatter = ISO8601DateFormatter()
30 | 	formatter.formatOptions = .withInternetDateTime
/Users/admin/builder/spi-builder-workspace/Sources/Extras.swift:15:17: warning: var 'refreshSession' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 13 |
 14 | @available(watchOSApplicationExtension 6.2, *)
 15 | fileprivate var refreshSession: RefreshSession?
    |                 |- warning: var 'refreshSession' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                 |- note: convert 'refreshSession' to a 'let' constant to make 'Sendable' shared state immutable
    |                 |- note: annotate 'refreshSession' with '@MainActor' if property should only be accessed from the main actor
    |                 `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 16 |
 17 | @available(tvOS 12.0, *)
/Users/admin/builder/spi-builder-workspace/Sources/Extras.swift:228:4: warning: capture of 'self' with non-sendable type 'RefreshSession?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
191 |
192 | @available(watchOSApplicationExtension 6.2, *)
193 | fileprivate class RefreshSession : NSObject, SKRequestDelegate
    |                   `- note: class 'RefreshSession' does not conform to the 'Sendable' protocol
194 | {
195 |     private let receiptRefreshRequest = SKReceiptRefreshRequest()
    :
226 |     {
227 |         DispatchQueue.main.async { [weak self] in
228 | 			self?.completion?(error)
    |    `- warning: capture of 'self' with non-sendable type 'RefreshSession?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
229 |         }
230 |         receiptRefreshRequest.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/Extras.swift:228:4: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
226 |     {
227 |         DispatchQueue.main.async { [weak self] in
228 | 			self?.completion?(error)
    |    |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |    `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
229 |         }
230 |         receiptRefreshRequest.cancel()
[35/37] Compiling TPInAppReceipt InAppPurchase.swift
[36/37] Emitting module TPInAppReceipt
/Users/admin/builder/spi-builder-workspace/Sources/Date+Extension.swift:28:17: warning: var 'rfc3339DateFormatter' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
26 | }
27 |
28 | fileprivate var rfc3339DateFormatter: ISO8601DateFormatter = {
   |                 |- warning: var 'rfc3339DateFormatter' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
   |                 |- note: convert 'rfc3339DateFormatter' to a 'let' constant to make 'Sendable' shared state immutable
   |                 |- note: annotate 'rfc3339DateFormatter' with '@MainActor' if property should only be accessed from the main actor
   |                 `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
29 | 	let formatter = ISO8601DateFormatter()
30 | 	formatter.formatOptions = .withInternetDateTime
/Users/admin/builder/spi-builder-workspace/Sources/Extras.swift:15:17: warning: var 'refreshSession' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 13 |
 14 | @available(watchOSApplicationExtension 6.2, *)
 15 | fileprivate var refreshSession: RefreshSession?
    |                 |- warning: var 'refreshSession' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                 |- note: convert 'refreshSession' to a 'let' constant to make 'Sendable' shared state immutable
    |                 |- note: annotate 'refreshSession' with '@MainActor' if property should only be accessed from the main actor
    |                 `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 16 |
 17 | @available(tvOS 12.0, *)
/Users/admin/builder/spi-builder-workspace/Sources/IARError.swift:18:10: warning: associated value 'initializationFailed(reason:)' of 'Sendable'-conforming enum 'IARError' has non-sendable type 'IARError.ReceiptInitializationFailureReason'; this is an error in the Swift 6 language mode
16 | public enum IARError: Error
17 | {
18 |     case initializationFailed(reason: ReceiptInitializationFailureReason)
   |          `- warning: associated value 'initializationFailed(reason:)' of 'Sendable'-conforming enum 'IARError' has non-sendable type 'IARError.ReceiptInitializationFailureReason'; this is an error in the Swift 6 language mode
19 |     case validationFailed(reason: ValidationFailureReason)
20 |     case purchaseExpired
   :
24 |     /// - appStoreReceiptNotFound:         In-App Receipt not found
25 |     /// - pkcs7ParsingError:               PKCS7 Container can't be extracted from in-app receipt data
26 |     public enum ReceiptInitializationFailureReason
   |                 `- note: consider making enum 'ReceiptInitializationFailureReason' conform to the 'Sendable' protocol
27 |     {
28 |         case appStoreReceiptNotFound
/Users/admin/builder/spi-builder-workspace/Sources/IARError.swift:19:10: warning: associated value 'validationFailed(reason:)' of 'Sendable'-conforming enum 'IARError' has non-sendable type 'IARError.ValidationFailureReason'; this is an error in the Swift 6 language mode
17 | {
18 |     case initializationFailed(reason: ReceiptInitializationFailureReason)
19 |     case validationFailed(reason: ValidationFailureReason)
   |          `- warning: associated value 'validationFailed(reason:)' of 'Sendable'-conforming enum 'IARError' has non-sendable type 'IARError.ValidationFailureReason'; this is an error in the Swift 6 language mode
20 |     case purchaseExpired
21 | 	case receiptRefreshingInProgress
   :
35 |     /// - hashValidation:          Computed hash doesn't match the hash from the receipt's payload
36 |     /// - signatureValidation:     Error occurs during signature validation. It has several reasons to failure
37 |     public enum ValidationFailureReason
   |                 `- note: consider making enum 'ValidationFailureReason' conform to the 'Sendable' protocol
38 |     {
39 |         case hashValidation
[37/37] Compiling TPInAppReceipt IARError.swift
/Users/admin/builder/spi-builder-workspace/Sources/IARError.swift:18:10: warning: associated value 'initializationFailed(reason:)' of 'Sendable'-conforming enum 'IARError' has non-sendable type 'IARError.ReceiptInitializationFailureReason'; this is an error in the Swift 6 language mode
16 | public enum IARError: Error
17 | {
18 |     case initializationFailed(reason: ReceiptInitializationFailureReason)
   |          `- warning: associated value 'initializationFailed(reason:)' of 'Sendable'-conforming enum 'IARError' has non-sendable type 'IARError.ReceiptInitializationFailureReason'; this is an error in the Swift 6 language mode
19 |     case validationFailed(reason: ValidationFailureReason)
20 |     case purchaseExpired
   :
24 |     /// - appStoreReceiptNotFound:         In-App Receipt not found
25 |     /// - pkcs7ParsingError:               PKCS7 Container can't be extracted from in-app receipt data
26 |     public enum ReceiptInitializationFailureReason
   |                 `- note: consider making enum 'ReceiptInitializationFailureReason' conform to the 'Sendable' protocol
27 |     {
28 |         case appStoreReceiptNotFound
/Users/admin/builder/spi-builder-workspace/Sources/IARError.swift:19:10: warning: associated value 'validationFailed(reason:)' of 'Sendable'-conforming enum 'IARError' has non-sendable type 'IARError.ValidationFailureReason'; this is an error in the Swift 6 language mode
17 | {
18 |     case initializationFailed(reason: ReceiptInitializationFailureReason)
19 |     case validationFailed(reason: ValidationFailureReason)
   |          `- warning: associated value 'validationFailed(reason:)' of 'Sendable'-conforming enum 'IARError' has non-sendable type 'IARError.ValidationFailureReason'; this is an error in the Swift 6 language mode
20 |     case purchaseExpired
21 | 	case receiptRefreshingInProgress
   :
35 |     /// - hashValidation:          Computed hash doesn't match the hash from the receipt's payload
36 |     /// - signatureValidation:     Error occurs during signature validation. It has several reasons to failure
37 |     public enum ValidationFailureReason
   |                 `- note: consider making enum 'ValidationFailureReason' conform to the 'Sendable' protocol
38 |     {
39 |         case hashValidation
[38/39] Emitting module TPInAppReceipt_Objc
[39/39] Compiling TPInAppReceipt_Objc InAppReceipt+Objc.swift
Build complete! (33.48s)
Fetching https://github.com/tikhop/ASN1Swift
[1/577] Fetching asn1swift
Fetched https://github.com/tikhop/ASN1Swift from cache (0.89s)
Computing version for https://github.com/tikhop/ASN1Swift
Computed https://github.com/tikhop/ASN1Swift at 1.2.6 (0.53s)
Creating working copy for https://github.com/tikhop/ASN1Swift
Working copy of https://github.com/tikhop/ASN1Swift resolved at 1.2.6
Build complete.
{
  "dependencies" : [
    {
      "identity" : "asn1swift",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "1.0.0",
            "upper_bound" : "2.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/tikhop/ASN1Swift"
    }
  ],
  "manifest_display_name" : "TPInAppReceipt",
  "name" : "TPInAppReceipt",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.13"
    },
    {
      "name" : "ios",
      "version" : "12.0"
    },
    {
      "name" : "tvos",
      "version" : "12.0"
    },
    {
      "name" : "watchos",
      "version" : "6.2"
    },
    {
      "name" : "visionos",
      "version" : "1.0"
    },
    {
      "name" : "maccatalyst",
      "version" : "13.0"
    }
  ],
  "products" : [
    {
      "name" : "TPInAppReceipt",
      "targets" : [
        "TPInAppReceipt"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    },
    {
      "name" : "TPInAppReceipt-Objc",
      "targets" : [
        "TPInAppReceipt-Objc"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "TPInAppReceiptTests",
      "module_type" : "SwiftTarget",
      "name" : "TPInAppReceiptTests",
      "path" : "Tests/TPInAppReceiptTests",
      "sources" : [
        "Device.swift",
        "PerformanceTests.swift",
        "ReceiptData.swift",
        "TPInAppReceiptTests.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "TPInAppReceipt"
      ],
      "type" : "test"
    },
    {
      "c99name" : "TPInAppReceipt_Objc",
      "module_type" : "SwiftTarget",
      "name" : "TPInAppReceipt-Objc",
      "path" : "Sources/Objc",
      "product_memberships" : [
        "TPInAppReceipt-Objc"
      ],
      "sources" : [
        "InAppReceipt+Objc.swift"
      ],
      "target_dependencies" : [
        "TPInAppReceipt"
      ],
      "type" : "library"
    },
    {
      "c99name" : "TPInAppReceipt",
      "module_type" : "SwiftTarget",
      "name" : "TPInAppReceipt",
      "path" : "Sources",
      "product_dependencies" : [
        "ASN1Swift"
      ],
      "product_memberships" : [
        "TPInAppReceipt",
        "TPInAppReceipt-Objc"
      ],
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/StoreKitTestCertificate.cer",
          "rule" : {
            "process" : {
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/AppleIncRootCertificate.cer",
          "rule" : {
            "process" : {
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/PrivacyInfo.xcprivacy",
          "rule" : {
            "process" : {
            }
          }
        }
      ],
      "sources" : [
        "Bundle+Extension.swift",
        "Data+Extension.swift",
        "Date+Extension.swift",
        "Extras.swift",
        "IARError.swift",
        "InAppPurchase.swift",
        "InAppReceipt+ASN1Decodable.swift",
        "InAppReceipt.swift",
        "InAppReceiptPayload.swift",
        "Initialization.swift",
        "Validation.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
Done.
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.