본문으로 건너뛰기
cccskills
무료GitHub에 공개

background-execution-audit

Detects apps that abuse iOS background execution modes — particularly silent audio used to keep the app alive, location background mode used for non-navigation purposes, and background task implementations that do excessive work — enforcing Guideline 2.5.4.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md8.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Skill: Background Execution Audit

<!-- SEO: background mode silent audio location abuse BGTaskScheduler background fetch voip Guideline 2.5.4 iOS App Store rejection -->

Purpose

Detects apps that abuse iOS background execution modes — particularly silent audio used to keep the app alive, location background mode used for non-navigation purposes, and background task implementations that do excessive work — enforcing Guideline 2.5.4 which requires background modes to be used only for their intended purpose.

Apple Guideline

  • Primary: 2.5.4 — Performance: Multitasking and Background Modes
  • Related: 5.1.5
  • Reference: references/guidelines/2-performance.md

Real-World Rejection Cases

  • Case: App declared the audio background mode and played a silent audio session to prevent the system from suspending the app — rejected under 2.5.4 Source: Apple Developer Forums (multiple reports) Root cause: Playing silent audio in the background solely to prevent app suspension is explicitly prohibited — it abuses the audio background mode, which is intended for apps that provide audible content to the user. Use BGTaskScheduler for background processing instead.

  • Case: Fitness app declared location background mode to track user steps, but only needed step count data — Apple reviewer noted the app used CoreLocation for step counting instead of the appropriate CoreMotion/CMPedometer API Source: Apple Developer Forums (Guideline 2.5.4 enforcement) Root cause: Background location must be used only when the app's core functionality genuinely requires continuous location updates (navigation, geo-fencing). Using it as a workaround to run in the background for non-location tasks violates 2.5.4.

  • Case: App declared voip background mode to maintain a persistent socket connection for non-VoIP chat — rejected; VoIP mode is reserved for apps providing telephone-like calling features Source: Apple Developer Forums Root cause: Each background mode has a specific intended use case — declaring a background mode for a purpose other than its design is treated as abuse. Use BGProcessingTask or BGAppRefreshTask for periodic background work.

Trigger

Invoke on any iOS/macOS project that declares background modes in Info.plist or uses BGTaskScheduler, CLLocationManager, or AVAudioSession.

Inputs

NameTypeDefaultDescription
project_rootpathcwdiOS/macOS project root
shared_contextobjectnilPre-collected context from appstore-full-audit Phase 1

Actions

Phase 1: Context Collection

Skip this phase if shared_context is provided.

  1. Glob **/Info.plist — locate Info.plist for background mode declarations.
  2. Glob **/*.swift — collect all Swift source files.

Phase 2: Checks

  1. Background audio mode with silent/zero-volume session Read Info.plist — check UIBackgroundModes for audio. If audio is declared, Grep AVAudioSession|AVAudioPlayer in **/*.swift. If audio session category is .ambient or .soloAmbient with no audible content, OR if volume is set to 0 near background mode activation → 🔴 CRITICAL. Silent audio background mode abuse.

  2. Background location declared — justify core use Read Info.plist — check UIBackgroundModes for location. If location is present, Grep CMPedometer|CMMotionActivityManager|CoreMotion in **/*.swift. If the app uses CoreMotion/pedometer APIs while also declaring background location → 🟠 HIGH. Step counting and activity tracking belong in CoreMotion, not CoreLocation — background location should not be used as a substitute.

  3. VoIP background mode without calling functionality Read Info.plist — check UIBackgroundModes for voip. If voip is present, Grep CXProvider|CXCallController|CallKit|VoIP in **/*.swift. If voip background mode declared but no CallKit integration found → 🔴 CRITICAL. VoIP background mode is reserved for apps providing telephone-like calling via CallKit — using it for persistent socket connections violates 2.5.4.

  4. BGTaskScheduler not registered for declared modes Grep pattern BGTaskScheduler|BGProcessingTask|BGAppRefreshTask in **/*.swift. If background modes fetch or processing are declared but BGTaskScheduler.shared.register is absent → 🟠 HIGH. Background fetch/processing tasks must be registered with BGTaskScheduler — unregistered tasks waste background time and will be deprecated.

  5. Location background mode with Always authorization Grep pattern requestAlwaysAuthorization in **/*.swift. If requestAlwaysAuthorization is called but background location mode is absent from Info.plist → 🟠 HIGH. Requesting Always authorization without declaring background location mode causes the OS to silently downgrade to WhenInUse.

Phase 3: Output

Collect all findings from Phase 2 and build the prioritised findings list below. Include file paths and line numbers. Omit tiers with no findings.

Output Format

## Background Execution Audit — Findings

