How to enable or disable a mobilesubstrate via a preference bundle

1.3k views Asked by At

I would like to know that suppose I have a tweak how would i enable people to enable or disable it via a switch? I need help for a current tweak im working on. This is a mobile substrate tweak made by logos in Theos

1

There are 1 answers

0
Matoe On

Create a Preferences plist as exemplified in a lot of opensource MobileSubstrate-based projects and as documented here.

Then, decently check if your tweak is enabled in your hooks where you find this to be most necessary, and that's it.

Note that when checking for Preferences, do it right. This function is a great example of doing this.