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
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.
Environment:
On bitrise.io with stack Xcode 8.2.x, on macOS 10.12 (Sierra)
If on Bitrise.io: which stack? If not on Bitrise.io: on what operating system? (Plus any other information you can share)
Which build Step causes the issue and which version of the step?
xcode-test@1.18.1
Reproducibility
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
Can it be reproduced by running the build locally with our CLI ( https://www.bitrise.io/cli ), after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( https://www.bitrise.io/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 - https://www.bitrise.io/contact ), with a link to the related GitHub issue.
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
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.
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.