### 🔴 CRITICAL — Guaranteed rejection
- [ ] TODO: Remove silent audio background mode — playing inaudible audio to prevent suspension violates 2.5.4; use BGTaskScheduler for background work — `AudioKeepAlive.swift:12` — Guideline 2.5.4
- [ ] TODO: Remove voip background mode or integrate CallKit — voip mode requires telephone-like calling functionality via CXProvider — `Info.plist` — Guideline 2.5.4

### 🟠 HIGH — Very likely rejection
- [ ] TODO: Replace CoreLocation-based step counting with CMPedometer — background location is not required for pedometry — `StepTracker.swift:34` — Guideline 2.5.4
- [ ] TODO: Register BGProcessingTask in BGTaskScheduler — background-processing mode declared but BGTaskScheduler not configured — `AppDelegate.swift` — Guideline 2.5.4

### 🟡 MEDIUM — Possible rejection
- [ ] TODO: Review all declared UIBackgroundModes against actual usage — remove any mode not actively used by a core feature

### 🟢 LOW — Best practice
- [ ] TODO: Add a comment next to each UIBackgroundMode entry explaining which feature requires it — helps reviewers and future maintainers understand the justification

Tools Used

Glob, Grep, Read

Constraints

  • Read-only. No file edits.
  • No network calls.
  • Skip Phase 1 if shared_context is provided by orchestrating agent.
  • Legitimate uses of background modes (music players for audio, navigation apps for location, calling apps for voip) are not flagged — context from Phase 2 checks determines whether usage matches intent.

Quick Commands

# Check declared background modes
!plutil -convert json -o - Info.plist 2>/dev/null | python3 -c "import sys,json; d=json.load(sys.stdin); print('Background modes:', d.get('UIBackgroundModes', 'none'))"

# Check for silent audio pattern
!grep -rn "AVAudioSession\|AVAudioPlayer" . --include="*.swift" -A5 | grep -i "ambient\|volume.*0\|setVolume(0"

# Check for BGTaskScheduler usage
!grep -rn "BGTaskScheduler\|BGProcessingTask\|BGAppRefreshTask" . --include="*.swift"

# Check for voip + CallKit
!grep -rn "CXProvider\|CXCallController\|CallKit" . --include="*.swift" | wc -l

Swift Anti-Pattern Reference

examples/swift/BackgroundExecutionPatterns.swift

Detection Steps

  1. Find target files

    • Glob: **/Info.plist, **/*.swift, **/*.m
  2. Search for rejection patterns

    • Read Info.plist → check UIBackgroundModes array values
    • Grep AVAudioSession.*categoryPlayback\|AVAudioSession.*setCategory.*playback + mixWithOthers — silent audio abuse
    • Grep kCLAuthorizationStatusAuthorizedAlways\|requestAlwaysAuthorization — always location
    • Grep PKPushRegistry\|voip in Info.plist UIBackgroundModes — VoIP background mode
    • Grep CXProvider\|CXCallController — CallKit usage (required for VoIP)
  3. Determine verdict

    • audio in UIBackgroundModes + mixWithOthers option (silent audio trick) → 🔴 CRITICAL (Guideline 2.5.4)
    • location in UIBackgroundModes + app is not navigation/fitness → 🔴 CRITICAL
    • voip in UIBackgroundModes + no CXProvider (CallKit) usage → 🔴 CRITICAL
    • Background modes match actual app functionality → 🟢 pass
  4. Report

    • UIBackgroundModes values found in Info.plist
    • File path + line of silent audio / location / VoIP misuse
    • Fix: Remove background modes that don't match core app features; implement CallKit for VoIP

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Detects missing or insufficient in-app account deletion functionality required since June 30, 2022 under Guideline 5.1.1(v) for all apps that support account creation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

cruisediary/apple-app-review-skills192026년 5월 2일 업데이트

Detects feature patterns that require a higher age rating than commonly submitted, enforcing Guideline 2.3.6 which requires age ratings to accurately reflect the app's content and social features.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

cruisediary/apple-app-review-skills192026년 5월 2일 업데이트

Detects apps that send user data to third-party AI systems without explicit in-app consent and disclosure, enforcing Guideline 5.1.2(i).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

cruisediary/apple-app-review-skills192026년 5월 2일 업데이트

Detects placeholder content, stub UI, hardcoded test credentials, and non-production endpoints that signal an incomplete app to reviewers under Guideline 2.1.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

cruisediary/apple-app-review-skills192026년 5월 2일 업데이트

Detects app name violations including names exceeding 30 characters, beta labels, Apple trademark terms, and version numbers in the display name, enforcing Guideline 2.3.7.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

cruisediary/apple-app-review-skills192026년 5월 2일 업데이트

App Store rejection prevention for iOS/macOS apps. Covers privacy, UGC, IAP, metadata, layout, and quality checks based on real Apple rejection cases.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

cruisediary/apple-app-review-skills192026년 5월 2일 업데이트

cruisediary의 스킬 모두 보기

이 스킬의 문제 신고