Why does CocoaPods target have build settings?












0















Why do our CocoaPods targets have different build settings than our actual project target settings? Shouldn't it just have project target settings? How does it work when our project is being compiled; does the compiler look at the CocoaPods settings or just our project target settings? If so, then what is the purpose of CocoaPods having its own build settings?










share|improve this question





























    0















    Why do our CocoaPods targets have different build settings than our actual project target settings? Shouldn't it just have project target settings? How does it work when our project is being compiled; does the compiler look at the CocoaPods settings or just our project target settings? If so, then what is the purpose of CocoaPods having its own build settings?










    share|improve this question



























      0












      0








      0








      Why do our CocoaPods targets have different build settings than our actual project target settings? Shouldn't it just have project target settings? How does it work when our project is being compiled; does the compiler look at the CocoaPods settings or just our project target settings? If so, then what is the purpose of CocoaPods having its own build settings?










      share|improve this question
















      Why do our CocoaPods targets have different build settings than our actual project target settings? Shouldn't it just have project target settings? How does it work when our project is being compiled; does the compiler look at the CocoaPods settings or just our project target settings? If so, then what is the purpose of CocoaPods having its own build settings?







      xcode cocoapods






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 2 at 18:09









      shim

      4,10664779




      4,10664779










      asked Jan 2 at 17:53









      izzy Machadoizzy Machado

      1301113




      1301113
























          1 Answer
          1






          active

          oldest

          votes


















          2














          CocoaPods generally are built as a framework in iOS, and frameworks can have different settings than the main application, and are built as a separate bundle. Every compile-unit (more or less "source file") can also have its own settings (at least in ObjC; I've never tried that in Swift).



          There are lots of reasons to have different compile settings for different parts of the program, and specifically for third-party code. For example, you might want to compile third-party code with a higher optimization level and debug stripping if you don't plan to debug that portion. I personally turn off all warnings in third-party code.



          It's not as common anymore, but during the ARC transition it was very common to compile some of the program with ARC and some without. As Swift evolves, you should expect it become more common for libraries to be written in source-incompatible versions of Swift that require different settings.






          share|improve this answer
























          • ok, thanks so if the frameworks im using dont have any instructions to change build settings and everything is building fine I should leave all the settings as is then right ?

            – izzy Machado
            Jan 2 at 18:12






          • 1





            Yeah, you generally shouldn't modify them directly. If you want to modify CocoaPod build settings, you would do that in your Podfile. For example, I generally include inhibit_all_warnings!. CP will take care of building the project correctly.

            – Rob Napier
            Jan 2 at 18:22














          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54010941%2fwhy-does-cocoapods-target-have-build-settings%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          CocoaPods generally are built as a framework in iOS, and frameworks can have different settings than the main application, and are built as a separate bundle. Every compile-unit (more or less "source file") can also have its own settings (at least in ObjC; I've never tried that in Swift).



          There are lots of reasons to have different compile settings for different parts of the program, and specifically for third-party code. For example, you might want to compile third-party code with a higher optimization level and debug stripping if you don't plan to debug that portion. I personally turn off all warnings in third-party code.



          It's not as common anymore, but during the ARC transition it was very common to compile some of the program with ARC and some without. As Swift evolves, you should expect it become more common for libraries to be written in source-incompatible versions of Swift that require different settings.






          share|improve this answer
























          • ok, thanks so if the frameworks im using dont have any instructions to change build settings and everything is building fine I should leave all the settings as is then right ?

            – izzy Machado
            Jan 2 at 18:12






          • 1





            Yeah, you generally shouldn't modify them directly. If you want to modify CocoaPod build settings, you would do that in your Podfile. For example, I generally include inhibit_all_warnings!. CP will take care of building the project correctly.

            – Rob Napier
            Jan 2 at 18:22


















          2














          CocoaPods generally are built as a framework in iOS, and frameworks can have different settings than the main application, and are built as a separate bundle. Every compile-unit (more or less "source file") can also have its own settings (at least in ObjC; I've never tried that in Swift).



          There are lots of reasons to have different compile settings for different parts of the program, and specifically for third-party code. For example, you might want to compile third-party code with a higher optimization level and debug stripping if you don't plan to debug that portion. I personally turn off all warnings in third-party code.



          It's not as common anymore, but during the ARC transition it was very common to compile some of the program with ARC and some without. As Swift evolves, you should expect it become more common for libraries to be written in source-incompatible versions of Swift that require different settings.






          share|improve this answer
























          • ok, thanks so if the frameworks im using dont have any instructions to change build settings and everything is building fine I should leave all the settings as is then right ?

            – izzy Machado
            Jan 2 at 18:12






          • 1





            Yeah, you generally shouldn't modify them directly. If you want to modify CocoaPod build settings, you would do that in your Podfile. For example, I generally include inhibit_all_warnings!. CP will take care of building the project correctly.

            – Rob Napier
            Jan 2 at 18:22
















          2












          2








          2







          CocoaPods generally are built as a framework in iOS, and frameworks can have different settings than the main application, and are built as a separate bundle. Every compile-unit (more or less "source file") can also have its own settings (at least in ObjC; I've never tried that in Swift).



          There are lots of reasons to have different compile settings for different parts of the program, and specifically for third-party code. For example, you might want to compile third-party code with a higher optimization level and debug stripping if you don't plan to debug that portion. I personally turn off all warnings in third-party code.



          It's not as common anymore, but during the ARC transition it was very common to compile some of the program with ARC and some without. As Swift evolves, you should expect it become more common for libraries to be written in source-incompatible versions of Swift that require different settings.






          share|improve this answer













          CocoaPods generally are built as a framework in iOS, and frameworks can have different settings than the main application, and are built as a separate bundle. Every compile-unit (more or less "source file") can also have its own settings (at least in ObjC; I've never tried that in Swift).



          There are lots of reasons to have different compile settings for different parts of the program, and specifically for third-party code. For example, you might want to compile third-party code with a higher optimization level and debug stripping if you don't plan to debug that portion. I personally turn off all warnings in third-party code.



          It's not as common anymore, but during the ARC transition it was very common to compile some of the program with ARC and some without. As Swift evolves, you should expect it become more common for libraries to be written in source-incompatible versions of Swift that require different settings.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 2 at 18:00









          Rob NapierRob Napier

          206k28304432




          206k28304432













          • ok, thanks so if the frameworks im using dont have any instructions to change build settings and everything is building fine I should leave all the settings as is then right ?

            – izzy Machado
            Jan 2 at 18:12






          • 1





            Yeah, you generally shouldn't modify them directly. If you want to modify CocoaPod build settings, you would do that in your Podfile. For example, I generally include inhibit_all_warnings!. CP will take care of building the project correctly.

            – Rob Napier
            Jan 2 at 18:22





















          • ok, thanks so if the frameworks im using dont have any instructions to change build settings and everything is building fine I should leave all the settings as is then right ?

            – izzy Machado
            Jan 2 at 18:12






          • 1





            Yeah, you generally shouldn't modify them directly. If you want to modify CocoaPod build settings, you would do that in your Podfile. For example, I generally include inhibit_all_warnings!. CP will take care of building the project correctly.

            – Rob Napier
            Jan 2 at 18:22



















          ok, thanks so if the frameworks im using dont have any instructions to change build settings and everything is building fine I should leave all the settings as is then right ?

          – izzy Machado
          Jan 2 at 18:12





          ok, thanks so if the frameworks im using dont have any instructions to change build settings and everything is building fine I should leave all the settings as is then right ?

          – izzy Machado
          Jan 2 at 18:12




          1




          1





          Yeah, you generally shouldn't modify them directly. If you want to modify CocoaPod build settings, you would do that in your Podfile. For example, I generally include inhibit_all_warnings!. CP will take care of building the project correctly.

          – Rob Napier
          Jan 2 at 18:22







          Yeah, you generally shouldn't modify them directly. If you want to modify CocoaPod build settings, you would do that in your Podfile. For example, I generally include inhibit_all_warnings!. CP will take care of building the project correctly.

          – Rob Napier
          Jan 2 at 18:22






















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54010941%2fwhy-does-cocoapods-target-have-build-settings%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          Npm cannot find a required file even through it is in the searched directory