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

Need help adding a new type #50

Open
gzz2000 opened this issue Dec 23, 2023 · 10 comments · May be fixed by #52
Open

Need help adding a new type #50

gzz2000 opened this issue Dec 23, 2023 · 10 comments · May be fixed by #52

Comments

@gzz2000
Copy link

gzz2000 commented Dec 23, 2023

Hi Evgeny, I tried to enhance ProvisionQL by adding support to an alias of the .ipa file, .tipa (TrollStore IPA, an airdrop-friendly extension making it easy to send ipa files to iOS devices running the TrollStore semi-jailbreak, which is very popular these days).

I did so by modifying all code related to ipa file handling and add tipa to the matching list (see my commit). By mdls -name kMDItemContentType I found the type should be com.opa334.trollstore.tipa. I've succeeded in making it working if I explicitly launch my modified ProvisionQL like this:

qlmanage -p file.tipa -g ~/Library/QuickLook/ProvisionQL.qlgenerator -c com.opa334.trollstore.tipa

But it does not work if I do not explicitly specify the -g and -c options, nor in Finder directly.
Do you have any idea why it doesn't work? Did I miss something to edit? Thanks!

@relikd
Copy link
Contributor

relikd commented Jan 21, 2024

tell me what this command returns for your tipa file:

mdls -name kMDItemContentType your_app.tipa

@relikd relikd linked a pull request Jan 21, 2024 that will close this issue
@gzz2000
Copy link
Author

gzz2000 commented Jan 22, 2024

tell me what this command returns for your tipa file:

mdls -name kMDItemContentType your_app.tipa

Actually on my side, mdls shows com.opa334.trollstore.tipa. I don't know where this is configured, as macos should never know this type.

% mdls -name kMDItemContentType ~/Downloads/Filza_4.0.0_.tipa           
kMDItemContentType = "com.opa334.trollstore.tipa"

I tried changing it to the type you mentioned in your PR (dyn.ah62d4rv4ge81k4puqe) but it did not work either.:(

@relikd
Copy link
Contributor

relikd commented Jan 22, 2024

Interesting, so there is a macOS application for tipa files. I did not find any on the official homepage.
With this command you can check which App is used:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump Type | grep '^uti:\s*com.opa334.trollstore.tipa$' -B2 -A3 | grep '^flags:\s*active' -B5 

you tried changing it in your source code or using my branch?
I've pushed a new version, try again.

@relikd
Copy link
Contributor

relikd commented Jan 22, 2024

Oh, and my opinion on that is that it is probably better to create a separate QL plugin for that. The TIPA file does not follow the same structure as normal IPAs. In fact, it would be best if the app you have would add a QL extension to its code.

The one tipa I tried has the icon file stored in a .car asset bundle. ProvisionQL (currently) does not support extracting from .car files. At least Apple provided .ipa files will always bundle an Artwork which can be used as icon. There are simply no guarantees as to what will and will not work in tipa.

@relikd
Copy link
Contributor

relikd commented Feb 4, 2024

Does .tipa work with this plugin? (remember to qlmanage -r)
ProvisionQL.qlgenerator.zip

@gzz2000
Copy link
Author

gzz2000 commented Feb 5, 2024

This is working! I have tested a few (~10) .tipa files and most of them works with this plugin.
However, 2 of them did not seem to work on my side. I don't know if it's because of caches on my side or something special about these two files. I uploaded the failed ones for reference.
failed_tipa.zip

@relikd
Copy link
Contributor

relikd commented Feb 5, 2024

Yes, the error happens because of a bug in the original code (tried to access non-existing key CFBundleShortVersionString). I fixed that in my overall refactoring. Here is the newest version which builds atop my refactoring branch with .tipa enabled.
ProvisionQL_with_tipa.zip

Note: TrollDecrypt does not show an icon but this is due to the poor quality control of tipa developers. In this case, the developer created an empty icon file with @3x which is prefered over the @1x resolution. As mentioned above, I noticed other inconsistencies which may and will break the functionality of this plugin. But at least you get as much information as possible out of it.

@gzz2000
Copy link
Author

gzz2000 commented Feb 6, 2024

This newest version works on all my .tipa files. This is cool!

@gzz2000 gzz2000 closed this as completed Feb 6, 2024
@relikd
Copy link
Contributor

relikd commented Feb 6, 2024

You shouldn't close the issue, as it is not added to the main branch yet. waiting for @ealeksandrov's approval

@gzz2000 gzz2000 reopened this Feb 7, 2024
@gzz2000
Copy link
Author

gzz2000 commented Feb 7, 2024

Reopened:)

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 a pull request may close this issue.

2 participants