Date: Thu, 28 Mar 2024 17:33:52 +0000 (UTC) Message-ID: <535101178.24597.1711647232185@ae5f4610bf64> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_24596_1995955596.1711647232185" ------=_Part_24596_1995955596.1711647232185 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Ice Touch offers an Objective-C language mapping, an Ice run tim= e for iOS and Mac OS X, and an Xcode SDK for Cocoa and iOS applications.
The Ice Touch distribution does not include any Ice services, but its su= pport for the complete Ice protocol means that your Ice Touch applications = can work seamlessly with existing Ice servers as well as Ice services such = as IceGrid, Glacier2, and IceStorm.
On this page:
This section outlines changes and improvements in this release that may = affect the operation of your applications or have an impact on your source = code.
For a detailed list of the changes in this release, please refer to the = CHANGES file included in your Ice Touch distribution.
-all_load
to the link=
er flags. See QA1490 f=
or more information.ICECallbackOnMainThread
helper has been remo=
ved. The new Ice dispatcher facilit=
y should be used instead. See below for more information.Ice Touch supports a new accessory transport to enable Ice Touch applications to com= municate with accessories connected to an iOS device (via USB or Bluetooth)= . The accessory must run an Ice server with a custom transport to allow the= communication.
This release features a completely new AMI facility that allows you to s= tructure your code with the same flexibility as the new AMI mapping introdu= ced in Ice 3.4. Callbacks are now specified using Objective-C blocks to pro= vide much greater flexibility.
In previous releases, the developer of a graphical Ice application would=
need to take precautions to make sure that updates to the user interface w=
ere performed in the proper thread. For example, graphical applications typ=
ically use AMI because it does not block the calling thread, but AMI callba=
cks are invoked from an Ice run time thread. Since the callback cannot upda=
te the user interface directly from such a thread, it is forced to schedule=
an update instead. With Ice Touch 1.0.0, this was facilitated with the&nbs=
p;ICECallbackOnMainThread
helper.
Ice Touch 1.1.0 introduces the same dispatcher facility that was added in Ice 3.4. The dispatcher =
lets you control the thread in which servant methods and AMI callbacks are =
invoked. It is especially useful for a graphical application, in which you =
can easily install a custom dispatcher to guarantee that all of your servan=
t and callback invocations are made in a thread that can safely update the =
user
interface.
For example, to execute all Ice servant methods and AMI callbacks on the= main GUI thread, you just need to set up the following dispatcher when ini= tializing a communicator:
initData.dispatcher =3D ^(id<ICEDispatcherCall&= gt; call, id<ICEConnection> con) { dispatch_sync(dispatch_get_main_queue(), ^ { [call run]; }); };
This technique is demonstrated in the GUI demo applications located in t= he following directories:
demo/Cocoa
demo/iPhone
It is now possible to specify in Slice the default values for data membe= rs of classes, structures, and exceptions. The semantics are the same as fo= r Slice constants in that you can only specify default values for a data me= mber whose type is a primitive or enumeration. For example:
enum Color { red, green, blue }; struct Point { int x =3D -1; int y =3D -1; Color c =3D blue; };
IceTouch 1.1.0 adds support for VoIP applications as documented in = Executing Code in the Backgrou= nd.
Follow these steps to ensure your application is correctly configured:= p>
voip
flag to the UIBackground=
Modes
key of your application's Info.plist
.=
li>
Ice.Voip
to =
1
in your communicator configuration properties. As descr=
ibed in the Configuring S=
ockets for VoIP Usage, this causes the Ice run time to set the kCFStream=
NetworkServiceTypeVoIP
for all sockets.<=
a href=3D"http://setKeepAliveTimeouthandler" class=3D"external-link" rel=3D=
"nofollow">setKeepAliveTimeout:handler:
method to specify t=
he frequency at which your application must be woken to maintain your servi=
ce.The new sample application demo/iPhone/voip
provi=
des a demonstration of these steps.
The Slice definitions included in Ice Touch 1.1.1 are the same as the Sl= ice definitions included in Ice 3.4.2. In particular, the Glacier 2 client = library included in this Ice Touch release (libGlacier2ObjC.a, libGlacier2O= bjC.11.dylib) uses the Ice 3.4.2 Glacier2 definitions. If the Glacier2 serv= ice in a future Ice release adds new APIs (such as a new operation, or a ne= w interface, you will need to rebuild this Glacier2ObjC library using the n= ewer Glacier2 Slice definitions to be able to use these APIs.
Ice Touch 1.1.1 maintains binary compatibility with Ice Touch 1.1.0, the= refore you may upgrade your application from Ice Touch 1.1.0 to Ice Touch 1= .1.1 without recompiling your Slice files or your program code. However, if= your application is linking with libIceObjC.a (a static library), you will= need to re-link your application. Ice Touch supports only static-linking w= hen building for iOS devices, the iOS simulator or Cocoa on OS X.
If you are building Ice Touch 1.1.1 from sources, you need to manually r=
emove the Xcode plug-in installed by Ice Touch 1.1.0 prior to the Ice Touch=
1.1.1 installation. To do so, remove the directory containing this plug-in=
, which can be either /Developer/Library/Xcode/Plug-ins/slice2ob=
jcplugin.pbplugin
or ~/Library/Application Support/D=
eveloper/Shared/Xcode/Plug-ins/slice2objcplugin.pbplugin
.
For Xcode iOS and Cocoa applications, you need to update the project pro=
perty ADDITIONAL_SDKS
to match the location of the n=
ew Ice Touch SDK installation. If you installed the Ice Touch 1.1.1 SDK in =
the default location, you would use /Developer/SDKs/IceTouch-1.1=
/iphoneos.sdk
instead of /Developer/SDKs/IceTouch-1.=
0/iphoneos.sdk
.
If you are building Ice Touch 1.1.1 from sources, you need to manually r=
emove the Xcode plug-in installed by Ice Touch 1.0.0 prior to the Ice Touch=
1.1.1 installation. To do so, remove the directory containing this plug-in=
, which can be either /Developer/Library/Xcode/Plug-ins/slice2ob=
jcplugin.pbplugin
or ~/Library/Application Support/D=
eveloper/Shared/Xcode/Plug-ins/slice2objcplugin.pbplugin
.
Ice Touch supports the following features:
This topic is described in the m= anual.
Ice Touch currently lacks support for the following Ice features:
Ice::Application
and Ice::Service
&n=
bsp;helper classesIce::Stats
interfaceIce Touch has limited support for:
Ice Touch for Mac OS X and Cocoa uses the Ice for C++ SSL protocol plug-= in.
For iOS devices, Ice Touch SSL provides only a subset of this functional= ity. Due to limitations in iOS SSL support, the following restriction appli= es:
Furthermore, the semantics of some IceSSL configuration properties have = changed, and new properties have been added. The IceSSL property reference provides complete details.=
Custom loggers must be installed via ICEInitializationData. You cannot use any of the Ice for C++ logger properties, such as =
;
Ice.UseSyslog
, and you cannot install a custom logger with a =
plug-in (Ice.Plugin.*
).
For Mac OS X and Cocoa, the Ice Touch run time is built with garbage col= lection support.
For iOS devices and the simulator, you must use explicit reta=
in
and release
because garbage collectio=
n is not supported. Consequently, the Ice Touch run time for iOS cannot gar=
bage collect graphs of objects containing cycles. Consider this Slice defin=
ition:
class Foo { Foo next; };
Suppose we use these definitions as follows:
Foo a =3D [[Foo alloc] init]; Foo b =3D [[Foo alloc] init]; a.next =3D b; b.next =3D a;
If you send this graph over the wire, your application will leak memory = unless you somehow retain the graph and manually break the cycle.
The Ice run time creates an NSAutoReleasePool
obj=
ect before each server-side dispatched invocation and client-side AMI callb=
ack. The pool is released once the dispatch is complete.
For Cocoa and iOS applications that use the Xcode SDK, you must add the =
following to Additional SDKs
:
/Developer/SDKs/IceTouch-1.1/$(PLATFORM_NAME).sdk
In addition, when creating a new Xcode project for iOS applications, you=
must set the Code Signing Resource Rules Path
to:=
p>
$(SDKROOT)/ResourceRules.plist
To set the path, select Target
, press Info<=
/code>, select the
Build
tab, and press S=
elect
.
If you do not do this, you will receive an error when signing your appli= cation.
You must also add to the Frameworks folder:
The accessory transport enables Ice Touch clients running on an iOS devi= ce to communicate with accessories connected either via Bluetooth or USB.= p>
This transport is built on top of the iPhone OS External Accessory frame= work. In order to use it, proxies must use the following endpoint syntax:= p>
accessory [-p
PROTOCOL
] [-=
n
NAME
] [-m
M=
ANUFACTURER
] [-o
MODELNUMBER=
code>
]
For example, to invoke on a proxy for the hello
o=
bject running on an accessory that implements the com.zeroc.hell=
oWorld
protocol, use the following stringified proxy:
hello:accessory -p com.zeroc.helloWorld
If the -p
option is omitted, the transport will l=
ook up an accessory that supports the com.zeroc.ice
=
protocol by default. This protocol string is application-defined and must m=
atch the protocol string that the accessory advertises.
In order to enable the accessory transport, Ice Touch applications must =
add properties to the Ice communicator initialization property set using th=
e ICEConfigureAccessoryTransport
method.
For example:
ICEInitializationData* initData =3D [ICEInitializa= tionData initializationData]; initData.properties =3D [ICEUtil createProperties]; ICEConfigureAccessoryTransport(initData.properties); communicator =3D [[ICEUtil createCommunicator:initData] retain];
This call will add the required properties and ensure that the accessory=
transport is linked in with your application. The project for your applica=
tion will need to include the ExternalAccessory
fram=
ework as well.
To specify that your application supports a given accessory protocol, yo=
u need to set UISupportedExternalAccessoryProtocols
=
in your project Info.plist
file as demonstrated belo=
w:
<key>UISupportedExternalAccessoryProtocols<= ;/key> <array> <string>com.zeroc.helloWorld</string> </array>
The iPhone hello world demo from the demo/iPhone/hello
=
directory demonstrates how to configure the accessory transport.
In order to use the Ice Touch accessory transport, your accessory must a= lso support running an Ice server that is capable of receiving Ice requests= from Ice Touch over USB or Bluetooth. We can assist you with the implement= ation of the Ice server-side transport for your accessory. For more informa= tion on this, please contact us at info@zeroc.com.
Running the iPhone test applications with Xcode 3.2 and iOS 4.2 requires= that you update the "Base SDK" and "Deployment target" of the test project= application; please refer to the INSTALL file included in your Ice Touch d= istribution for details.
This section describes known problems in this Ice Touch release.
test/Ice/operations
with Xcode 3.2 on Mac OS XThe AMI portion of the Ice operations test fails on Mac OS X when built = with Xcode 3.2 with debug information for x64. While the exact cause is unk= nown, the error suggests a compiler or run time library issue. The same tes= t runs successfully with Xcode 4.0 (on Mac OS X 10.6) and Xcode 4.1 (on Mac= OS X 10.7).