Creating Cydia Logos Tweak, now required respring after installation (How to do)

此生再无相见时 提交于 2019-12-13 13:28:32

问题


I am creating a Logos Tweak for Cydia and i did complete my task, but now i required "Restart SpringBoard" after Installation. Can anybody tell me what i have to do to achieve this like many apps in Cydia store, In which after installation button appears with text "Restart SpringBoard" instead of "Return to Cydia".


回答1:


You could do this 2 ways if you are using THEOS,

First one (if you do make clean then you will have to redo these steps),

Create 2 files in the DEBIAN folder which is located in mytweak/_/DEBIAN/ Call them preinst and postrm Inside those files paste:

declare -a cydia
cydia=($CYDIA)

if [[ $1 == install || $1 == upgrade ]]; then
    if [[ ${CYDIA+@} ]]; then
        eval "echo 'finish:restart' >&${cydia[0]}"
    fi
fi

exit

Then run make package to create the new package that has the respring button on it

The second way is much more simpler and can be used without theos, In the control file which is located in the DEBIAN folder, you should know where this is. Add the line:

Depends: mobilesubstrate

Credit to Nate for this answer, although I did know this.

Hope this helped.



来源:https://stackoverflow.com/questions/17207364/creating-cydia-logos-tweak-now-required-respring-after-installation-how-to-do

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!