iosjailbreakcydiatweaklogos

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


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".


Solution

  • 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.