Theos/Setup/iOS: Difference between revisions

From iPhone Development Wiki
mNo edit summary
(πŸͺ¦)
Tag: Replaced
Β 
(14 intermediate revisions by 8 users not shown)
Line 1: Line 1:
This page is for setting up Theos on an iOS Device. For other platforms see [[Theos/Setup]].
{{soft redirect|https://theos.dev/docs/installation-ios}}


== Requirements ==
This article is obsolete and has been replaced by the [https://theos.dev/docs/installation-ios theos.dev website].


=== Mandatory Requirements ===
If you need historical installation instructions, you can find the last version of this article [https://iphonedev.wiki/index.php?title=Theos/Setup/iOS&oldid=6049 here].
Β 
* 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 ==
Β 
# Add the following repositories to your Cydia sources.
#* http://coolstar.org/publicrepo
#* http://nix.howett.net/theos
# Install the following packages in Cydia:
#* <code>Perl</code>
#* <code>Theos</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>
Β 
== Setting up the iOS SDK ==
Β 
Navigate to http://iphone.howett.net/sdks and check which iOS SDK you wish to download.
Β 
# Create a directory for the SDK to be placed in: <pre>mkdir -p $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.''
Β 
== 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.
Β 
# Create symlinks to support ARM64: <pre>ln -s $THEOS/makefiles/platform/Darwin-arm.mk $THEOS/makefiles/platform/Darwin-arm64.mk&#10;ln -s $THEOS/makefiles/targets/Darwin-arm $THEOS/makefiles/targets/Darwin-arm64</pre>
Β 
== Additional Steps for Ease of Use ==
Β 
=== Automatically exporting environmental variables ===
Β 
Although exporting $THEOS to /var/theos is not necessary on iOS, it is useful, and tedious to do every time a terminal is opened. To automatically do this, bash's login scripts can be utilized to export these variables. First, the default shell must be changed to bash:
Β 
# Open the file /etc/master.passwd in a text editor (ifile or vim) and find the lines starting with "mobile" and "root". Change the text at the end of these lines from <pre>/bin/sh</pre>&#10;to&#10;<pre>/bin/bash</pre>
# Create a file named .bash_pofile in /var/mobile and add the variables to the file you created. EX: <pre>export THEOS="/var/theos"</pre>
Β 
=== Avoiding using the root userΒ  ===
Β 
Using the root user while in a theos project for 'make' commands can cause many issues very quickly.
Β 
As your the environment you set up above stands, root is still needed for 'make install'.
Β 
To avoid the root user completely, we can bypass this by using ssh keys and remote install.
Β 
# Follow the guide at http://www.linuxproblem.org/art_9.html to add your ssh keys to the root user for passwordless ss, substituting '[email protected]' for 'a@A' and '[email protected]' for 'b@B'
# Open $THEOS/makefiles/Darwin-arm/iphone.mk and near the bottom of the file, find the line <pre>TARGET_INSTALL_REMOTE := $(_THEOS_FALSE)</pre>&#10;and change it to&#10;<pre>TARGET_INSTALL_REMOTE := $(_THEOS_TRUE)</pre>
# add this line to the end of ~/.bash_profile <pre>export THEOS_DEVICE_IP=127.0.0.1</pre>
Β 
Now 'make package install' may be utilized.

Latest revision as of 07:36, 4 September 2023

Error creating thumbnail: File missing

https://theos.dev/docs/installation-ios

This article is obsolete and has been replaced by the theos.dev website.

If you need historical installation instructions, you can find the last version of this article here.