Ignore missing files in copy bundle resource Xcode 8





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







2















short



I got an error:




No such file or directory




But this is intentional. Is there a way to ignore this error? Or can I remove files from my copy bundle resources programmatically?



Background



I have an app for different providers. Every provider has different configs and get some different json-files. For example Provider1 has file1.json, file2.json, Provider2 has file1.json,file3.json, Provider3 has only file2.json and so on.



For every app upload the json-files can change (it's a settings thing). Now in my basic project I have references to every possible json-files. This files are filled with test data.



The work around is like this and full automatic:
Get individual json files for provider -> merge founded json files in my basic project and override existing jsons with test data -> start app upload with fastlane



Usually I uncomment all test data before I upload a new version. So every possible reference is okay in XCode.



Now I forgot to uncomment things and a provider receive wrong files with my test data.



To solve that problem I set a git ignore. So in my project are only the jsons files that the provider needs. But the references from my project file are still existing. So I understand why the error appears.



How can I solve that problem smart?










share|improve this question































    2















    short



    I got an error:




    No such file or directory




    But this is intentional. Is there a way to ignore this error? Or can I remove files from my copy bundle resources programmatically?



    Background



    I have an app for different providers. Every provider has different configs and get some different json-files. For example Provider1 has file1.json, file2.json, Provider2 has file1.json,file3.json, Provider3 has only file2.json and so on.



    For every app upload the json-files can change (it's a settings thing). Now in my basic project I have references to every possible json-files. This files are filled with test data.



    The work around is like this and full automatic:
    Get individual json files for provider -> merge founded json files in my basic project and override existing jsons with test data -> start app upload with fastlane



    Usually I uncomment all test data before I upload a new version. So every possible reference is okay in XCode.



    Now I forgot to uncomment things and a provider receive wrong files with my test data.



    To solve that problem I set a git ignore. So in my project are only the jsons files that the provider needs. But the references from my project file are still existing. So I understand why the error appears.



    How can I solve that problem smart?










    share|improve this question



























      2












      2








      2








      short



      I got an error:




      No such file or directory




      But this is intentional. Is there a way to ignore this error? Or can I remove files from my copy bundle resources programmatically?



      Background



      I have an app for different providers. Every provider has different configs and get some different json-files. For example Provider1 has file1.json, file2.json, Provider2 has file1.json,file3.json, Provider3 has only file2.json and so on.



      For every app upload the json-files can change (it's a settings thing). Now in my basic project I have references to every possible json-files. This files are filled with test data.



      The work around is like this and full automatic:
      Get individual json files for provider -> merge founded json files in my basic project and override existing jsons with test data -> start app upload with fastlane



      Usually I uncomment all test data before I upload a new version. So every possible reference is okay in XCode.



      Now I forgot to uncomment things and a provider receive wrong files with my test data.



      To solve that problem I set a git ignore. So in my project are only the jsons files that the provider needs. But the references from my project file are still existing. So I understand why the error appears.



      How can I solve that problem smart?










      share|improve this question
















      short



      I got an error:




      No such file or directory




      But this is intentional. Is there a way to ignore this error? Or can I remove files from my copy bundle resources programmatically?



      Background



      I have an app for different providers. Every provider has different configs and get some different json-files. For example Provider1 has file1.json, file2.json, Provider2 has file1.json,file3.json, Provider3 has only file2.json and so on.



      For every app upload the json-files can change (it's a settings thing). Now in my basic project I have references to every possible json-files. This files are filled with test data.



      The work around is like this and full automatic:
      Get individual json files for provider -> merge founded json files in my basic project and override existing jsons with test data -> start app upload with fastlane



      Usually I uncomment all test data before I upload a new version. So every possible reference is okay in XCode.



      Now I forgot to uncomment things and a provider receive wrong files with my test data.



      To solve that problem I set a git ignore. So in my project are only the jsons files that the provider needs. But the references from my project file are still existing. So I understand why the error appears.



      How can I solve that problem smart?







      ios xcode git






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 22 '18 at 2:54









      Cœur

      19.3k10116155




      19.3k10116155










      asked Mar 9 '17 at 12:23









      kuzdukuzdu

      2,93112138




      2,93112138
























          2 Answers
          2






          active

          oldest

          votes


















          1














          I solve the problem... it's dirty but it works.



          In the merging process I clean my data by shell before the provider data override some of them:



          cd goToPathWhereFilesAre
          echo "" > file1.json
          echo "" > file2.json


          So my references are always correct and the content is empty, either the provider data are override them.



          EDIT and thanks @Anton Tropashko for the cleaner way



          cd goToPathWhereFilesAre
          touch file1.json
          touch file2.json





          share|improve this answer





















          • 1





            touch file1.json file2.json

            – Anton Tropashko
            Nov 20 '18 at 15:03



















          0














          You should create a target for each provider. And set each file (config/json) with the proper targets...
          Don't you ever work manually on differentiating versions!!! Good luck






          share|improve this answer
























          • I read a little bit about this idea, but I can't inspire by that. You configure the provider about an web interface. The data will save in a repository. I merge the basic version with the providers data. I don't want to put everything manually in my xcode Project. But good to know that this is possible.

            – kuzdu
            Mar 9 '17 at 13:04













          • i don't understand your english. don't you use Xcode to manage your dependencies?

            – Yitzchak
            Mar 9 '17 at 13:05











          • I'm sorry for my english. It's not the best. Sure I use XCode. But I have an basic project. You can brand this basic project with provider data. This provider data implicit a lot of stuff (images, jsons, colors etc.). This data will be save in a repository. My basic project is in another repository. When I upload an app I merge the the stuff together an voilá there is an individual app.

            – kuzdu
            Mar 9 '17 at 13:12











          • And if you copy files by extension and not by filename, does it help?

            – Yitzchak
            Mar 9 '17 at 13:24












          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%2f42695321%2fignore-missing-files-in-copy-bundle-resource-xcode-8%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          I solve the problem... it's dirty but it works.



          In the merging process I clean my data by shell before the provider data override some of them:



          cd goToPathWhereFilesAre
          echo "" > file1.json
          echo "" > file2.json


          So my references are always correct and the content is empty, either the provider data are override them.



          EDIT and thanks @Anton Tropashko for the cleaner way



          cd goToPathWhereFilesAre
          touch file1.json
          touch file2.json





          share|improve this answer





















          • 1





            touch file1.json file2.json

            – Anton Tropashko
            Nov 20 '18 at 15:03
















          1














          I solve the problem... it's dirty but it works.



          In the merging process I clean my data by shell before the provider data override some of them:



          cd goToPathWhereFilesAre
          echo "" > file1.json
          echo "" > file2.json


          So my references are always correct and the content is empty, either the provider data are override them.



          EDIT and thanks @Anton Tropashko for the cleaner way



          cd goToPathWhereFilesAre
          touch file1.json
          touch file2.json





          share|improve this answer





















          • 1





            touch file1.json file2.json

            – Anton Tropashko
            Nov 20 '18 at 15:03














          1












          1








          1







          I solve the problem... it's dirty but it works.



          In the merging process I clean my data by shell before the provider data override some of them:



          cd goToPathWhereFilesAre
          echo "" > file1.json
          echo "" > file2.json


          So my references are always correct and the content is empty, either the provider data are override them.



          EDIT and thanks @Anton Tropashko for the cleaner way



          cd goToPathWhereFilesAre
          touch file1.json
          touch file2.json





          share|improve this answer















          I solve the problem... it's dirty but it works.



          In the merging process I clean my data by shell before the provider data override some of them:



          cd goToPathWhereFilesAre
          echo "" > file1.json
          echo "" > file2.json


          So my references are always correct and the content is empty, either the provider data are override them.



          EDIT and thanks @Anton Tropashko for the cleaner way



          cd goToPathWhereFilesAre
          touch file1.json
          touch file2.json






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 21 '18 at 9:49

























          answered Mar 9 '17 at 13:31









          kuzdukuzdu

          2,93112138




          2,93112138








          • 1





            touch file1.json file2.json

            – Anton Tropashko
            Nov 20 '18 at 15:03














          • 1





            touch file1.json file2.json

            – Anton Tropashko
            Nov 20 '18 at 15:03








          1




          1





          touch file1.json file2.json

          – Anton Tropashko
          Nov 20 '18 at 15:03





          touch file1.json file2.json

          – Anton Tropashko
          Nov 20 '18 at 15:03













          0














          You should create a target for each provider. And set each file (config/json) with the proper targets...
          Don't you ever work manually on differentiating versions!!! Good luck






          share|improve this answer
























          • I read a little bit about this idea, but I can't inspire by that. You configure the provider about an web interface. The data will save in a repository. I merge the basic version with the providers data. I don't want to put everything manually in my xcode Project. But good to know that this is possible.

            – kuzdu
            Mar 9 '17 at 13:04













          • i don't understand your english. don't you use Xcode to manage your dependencies?

            – Yitzchak
            Mar 9 '17 at 13:05











          • I'm sorry for my english. It's not the best. Sure I use XCode. But I have an basic project. You can brand this basic project with provider data. This provider data implicit a lot of stuff (images, jsons, colors etc.). This data will be save in a repository. My basic project is in another repository. When I upload an app I merge the the stuff together an voilá there is an individual app.

            – kuzdu
            Mar 9 '17 at 13:12











          • And if you copy files by extension and not by filename, does it help?

            – Yitzchak
            Mar 9 '17 at 13:24
















          0














          You should create a target for each provider. And set each file (config/json) with the proper targets...
          Don't you ever work manually on differentiating versions!!! Good luck






          share|improve this answer
























          • I read a little bit about this idea, but I can't inspire by that. You configure the provider about an web interface. The data will save in a repository. I merge the basic version with the providers data. I don't want to put everything manually in my xcode Project. But good to know that this is possible.

            – kuzdu
            Mar 9 '17 at 13:04













          • i don't understand your english. don't you use Xcode to manage your dependencies?

            – Yitzchak
            Mar 9 '17 at 13:05











          • I'm sorry for my english. It's not the best. Sure I use XCode. But I have an basic project. You can brand this basic project with provider data. This provider data implicit a lot of stuff (images, jsons, colors etc.). This data will be save in a repository. My basic project is in another repository. When I upload an app I merge the the stuff together an voilá there is an individual app.

            – kuzdu
            Mar 9 '17 at 13:12











          • And if you copy files by extension and not by filename, does it help?

            – Yitzchak
            Mar 9 '17 at 13:24














          0












          0








          0







          You should create a target for each provider. And set each file (config/json) with the proper targets...
          Don't you ever work manually on differentiating versions!!! Good luck






          share|improve this answer













          You should create a target for each provider. And set each file (config/json) with the proper targets...
          Don't you ever work manually on differentiating versions!!! Good luck







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 9 '17 at 12:41









          YitzchakYitzchak

          1,50031330




          1,50031330













          • I read a little bit about this idea, but I can't inspire by that. You configure the provider about an web interface. The data will save in a repository. I merge the basic version with the providers data. I don't want to put everything manually in my xcode Project. But good to know that this is possible.

            – kuzdu
            Mar 9 '17 at 13:04













          • i don't understand your english. don't you use Xcode to manage your dependencies?

            – Yitzchak
            Mar 9 '17 at 13:05











          • I'm sorry for my english. It's not the best. Sure I use XCode. But I have an basic project. You can brand this basic project with provider data. This provider data implicit a lot of stuff (images, jsons, colors etc.). This data will be save in a repository. My basic project is in another repository. When I upload an app I merge the the stuff together an voilá there is an individual app.

            – kuzdu
            Mar 9 '17 at 13:12











          • And if you copy files by extension and not by filename, does it help?

            – Yitzchak
            Mar 9 '17 at 13:24



















          • I read a little bit about this idea, but I can't inspire by that. You configure the provider about an web interface. The data will save in a repository. I merge the basic version with the providers data. I don't want to put everything manually in my xcode Project. But good to know that this is possible.

            – kuzdu
            Mar 9 '17 at 13:04













          • i don't understand your english. don't you use Xcode to manage your dependencies?

            – Yitzchak
            Mar 9 '17 at 13:05











          • I'm sorry for my english. It's not the best. Sure I use XCode. But I have an basic project. You can brand this basic project with provider data. This provider data implicit a lot of stuff (images, jsons, colors etc.). This data will be save in a repository. My basic project is in another repository. When I upload an app I merge the the stuff together an voilá there is an individual app.

            – kuzdu
            Mar 9 '17 at 13:12











          • And if you copy files by extension and not by filename, does it help?

            – Yitzchak
            Mar 9 '17 at 13:24

















          I read a little bit about this idea, but I can't inspire by that. You configure the provider about an web interface. The data will save in a repository. I merge the basic version with the providers data. I don't want to put everything manually in my xcode Project. But good to know that this is possible.

          – kuzdu
          Mar 9 '17 at 13:04







          I read a little bit about this idea, but I can't inspire by that. You configure the provider about an web interface. The data will save in a repository. I merge the basic version with the providers data. I don't want to put everything manually in my xcode Project. But good to know that this is possible.

          – kuzdu
          Mar 9 '17 at 13:04















          i don't understand your english. don't you use Xcode to manage your dependencies?

          – Yitzchak
          Mar 9 '17 at 13:05





          i don't understand your english. don't you use Xcode to manage your dependencies?

          – Yitzchak
          Mar 9 '17 at 13:05













          I'm sorry for my english. It's not the best. Sure I use XCode. But I have an basic project. You can brand this basic project with provider data. This provider data implicit a lot of stuff (images, jsons, colors etc.). This data will be save in a repository. My basic project is in another repository. When I upload an app I merge the the stuff together an voilá there is an individual app.

          – kuzdu
          Mar 9 '17 at 13:12





          I'm sorry for my english. It's not the best. Sure I use XCode. But I have an basic project. You can brand this basic project with provider data. This provider data implicit a lot of stuff (images, jsons, colors etc.). This data will be save in a repository. My basic project is in another repository. When I upload an app I merge the the stuff together an voilá there is an individual app.

          – kuzdu
          Mar 9 '17 at 13:12













          And if you copy files by extension and not by filename, does it help?

          – Yitzchak
          Mar 9 '17 at 13:24





          And if you copy files by extension and not by filename, does it help?

          – Yitzchak
          Mar 9 '17 at 13:24


















          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%2f42695321%2fignore-missing-files-in-copy-bundle-resource-xcode-8%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

          Guess what letter conforming each word

          Port of Spain

          Run scheduled task as local user group (not BUILTIN)