View in English

  • Apple Developer
    • Get Started

    Explore Get Started

    • Overview
    • Learn
    • Apple Developer Program

    Stay Updated

    • Latest News
    • Hello Developer
    • Platforms

    Explore Platforms

    • Apple Platforms
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    Featured

    • Design
    • Distribution
    • Games
    • Accessories
    • Web
    • Home
    • CarPlay
    • Technologies

    Explore Technologies

    • Overview
    • Xcode
    • Swift
    • SwiftUI

    Featured

    • Accessibility
    • App Intents
    • Apple Intelligence
    • Games
    • Machine Learning & AI
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community-driven events
    • Developer Forums
    • Open Source

    Featured

    • WWDC
    • Swift Student Challenge
    • Developer Stories
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Centers
    • Documentation

    Explore Documentation

    • Documentation Library
    • Technology Overviews
    • Sample Code
    • Human Interface Guidelines
    • Videos

    Release Notes

    • Featured Updates
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • Downloads

    Explore Downloads

    • All Downloads
    • Operating Systems
    • Applications
    • Design Resources

    Featured

    • Xcode
    • TestFlight
    • Fonts
    • SF Symbols
    • Icon Composer
    • Support

    Explore Support

    • Overview
    • Help Guides
    • Developer Forums
    • Feedback Assistant
    • Contact Us

    Featured

    • Account Help
    • App Review Guidelines
    • App Store Connect Help
    • Upcoming Requirements
    • Agreements and Guidelines
    • System Status
  • Quick Links

    • Events
    • News
    • Forums
    • Sample Code
    • Videos
 

Vídeos

Abrir menu Fechar menu
  • Coleções
  • Todos os vídeos
  • Sobre

