This directory contains Objective-C sample programs for various Ice components. These examples are provided to get you started on using a particular Ice feature or coding technique.
Most of the subdirectories here correspond directly to Ice components, such as Ice and IceDiscovery. We've also included the following additional subdirectories:
-
Ice clients for our Java-based Database library demo.
-
Complete examples for some of the code snippets in the Ice manual.
The iOS and Cocoa demos require the Ice Builder for Xcode.
The command-line demos require the Xcode Command Line Tools to be installed
(use xcode-select --install
to install them).
To build the command-line examples, first review the settings found in
../make/Make.rules
and adjust any you want changed. If you've installed Ice
in a non-standard location, you'll also need to set the ICE_HOME
environment
variable with the path name of the installation directory:
export ICE_HOME=~/testing/Ice
Run make
to start the build:
make
When you're ready to start the build, run make
, for example:
make V=1
V=1
in the example above turns on verbose output.
The clean
and distclean
targets allow you clean all the demos. clean
removes the binary files created by the build; distclean
removes all these
files plus the Objective-C files generated by slice2objc.
Note that make clean
only removes the binary files for the configuration and
platform specified with the CONFIGS
and PLATFORMS
variables in Make.rules
.
You can also build or clean a single demo with make <demo-path>[_clean|_distclean]
,
for example:
make V=1 Ice/hello
make Ice/hello_distclean
When you're ready to start the build, run make
, for example:
make V=1
V=1
in the example above turns on verbose output.
The clean
and distclean
targets allow you clean all the demos. clean
removes the binary files created by the build; distclean
removes all these
files plus the Objective-C files generated by slice2objc.
Note that make clean
only removes the binary files for the configuration and
platform specified with the CONFIGS
and PLATFORMS
variables in Make.rules
.
You can also build or clean a single demo with make <demo-path>[_clean|_distclean]
,
for example:
make V=1 Ice/hello
make Ice/hello_distclean
To build the iOS or Cocoa examples, open Objective-C demos.xcworkspace
in
Xcode. You will need to select a development team in the Xcode project General
settings of each demo to test the demos on an iOS device or macOS.
Refer to the README.md file in each demo directory for usage instructions.