Xcode中安装 Ice 插件

Ice 是 Internet Communications Engine 的简称,出自ZeroC名门之下。 
Ice 是一种面向对象的中间件平台。从根本上说,这意味着Ice 为构建面向对象的客户-服务器应用提供了工具、API 和库支持。Ice 应用适合于异构平台环境中使用:客户和服务器可以采用不同的编程语言,可以运行在不同的操作系统和机器架构上,并且可以使用多种网络技术进行通信。无论部署环境如何,这些应用的源码都是可移植的。这几天学习的过程中记录下笔记:

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:

Adding Slice Files to an Xcode Project

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.

Configuring Xcode Project Settings

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.

  • Header Directory
    Directory to use as the header include directory in source files.
  • Header Search Paths
    The list of directories to search for included Slice files (-I option). Note that the Ice Slice files are automatically in the header search path.
  • Ice Home
    If you are building with the Ice Touch Xcode SDK, this should be left unset; otherwise, if using the command-line toolkit or regular Ice, set this to the location of the installation (/Library/Developer/Ice-3.5.0 or /Library/Developer/IceTouch-1.3.0).
  • Output Directory
    Directory to place files generated by the Slice compiler.
  • Permit `Ice' prefix
    Pass --ice to the Slice compiler.
  • Streaming support
    Pass --stream to the Slice compiler (C++ only).
  • Checksum support
    Pass --checksum to the Slice compiler (C++ only).
  • Preprocessor Macros
    Set the list of preprocessor macros to define (-D option).
  • Translate C++ code
    Leave this option unset for an SDK build. For non-SDK builds, setting this option means slice2cpp is used to compile the Slice files; otherwise, slice2objc is used.
  • Underscore support
    Permit underscores in Slice identifiers.
  • Link with Ice services client libraries
    Link with Glacier2, IceStorm and IceGrid client libraries.

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.

Xcode Project Settings for Cocoa and iPhone Applications

For Cocoa and iPhone applications, which use the Xcode SDK, you must add the appropriate directory to Additional SDKs:

Objective-C SDK

/Library/Developer/IceTouch-1.3/SDKs/ObjC/$(PLATFORM_NAME).sdk

C++ SDK

/Library/Developer/IceTouch-1.3/SDKs/Cpp/$(PLATFORM_NAME).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

Configuring Non-SDK Builds

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:

  • Add /Library/Developer/Ice-3.5.0/include for Ice or /Library/Developer/IceTouch-1.3.0/include to the Header Search Paths setting.
  • Add /Library/Developer/Ice-3.5.0/lib for Ice or /Library/Developer/IceTouch-1.3.0/lib to the Library Search Paths setting.

 Generating Code using Xcode

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.


参考链接:https://www.zeroc.com/xcodeplugin.html

https://doc.zeroc.com/display/Ice/Xcode+Plug-in


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值