Blame docs/README.ios

Packit 1fb8d4
Overview
Packit 1fb8d4
========
Packit 1fb8d4
Packit 1fb8d4
The FreeRDP iOS port allows users to enjoy FreeRDP features on Apple iOS devices.
Packit 1fb8d4
The application was written to be compatible with devices running iOS 4.3 or higher. 
Packit 1fb8d4
Packit 1fb8d4
Build requirements
Packit 1fb8d4
==================
Packit 1fb8d4
Packit 1fb8d4
The following prerequisites are required in order to build the iOS port:
Packit 1fb8d4
Packit 1fb8d4
- cmake version >= 2.8.9
Packit 1fb8d4
- latest Xcode installed (>= 4.6)
Packit 1fb8d4
- installed Provisioning Profile and iOS Developer Certificate for code signing
Packit 1fb8d4
	(not required for simulator builds)
Packit 1fb8d4
- pre-build static OpenSSL libraries (see below)
Packit 1fb8d4
Packit 1fb8d4
FreeRDP requires OpenSSL libraries for building but they are not part of the iOS SDK and therefore they need to be pre-build manually.
Packit 1fb8d4
There are various versions and builds of static OpenSSL libraries floating around like iOSPorts.
Packit 1fb8d4
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.
Packit 1fb8d4
Packit 1fb8d4
If you don't care about modifying the OpenSSL build you can run the following command in the FreeRDP root directory:
Packit 1fb8d4
Packit 1fb8d4
./scripts/OpenSSL-DownloadAndBuild.command 
Packit 1fb8d4
Packit 1fb8d4
The output of the script will be found in external/openssl/. In case you want a
Packit 1fb8d4
different install/build directory you specify it as first parameter:
Packit 1fb8d4
Packit 1fb8d4
./scripts/OpenSSL-DownloadAndBuild.command  /tmp/
Packit 1fb8d4
Packit 1fb8d4
In the example above the output can then be found in /tmp/openssl.
Packit 1fb8d4
Packit 1fb8d4
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
Packit 1fb8d4
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.
Packit 1fb8d4
Packit 1fb8d4
When the script is finished you will find libcrypto.a and libssl.at, both universal libraries containing all openssl/lib 
Packit 1fb8d4
subfolder in the specified
Packit 1fb8d4
install directory (external per default)
Packit 1fb8d4
Packit 1fb8d4
When the script finishes you will find libcrypto.a and libssl.a, both universal
Packit 1fb8d4
binary libraries containing arm and i386 targets in order to compile FreeRDP for
Packit 1fb8d4
iOS devices and the simulator, in the lib subfolder of your installation
Packit 1fb8d4
directory.
Packit 1fb8d4
Packit 1fb8d4
If you build OpenSSL youself or with an install directory specified you need to set FREERDP_IOS_EXTERNAL_SSL_PATH when running cmake.
Packit 1fb8d4
Packit 1fb8d4
Packit 1fb8d4
Building
Packit 1fb8d4
========
Packit 1fb8d4
Packit 1fb8d4
Run the following commands in the top level FreeRDP directory:
Packit 1fb8d4
Packit 1fb8d4
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/iOSToolchain.cmake -GXcode
Packit 1fb8d4
Packit 1fb8d4
This command will create a XCode project in the FreeRDP root folder called FreeRDP.xcodeproj.
Packit 1fb8d4
Open the project in XCode and modify, build or run the app. 
Packit 1fb8d4
Packit 1fb8d4
Alternatively you can also build the project from the command line using xcodebuild:
Packit 1fb8d4
Packit 1fb8d4
xcodebuild -project FreeRDP.xcodeproj -configuration Debug -sdk iphoneos6.1
Packit 1fb8d4
Packit 1fb8d4
or with cmake --build . in your build directory.
Packit 1fb8d4
Packit 1fb8d4
Notes: 
Packit 1fb8d4
     
Packit 1fb8d4
* XCode, by default will build the application into its derived data location (usually in ~/Library/Developer/...).
Packit 1fb8d4
If you want to specify an output directory add CONFIGURATION_BUILD_DIR=<output-path-here> to the end of above command line.
Packit 1fb8d4
Packit 1fb8d4
* If using XCode choose "Open Other" from the welcome screen, browse to the FreeRDP root directory and select FreeRDP.xcodeproj. Alternatively you can
Packit 1fb8d4
  also start it with "open FreeRDP.xcodeproj".
Packit 1fb8d4
Packit 1fb8d4
* If you switch between platforms (OS and SIMULATOR) please remove CMakeCache.txt and CMakeFiles/ before calling cmake again.
Packit 1fb8d4
  Otherwise build errors might occur (this seems to be a bug with cmake or the cmake scripts). To switch between platforms do:
Packit 1fb8d4
Packit 1fb8d4
  rm CMakeCache.txt
Packit 1fb8d4
  rm -rf CMakeFiles/
Packit 1fb8d4
Packit 1fb8d4
  before you run a new cmake command with the desired platform.
Packit 1fb8d4
Packit 1fb8d4
Packit 1fb8d4
cmake variables
Packit 1fb8d4
===============
Packit 1fb8d4
Packit 1fb8d4
CMAKE_TOOLCHAIN_FILE
Packit 1fb8d4
* the toolchain file to use must be cmake/iOSToolchain.cmake
Packit 1fb8d4
Packit 1fb8d4
IOS_PLATFORM (OS (default), SIMULATOR)
Packit 1fb8d4
* 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)
Packit 1fb8d4
Packit 1fb8d4
CMAKE_IOS_DEVELOPER_ROOT (used by toolchain file)
Packit 1fb8d4
* 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
Packit 1fb8d4
Packit 1fb8d4
CMAKE_IOS_SDK_ROOT (used by toolchain file)
Packit 1fb8d4
* 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 
Packit 1fb8d4
Packit 1fb8d4
FREERDP_IOS_EXTERNAL_SSL_PATH (used by FindOpenSSL)
Packit 1fb8d4
* absolut root path to the pre-built static OpenSSL libraries
Packit 1fb8d4
Packit 1fb8d4
CODE_SIGN_IDENTITY
Packit 1fb8d4
* specify the identity to sign the code with