Mais vídeos

  • Sobre
  • Código
  • Explore advanced project configuration in Xcode

    Working with more complex Xcode projects? You've come to the right place. Discover how you can configure your project to build for multiple Apple platforms, filter content per-platform, create custom build rules and file dependencies, and more. We'll take you through multi-platform framework targets, detail how to optimize your project and scheme configuration, and show you how to make effective use of configuration settings files.

    We'll explore configuring schemes for parallel builds and implicit dependencies, script phases, custom build rules, setting up input and output file dependencies, build phase file lists, and deduplicating work via aggregate targets. Lastly, find out more about the build settings editor, how levels work, and configuration settings file syntax.

    Recursos

      • Vídeo HD
      • Vídeo SD

    Vídeos relacionados

    WWDC21

    • Qualities of great iPad and iPhone apps on Macs with M1
  • Buscar neste vídeo...
    • 7:38 - Shell Script - Output Files

      $(DERIVED_FILE_DIR)/$(INPUT_FILE_BASE).compiledrecipe
    • 8:22 - Build Rule - code

      "$SRCROOT/Scripts/gen-code.sh" "$SCRIPT_INPUT_FILE" "$SCRIPT_OUTPUT_FILE_0"
    • 10:15 - Shell Script - code

      # Package up the recipes.
      
      echo "packaging..."
      
      for i in $(seq 0 $(expr ${SCRIPT_INPUT_FILE_LIST_COUNT} - 1)) ; do
          infile_="SCRIPT_INPUT_FILE_LIST_$i"
          eval infile=\$$infile_
      
          while IFS= read -r file; do
              cat "$file" >> "$SCRIPT_OUTPUT_FILE_0"
          done < "$infile"
      done
    • 11:34 - XCFileList

      $(SRCROOT)/Recipes/Instructions/berry-blue.md
      $(SRCROOT)/Recipes/Instructions/carrot-chops.md
      $(SRCROOT)/Recipes/Instructions/hulking-lemonade.md
      $(SRCROOT)/Recipes/Instructions/kiwi-cutie.md
      $(SRCROOT)/Recipes/Instructions/lemonberry.md
      $(SRCROOT)/Recipes/Instructions/love-you-berry-much.md
      $(SRCROOT)/Recipes/Instructions/mango-jambo.md
      $(SRCROOT)/Recipes/Instructions/one-in-a-melon.md
      $(SRCROOT)/Recipes/Instructions/papas-papaya.md
      $(SRCROOT)/Recipes/Instructions/pina-y-coco.md
    • 11:57 - Shell Script - Input File Lists

      $(SRCROOT)/FileList.xcfilelist
    • 12:11 - Shell Script - Output Files

      $(PROJECT_TEMP_DIR)/instructions.mdarchive
    • 12:50 - Environment Variables - Script Phases

      // These environment variables are available in script phases:
      
      SCRIPT_INPUT_FILE_COUNT // This specifies the number of paths from the Input Files table.
      SCRIPT_INPUT_FILE_n // This specifies the absolute path of the nth file from the Input Files table, with build settings expanded.
      
      SCRIPT_INPUT_FILE_LIST_COUNT // This specifies the number of input file lists.
      SCRIPT_INPUT_FILE_LIST_n // This specifies the absolute path of the nth "resolved" input file list with contained paths made absolute, build settings expanded, and comments removed.
      
      SCRIPT_OUTPUT_FILE_COUNT // This specifies the number of paths from the Output Files table.
      SCRIPT_OUTPUT_FILE_n // This specifies the absolute path of the nth file from the Output Files table, with build settings expanded.
      
      SCRIPT_OUTPUT_FILE_LIST_COUNT // This specifies the number of output file lists.
      SCRIPT_OUTPUT_FILE_LIST_n // This specifies the absolute path of the nth "resolved" output file list with contained paths made absolute, build settings expanded, and comments removed.
      
      * n in the above examples refers to a 0-based index.
    • 13:00 - Environment Variables - Build Rules

      // These environment variables are available in build rules:
      
      SCRIPT_INPUT_FILE // This specifies the absolute path of the main input file being processed by the rule.
      
      OTHER_INPUT_FILE_FLAGS // This specifies custom command line flags defined for the input file in the Compile Sources build phase.
      
      SCRIPT_INPUT_FILE_COUNT // This specifies the number of paths from the Input Files table.
      SCRIPT_INPUT_FILE_n // This specifies the absolute path of the nth file from the Input Files table, with build settings expanded.
      
      SCRIPT_OUTPUT_FILE_COUNT // This specifies the number of paths from the Output Files table.
      SCRIPT_OUTPUT_FILE_n // This specifies the absolute path of the nth file from the Output Files table, with build settings expanded.
      
      SCRIPT_HEADER_VISIBILITY // This is set to "public" or "private" if the input file being processed is a header file in a Headers build phase, and its Header Visibility is set to one of those values.
      
      HEADER_OUTPUT_DIR // This specifies the output directory to which the input file should be copied, if the input file being processed is a header file in a Headers build phase.
      
      * n in the above examples refers to a 0-based index.
    • 18:17 - Build setting definition

      MY_BUILD_SETTING_NAME = "A build setting value"
    • 18:30 - Build setting definition with conditions

      MY_BUILD_SETTING_NAME = "A build setting value"
      MY_BUILD_SETTING_NAME[config=Debug] = -debug_flag
      MY_BUILD_SETTING_NAME[arch=arm64] = -arm64_only
      MY_BUILD_SETTING_NAME[sdk=iphone*] = -ios_only
    • 19:50 - Build setting composition

      IS_BUILD_SETTING_ENABLED = NO
      MY_BUILD_SETTING_NO = -use_this_one
      MY_BUILD_SETTING_YES = -use_this_instead
      MY_BUILD_SETTING = $(MY_BUILD_SETTING_$(IS_BUILD_SETTING_ENABLED))
    • 21:08 - Build setting evaluation operators (paths)

      $(MY_PATH:dir)
      $(MY_PATH:file)
      $(MY_PATH:base)
      $(MY_PATH:suffix)
      $(MY_PATH:standardizepath)
    • 21:21 - Build setting evaluation operators (replacement)

      $(MY_PATH:dir=/tmp)
      $(MY_PATH:file=/better.swift)
      $(MY_PATH:base=another)
      $(MY_PATH:suffix=m)
      $(MY_PATH:default=YES)

Developer Footer

  • Vídeos
  • WWDC21
  • Explore advanced project configuration in Xcode
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning & AI
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    Open Menu Close Menu
    • Help Guides & Articles
    • Contact Us
    • Forums
    • Feedback & Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • Mini Apps Partner Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Read the latest news.
    Get the Apple Developer app.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines