2013-02-14 17:59:12 +04:00
Overview
========
The FreeRDP iOS port allows users to enjoy FreeRDP features on Apple iOS devices.
2013-04-02 13:01:59 +04:00
The application was written to be compatible with devices running iOS 4.3 or higher.
2013-02-14 17:59:12 +04:00
Build requirements
==================
The following prerequisites are required in order to build the iOS port:
2023-03-14 10:19:19 +03:00
- cmake version >= 3.13
2013-02-14 17:59:12 +04:00
- latest Xcode installed (>= 4.6)
- installed Provisioning Profile and iOS Developer Certificate for code signing
2013-10-06 15:47:52 +04:00
(not required for simulator builds)
2013-02-14 17:59:12 +04:00
- pre-build static OpenSSL libraries (see below)
FreeRDP requires OpenSSL libraries for building but they are not part of the iOS SDK and therefore they need to be pre-build manually.
There are various versions and builds of static OpenSSL libraries floating around like iOSPorts.
At the time of writing we have tested and used a small script (OpenSSL-DownloadAndBuild.command) that downloads and builds armv7, armv7s and i386 versions of the OpenSSL 1.0.0e libraries.
If you don't care about modifying the OpenSSL build you can run the following command in the FreeRDP root directory:
./scripts/OpenSSL-DownloadAndBuild.command
2013-10-06 15:47:52 +04:00
The output of the script will be found in external/openssl/. In case you want a
different install/build directory you specify it as first parameter:
./scripts/OpenSSL-DownloadAndBuild.command /tmp/
In the example above the output can then be found in /tmp/openssl.
2015-06-08 17:17:39 +03:00
The script uses oldest iOS/iPhoneSimulator SDK found on the build machine per default. If it is required to build against a specific SDK version
the variable SDK_VERSION can be used to specify it. The minimum SDK version that should be used can be set with MIN_SDK_VERSION within the script.
2013-02-14 17:59:12 +04:00
2013-10-06 15:47:52 +04:00
When the script is finished you will find libcrypto.a and libssl.at, both universal libraries containing all openssl/lib
subfolder in the specified
install directory (external per default)
When the script finishes you will find libcrypto.a and libssl.a, both universal
binary libraries containing arm and i386 targets in order to compile FreeRDP for
iOS devices and the simulator, in the lib subfolder of your installation
directory.
If you build OpenSSL youself or with an install directory specified you need to set FREERDP_IOS_EXTERNAL_SSL_PATH when running cmake.
2013-02-14 17:59:12 +04:00
2023-03-14 10:19:19 +03:00
Additional (optional) libraries that are required:
* cJSON for Azure logon support
* MIT or Heimdal kerberos for kerberos support
2013-02-14 17:59:12 +04:00
Building
========
Run the following commands in the top level FreeRDP directory:
2021-12-16 07:23:54 +03:00
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/ios.toolchain.cmake -GXcode
2013-02-14 17:59:12 +04:00
2013-04-02 13:01:59 +04:00
This command will create a XCode project in the FreeRDP root folder called FreeRDP.xcodeproj.
Open the project in XCode and modify, build or run the app.
2013-02-14 17:59:12 +04:00
2013-04-02 13:01:59 +04:00
Alternatively you can also build the project from the command line using xcodebuild:
2013-02-14 17:59:12 +04:00
2013-04-02 13:01:59 +04:00
xcodebuild -project FreeRDP.xcodeproj -configuration Debug -sdk iphoneos6.1
2013-02-14 17:59:12 +04:00
2013-10-06 15:47:52 +04:00
or with cmake --build . in your build directory.
2013-02-14 17:59:12 +04:00
Notes:
* XCode, by default will build the application into its derived data location (usually in ~/Library/Developer/...).
If you want to specify an output directory add CONFIGURATION_BUILD_DIR=<output-path-here> to the end of above command line.
2013-10-06 15:47:52 +04:00
* If using XCode choose "Open Other" from the welcome screen, browse to the FreeRDP root directory and select FreeRDP.xcodeproj. Alternatively you can
also start it with "open FreeRDP.xcodeproj".
2013-02-14 17:59:12 +04:00
2013-05-07 18:01:04 +04:00
* If you switch between platforms (OS and SIMULATOR) please remove CMakeCache.txt and CMakeFiles/ before calling cmake again.
Otherwise build errors might occur (this seems to be a bug with cmake or the cmake scripts). To switch between platforms do:
rm CMakeCache.txt
rm -rf CMakeFiles/
before you run a new cmake command with the desired platform.
2013-02-14 17:59:12 +04:00
cmake variables
===============
CMAKE_TOOLCHAIN_FILE
2021-12-16 07:23:54 +03:00
* the toolchain file to use must be cmake/ios.toolchain.cmake
2013-02-14 17:59:12 +04:00
IOS_PLATFORM (OS (default), SIMULATOR)
* the platform for which to build iFreeRDP. OS compiles for iOS devices (using armv7 and armv7s ABIs) and SIMULATOR compiles for the iOS Simulator (i386)
CMAKE_IOS_DEVELOPER_ROOT (used by toolchain file)
* absolute path to the iOS developer platform (i.e. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer) the toolchain file will usually auto-detect the correct Developer platform depending on IOS_PLATFORM
CMAKE_IOS_SDK_ROOT (used by toolchain file)
* absolute path to the iOS SDK (i.e. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk) the toolchain file will usually auto-detect the correct SDK, depending on IOS_PLATFORM
FREERDP_IOS_EXTERNAL_SSL_PATH (used by FindOpenSSL)
* absolut root path to the pre-built static OpenSSL libraries
2013-10-06 15:47:52 +04:00
CODE_SIGN_IDENTITY
* specify the identity to sign the code with