private-api-audit

Detects private Apple API usage and runtime introspection patterns in iOS and macOS source code.

Updated Aug 14, 2026
One-click install
npx skills add https://github.com/tvh25082004/Badminton --skill private-api-audit-tvh25082004
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: private-api-audit
Source: https://github.com/tvh25082004/Badminton/tree/main/.claude/skills/apple-app-review/quality/private-api-audit
Command: npx skills add https://github.com/tvh25082004/Badminton --skill private-api-audit-tvh25082004

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Private API usage in iOS and macOS apps triggers automated binary rejection at App Store upload (ITMS-90338) under Guideline 2.5.1, and repeated violations can lead to account termination. This Skill scans your codebase before submission to catch these patterns early. ## Core Features & Use Cases - Dynamic Loading Detection: Finds dlopen, dlsym, and runtime bundle loading calls that Apple's binary scanner flags automatically. - Private Symbol Analysis: Detects NSClassFromString with private class names (_UI, _NS, _CA prefixes), underscore-prefixed method calls, and private framework imports like SpringBoardServices. - Swizzling Audits: Identifies method_exchangeImplementations and class_replaceMethod calls targeting system classes. - Use Case: Before submitting an app update, run the audit on your project root to get a prioritized findings list with file paths, line numbers, and remediation guidance mapped to Guideline 2.5.1. ## Quick Start Audit my iOS project for private Apple API usage before App Store submission.

Frequently Asked Questions about private-api-audit

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

FAQPage Schema
How do I check my iOS app for private API usage before App Store submission?▼

Run this audit on your project root to grep Swift and Objective-C sources for dlopen, NSClassFromString with private class names, underscore-prefixed selectors, and private framework imports. Findings are reported with file paths, line numbers, and severity tiers mapped to Guideline 2.5.1.

What causes ITMS-90338 Non-public API usage rejection?▼

ITMS-90338 is triggered by Apple's automated binary analysis detecting dlopen or dlsym calls, symbol references to non-public frameworks, or underscore-prefixed private methods. The scanner runs at upload, so an app can pass human review and still be rejected by the binary scan.

Does the audit detect method swizzling on system classes?▼

Yes, it greps for method_exchangeImplementations, class_replaceMethod, method_setImplementation, and swizzle patterns. Matches targeting system classes like UIViewController or UIApplication are flagged as HIGH severity since swizzling Apple classes is fragile and may be flagged as private API abuse.

Can third-party SDKs cause private API rejections?▼

Yes, third-party SDKs can introduce private API usage into your binary. The audit recommends checking dependency frameworks and running otool -L on the final binary to list all linked libraries, plus nm on the release binary to check for private symbol references.

Is NSClassFromString always flagged as private API usage?▼

No, only when the string argument references private Apple classes with prefixes like _UI, _NS, or _CA, such as _UIBackdropView. The audit reads surrounding context for each NSClassFromString match to determine whether the target class is private.