opa334 / Crane-Resources

11 stars 9 forks source link

How to delete container using libcrane header ? #4

Open walmart-tweak opened 2 years ago

walmart-tweak commented 2 years ago

Hi, Oppa. i checked headers but do not find any api that support to remove a created container. Can you help me figure it out ? Thanks

opa334 commented 2 years ago

this is unfortunately not possible because deletion requires keychain access which only the settings app has, I may allow keychain access from SpringBoard in the future and offer some new methods that will only work in settings app and springboard, but I'm unsure about the security implications so maybe there should be a killswitch in crane settings for this.

walmart-tweak commented 2 years ago

Actually, As I tried before. SpringBoard does not have keychain access too. To modify keychains, I have to sign an entitlement to do that. Anw, I do not see keychains data of container stored in iPhone ? where did you put it ?

opa334 commented 2 years ago

I'm aware SpringBoard by default does not have access to keychain, the Settings app doesn't have either but I have a securityd hook in place that allows the settings app to access the full keychain which I could extent to SpringBoard in the future. Keychain data is stored... in the keychain, not inside the app container.

walmart-tweak commented 2 years ago

That's sound interesting. !! Wait for your next update !!

opa334 commented 2 years ago

This functionality was added in Crane 1.3.

lejovaar7 commented 6 months ago

First of all, I want to congratulate you on this excellent tweak! I'm using libCrane.h in my tweak, and I've encountered an issue when trying to delete containers. I've attempted to use deleteContainerWithIdentifier, but it doesn't seem to have any effect. I added libSandy to my tweak, thinking this could be the problem, but it's still not working. Could you please let me know if this is a bug or if I'm not using it correctly?

opa334 commented 6 months ago

Yeah it doesn't actually work. I will hopefully get to it eventually, right now the API "deletes" the container but it will still exist as an entry inside the preferences plist.

lejovaar7 commented 5 months ago

thank you for your reply. You saved me from spending more time trying to get my code to work. I will be watching for a future update.

thank you very much.