Theos/Setup/iOS: Difference between revisions

From iPhone Development Wiki
mNo edit summary
Line 44: Line 44:
# Create a directory for the SDK to be placed in: <pre>mkdir $THEOS/sdks</pre>
# Create a directory for the SDK to be placed in: <pre>mkdir $THEOS/sdks</pre>
# Move the SDK to the directory we just created: <pre>mv /var/mobile/Documents/iPhoneOS8.1.sdk.tbz2 $THEOS/sdks/</pre>
# Move the SDK to the directory we just created: <pre>mv /var/mobile/Documents/iPhoneOS8.1.sdk.tbz2 $THEOS/sdks/</pre>
# Extract the SDK from the tar archive: <pre>tar xjvf iPhoneOS8.1.sdk.tbz2</pre>
# Extract the SDK from the tar archive: <pre>cd $THEOS/sdks/&#10;tar xjvf iPhoneOS8.1.sdk.tbz2</pre>
# Delete the archive file as we don't need it anymore: <pre>rm iPhoneOS8.1.sdk.tbz2</pre>
# Delete the archive file as we don't need it anymore: <pre>rm iPhoneOS8.1.sdk.tbz2</pre>



Revision as of 08:34, 12 July 2015

This page is for setting up Theos on an iOS Device. For other platforms see Theos/Setup.

Requirements

Mandatory Requirements

  • A jailbroken iOS device with Cydia (or another package manager) installed.

Optional Requirements

  • Knowledge on how to use a command line terminal.
  • Objective C knowledge.
  • OpenSSH installed on your device and a computer that you can SSH into your device with (using MobileTerminal gets tedious pretty quickly).

Installing Theos and it's Dependancies

  1. Install iOS Toolchain with Cydia.
  2. Add the following repositories to your Cydia sources.
  3. Install the following packages in Cydia:
    • Perl
    • Theos
  4. Check that Theos is installed on your device by running:
    $THEOS

    The output should be: /var/theos: is a directory

Retrieving an iOS SDK

For this, you can download the SDK directly on your device or download the SDK using a web browser on a computer and transferring it to your device with SSH.

On the Device

  1. Install wget with Cydia.
  2. Select a directory to download the SDK. /var/mobile/Documents is a good choice:
    cd /var/mobile/Documents
  3. Now download an SDK using wget:
    wget http://iphone.howett.net/sdks/dl/iPhoneOS8.1.sdk.tbz2

Using a Computer

  1. With a web browser, navigate to http://iphone.howett.net/sdks.
  2. Download the latest iOS SDK available (currently 8.1).
  3. Using SSH, transfer the file to your iOS device.

Setting up the iOS SDK

  1. Create a directory for the SDK to be placed in:
    mkdir $THEOS/sdks
  2. Move the SDK to the directory we just created:
    mv /var/mobile/Documents/iPhoneOS8.1.sdk.tbz2 $THEOS/sdks/
  3. Extract the SDK from the tar archive:
    cd $THEOS/sdks/
    tar xjvf iPhoneOS8.1.sdk.tbz2
  4. Delete the archive file as we don't need it anymore:
    rm iPhoneOS8.1.sdk.tbz2

Additional Step for 64 bit (ARM64) Devices

With the current version of Theos (0.9.639-1), building on ARM64 will throw an error. The following will solve this issue.

  1. Create symlinks to support ARM64:
    ln -s $THEOS/makefiles/platform/Darwin-arm.mk $THEOS/makefiles/platform/Darwin-arm64.mk
    ln -s $THEOS/makefiles/targets/Darwin-arm $THEOS/makefiles/targets/Darwin-arm64