Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor rewrite, plenty of new features #54

Open
wants to merge 35 commits into
base: master
Choose a base branch
from

Conversation

relikd
Copy link
Contributor

@relikd relikd commented Feb 4, 2024

This PR supersedes #51 and includes the following:

  • New: show iTunes Metadata & purchase information (closes Want to show Apple ID info #26)
  • New: use higher resolution app icon if available (try iTunesArtwork)
  • New: show entitlements regardless of provisioning plist if available
  • New: load icon from Assets.car
  • Performance: unzip with zlib instead of sys-call
  • Performance: parse html template tags with regex
  • Performance: use SecCodeSigning instead of codesign sys-call
  • Fix codesign unkown param on <10.15 (--xml flag)
  • Fix crash if a plist key is not present (e.g. CFBundleShortVersionString for some old iOS 3.2 ipa)
  • Fix fixed-width size for preview of app-icon (consistency)
  • Fix IconFlavor attribute for thumbnail drawing in 10.15+
  • Fix prefer icons without "small" suffix
  • Minor html template improvements
  • Some refactoring to reduce duplicate code

@ealeksandrov
Copy link
Owner

@relikd thanks for the PR!
Can you rebase this one and make sure spaces are used everywhere for indentation? Mix of spaces/tabs makes git diffs more complicated.

@relikd
Copy link
Contributor Author

relikd commented Feb 12, 2024

Not sure if I fixed it. A rebase was too complex so I merged by ignoring your commit (it contained only tab conversions anyway). In this branch there were no mixed indentation, only tabs. But I converted it all to spaces as per your request. (btw. you already had mixed indentation before my first PR). Now it is uniform.

@relikd
Copy link
Contributor Author

relikd commented Feb 12, 2024

Also, I just looked at the diff, and I think its easier to just look at the code than the diff. There are simply too many changes 😄. But thats just my opinion.

@ealeksandrov
Copy link
Owner

Thanks for the update, I will go over this in coming days. It's a huge work, so I'll need more than a quick look :)

you already had mixed indentation before my first PR

That's right, I've noticed it! It wasn't obvious until we had some big diffs.

@relikd
Copy link
Contributor Author

relikd commented Apr 2, 2024

Did you have any time yet to look at the PR? :)

@ealeksandrov
Copy link
Owner

@relikd yes! but that's a lot to digest (4000 lines of changes!)
I'll dedicate more time to it, but can't guarantee that we'll merge it very soon.

If you have time and energy and can slice it into smaller PRs ("show iTunes Metadata", "replace zip helpers", etc), we'll get it much faster.

Thank you for your contribution anyway!

@ealeksandrov
Copy link
Owner

Some questions to start:

  • Where CoreUI framework comes from and how is it used?
  • Why Pinch/ZipEntry is used, what are the benefits?

@relikd
Copy link
Contributor Author

relikd commented Apr 3, 2024

can slice it into smaller PRs ...

unfortunately that is not easily possible because the refactoring of the code structure is what makes the most changes. Otherwise I would have created multiple PRs.

Where CoreUI framework comes from and how is it used?

CoreUI is private API and used by Apple internally. Thats why there are only header files and no source code. This framework is used to read "Assets.car" files (app icons). I placed a bunch of checks to fallback to an undistrubed execution in case the API changes (or isnt available at all which should never happen).

Why Pinch/ZipEntry is used, what are the benefits?

To read the zip content without relying on a sys-call to unzip. This improves performance as it does not need to spawn sub-processes. Again, I've added some checks to fallback to the unzip sys-call in case the in-memory extraction fails (or CRC check fails, though I think the unzip utility simply ignores CRC).

I have a similar fallback for the codesign sys-call (which now uses direct execution too)

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.

Want to show Apple ID info
2 participants