{"id":18951806,"url":"https://github.com/neteasegame/ios-private-api-checker","last_synced_at":"2025-04-05T00:04:42.525Z","repository":{"id":66093495,"uuid":"68173572","full_name":"NetEaseGame/iOS-private-api-checker","owner":"NetEaseGame","description":"[Deprecated] iOS-private-api-checker 苹果iOS私有API检查工具 Developer tool to scan iOS apps for private API usage before submitting to Apple","archived":false,"fork":false,"pushed_at":"2016-09-14T08:55:43.000Z","size":36584,"stargazers_count":796,"open_issues_count":19,"forks_count":164,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-03-28T23:02:57.763Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/hustcc/iOS-private-api-checker","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NetEaseGame.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-09-14T04:35:31.000Z","updated_at":"2025-03-27T06:58:41.000Z","dependencies_parsed_at":"2023-07-03T03:01:56.393Z","dependency_job_id":null,"html_url":"https://github.com/NetEaseGame/iOS-private-api-checker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetEaseGame%2FiOS-private-api-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetEaseGame%2FiOS-private-api-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetEaseGame%2FiOS-private-api-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetEaseGame%2FiOS-private-api-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NetEaseGame","download_url":"https://codeload.github.com/NetEaseGame/iOS-private-api-checker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266563,"owners_count":20910836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T13:29:31.448Z","updated_at":"2025-04-05T00:04:42.506Z","avatar_url":"https://github.com/NetEaseGame.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## iOS私有API检查工具 ##\n\n私有API检查的原因在于：苹果在app提审的时候，会检查app使用私有api的情况，对于使用了私有api的app，不予通过，这个工具的目地就是在提审之前检查一下，提高通过率。\n\n***PS:代码写的一般，主要是在做工具功能，欢迎PR。***\n\n### 一、功能 ###\n\n目前功能主要有以下：\n\n1. 从ipa中提取一些基本信息，例如app名字，sdk版本，包名等，可以辅助QA日常工作。\n2. ipa架构检查，可以看出是否支持64位架构，可以辅助AppStore提审。\n3. ipa使用私有api情况，可以辅助AppStore提审。\n4. ipa info和provision配置项的检查，获得授权设备udid（参考项目iOS-checkIPA）。\n5. 获取签名信息。\n6. 批量检查APP，并生成excel报告，截图见下方。\n\n### 二、如何使用 ###\n\n#### 1. 构建私有api库 ####\n\n - db/dsidx_dbs.py文件为解析docSet.dsidx的库，请实现将docSet.dsidx内容导出到sqlite中。docSet.dsidx是xcode作为代码提示的数据库，表示是apple公开的公有api。\n\n - 修改config.py中sdks_config字典，增加各个version的sdk路径，然后运行build_api_db.py，会自动解析私有api，存存储到sqlite中。\n\n - (项目中的数据库内容是我编译sdk7.0的数据，可以直接用。)\n\n\n#### 2. 检查ipa私有api ####\n\n运行方式有二，建议第二种web方式：\n\n1. 修改iOS_private.py main方法中的ipa路径，运行即可。\n\n2. 使用Web上传运行的方式，运行python run_web.py（请先配置flask运行环境），然后浏览器输入127.0.0.1:9527 将ipa拖入上传框等待即可看到检查结果。\n\n3. 使用batch_check方法批量运行目录中的ipa，并生成excel报告。\n\n### 三、Screenshot ###\n\n - 网页检查展示\n\n![web_screenshot](screenshot/web_screenshot.png)\n\n - 批量检测生成excel报告概要\n\n![excel_report_outline](screenshot/excel_report_outline.png)\n\n - excel报告详细页\n\n![excel_report_detail](screenshot/excel_report_detail.png)\n\n### 四、参考项目 ###\n\n - [iOS-private-api-scanner](https://github.com/mrmign/iOS-private-api-scanner)\n - [RuntimeBrowser](https://github.com/nst/RuntimeBrowser/tree/master/tools/ios_headers_history)\n - [XlsxWriter](https://github.com/jmcnamara/XlsxWriter)\n - [iOS-checkIPA](https://github.com/apperian/iOS-checkIPA)\n - [iOS-api-scan.md](https://github.com/mrmign/iOS-private-api-scanner/blob/master/iOS-api-scan.md)\n\n\n### 五、Note ###\n\n1. `私有的api ＝ (class-dump Framework下的库生成的头文件中的api - (Framework下的头文件里的api = 有文档的api + 没有文档的api)) + PrivateFramework下的api`。\n2. 私有api在公开的Framework及私有的PrivateFramework都有。\n3. 请暂时暂mac上运行，linux上暂时没有找到合适的、代替otool的工具，求推荐^^!\n\n\n## License\n\nThis code is distributed under the terms and conditions of the GPL v2 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneteasegame%2Fios-private-api-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneteasegame%2Fios-private-api-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneteasegame%2Fios-private-api-checker/lists"}