The Xcode plug-in manages all aspects of code generation, including automatically recompiling Slice files that have changed, removing obsolete generated classes, and tracking dependencies. The Xcode plugin is provided with the Ice Touch installer.
On this page:
To add an existing Slice file, select a folder in the project, select File, and choose Add -> Existing Files...
To create a new Slice file, select a folder in the project, select File, and choose New -> New Files... Select the Other category and choose Empty File as the file type. Save the file with a .ice
extension.
The Xcode plug-in is configured using the per-target info build settings, just as you would configure the compiler settings. Select a target, and then select the build settings tab, and enter Slice
in the Search in Build Settings field.
-I
option). Note that the Ice Slice files are automatically in the header search path./Library/Developer/Ice-3.5.0
or /Library/Developer/IceTouch-1.3.0
).--ice
to the Slice compiler.--stream
to the Slice compiler (C++ only).--checksum
to the Slice compiler (C++ only).-D
option).slice2cpp
is used to compile the Slice files; otherwise, slice2objc
is used.You can also define Slice compiler options for individual Slice source files. Select your project in the Project Navigator, select the relevant target (you may have only one), then select the Build Phases tab, expand the Compile Sources phase and the Compiler Flags column lets you set each file's options for that target.
For Cocoa and iPhone applications, which use the Xcode SDK, you must add the appropriate directory to Additional SDKs:
Objective-C SDK |
|
C++ SDK |
|
In addition, when creating a new iPhone Xcode project, you must set the Code Signing Resource Rules Path to:
$(SDKROOT)/ResourceRules.plist
You must also add the following to the Frameworks
folder:
CFNetwork.framework
Security.framework
Foundation.framework
When using the Objective-C SDK you must also add the following to the Frameworks
folder:
ExternalAccessory.framework
For non-SDK builds, you must configure the location of the Ice or Ice Touch header and library directories.
Under the Search Paths section in the project build settings:
/Library/Developer/Ice-3.5.0
/include
for Ice or /Library/Developer/IceTouch-1.3.0
/include
to the Header Search Paths setting./Library/Developer/Ice-3.5.0/lib
for Ice or /Library/Developer/IceTouch-1.3.0/lib
to the Library Search Paths setting.
The plug-in compiles a Slice file whenever you build the project. The extension tracks dependencies among Slice files in the project and recompiles only those files that require it after a change.