Results 1 to 2 of 2

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.

Thread: Editing .plist with a command

  1. #1
    Default Editing .plist with a command
    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" "">
    <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!

  2. #2
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts