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

Unify targets for multiple platforms into one target

Unify targets for multiple platforms into one target

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

9bf923e39671cde83584e3e926296c13?s=128

Kishikawa Katsumi

December 16, 2015
Tweet

Transcript

  1. Unify targets for multiple platforms into one target

  2. https://github.com/kishikawakatsumi/ kishikawa katsumi http://kishikawakatsumi.com/ Realm

  3. None
  4. None
  5. None
  6. None
  7. None
  8. None
  9. None
  10. How to achieve it?

  11. None
  12. None
  13. Aggregate each settings of targets with xcconfings

  14. 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;
  15. 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;
  16. Release.xcconfig #include "Base.xcconfig" BITCODE_GENERATION_MODE = bitcode; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS

    = NO; MTL_ENABLE_DEBUG_INFO = NO; VALIDATE_PRODUCT = YES;
  17. 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;
  18. 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;
  19. The Structures #BTF %FCVH 3FMFBTF 5FTUT 'SBNFXPSL

  20. None
  21. None
  22. ishkawa/APIKit/pull/110

  23. dempseyatgithub/BuildSettingExtractor

  24. None
  25. None
  26. None
  27. mrackwitz/xcconfigs

  28. None
  29. try! Swift Conference w ʙ w ौ୩ϚʔΫγςΟ w ਓҎ্ͷࠃ಺֎τοϓϨϕϧͷΤϯδχΞʹΑΔߨԋ w

    ΞϑλʔύʔςΟ w Φʔϓϯιʔεޙॳͷେن໛4XJGUΧϯϑΝϨϯε
  30. http://tryswiftconf.com