
Adobe Acrobat SDK
Creating Plug-in and PDF Library Applications
Developing Plug-ins and Applications
Mac OS techniques 45
Xcode configuration files
Mac OS plug-in sample build settings are defined in SDK and project-level configuration files and not
within the projects themselves. Xcode configuration files include lists of build settings definitions that can
be applied to multiple projects and/or multiple targets.
The configuration files and settings have a hierarchical structure modeled after Apple Developer
documentation located at the following URL:
http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeUserGuide/Contents/
Resources/en.lproj/05_05_build_configs/chapter_33_section_6.html
Each project is based on a project-level build settings file(s) that includes SDK-level settings.
At the SDK level, there are separate configuration files for SDK plug-in settings (Default.xcconfig),
environmental variables (Environment.xcconfig) and resource settings (Resources.xcconfig). Global target
settings for _debug and _release targets are stored in Debug.xcconfig and Release.xcconfig, respectively.
At the project level, there are four configuration files:
●
ProjectDefault.xcconfig
●
ProjectResources.xcconfig
●
Project_debug.xcconfig
●
Project_release.xcconfig.
Each project level configuration file includes the settings from its related (parent) SDK configuration file
(for example, ProjectDefault.xconfig includes Default.xcconfig and ProjectResources.xcconfig includes
Resources.xcconfig). Generally, SDK-level setting definitions are not included directly, but rather are
included through project-level configuration files.
Each SDK plug-in project includes a single (Default) configuration based on the ProjectDefault.xcconfig
build settings which include the SDK-level Default.xcconfig build settings. Each project has two targets: a
_debug target and a _release target. The targets’ build settings are based on Project_debug.xcconfig and
Project_release.xconfig, respectively. Similar to the project configuration files, each target configuration
settings include its parent SDK configuration file; for instance, Project_debug includes Debug.xcconfig
settings.
Project-level configuration files whose names begins with Project are the default project settings included
with most SDK plug-in samples. Project-level configuration files that are prefixed with a specific sample’s
name include settings specific to that sample. The build settings for most SDK projects are extremely
similar with most definitions residing in the SDK configuration files.
Using SetGWorld rather than SetPort
With the move to carbonization and double buffering, you should use GetGWorld rather than the toolbox
call SetPort. Using both calls in the same plug-in can cause the current port to get out of sync with the
current device. Using only GetGWorld maintains the correct port and device settings.