Skip to content

Fix IPA generated by ipatool not installable via itms-services#434

Open
anjiuzhe wants to merge 3 commits intomajd:mainfrom
anjiuzhe:fix/itms-services-install
Open

Fix IPA generated by ipatool not installable via itms-services#434
anjiuzhe wants to merge 3 commits intomajd:mainfrom
anjiuzhe:fix/itms-services-install

Conversation

@anjiuzhe
Copy link

This PR fixes an issue where IPA files generated by ipatool can be installed via Xcode,
but fail when installed through the itms-services protocol.

The installation failure was caused by the generated IPA not being compatible with
iOS streaming unzip (StreamingUnzip), which is required by itms-services installation.

Fixes #433


@majd
Copy link
Owner

majd commented Feb 16, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eb0ae39408

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

func (t *appstore) replicateZip(src *zip.ReadCloser, dst *zip.Writer) error {
for _, file := range src.File {
srcFile, err := file.OpenRaw()
srcFile, err := file.Open()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Close opened zip entry readers

replicateZip now uses file.Open(), which returns an io.ReadCloser, but the returned reader is never closed in the loop. On IPAs with many entries (or repeated calls via both ReplicateSinf and applyPatches), this leaves decompressor resources alive until GC and can cause avoidable memory growth/resource pressure; close srcFile after each copy (including error paths).

Useful? React with 👍 / 👎.

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IPA downloaded by ipatool cannot be installed via itms-services (but works with Xcode)

3 participants