Multi-environment Configuration

Project: contains all the code, resource files, and information of the Project. Target: The specific build of the specified code and resource files. Scheme: Configures the environment for the specified Target.

  • Make a copy of Target

  • Modify the name

  • Note that the path of the newly generated info.plist needs to be changed

Selecting different targets to run will result in two different apps

  • Macro definition of the definition used under OC

  • Use of OC macro definition

Macro definition of the definition used under SwiftSwift macro definition under use

Primary results Test OC Open OC

  • Button click jumps to an OC controller

  • Display different background colors according to macro definition

  • Run two different targets on the two emulators and click the button to display the two background colors of the page

Preliminary results test OC to open Swift

  • Look for the correct reference file name in Target

  • Button click jumps to a Swift controller

  • Display different background colors according to macro definition

  • Run two different targets on the two emulators and click the button to display the two background colors of the page

conclusion

  • Generate multiple Info
  • Cumbersome configuration

Delete created targets