In-App Purchases (Non-Consumable) for iOS

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
In-App Purchases (Non-Consumable) for iOS
Medium
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

iOS In-App Purchases Implementation (Non-Consumable)

Non-consumable IAP — category where every error in purchase restoration logic turns into App Store complaint and chargeback. User bought "unlimited mode" or "remove ads", reinstalled app — and didn't get their purchase. Apple Support won't help: purchase restoration is developer's responsibility.

What Usually Goes Wrong

Most common mistake — calling SKPaymentQueue.default().restoreCompletedTransactions() only on "Restore" button click. Correct: check originalTransaction on every launch via SKReceiptRefreshRequest or server validation. Without this, user returning after half a year with new iPhone gets no paid content.

Second case — incorrect SKPaymentTransactionObserver handling. If updatedTransactions doesn't call finishTransaction(_:) for all states (.purchased, .restored, .failed), transaction hangs in queue and re-triggers observer on next app launch. Seen projects where this caused double unlock of paid content after restart.

Correct Implementation Architecture

Non-consumable IAP in 2024 built around StoreKit 2 (iOS 15+) or StoreKit 1 with iOS 13–14 support.

StoreKit 2 radically simplifies code:

// Request products
let products = try await Product.products(for: ["com.app.premium_unlock"])

// Purchase
let result = try await products.first?.purchase()

switch result {
case .success(let verification):
    switch verification {
    case .verified(let transaction):
        // unlock content
        await transaction.finish()
    case .unverified:
        // receipt forged — don't unlock
        break
    }
case .pending:
    // SCA or parental control — wait
    break
case .userCancelled:
    break
}

Transaction.currentEntitlements — async sequence that on every app launch returns all active purchases. Iterate through it in @main or AppDelegate.applicationDidFinishLaunching and restore state without "Restore" button.

For iOS 13–14 StoreKit 1 remains with SKPaymentTransactionObserver. Need separate ReceiptValidator — either local via openssl (complex, no network requests), or server via Apple /verifyReceipt endpoint (deprecated since 2023, but works). Recommend server: local requires embedding Apple root certificate and correct ASN.1 parsing.

Server Validation

For apps with backend: on purchase client sends appStoreReceiptURL to server, server requests Apple Sandbox/Production and saves original_transaction_id in DB. On restore on new device — request to your API by user apple_id.

Impossible to implement "purchase on one device, access on another" within single Apple ID without this — and users expect this.

Testing

In Xcode Simulator StoreKit works via local .storekit file — test without real products. For device testing need Sandbox Account in App Store Connect. Important to check: purchase → deletion → reinstall → restore. This path breaks most often.

Timeline implementation — 2–3 days: product setup in App Store Connect, StoreKit 2 integration with StoreKit 1 fallback, test coverage on Sandbox, App Review (requires "Restore Purchases" button in interface).