Remove LiveTV menu.
[vuplus_xbmc] / docs / README.ios
1 TOC
2 1. Introduction
3 2. Getting the source code
4 3. Install required libs
5   3.1. Install Xcode
6   3.2. Install Cross libs and runtime environment
7 4. How to compile and run
8         4.1 Using XCode
9         4.2 Using Command line
10 5. Packaging
11 6. Gesture Handling on iPad/iPhone/iPod touch
12 7. Remote control on ATV2
13 8. Usage/Development on un-jailbroken devices (only interesting for official
14    apple developers!)
15 -----------------------------------------------------------------------------
16 1. Introduction
17 -----------------------------------------------------------------------------
18
19 This is a platform port of XBMC for the Apple iOS operating system. 
20 The current build system supports Xcode 3.2.6 or Xcode 4.3.x with iOS SDK 4.2/4.3/5.1
21 There are two ways to build XBMC for Mac.
22
23 1) command-line or
24 2) Xcode.
25
26 Generally, Xcode is the easiest as it presents the build system in a GUI environment.
27 The command-line build is still under development.
28
29 XBMC for iOS is composed of a main binary with numerous dynamic libraries and
30 codecs that support a multitude of music and video formats.
31
32 NOTE TO NEW OS X USERS: All lines that are prefixed with the '$' character are
33 commands that need to be typed into a Terminal window. Note that the '$'
34 character itself should NOT be typed as part of the command.
35
36
37 -----------------------------------------------------------------------------
38 2. Getting the source code
39 -----------------------------------------------------------------------------
40
41  $ cd $HOME
42  $ git clone git://github.com/xbmc/xbmc.git xbmc
43  $ cd xbmc
44  $ git submodule update --init addons/skin.touched
45
46 -----------------------------------------------------------------------------
47 3.0 Install Xcode
48 -----------------------------------------------------------------------------
49 See point 3.0a below for an updated list of supported Xcode/osx constellations!!!
50
51 Install latest Xcode (4.3.2 or 3.2.6 as of the writing). You can download it from 
52
53 1. Apple's site after registration at http://developer.apple.com/tools/download (Xcode 3.2.6)
54 2. In the MacOSX AppStore (Xcode 4.3.x). 
55
56 If you are using XCode 4.3.x you also need to install the "Command Line Tools". To do so
57 after installing Xcode you have to go to "Xcode->Preferences->Downloads" and install the
58 package "Command Line Tools".
59
60 Xcode 3.2.6 only runs on 10.6.x (Snow Leopard). 
61 Xcode 4.3.x only runs on 10.7.x (Lion).
62
63 The preferred iOS SDK Version is 4.3 (when using Xcode 3.2.6) or 5.1 (when using
64 Xcode 4.3.x).
65
66 -----------------------------------------------------------------------------
67 3.0a Supported Xcode and OSX constellations
68 -----------------------------------------------------------------------------
69 As far as we know the compilation for ios and atv2 should work with the following
70 constellations of Xcode and osx versions (to be updated once we know more):
71
72 1. XCode 3.2.6 against iOS SDK 4.3 on 10.6.x (Snow Leopard)
73 2. XCode 4.3.x against iOS SDK 4.3 and 5.1 on 10.7.x (Lion)
74 3. XCode 4.6 against iOS SDK 4.3, 5.1 and 6.1 on 10.7.x (Lion) and 10.8.x (ML)
75 3.a Building against iOS SDK 6.0 will only allow to run on targets with iOS 5.1 and below.
76     There is no support for devices running iOS 6.0 for now!
77
78 -----------------------------------------------------------------------------
79 3.1 Install Cross libs and runtime environment
80 -----------------------------------------------------------------------------
81
82  The following commands will build using the latest iOS SDK found on your 
83  system.
84
85  $ cd $HOME/XBMC
86  $ cd tools/depends
87  $ ./bootstrap
88  $ ./configure --host=arm-apple-darwin
89  $ make
90
91  NOTE: You can speedup compilation on multicore systems by doing 
92  "make -j<number of cores>" instead of "make". For a dualcore this would read:
93  "make -j2"
94
95  ADVANCED developers only! If you want to specify an iOS SDK version (if
96  multiple versions are installed) - then append it to the configure line
97  above (example below would use iOS SDK 6.0):
98
99  $ ./configure --host=arm-apple-darwin --with-sdk=6.0
100
101  Ensure that you also adapt the xcode project to use this SDK version or
102  if building via cmdline the SDKROOT parameter of the xcodebuild command.
103
104 -----------------------------------------------------------------------------
105 4. How to compile
106 -----------------------------------------------------------------------------
107 Both Xcode and Terminal compilation require that build environment be setup
108 from the step 3.1.
109
110  $ cd $HOME/XBMC
111  $ make -C tools/depends/target/xbmc
112  $ make clean
113  $ make xcode_depends
114
115 -----------------------------------------------------------------------------
116 4.1 Using Xcode
117 -----------------------------------------------------------------------------
118 Start XCode and open the XBMC project (XBMC.xcodeproj)
119 located in $HOME/XBMC.
120
121 There are two relevant build configurations : Release and Debug. Compile always for device
122 end not simulator and select the wanted target (either XBMC-iOS or XBMC-ATV2)
123
124 If you have selected a specific iOS SDK Version in step 3.1 then you might need 
125 to adapt the active target to use the same iOS SDK version. Else build will fail 
126 (you will see alot of errors with at least non-found boost/shared_ptr.hpp).
127
128 -----------------------------------------------------------------------------
129 4.2 Using Terminal (command-line)
130 -----------------------------------------------------------------------------
131
132  $ cd $HOME/XBMC
133  $ xcodebuild -project XBMC.xcodeproj -target XBMC-iOS -configuration Release build \
134    ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.2 \
135    SDKROOT=iphoneos4.2
136
137 or
138
139  $ xcodebuild -project XBMC.xcodeproj -target XBMC-ATV2 -configuration Release build \
140   ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.2 \
141   SDKROOT=iphoneos4.2
142  
143  Make sure to set SDKROOT to the iOS SDK you want to use. This should be the same
144  you used on point 3.1!
145
146 -----------------------------------------------------------------------------
147 5. Packaging
148 -----------------------------------------------------------------------------
149
150 This section describes how to package XBMC in a deb image for
151 distribution.
152
153   1. build XBMC for iOS or ATV2 from XCode so that the application bundle is 
154      correctly updated.
155
156   2. 
157    $ cd tools/darwin/packaging/xbmc-atv2
158    or
159    $ cd tools/darwin/packaging/xbmc-ios
160
161   3. $ ./mkdeb-xbmc-atv2.sh release
162      or
163      $ ./mkdeb-xbmc-ios.sh release
164      
165   4. Use release or debug - you have to be sure that you build the corresponding 
166      version before.
167   
168   5. The resulting deb file can be copied to the iOS/ATV2 via ssh/scp and then be 
169      installed manually. For this you need to ssh into the iOS/ATV2 and do:
170      $ dpkg -i <name of the deb file>
171
172 -----------------------------------------------------------------------------
173 6. Gesture Handling on iPad/iPhone/iPod touch
174 -----------------------------------------------------------------------------
175
176  - double finger swipe left                   -> back
177  - double finger tap/single finger long tap   -> right mouse
178  - single finger tap                          -> left mouse
179  - panning, and flicking                      -> for navigating in lists
180  - dragging                                   -> for scrollbars and sliders
181  - zoom gesture                               -> in the pictureviewer
182
183 -----------------------------------------------------------------------------
184 7. Remote control on ATV2
185 -----------------------------------------------------------------------------
186
187  - Select             -> like enter/left click - OK button on other remotes (during playback its pause by defaul)
188  - Select long press  -> During playback show the overlay
189  - Cursor keys        -> for moving around and selecting controls
190  - Menu               -> back
191  - Menu long press    -> context menu
192  
193 ------------------------------------------------------------------------------
194 8. Usage/Development on un-jailbroken devices (only interesting for official apple developers!)
195 ------------------------------------------------------------------------------
196
197 If you are a developer with an official apple code signing identity you can deploy XBMC
198 via xcode to work on it on non-jailbroken devices. For this to happen you just need to alter the
199 Xcode project by setting your codesign identity. After that the last buildstep in our support script
200 will do a full sign of all binaries and the bundle with the given identity (all *.viz, *.pvr, *.so files
201 Xcode doesn't know anything about). This should allow you to deploy XBMC to all non-jailbroken devices
202 which you can deploy normal apps to. In that case (XBMC will be sandboxed like any other app) - all XBMC
203 files are then located in the sandboxed "Documents" folder and can be easily accessed via iTunes file
204 sharing.
205 Keep in mind that no hardware acceleration will be possible without jailbreaking!