Theos/Setup/iOS: Difference between revisions

From iPhone Development Wiki
mNo edit summary
m (Simplified SDK fetching plus a couple fixes.)
Line 13: Line 13:
* OpenSSH installed on your device and a computer that you can SSH into your device with (using MobileTerminal gets tedious pretty quickly).
* 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 ==
== Installing Theos and it's dependencies ==


# Install <code>iOS Toolchain</code> with Cydia.
# Add the following repositories to your Cydia sources.
# Add the following repositories to your Cydia sources.
#* http://coolstar.org/publicrepo
#* http://coolstar.org/publicrepo
Line 22: Line 21:
#* <code>Perl</code>
#* <code>Perl</code>
#* <code>Theos</code>
#* <code>Theos</code>
# Check that Theos is installed on your device by running: <pre>$THEOS</pre><br />The output should be: <code>/var/theos: is a directory</code>
#* <code>iOS Toolchain</code>
# Check that Theos is installed on your device by running: <pre>echo $THEOS</pre><br />The output should be: <code>/var/theos</code>


== Retrieving an iOS SDK ==
== Setting up the 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 ===


# Install <code>wget</code> with Cydia.
Navigate to http://iphone.howett.net/sdks and check which iOS SDK you wish to download.
# Select a directory to download the SDK. <code>/var/mobile/Documents</code> is a good choice: <pre>cd /var/mobile/Documents</pre>
# Now download an SDK using <code>wget</code>: <pre>wget http://iphone.howett.net/sdks/dl/iPhoneOS8.1.sdk.tbz2</pre>
 
=== Using a Computer ===
 
# With a web browser, navigate to http://iphone.howett.net/sdks.
# Download the latest iOS SDK available (currently 8.1).
# Using SSH, transfer the file to your iOS device.
 
== Setting up the iOS SDK ==


# 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 -p $THEOS/sdks</pre>
# Move the SDK to the directory we just created: <pre>mv /var/mobile/Documents/iPhoneOS8.1.sdk.tbz2 $THEOS/sdks/</pre>
# Download the SDK temporarily and extract to the SDK directory: <pre>curl -ksL "http://iphone.howett.net/sdks/dl/iPhoneOSX.Y.sdk.tbz2" | tar -xj -C $THEOS/sdks</pre><br>''X.Y being the version numbers of the SDK, as seen in http://iphone.howett.net/sdks.''
# 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>


== Additional Step for 64 bit (ARM64) Devices ==
== Additional Step for 64 bit (ARM64) Devices ==

Revision as of 15:52, 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 dependencies

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

    The output should be: /var/theos

Setting up the iOS SDK

Navigate to http://iphone.howett.net/sdks and check which iOS SDK you wish to download.

  1. Create a directory for the SDK to be placed in:
    mkdir -p $THEOS/sdks
  2. Download the SDK temporarily and extract to the SDK directory:
    curl -ksL "http://iphone.howett.net/sdks/dl/iPhoneOSX.Y.sdk.tbz2" | tar -xj -C $THEOS/sdks

    X.Y being the version numbers of the SDK, as seen in http://iphone.howett.net/sdks.

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