Fix IPA generated by ipatool not installable via itms-services#434
Fix IPA generated by ipatool not installable via itms-services#434
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 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() |
There was a problem hiding this comment.
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 PR fixes an issue where IPA files generated by ipatool can be installed via Xcode,
but fail when installed through the
itms-servicesprotocol.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