Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Target overrides the `OTHER_SWIFT_FLAGS` build setting

Here is my pod file:

platform :ios, '8.0' use_frameworks!  target 'TestApp' do   ... end 

After pod installI get the following errors:

[!] The `TestApp [Debug]` target overrides the `OTHER_SWIFT_FLAGS` build setting defined in `Pods/Target Support Files/Pods-TestApp/Pods-TestApp.debug.xcconfig'. This can lead to problems with the CocoaPods installation     - Use the `$(inherited)` flag, or     - Remove the build settings from the target.  [!] The `TestApp [Release]` target overrides the `OTHER_SWIFT_FLAGS` build setting defined in `Pods/Target Support Files/Pods-TestApp/Pods-TestApp.release.xcconfig'. This can lead to problems with the CocoaPods installation     - Use the `$(inherited)` flag, or     - Remove the build settings from the target.  

How do I resolve this problem?

like image 458
confile Avatar asked Sep 20 '15 19:09

confile


People also ask

How do I add another flag on Swift?

You can then add swift compiler flags so that we can check the current configuration through code. To do that, goto Project (not target)→Build settings → Swift Compiler → Custom flags → Other swift flags section and edit the different configuration flags. Add the flags using the syntax “ -D <flag_name>”.


2 Answers

  1. Select your project

  2. Switch to your project 's Build Settings panel.

  3. Search for Other Swift Flags

  4. Now you may see the value of Other Swift Flags shows in BOLD

(BOLD also means this value is being overridden)

enter image description here

As the warnings showing in terminal:

Use the $(inherited) flag, or - Remove the build settings from the target.

You can make the compiler happy in these two ways:

Option 1:

Double click the Other Swift Flags value area and replace the value with $(inherited)

Option 2:

Select the Other Swift Flags panel to make it highlight. Then press the Delete Button in your keyboard and now the font will become THIN, instead of BOLD.

like image 96
Zigii Wong Avatar answered Sep 18 '22 02:09

Zigii Wong


I also had same problem where I have to use multiple targets and cocoapods

  1. Staging / Development
  2. Production

You can add multiple swift flags in targets --> Build Settings ---> Other Swift flags.

like image 33
Abhijit Hadkar Avatar answered Sep 19 '22 02:09

Abhijit Hadkar