ios-pitfalls

Document solutions for iOS pitfalls in CoreData, AVFoundation, and AVAudioSession.

2|Updated Feb 1, 2026
One-click install
npx skills add https://github.com/entaku0818/claude-code-settings --skill ios-pitfalls
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ios-pitfalls
Source: https://github.com/entaku0818/claude-code-settings/tree/main/docs/skills/collected/videoPlayer/ios-pitfalls
Command: npx skills add https://github.com/entaku0818/claude-code-settings --skill ios-pitfalls

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses common and critical pitfalls encountered during iOS development, specifically related to CoreData, AVFoundation, and AVAudioSession, preventing data loss and playback issues.

Core Features & Use Cases

  • CoreData Data Loss Prevention: Provides solutions to prevent accidental data deletion during migrations or configuration changes.
  • Audio Playback Fixes: Resolves issues where audio doesn't play correctly, especially concerning the silent switch.
  • Thumbnail Generation: Offers a reliable method for generating thumbnails from downloaded video assets.
  • Use Case: When implementing CoreData migrations, consult this Skill to avoid the common pitfall of overwriting NSPersistentStoreDescription and losing all user data.

Quick Start

Refer to this Skill for guidance on preventing CoreData data loss when modifying persistent store descriptions.

Frequently Asked Questions about ios-pitfalls

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does overwriting NSPersistentStoreDescription cause CoreData data loss during migration?

You need an understanding of Swift, CoreData migration policies, and AVFoundation APIs to effectively apply the fixes provided. This knowledge ensures you can correctly configure NSPersistentStoreDescription and manage AVAudioSession without introducing new issues.

How do I prevent CoreData data loss when modifying NSPersistentStoreDescription?

To prevent CoreData data loss when modifying NSPersistentStoreDescription, avoid overwriting the existing store configuration during migrations. Carefully manage persistent store descriptions to ensure previously saved user data is preserved across configuration changes.

Why does my iOS audio mute when the silent switch is on using AVFoundation?

iOS audio mutes with the silent switch due to incorrect AVAudioSession category configuration. You must properly configure the AVAudioSession category and options within your AVFoundation implementation to ensure playback continues regardless of the physical switch position.

How do I generate thumbnails from .movpkg HLS downloads using AVFoundation?

Generating thumbnails from .movpkg HLS downloads requires handling specific AVFoundation asset structures within the bundle. You must correctly access the downloaded video asset data within the .movpkg format to extract a valid visual thumbnail representation.

What are the common AVAudioSession pitfalls causing iOS playback issues?

Common AVAudioSession pitfalls causing iOS playback issues include incorrect category configuration and failing to handle the silent switch state. Properly setting the AVAudioSession category and options is critical to resolving unexpected audio muting during playback.