3

How can I test an iOS application on my Jailbroken Ipod Touch ?

Is there a tutorial for this?

Wyetro
  • 8,439
  • 9
  • 46
  • 64
  • 1
    @NickVeys what do you mean by that? Are you saying that it is not possible to run one's app on a jailbroken iOS device? That's simply wrong. – The Paramagnetic Croissant Aug 23 '14 at 05:54
  • @Reza - I voted to close because of *"Is there a tutorial for this?"*, which makes it off-topic for another reason. You might be able to get the question reopened if you remove that request. And I believe the cited dup is incorrect, so I'll vote to reopen if you want to pursue it. – jww Aug 23 '14 at 08:30
  • 1
    @TheParamagneticCroissant It's absolutely wrong, but that wasn't the question at the time: http://stackoverflow.com/posts/25458409/revisions – Nick Veys Aug 23 '14 at 17:56
  • 1
    @Nick - you're right. Good catch. (That really irritates me. It destroys context and breaks the flow of comments). – jww Aug 24 '14 at 00:25

2 Answers2

1

How can I test an iOS application on my Jailbroken Ipod Touch ?

Typically, all you need to do is build your application and then sign it:

$ codesign -fs "Johnny Developer" myapp.exe

If you don't have a developer account, then your other option is to use ldid. Its supposed to be as simple as:

$ ldid -S myapp.exe

I say "its supposed to be as simple as" because I've never had any luck with it. I just use my developer account from the command line using codesign. The last time I used it, I was getting "Bad CPU Type In Executable" (I guess it could not recognize ARMv7 at the time).

ldid is covered on the Jailbreak QA. See the topics with the ldid tag.

If your device is really old, then you don't need even need ldid. Here, I believe "really old" is pre-iOS 4.2 or so. See Command Line Test Program "Killed: 9".

You will know when code signing is giving you trouble. If you attempt to run your program from the command line, then it will be "Killed: 9".


Is there a tutorial for this?

The quick, short answer:

  1. Install Cydia
  2. Install SSH
  3. Install Mobile Terminal
  4. Set a password
  5. Push app with SSH
  6. Run the program

The nice thing is, Cydia has a link for detailed instructions on its homepage/landing page (on the device).

Also see the Jailbreak QA. Its like Stack Overflow for Jailbreakers.

jww
  • 97,681
  • 90
  • 411
  • 885
0

I've actually done this myself a few days ago. I'd like to mention no jailbreak is necessary.

First, you'll want to go to /User/<username>/Applications/then find Xcode.app, secondary click it, and choose Show Package Contents. Afterwards, navigate through Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk (Now take a break for some water because that must have taken a lot of energy) and copy SDKSettings.plist to your Desktop. Now, open the file you've just copied (SDKSettings.plist) from the Desktop then use the .plist editor to find /DefaultProperties/CODE_SIGNING_REQUIRED. Now look to the right of that and toggle it from YES to NO.

Now you'll want to move the edited version from the Desktop back to Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk and be sure to either overwrite the old file or rename the old file so Xcode will load your modification instead.

There's only one more thing you'll need to be sure of. When you're creating applications in Xcode, you'll need to set the code signing setting to Don't Code Sign, that way you'll be able to run the unsigned application on your device. To do so, open your application (or create a new project, whatever) in Xcode then user the Project Navigator to find your application (It's the first thing in the list with the blue icon to the left.), then go to Build Settings, be sure All is selected -- not Basic, then go to the Code Signing part, and change the value of Code Signing Identity to Don't Code Sign.

Now you're all set (finally) to test applications on your device.

  • I don't believe this works on iOS 4.3 and above. All code must be signed because the JB does not patch the Gatekeeper service (code signing). Did you test this on an actual device, or one of the simulators? – jww Aug 23 '14 at 05:29
  • 1
    @jww it depends on what kind of jailbreak you are using. For example, I can perfectly run not codesigned applications on my jailbroken iPad with iOS 7.0. – The Paramagnetic Croissant Aug 23 '14 at 05:57
  • @The Paramagnetic Croissant - are they patching that now? I guess I should ask, whose JB are you using? (I usually use RedSn0w, but I have not JB anything recently). – jww Aug 23 '14 at 05:59
  • 1
    @jww I am using evasi0n. (You are right in that recent versions of redsn0w didn't bother or couldn't patch that.) – The Paramagnetic Croissant Aug 23 '14 at 06:18
  • The jailbreak has nothing to do with anything. You don't need to have a jailbroken device, and I've done this with iOS 7.1.2 and Mavericks 1.9.4 just a few days ago. You should have guessed so because no one can even run 4.3 anymore unless they're using some old device they found in the junk drawer. If someone actually did run it today they'd go crazy because their devices would basically be useless. For the record, the device I've used has also been jailbroken with Pangu. – Alexander Crammer Aug 24 '14 at 05:45