1. F0u4d's Avatar
    What im trying to do is creating an sbsettings toggle for a cydia app with a on/off button in settings I've downloaded the "SBsettings Scripty" from insanely cydia repo which is a prebuilt toggle all i need to do is write the command to execute when the button is on and off... there are 2 files to edit:

    1- com.mytoggle.toggle1-launch-when-toggle-is-on

    it contains by default:
    rm /var/mobile/Library/Preferences/com.mytoggle.toggle1.flagfile
    echo "the toggle is now OFF" >>/var/mobile/scripty.txt
    so basically this turn the toggle off and writes "the toggle is now OFF" in the scripty.txt

    and the other file com.mytoggle.toggle1-launch-when-toggle-is-off does exactly the opposite, turn the toggle ON and writes "the toggle is now ON

    so im trying to replace this script of writing text in scripty.txt file to a command that change values in the .plist of the app

    this is how my plist file looks like:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    i want to replace </false> of the <key>something1</key> with </true> which will turn the button on...

    YES i'm noob but i'd like to make this toggle work!
    Thanks in advance!
    2013-07-28 10:59 PM
  2. Matchstic's Avatar
    For changing the plist, try looking into using plutil; the syntax for it is

    plutil -key something1 -value 1 -type bool /path/to/file.plist

    You may need to add a dependancy for Erica Utilities in Cydia if this will be a .deb, but may not need it
    2013-09-05 12:21 PM