Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Unify targets for multiple platforms into one t...

Unify targets for multiple platforms into one target

Unify targets for multiple platforms into one target
Aggregate each settings of targets with xcconfings

Kishikawa Katsumi

December 16, 2015
Tweet

More Decks by Kishikawa Katsumi

Other Decks in Programming

Transcript

  1. Base.xcconfig ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES;

    ... GCC_WARN_UNUSED_FUNCTION = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer; MACOSX_DEPLOYMENT_TARGET = 10.9; IPHONEOS_DEPLOYMENT_TARGET = 8.0; WATCHOS_DEPLOYMENT_TARGET = 2.0; TVOS_DEPLOYMENT_TARGET = 9.0;
  2. Debug.xcconfig #include "Base.xcconfig" BITCODE_GENERATION_MODE = marker; MTL_ENABLE_DEBUG_INFO = YES; COPY_PHASE_STRIP

    = NO; ENABLE_TESTABILITY = YES; GCC_OPTIMIZATION_LEVEL = 0; ONLY_ACTIVE_ARCH = YES; SWIFT_OPTIMIZATION_LEVEL = -Onone; GCC_PREPROCESSOR_DEFINITIONS = $(inherited) DEBUG=1;
  3. KeychainAccess.xcconfig SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator watchos watchsimulator appletvos appletvsimulator;

    TARGETED_DEVICE_FAMILY = 1,2,3,4; PRODUCT_NAME = $(PROJECT_NAME); APPLICATION_EXTENSION_API_ONLY = YES; INFOPLIST_FILE = KeychainAccess/Info.plist; SKIP_INSTALL = YES; DEFINES_MODULE = YES; DYLIB_INSTALL_NAME_BASE = @rpath; ENABLE_BITCODE[sdk=iphone*] = YES; ENABLE_BITCODE[sdk=watch*] = YES; ENABLE_BITCODE[sdk=appletv*] = YES;
  4. Tests.xcconfig SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator; COMBINE_HIDPI_IMAGES =

    YES; PRODUCT_BUNDLE_IDENTIFIER = com.kishikawakatsumi.$ (PRODUCT_NAME:rfc1034identifier); PRODUCT_NAME = $(TARGET_NAME); APPLICATION_EXTENSION_API_ONLY = NO; INFOPLIST_FILE = KeychainAccessTests/Info.plist; EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = SharedCredentialTests.swift; EXCLUDED_SOURCE_FILE_NAMES[sdk=watch*] = *; EXCLUDED_SOURCE_FILE_NAMES[sdk=appletv*] = SharedCredentialTests.swift;