Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>EXAMPLE</strong></p> <p>I will name my app Respring</p> <p>In my app code I have an <code>RespringViewController.h</code> and <code>RespringViewController.m</code></p> <p>Inside of the <code>ResringViewController.h</code> I will add a button to call my respring action.</p> <pre><code>#import &lt;UIKit/UIKit.h&gt; @interface RespringViewController : UIViewController //Creates the button - (IBAction) respring:(id)sender; @end </code></pre> <p>Now inside of <code>RespringViewController.m</code></p> <pre><code>#import "RespringViewController.h" @interface RespringViewController () @end @implementation RespringViewController //This calls the button created in RespringViewController.h - (IBAction) respring: (id) sender { setuid(0); system("killall SpringBoard"); } //This makes the view for the button programmatically UIButton *button9 = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [button9 addTarget:self action:@selector(respring:) forControlEvents:UIControlEventTouchUpInside]; button9.frame = CGRectMake(96.0, 262.0, 130.0, 37.0); button9.adjustsImageWhenDisabled = YES; button9.adjustsImageWhenHighlighted = YES; button9.alpha = 1.000; button9.autoresizesSubviews = YES; button9.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin; button9.clearsContextBeforeDrawing = YES; button9.clipsToBounds = NO; button9.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter; button9.contentMode = UIViewContentModeScaleToFill; button9.contentStretch = CGRectFromString(@"{{0, 0}, {1, 1}}"); button9.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; button9.enabled = YES; button9.hidden = NO; button9.highlighted = NO; button9.multipleTouchEnabled = NO; button9.opaque = NO; button9.reversesTitleShadowWhenHighlighted = NO; button9.selected = NO; button9.showsTouchWhenHighlighted = NO; button9.tag = 0; button9.titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:15.000]; button9.titleLabel.lineBreakMode = UILineBreakModeMiddleTruncation; button9.titleLabel.shadowOffset = CGSizeMake(0.0, 0.0); button9.userInteractionEnabled = YES; [button9 setTitle:NSLocalizedString(@"APPLY SETTINGS", nil) forState:UIControlStateNormal]; [button9 setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; [button9 setTitleColor:[UIColor colorWithWhite:1.000 alpha:1.000] forState:UIControlStateHighlighted]; [button9 setTitleShadowColor:[UIColor colorWithWhite:0.500 alpha:1.000] forState:UIControlStateNormal]; //Adds the button to the view [view addSubview:button9]; </code></pre> <p>Now I go ahead and build it and get a file called <code>Respring.app</code></p> <p>Inside of <code>Respring.app</code> there are for example these files</p> <blockquote> <p>Info.plist</p> <p>Icon.png</p> <p>Respring</p> </blockquote> <p>I have to rename <code>Respring</code> inside of <code>Respring.app</code> to <code>Respring_</code></p> <p>Now I have to upload the script below to <code>/path/to/Respring.app/</code></p> <pre><code>#!/bin/bash C=/${0} C=${C%/*} declare -a flags [[ :${DYLD_INSERT_LIBRARIES}: == */MobileSubstrate.dylib: ]] &amp;&amp; flags[${#flags[@]}]=--substrate exec "${C:-.}"/Respring_ "${flags[@]}" -- "$@" 2&gt;&gt;/tmp/Respring.log </code></pre> <p>and name it <code>Respring</code></p> <p>You will now need to fake code sign the binary using the tool <code>ldid</code></p> <p>You can download it <a href="http://code.google.com/p/networkpx/downloads/detail?name=ldid" rel="nofollow">here</a></p> <p>From the terminal use the following command</p> <p><code>sudo ldid -S /path/to/Respring.app/Respring_</code> </p> <p>Be sure to sign the binary not the script</p> <p>The correct permissions have to be in place for the script to launch app as root user from terminal you can run this</p> <p><code>sudo chown 0:0 /path/to/Respring.app/Respring*</code></p> <p><code>sudo chmod 0755 /path/to/Respring.app/Respring</code></p> <p><code>sudo chmod 4755 /path/to/Respring.app/Respring_</code></p> <p>Everything is all set now and you can launch the app, any logs will be stored inside of <code>/tmp/Respring.log</code> of your device now and you can use the button to respring.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload