# Guideline 2.1 - Performance: App Unresponsive After In-App Purchase Closure

**Guideline:** 2.1 · **Store:** Apple App Store · **Severity:** medium · **Fix difficulty:** medium · **Typical turnaround:** 2-5 days

Canonical URL: https://appstorereject.com/rejections/apple/2/guideline-21-performance-app-unresponsive-after-in-app-purchase-closure

## Description

This is a straightforward technical issue under Guideline 2.1 (Performance) - your app fails to properly handle the dismissal of the purchase flow, leaving the interface in a broken state where no buttons or functionality work. 

This is likely a manual review finding, not automated, as it requires specific user interaction testing. 

The fastest path to approval is identifying and fixing the root cause of this UI freeze, which typically involves improper state management, memory leaks, or event handling issues in your purchase flow dismissal logic.

## Common variations

- We discovered one or more bugs in your app when reviewed on Mac. After closing the in-app purchase dialog, the app became unresponsive.
- Your app fails to respond to user input after the in-app purchase flow is dismissed on macOS.
- We found that your app's interface becomes non-functional following closure of the purchase screen.
- After completing or canceling an in-app purchase, none of your app's controls respond to user interaction.
- Your app enters an unresponsive state when users exit the in-app purchase interface.

## Example rejection email

```
Guideline 2.1 - Performance

We discovered one or more bugs in your app when reviewed on Mac running macOS 14.3.

Specifically, after we closed the in-app purchase page, none of the app's functionality options responded when clicked.

Next Steps

Please run your app on a device to identify the issue(s), then revise and resubmit your app for review. If you are unable to reproduce this issue, ensure you are testing the exact version of the app that you submitted for review, and that you're doing so in a minimally privileged environment. See Technical Q&A QA1778: How to reproduce bugs reported against Mac App Store submissions. For additional information on crash reports, see Diagnosing Issues Using Crash Reports and Device Logs.

Please see attached screenshots for details.
```

## Resolution steps

## Quick Assessment
- **Risk level:** Medium
- **Resolution path:** Fix & Resubmit
- **Typical turnaround:** 2-5 days

## The Fix

01. **Reproduce the exact issue**
   Test your submitted build on macOS 14.3+ by opening any in-app purchase dialog, then closing it (both cancel and complete scenarios). Verify if UI becomes unresponsive.

02. **Check purchase flow state management**
   Review your StoreKit delegate methods and ensure proper cleanup when purchase views are dismissed. Look for retain cycles or incomplete state resets.

03. **Audit main thread blocking**
   Verify that purchase completion/cancellation callbacks aren't blocking the main UI thread. Move heavy processing to background queues.

04. **Fix view controller lifecycle issues**
   Ensure purchase view controllers are properly deallocated and parent views regain first responder status when dismissing purchase flows.

05. **Test on multiple macOS versions**
   Verify the fix works across macOS 13.0+ and specifically test the scenario described by Apple's reviewers.

06. **Add defensive programming**
   Implement timeout handlers and fallback UI state restoration in case purchase flows don't complete normally.

## Prevention
- Always test in-app purchase flows end-to-end before submission
- Use instruments to check for memory leaks in purchase code paths
- Implement proper view controller lifecycle management for modal presentations

## Before / after examples

**Before:** After user closes in-app purchase dialog, all app buttons and controls become unresponsive and clicks have no effect.
**After:** When purchase dialog is dismissed, app returns to normal responsive state with all functionality working correctly.
**Why it works:** Proper state management and UI thread handling ensure the app remains functional after purchase flow completion.

**Before:** Purchase view controller dismissal leaves the main interface in a frozen state where no user interaction is processed.
**After:** Purchase flow cleanup properly restores first responder status and main view controller event handling.
**Why it works:** Fixed view controller lifecycle management prevents UI blocking after modal dismissal.

## Common questions

**How long does this typically take to fix?**

Typical turnaround is 2-5 days (difficulty: medium). After resubmission, most re-reviews complete within 24-48 hours.

---
*Machine-readable source: https://api.appstorereject.com/api/rejections/detail?slug=guideline-21-performance-app-unresponsive-after-in-app-purchase-closure*