CoreData generated file problem

Bitrise Build Issue Report template

Description of the issue

I’m facing a problem cause i’m using core data generated file and the analyzer and archiver step dont find them on bitrise. Everything working well when i m doing archive from my mac


Where did the issue happen?

XCode 8.2
xcode-analyze@1.6.0 (exit code: 65)
xcode-archive@2.0.4 (exit code: 1)

1 Like

Can you please include the error from the log? The error message you can find in the steps’ log.

I’m going to send it from email

Perfect, thank you! :slight_smile:

Relevant line of the log:

<unknown>:0: error: no such file or directory: '.../Something+CoreDataClass.swift'

or just

error: no such file or directory: '.../Something+CoreDataClass.swift'

Note the +CoreDataClass.swift at the end of the file name.

This is a known Xcode issue, possible solutions:

Bitrise Build Issue Report template

Description of the issue

I’ve got CoreData models in my iOS app. And with Xcode 8.0 there’s a new functionality where you can specify “Codegen” for an entity. If you specify “Class Definition” the class is defined in a auto-generated class created by Xcode (which resides in DerivedData).

This classes aren’t created for one of my libraries. Which gives me the error:
“error: no such file or directory: …/Person+CoreDataClass.swift”

It works if I run “bitrise run primary” localy (and I’ve made sure to clean DerivedData before running it). I’m using this setting in other apps on bitrise and there it’s working fine as well.


On with stack Xcode 8.2.x, on macOS 10.12 (Sierra)

If on which stack? If not on on what operating system? (Plus any other information you can share)

Which build Step causes the issue and which version of the step?



  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO

  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : YES/NO

  • If you have multiple different build configurations (workflows), does the issue affect all/more than one? : YES/NO

  • Does upgrading the build Step to the latest version help? : It’s on latest

  • When did the issue start? : When the CoreData model was created

Linux/Android stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( )? If no, can it be reproduced with Docker (using the same docker images / environment we use on Related guide: .

It can not be reproduced locally.

Other stacks

Can it be reproduced by running the build locally with our CLI ( ), after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( )?

It can not be reproduced locally with bitrise tool.

Build log

Please attach the build log (you can download the build log from the build’s page, once the build is finished, using the “Download log” button - floating at the bottom right corner of the log viewer), or if you can’t attach the whole log then send the full log through a private channel (e.g. email - ), with a link to the related GitHub issue.

1 Like

For possible solutions please see my previous reply above.

Thanks for the reply i will take a look on that

1 Like

Let us know how it goes!

I couldnt get any of those working, except the one suggesting to turn of automatic codegen, but that’s just a temporary solution in my opinion. Anyway, thanks for the suggestions.

The first beta of Xcode 8.3 was just released, we’re working on adding it as a new stack option. Maybe the issue was resolved in 8.3, it will definitely worth a try at least :wink:

1 Like

@r.trigodet did you find a solution?

@viktorbenei No not for the moment :confused: We will try with Xcode 8.3, but we are not on this project for the moment

Any solution for this yet? we have the same problem. Thanks in advance.

@chris_brind_waracle did you try it with the Xcode 8.3.x stack / Xcode 8.3 (beta)?

I am seeing the same issue. Upgrading to Xcode 8.3 fixes the issue. However until 8.3 is out of beta this is not a real solution for my team.

@Peter did you check the suggested solutions, e.g. CoreData generated file problem ?

Yes I did and they did not help.

Code generation is not being changed
Code generation is set to "class definition"
Class names are not named incorrectly (No “.” prefix)
Module set to to "Global namespace"
Code generation works locally
Running the birtise.yml locally also works.

Update 1:
Was able to get access to a VM from bitrise. Was able to run unit test from Xcode. However when run using bitrise cli the database entities are not generated.

Update 2:
If I change codegen to “Manual/None” for all entities and “Create NSManagedObject subclass” for all entities, bitrise will succeed.

1 Like

Just for clarity, the CLI does not do any magic. The related step (Xcode Test in this case) simply transforms the configuration inputs into an xcodebuild command and runs that command. The error comes from xcodebuild (Xcode’s command line tool), not from bitrise / bitrise CLI. You can find the full xcodebuild command in the step’s log.

This note is mainly for future reference, not against what you wrote @Peter, just to avoid confusion when someone else reads this.

Thanks - we’ll test with 8.3.

1 Like