If the iPhone is Jailbroken

Discussion in 'iOS Development' started by startrees, Oct 8, 2010.

  1. startrees

    startrees Member

    Joined:
    Nov 29, 2008
    Messages:
    223
    Likes Received:
    0
    Device:
    iPad 2 (White)
    Ok so I am programming a game that is almost done, but I don't want ANYONE who is Jailbroken to be able to play my game for the following reason:


    1. The most obvious is that I don't want any illegal copies of my game going around

    Please Register or Log in to view images



    2. I don't want them changing their high score for many reasons but so its only fair.

    3. I don't want them to have things they don't, like extras that my game has.(not paid stuff but things that are unlocked in the game)

    So how can I find out if they are jailbroken Programmaticaly? thanks for all answers
  2. jaymzleon

    jaymzleon Active Member

    Joined:
    Nov 16, 2007
    Messages:
    902
    Likes Received:
    37
    Device:
    iPhone 5 (White)
    i dont think this is possible... or the app store apps would already be doing this
  3. bobby681

    bobby681 Active Member

    Joined:
    Jun 24, 2008
    Messages:
    2,588
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
    Instead of banning everybody who jailbreaks, which is a sizeable amount of people. You could just put some piracy prevention techniques into your code. I'm sure there's some tutorials around the web on this sort of thing.
  4. Tkf1

    Tkf1 Community Development Staff Member

    Joined:
    Oct 12, 2009
    Messages:
    17,397
    Likes Received:
    2,488
    Device:
    iPad mini
    Download Skype on a jailbroken iPhone.
  5. jaymzleon

    jaymzleon Active Member

    Joined:
    Nov 16, 2007
    Messages:
    902
    Likes Received:
    37
    Device:
    iPhone 5 (White)
    ill have to wait till sunday... but what happens?
  6. SwiftSkii

    SwiftSkii Active Member

    Joined:
    Jul 14, 2010
    Messages:
    1,638
    Likes Received:
    0
    Device:
    iPad
    It sez you can only use Skype on an unmodified iDevice.
  7. amandureja

    amandureja New Member

    Joined:
    Apr 20, 2010
    Messages:
    306
    Likes Received:
    0
    Device:
    3G iPod touch
    thats funny. skype works on my ipod touch 3g perfectly well.

    Please Register or Log in to view images

  8. NolesFans

    NolesFans New Member

    Joined:
    Sep 23, 2008
    Messages:
    404
    Likes Received:
    0
    Device:
    iPod touch
    There is no way to detect any device is jailbroken.

    @bobby681, if they knew those technique, they will find a way to get around of it.
  9. lauNchD

    lauNchD Well-Known Member

    Joined:
    Jan 27, 2008
    Messages:
    1,844
    Likes Received:
    261
    Device:
    iPhone 5 (Black)
    DUDE!
    WHAT THE F**K?!

    1. If you "don't want illegal copies going around

    Please Register or Log in to view images

    [sic]," detect if the app is cracked, not whether your device is jailbroken.
    This "IPA God" douchebag signs cracked apps with an official developer certificate and thus can distribute them on non-jailbroken devices (*selling* "UDID slots" -> pirated apps)​

    2. There are plenty of ways to modify high scores without a jailbreak. The people you're not being "fair" to are the people who have very legitimate reasons to jailbreak their devices. Also, how about writing good code and using hash checks, obfuscation, etc. to thwart cheaters?

    3. See #2

    -----------------------------------------------------------------------

    </rant>

    If you absolutely want to do this, this website seems to be somewhat resourceful. Knock yourself out.

    You could take the following code as an example (checks for Mobile Substrate). Even if you don't use this, I suggest you place the code to detect jailbreaks into an instance method of your app delegate, for your convenience. (BTW, I take no warranty for this code; don't come complaining to me if your app crashes with a segfault or something, just fix it, then)

    [OBJC]

    #define MSSelfTestFunctionComparison MSHookFunction

    extern void MSSelfTestFunctionComparison(void *standardFunction, void *functionWithOppositeReturnValue, void **result); // declare Mobile Substrate function

    BOOL returnYes()
    {
    return YES;
    }

    BOOL returnNo()
    {
    return NO;
    }

    - (BOOL) isJailbroken
    {
    BOOL *jbPtr = calloc(1, sizeof(BOOL)); // set to known state; allocate memory for heap boolean value
    if (MSSelfTestFunctionComparison)
    {
    MSSelfTestFunctionComparison(&returnYes, &returnNo, NULL); // "self-test"
    *jbPtr = returnYes(); // obviously returnYes() in case it's jailbroken
    }
    else
    {
    *jbPtr = returnNo();
    free(jbPtr);
    }
    BOOL retVal = *jbPtr; // allocate memory for stack boolean value and dereference pointer to heap boolean value
    free(jbPtr); // free memory for heap boolean value
    return retVal;
    }

    [/OBJC]
  10. startrees

    startrees Member

    Joined:
    Nov 29, 2008
    Messages:
    223
    Likes Received:
    0
    Device:
    iPad 2 (White)

    Thanks for the response if you know anyother way to store the highscore data(not online) please tell me and I will do it... I really don't want anyone change it.

Share This Page