読者です 読者をやめる 読者になる 読者になる

matsukaz's blog

Agile, node.js, ruby, AWS, cocos2d-xなどなどいろいろやってます

Xcodeのカスタムビルドアクションで使える環境変数

久々の更新!
いろいろ忙しくて月一になってもうた(;´Д`)

あ、忙しかったのは新規アプリのリリースがあったためです。
本日無事リリースできたので、よかったら遊んで下さいね!!!
めちゃくちゃ面白いんじゃないかと!

というわけで本題。




Xcodeでは、以下のいずれかの方法によりビルド時の任意のタイミングでスクリプトを実行できます。

  • targetごとの Build Phases

f:id:matsukaz:20150705192415p:plain

  • Scheme設定のビルドフェーズごとの Pre-actions または Post-actions

f:id:matsukaz:20150705192428p:plain


実際にスクリプトを作り始めると、プロジェクトの環境情報やtargetの設定内容、ビルド結果の出力先など、ビルドに関わる様々な情報が必要となってきます。
スクリプト内からは、こうした情報を環境変数から取得できます。

ここではカスタムビルドアクション内で使える環境変数について説明します。

環境変数一覧

環境変数の一覧は、Appleの公式ドキュメントに記載されてます。
ただ用途別にはなってるけど、かなりの数があるのでちょっと分かりづらいかも。

https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/0-Introduction/introduction.html

環境変数と実際の値の確認方法

環境変数の一覧だけでなく、実際にどんな値が入るか知りたくなりますよね。

以下のコマンドを実行することで、スクリプト内で使える環境変数の一覧と実際の値を取得できます。

$ xcodebuild -project [プロジェクトディレクトリ] -target [対象target] -showBuildSettings
$ xcodebuild -workspace [ワークスペースディレクトリ] -scheme [対象scheme] -showBuildSettings

以下は、cocos2d-xで作ったXCodeプロジェクトを対象とした実行例です。

$  xcodebuild -project example/proj.ios_mac/example.xcodeproj -target "example iOS" -showBuildSettings
Build settings for action build and target "example iOS":
    ACTION = build
    AD_HOC_CODE_SIGNING_ALLOWED = NO
    ALTERNATE_GROUP = staff
    ALTERNATE_MODE = u+w,go-w,a+rX
    ALTERNATE_OWNER = matsukaz
    ALWAYS_SEARCH_USER_PATHS = YES
    ALWAYS_USE_SEPARATE_HEADERMAPS = YES
    APPLE_INTERNAL_DEVELOPER_DIR = /AppleInternal/Developer
    APPLE_INTERNAL_DIR = /AppleInternal
    APPLE_INTERNAL_DOCUMENTATION_DIR = /AppleInternal/Documentation
    APPLE_INTERNAL_LIBRARY_DIR = /AppleInternal/Library
    APPLE_INTERNAL_TOOLS = /AppleInternal/Developer/Tools
    APPLICATION_EXTENSION_API_ONLY = NO
    APPLY_RULES_IN_COPY_FILES = NO
    ARCHS = armv7
    ARCHS_STANDARD = armv7 arm64
    ARCHS_STANDARD_32_64_BIT = armv7 arm64
    ARCHS_STANDARD_32_BIT = armv7
    ARCHS_STANDARD_64_BIT = arm64
    ARCHS_STANDARD_INCLUDING_64_BIT = armv7 arm64
    ARCHS_UNIVERSAL_IPHONE_OS = armv7 arm64
    AVAILABLE_PLATFORMS = iphonesimulator macosx iphoneos
    BUILD_COMPONENTS = headers build
    BUILD_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Products
    BUILD_ROOT = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Products
    BUILD_STYLE =
    BUILD_VARIANTS = normal
    BUILT_PRODUCTS_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Products/Debug-iphoneos
    CACHE_ROOT = /var/folders/ck/vwmb4dsj2kl1jzps9bg4l67m0000gn/C/com.apple.DeveloperTools/6.4-6E35b/Xcode
    CCHROOT = /var/folders/ck/vwmb4dsj2kl1jzps9bg4l67m0000gn/C/com.apple.DeveloperTools/6.4-6E35b/Xcode
    CHMOD = /bin/chmod
    CHOWN = /usr/sbin/chown
    CLANG_CXX_LANGUAGE_STANDARD = c++0x
    CLANG_CXX_LIBRARY = libc++
    CLASS_FILE_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build/JavaClasses
    CLEAN_PRECOMPS = YES
    CLONE_HEADERS = NO
    CODESIGNING_FOLDER_PATH = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Products/Debug-iphoneos/example iOS.app
    CODE_SIGNING_ALLOWED = YES
    CODE_SIGNING_REQUIRED = YES
    CODE_SIGN_CONTEXT_CLASS = XCiPhoneOSCodeSignContext
    CODE_SIGN_IDENTITY = iPhone Developer
    COLOR_DIAGNOSTICS = YES
    COMBINE_HIDPI_IMAGES = NO
    COMPOSITE_SDK_DIRS = /var/folders/ck/vwmb4dsj2kl1jzps9bg4l67m0000gn/C/com.apple.DeveloperTools/6.4-6E35b/Xcode/CompositeSDKs
    COMPRESS_PNG_FILES = NO
    CONFIGURATION = Debug
    CONFIGURATION_BUILD_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Products/Debug-iphoneos
    CONFIGURATION_TEMP_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos
    CONTENTS_FOLDER_PATH = example iOS.app
    COPYING_PRESERVES_HFS_DATA = NO
    COPY_PHASE_STRIP = NO
    COPY_RESOURCES_FROM_STATIC_FRAMEWORKS = YES
    CP = /bin/cp
    CREATE_INFOPLIST_SECTION_IN_BINARY = NO
    CURRENT_ARCH = armv7
    CURRENT_VARIANT = normal
    DEAD_CODE_STRIPPING = YES
    DEBUGGING_SYMBOLS = YES
    DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
    DEFAULT_COMPILER = com.apple.compilers.llvm.clang.1_0
    DEFAULT_KEXT_INSTALL_PATH = /System/Library/Extensions
    DEFINES_MODULE = NO
    DEPLOYMENT_LOCATION = NO
    DEPLOYMENT_POSTPROCESSING = NO
    DERIVED_FILES_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build/DerivedSources
    DERIVED_FILE_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build/DerivedSources
    DERIVED_SOURCES_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build/DerivedSources
    DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode.app/Contents/Developer/Applications
    DEVELOPER_BIN_DIR = /Applications/Xcode.app/Contents/Developer/usr/bin
    DEVELOPER_DIR = /Applications/Xcode.app/Contents/Developer
    DEVELOPER_FRAMEWORKS_DIR = /Applications/Xcode.app/Contents/Developer/Library/Frameworks
    DEVELOPER_FRAMEWORKS_DIR_QUOTED = /Applications/Xcode.app/Contents/Developer/Library/Frameworks
    DEVELOPER_LIBRARY_DIR = /Applications/Xcode.app/Contents/Developer/Library
    DEVELOPER_SDK_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
    DEVELOPER_TOOLS_DIR = /Applications/Xcode.app/Contents/Developer/Tools
    DEVELOPER_USR_DIR = /Applications/Xcode.app/Contents/Developer/usr
    DEVELOPMENT_LANGUAGE = English
    DOCUMENTATION_FOLDER_PATH = example iOS.app/English.lproj/Documentation
    DO_HEADER_SCANNING_IN_JAM = NO
    DSTROOT = /tmp/example.dst
    DT_TOOLCHAIN_DIR = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
    DWARF_DSYM_FILE_NAME = example iOS.app.dSYM
    DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT = NO
    DWARF_DSYM_FOLDER_PATH = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Products/Debug-iphoneos
    EFFECTIVE_PLATFORM_NAME = -iphoneos
    EMBEDDED_CONTENT_CONTAINS_SWIFT = NO
    EMBEDDED_PROFILE_NAME = embedded.mobileprovision
    ENABLE_HEADER_DEPENDENCIES = YES
    ENTITLEMENTS_ALLOWED = YES
    ENTITLEMENTS_REQUIRED = YES
    EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS = .DS_Store .svn .git .hg CVS
    EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = *.nib *.lproj *.framework *.gch (*) .DS_Store CVS .svn .git .hg *.xcodeproj *.xcode *.pbproj *.pbxproj
    EXECUTABLES_FOLDER_PATH = example iOS.app/Executables
    EXECUTABLE_FOLDER_PATH = example iOS.app
    EXECUTABLE_NAME = example iOS
    EXECUTABLE_PATH = example iOS.app/example iOS
    EXPANDED_CODE_SIGN_IDENTITY =
    EXPANDED_CODE_SIGN_IDENTITY_NAME =
    EXPANDED_PROVISIONING_PROFILE =
    FILE_LIST = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build/Objects/LinkFileList
    FIXED_FILES_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build/FixedFiles
    FRAMEWORKS_FOLDER_PATH = example iOS.app/Frameworks
    FRAMEWORK_FLAG_PREFIX = -framework
    FRAMEWORK_VERSION = A
    FULL_PRODUCT_NAME = example iOS.app
    GCC3_VERSION = 3.3
    GCC_DYNAMIC_NO_PIC = NO
    GCC_INLINES_ARE_PRIVATE_EXTERN = NO
    GCC_OPTIMIZATION_LEVEL = 0
    GCC_PFE_FILE_C_DIALECTS = c objective-c c++ objective-c++
    GCC_PRECOMPILE_PREFIX_HEADER = YES
    GCC_PREFIX_HEADER = ios/Prefix.pch
    GCC_PREPROCESSOR_DEFINITIONS = USE_FILE32API CC_TARGET_OS_IPHONE COCOS2D_DEBUG=1 CC_ENABLE_CHIPMUNK_INTEGRATION=1
    GCC_SYMBOLS_PRIVATE_EXTERN = NO
    GCC_THUMB_SUPPORT = YES
    GCC_TREAT_WARNINGS_AS_ERRORS = NO
    GCC_VERSION = com.apple.compilers.llvm.clang.1_0
    GCC_VERSION_IDENTIFIER = com_apple_compilers_llvm_clang_1_0
    GCC_WARN_ABOUT_RETURN_TYPE = YES
    GCC_WARN_UNUSED_VARIABLE = YES
    GENERATE_MASTER_OBJECT_FILE = NO
    GENERATE_PKGINFO_FILE = YES
    GENERATE_PROFILING_CODE = NO
    GID = 20
    GROUP = staff
    HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT = YES
    HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES = YES
    HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS = YES
    HEADERMAP_INCLUDES_PROJECT_HEADERS = YES
    HEADERMAP_USES_FRAMEWORK_PREFIX_ENTRIES = YES
    HEADERMAP_USES_VFS = NO
    HEADER_SEARCH_PATHS = /Users/matsukaz/Desktop/example/proj.ios_mac/../cocos2d /Users/matsukaz/Desktop/example/proj.ios_mac/../cocos2d/cocos /Users/matsukaz/Desktop/example/proj.ios_mac/../cocos2d/cocos/base /Users/matsukaz/Desktop/example/proj.ios_mac/../cocos2d/cocos/physics /Users/matsukaz/Desktop/example/proj.ios_mac/../cocos2d/cocos/math /Users/matsukaz/Desktop/example/proj.ios_mac/../cocos2d/cocos/2d /Users/matsukaz/Desktop/example/proj.ios_mac/../cocos2d/cocos/ui /Users/matsukaz/Desktop/example/proj.ios_mac/../cocos2d/cocos/network /Users/matsukaz/Desktop/example/proj.ios_mac/../cocos2d/cocos/audio/include /Users/matsukaz/Desktop/example/proj.ios_mac/../cocos2d/cocos/editor-support /Users/matsukaz/Desktop/example/proj.ios_mac/../cocos2d/extensions /Users/matsukaz/Desktop/example/proj.ios_mac/../cocos2d/external /Users/matsukaz/Desktop/example/proj.ios_mac/../cocos2d/external/chipmunk/include/chipmunk /Users/matsukaz/Desktop/example/proj.ios_mac/../cocos2d/cocos/platform/ios /Users/matsukaz/Desktop/example/proj.ios_mac/../cocos2d/cocos/platform/ios/Simulation
    ICONV = /usr/bin/iconv
    INFOPLIST_EXPAND_BUILD_SETTINGS = YES
    INFOPLIST_FILE = ios/Info.plist
    INFOPLIST_OUTPUT_FORMAT = binary
    INFOPLIST_PATH = example iOS.app/Info.plist
    INFOPLIST_PREPROCESS = NO
    INFOSTRINGS_PATH = example iOS.app/English.lproj/InfoPlist.strings
    INSTALL_DIR = /tmp/example.dst/Applications
    INSTALL_GROUP = staff
    INSTALL_MODE_FLAG = u+w,go-w,a+rX
    INSTALL_OWNER = matsukaz
    INSTALL_PATH = /Applications
    INSTALL_ROOT = /tmp/example.dst
    IPHONEOS_DEPLOYMENT_TARGET = 5.0
    JAVAC_DEFAULT_FLAGS = -J-Xms64m -J-XX:NewSize=4M -J-Dfile.encoding=UTF8
    JAVA_APP_STUB = /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub
    JAVA_ARCHIVE_CLASSES = YES
    JAVA_ARCHIVE_TYPE = JAR
    JAVA_COMPILER = /usr/bin/javac
    JAVA_FOLDER_PATH = example iOS.app/Java
    JAVA_FRAMEWORK_RESOURCES_DIRS = Resources
    JAVA_JAR_FLAGS = cv
    JAVA_SOURCE_SUBDIR = .
    JAVA_USE_DEPENDENCIES = YES
    JAVA_ZIP_FLAGS = -urg
    JIKES_DEFAULT_FLAGS = +E +OLDCSO
    KEEP_PRIVATE_EXTERNS = NO
    LD_DEPENDENCY_INFO_FILE = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build/Objects-normal/armv7/example iOS_dependency_info.dat
    LD_GENERATE_MAP_FILE = NO
    LD_MAP_FILE_PATH = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build/example iOS-LinkMap-normal-armv7.txt
    LD_NO_PIE = NO
    LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER = YES
    LEGACY_DEVELOPER_DIR = /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer
    LEX = lex
    LIBRARY_FLAG_NOSPACE = YES
    LIBRARY_FLAG_PREFIX = -l
    LIBRARY_KEXT_INSTALL_PATH = /Library/Extensions
    LINKER_DISPLAYS_MANGLED_NAMES = NO
    LINK_FILE_LIST_normal_armv7 =
    LINK_WITH_STANDARD_LIBRARIES = YES
    LOCALIZED_RESOURCES_FOLDER_PATH = example iOS.app/English.lproj
    LOCAL_ADMIN_APPS_DIR = /Applications/Utilities
    LOCAL_APPS_DIR = /Applications
    LOCAL_DEVELOPER_DIR = /Library/Developer
    LOCAL_LIBRARY_DIR = /Library
    MACH_O_TYPE = mh_execute
    MACOSX_DEPLOYMENT_TARGET = 10.7
    MAC_OS_X_PRODUCT_BUILD_VERSION = 14E46
    MAC_OS_X_VERSION_ACTUAL = 101004
    MAC_OS_X_VERSION_MAJOR = 101000
    MAC_OS_X_VERSION_MINOR = 1004
    MODULE_CACHE_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/ModuleCache
    NATIVE_ARCH = armv7
    NATIVE_ARCH_32_BIT = i386
    NATIVE_ARCH_64_BIT = x86_64
    NATIVE_ARCH_ACTUAL = x86_64
    NO_COMMON = YES
    OBJECT_FILE_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build/Objects
    OBJECT_FILE_DIR_normal = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build/Objects-normal
    OBJROOT = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates
    ONLY_ACTIVE_ARCH = YES
    OPTIMIZATION_LEVEL = 0
    OS = MACOS
    OSAC = /usr/bin/osacompile
    OTHER_LDFLAGS =
    PACKAGE_TYPE = com.apple.package-type.wrapper.application
    PASCAL_STRINGS = YES
    PATH = /Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
    PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES = /usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode.app/Contents/Developer/Headers /Applications/Xcode.app/Contents/Developer/SDKs /Applications/Xcode.app/Contents/Developer/Platforms
    PBDEVELOPMENTPLIST_PATH = example iOS.app/pbdevelopment.plist
    PFE_FILE_C_DIALECTS = objective-c c++ objective-c++
    PKGINFO_FILE_PATH = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build/PkgInfo
    PKGINFO_PATH = example iOS.app/PkgInfo
    PLATFORM_DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Applications
    PLATFORM_DEVELOPER_BIN_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
    PLATFORM_DEVELOPER_LIBRARY_DIR = /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library
    PLATFORM_DEVELOPER_SDK_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
    PLATFORM_DEVELOPER_TOOLS_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Tools
    PLATFORM_DEVELOPER_USR_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr
    PLATFORM_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
    PLATFORM_NAME = iphoneos
    PLATFORM_PREFERRED_ARCH = arm64
    PLATFORM_PRODUCT_BUILD_VERSION = 12H141
    PLIST_FILE_OUTPUT_FORMAT = binary
    PLUGINS_FOLDER_PATH = example iOS.app/PlugIns
    PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES
    PRECOMP_DESTINATION_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build/PrefixHeaders
    PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO
    PRIVATE_HEADERS_FOLDER_PATH = example iOS.app/PrivateHeaders
    PRODUCT_MODULE_NAME = example_iOS
    PRODUCT_NAME = example iOS
    PRODUCT_SETTINGS_PATH = /Users/matsukaz/Desktop/example/proj.ios_mac/ios/Info.plist
    PRODUCT_TYPE = com.apple.product-type.application
    PROFILING_CODE = NO
    PROJECT = example
    PROJECT_DERIVED_FILE_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/DerivedSources
    PROJECT_DIR = /Users/matsukaz/Desktop/example/proj.ios_mac
    PROJECT_FILE_PATH = /Users/matsukaz/Desktop/example/proj.ios_mac/example.xcodeproj
    PROJECT_NAME = example
    PROJECT_TEMP_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build
    PROJECT_TEMP_ROOT = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates
    PROVISIONING_PROFILE_REQUIRED = YES
    PUBLIC_HEADERS_FOLDER_PATH = example iOS.app/Headers
    RECURSIVE_SEARCH_PATHS_FOLLOW_SYMLINKS = YES
    REMOVE_CVS_FROM_RESOURCES = YES
    REMOVE_GIT_FROM_RESOURCES = YES
    REMOVE_HEADERS_FROM_EMBEDDED_BUNDLES = YES
    REMOVE_HG_FROM_RESOURCES = YES
    REMOVE_SVN_FROM_RESOURCES = YES
    RESOURCE_RULES_REQUIRED = YES
    REZ_COLLECTOR_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build/ResourceManagerResources
    REZ_OBJECTS_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build/ResourceManagerResources/Objects
    SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = NO
    SCRIPTS_FOLDER_PATH = example iOS.app/Scripts
    SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk
    SDK_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk
    SDK_NAME = iphoneos8.4
    SDK_PRODUCT_BUILD_VERSION = 12H141
    SED = /usr/bin/sed
    SEPARATE_STRIP = NO
    SEPARATE_SYMBOL_EDIT = NO
    SET_DIR_MODE_OWNER_GROUP = YES
    SET_FILE_MODE_OWNER_GROUP = NO
    SHALLOW_BUNDLE = YES
    SHARED_DERIVED_FILE_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Products/Debug-iphoneos/DerivedSources
    SHARED_FRAMEWORKS_FOLDER_PATH = example iOS.app/SharedFrameworks
    SHARED_PRECOMPS_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/PrecompiledHeaders
    SHARED_SUPPORT_FOLDER_PATH = example iOS.app/SharedSupport
    SKIP_INSTALL = NO
    SOURCE_ROOT = /Users/matsukaz/Desktop/example/proj.ios_mac
    SRCROOT = /Users/matsukaz/Desktop/example/proj.ios_mac
    STRINGS_FILE_OUTPUT_ENCODING = binary
    STRIP_INSTALLED_PRODUCT = YES
    STRIP_STYLE = all
    SUPPORTED_DEVICE_FAMILIES = 1,2
    SUPPORTED_PLATFORMS = iphonesimulator iphoneos
    SYMROOT = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Products
    SYSTEM_ADMIN_APPS_DIR = /Applications/Utilities
    SYSTEM_APPS_DIR = /Applications
    SYSTEM_CORE_SERVICES_DIR = /System/Library/CoreServices
    SYSTEM_DEMOS_DIR = /Applications/Extras
    SYSTEM_DEVELOPER_APPS_DIR = /Applications/Xcode.app/Contents/Developer/Applications
    SYSTEM_DEVELOPER_BIN_DIR = /Applications/Xcode.app/Contents/Developer/usr/bin
    SYSTEM_DEVELOPER_DEMOS_DIR = /Applications/Xcode.app/Contents/Developer/Applications/Utilities/Built Examples
    SYSTEM_DEVELOPER_DIR = /Applications/Xcode.app/Contents/Developer
    SYSTEM_DEVELOPER_DOC_DIR = /Applications/Xcode.app/Contents/Developer/ADC Reference Library
    SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR = /Applications/Xcode.app/Contents/Developer/Applications/Graphics Tools
    SYSTEM_DEVELOPER_JAVA_TOOLS_DIR = /Applications/Xcode.app/Contents/Developer/Applications/Java Tools
    SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR = /Applications/Xcode.app/Contents/Developer/Applications/Performance Tools
    SYSTEM_DEVELOPER_RELEASENOTES_DIR = /Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes
    SYSTEM_DEVELOPER_TOOLS = /Applications/Xcode.app/Contents/Developer/Tools
    SYSTEM_DEVELOPER_TOOLS_DOC_DIR = /Applications/Xcode.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools
    SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR = /Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools
    SYSTEM_DEVELOPER_USR_DIR = /Applications/Xcode.app/Contents/Developer/usr
    SYSTEM_DEVELOPER_UTILITIES_DIR = /Applications/Xcode.app/Contents/Developer/Applications/Utilities
    SYSTEM_DOCUMENTATION_DIR = /Library/Documentation
    SYSTEM_KEXT_INSTALL_PATH = /System/Library/Extensions
    SYSTEM_LIBRARY_DIR = /System/Library
    TARGETED_DEVICE_FAMILY = 1,2
    TARGETNAME = example iOS
    TARGET_BUILD_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Products/Debug-iphoneos
    TARGET_NAME = example iOS
    TARGET_TEMP_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build
    TEMP_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build
    TEMP_FILES_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build
    TEMP_FILE_DIR = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates/example.build/Debug-iphoneos/example iOS.build
    TEMP_ROOT = /Users/matsukaz/Library/Developer/Xcode/DerivedData/example-cxwgbvuzeycogddzrnymlbuzeelm/Build/Intermediates
    TOOLCHAINS = com.apple.dt.toolchain.iOS8_4
    TREAT_MISSING_BASELINES_AS_TEST_FAILURES = NO
    UID = 501
    UNLOCALIZED_RESOURCES_FOLDER_PATH = example iOS.app
    UNSTRIPPED_PRODUCT = NO
    USER = matsukaz
    USER_APPS_DIR = /Users/matsukaz/Applications
    USER_HEADER_SEARCH_PATHS =
    USER_LIBRARY_DIR = /Users/matsukaz/Library
    USE_DYNAMIC_NO_PIC = YES
    USE_HEADERMAP = YES
    USE_HEADER_SYMLINKS = NO
    VALIDATE_PRODUCT = NO
    VALID_ARCHS = arm64 armv7
    VERBOSE_PBXCP = NO
    VERSIONPLIST_PATH = example iOS.app/version.plist
    VERSION_INFO_BUILDER = matsukaz
    VERSION_INFO_FILE = example iOS_vers.c
    VERSION_INFO_STRING = "@(#)PROGRAM:example iOS  PROJECT:example-"
    WRAPPER_EXTENSION = app
    WRAPPER_NAME = example iOS.app
    WRAPPER_SUFFIX = .app
    XCODE_APP_SUPPORT_DIR = /Applications/Xcode.app/Contents/Developer/Library/Xcode
    XCODE_PRODUCT_BUILD_VERSION = 6E35b
    XCODE_VERSION_ACTUAL = 0640
    XCODE_VERSION_MAJOR = 0600
    XCODE_VERSION_MINOR = 0640
    XPCSERVICES_FOLDER_PATH = example iOS.app/XPCServices
    YACC = yacc
    arch = armv7
    diagnostic_message_length = 208
    variant = normal

これだけ分かればビルドスクリプト内でなんでもできますね!




www.wantedly.com

入門UNIXシェルプログラミング―シェルの基礎から学ぶUNIXの世界

入門UNIXシェルプログラミング―シェルの基礎から学ぶUNIXの世界

カサフィエスタ タコシェル 128g(12枚入り)

カサフィエスタ タコシェル 128g(12枚入り)