s/ffmpegcolorspace/videoconvert/ in a few places
[platform/upstream/gstreamer.git] / sdk-installing-for-ios-development.md
1 # Installing for iOS development
2
3 ![](images/icons/emoticons/information.png) All versions starting form iOS 6 are supported
4
5 ### Prerequisites
6
7 For iOS development you need to download Xcode and the iOS SDK. Xcode
8 can be found at the App Store or
9 [here](https://developer.apple.com/devcenter/ios/index.action#downloads)
10 and the iOS SDK, if it is not already included in your version of Xcode,
11 can be downloaded from Xcode's preferences menu under the downloads tab.
12 The minimum required iOS version is 6.0. The minimum required version of
13 Xcode is 4, but 4.5 is recommended.
14
15 In case you are not familiar with iOS, Objective-C or Xcode, we
16 recommend taking a look at the available documentation at Apple's
17 website.
18 [This](http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhone101/Articles/00_Introduction.html) can be a good starting point.
19
20 ## Download and install GStreamer binaries
21
22 GStreamer binary installer can be found at:
23
24 [https://gstreamer.freedesktop.org/data/pkg/ios/](https://gstreamer.freedesktop.org/data/pkg/ios/)
25
26 Double click the package file and follow the instructions presented by
27 the install wizard. In case the system complains about the package not
28 being signed, you can control-click it and open to start the
29 installation. When you do this, it will warn you, but there is an option
30 to install anyway. Otherwise you can go to System Preferences → Security
31 and Privacy → General and select the option to allow installation of
32 packages from "anywhere".
33
34 The GStreamer SDK installs itself in your home directory, so it is
35 available only to the user that installed it. The SDK library is
36 installed to `~/Library/Developer/GStreamer/iPhone.sdk`. Inside this
37 directory there is the GStreamer.framework that contains the libs,
38 headers and resources, and there is a `Templates` directory that has
39 Xcode application templates for GStreamer development. Those templates
40 are also copied to `~/Library/Developer/Xcode/Templates` during
41 installation so that Xcode can find them.
42
43 ### Configure your development environment
44
45 GStreamer is written in C, and the iOS API uses mostly Objective-C (and
46 C for some parts), but this should cause no problems as those languages
47 interoperate freely. You can mix both in the same source code, for
48 example.
49
50 #### Building the tutorials
51
52 The GStreamer SDK ships a few tutorials in the `xcode iOS` folder inside
53 the `.dmg` file. Copy them out of the package and into a more suitable
54 place. We recommend that you open the project in Xcode, take a look
55 at the sources and build them. This should confirm that the installation
56 works and give some insight on how simple it is to mix Objective-C and C
57 code.
58
59 #### Creating new projects
60
61 After installation, when creating a new Xcode project, you should see
62 the GStreamer project templates under the `Templates` category. OS X and
63 iOS have a different way of organizing libraries headers and binaries.
64 They are grouped into Frameworks, and that's how we ship GStreamer and
65 its dependencies for iOS (and OS X). Due to this difference from
66 traditional linux development, we strongly recommend using the SDK
67 templates, as they set a few variables on your project that allows Xcode
68 to find, use and link GStreamer just like in traditional linux
69 development. For example, if you don't use the templates, you'll have to
70 use:
71
72 ```
73 #include <GStreamer/gst/gst.h>
74 ```
75
76 instead of the usual:
77
78 ```
79 #include <gst/gst.h>
80 ```
81
82 Among some other things the template does, this was a decision made to
83 keep development consistent across all the platforms the SDK supports.
84
85 Once a project has been created using a GStreamer SDK Template, it is
86 ready to build and run. All necessary infrastructure is already in
87 place. To understand what files have been created and how they interact,
88 take a look at the [iOS tutorials](sdk-ios-tutorials.md).