설정에서 켜기/끄기 버튼이있는 cydia 앱의 sbsettings 토글을 만듭니다.앱의 .plist 파일 편집
미리 만들어진 토글 인 미친 cydia 레포에서 "SBsettings Scripty"를 다운로드했습니다. 버튼을 켜고 끌 때 실행할 명령을 작성해야합니다.
1-com.mytoggle.toggle1 발사 - 때 - 토글-에
그것은 기본적으로 포함되어 있습니다 :
#!/bin/sh
rm /var/mobile/Library/Preferences/com.mytoggle.toggle1.flagfile
echo "the toggle is now OFF" >>/var/mobile/scripty.txt
이 회전
편집 할 2 개 파일이 있습니다 토글을 해제하고 scripty.txt
에 "토글이 해제되었습니다"라고 씁니다.
다른 파일 com.mytoggle.toggle1-launch-when-toggle-is-off는 정확히 반대입니다. 토글을 ON으로 설정하고 "토글이 ON으로 설정되었습니다"라고 씁니다.
이 스크립트를 바꾸려고합니다. scripty.txt에 텍스트를 쓰는 대신 앱의 .plist에서 값을 변경하고 싶습니다.
이 내 PLIST 파일입니다 : 나는에있는 버튼을 켜집니다 </true>
으로 <key>something1</key>
의 </false>
을 대체 할
<?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">
<dict>
<key>something1</key>
<false/>
<key>something2</key>
<false/>
</dict>
</plist>
.