Closed mecoFarid closed 1 year ago
The point of this is to add the generated file into the target, no playing around with the generated code required. 🙂 There might be a way to use the xcodeproj
ruby gem to add this functionality, PRs are welcome. 😁
Thanks for reply.
With this "no one wants to manually play with generated code", I actually meant the drag/drop 😬. Okay, I will check this as soon as I have time and create PR if I can achieve something.
Quick follow-up question: With current configuration, how is this done in CI pipelines? I mean if you wanna execute unit tests in CI server, how the generated file is added to target given we do not check the generated file into version control?
Oh, adding the file to the Xcode project modifies the .pbxproj
manifest file that you have to commit into source control. Xcode then knows about the file, you only need to do this the first time you run the generator.
Alright, that is nice.
In the CocoaPods documentations there is a part that says:
# After running once, locate `GeneratedMocks.swift` and drag it into your Xcode test target group.
Is there any way to automate this? Probably no one wants to manually play with generated code