2

I'm trying to get a somewhat complex application built with Xcode 10 so that I can submit it to the store shortly, and I am getting the following error (paths changed for simplicity reason).

Showing All Errors Only :-1: shell script build rule for '/Uses/Desktop/ios/app/Vendor/QMServices/QMContactListCache/QMContactListCache/CoreData/QMContactListModel.xcdatamodeld' must declare at least one output file (in target 'QMContactListCache')

I really have no clue what this means and I am not even sure how to find the target in the project as I don't see it. It builds in Xcode 9 no problems.

Any help would be appreciated.

1
  • 1
    So you claim you're not using the QMServices pod? QuickBlox?
    – matt
    Oct 20, 2018 at 23:04

2 Answers 2

2

Error removed by deleting duplicate files in the copy bundle resources

Click on Build phase and click on Copy Bundle Resources In my case i have info.pllist duplicate file in bundle,now working fine for me

1.Error removed by deleting duplicate files in the copy bundle resources. 2.Click on Build phase and click on Copy Bundle Resources. 3.In my case i have info.pllist duplicate file in bundle,now working fine for me.

0

To answer the actual question:

  • in your target's settings, there's Build Rules
  • the build rules define how each kind of source-file is converted into something meaningful during build. (e.g. how your .m files are compiled using clang)
  • if you add your own file-processing rule, you need to tell the build system, what kind out output your script produces
  • you can do this using the Output Files table underneath the script-editor

Example:

  • you add a processor for Markdown files using Pandoc

    • it'll convert .md files to .html files
    • the first line of parameters defaults to "Process" Source files with names matching: and your pattern is *.md
  • the second line of parameters can be left as created "Using" Custom script: and Run once per Architecture.

  • your actual script may look like something along these lines

    pandoc --standalone $INPUT_FILE_PATH --output "$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/$INPUT_FILE_REGION_PATH_COMPONENT$INPUT_FILE_BASE.html"

  • there're more options to be configured: Dependency file, Input Files and most importantly Output Files which is super easy to miss.

    • click on + underneath Output Files
    • the value should match what you use in your script ($(BUILT_PRODUCTS_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/$(INPUT_FILE_REGION_PATH_COMPONENT)$(INPUT_FILE_BASE).html in this case)
  • now you can add Markdown files to your project and simply tick the checkbox under Target Membership just like you do to add source-code files to a specific target. But instead of just copying the file to the resource-folder they'll be processed using the configured script and produce HTML files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.