a7ex / xcresultparser

Parse the binary xcresult bundle from Xcode builds and testruns
MIT License
83 stars 24 forks source link

Migrate from Xcode project to Swift Package #1

Closed darrarski closed 2 years ago

darrarski commented 2 years ago

Hi @a7ex! Thanks for making xcresultparser, I appreciate the effort you put into creating this open-source tool ❤️

Summary

I tried to use xcresultparser, but experienced several issues:

  1. The binary attached in the releases tab on GitHub does not work for me, due to code signing issues (I guess it's connected to the certificate used for signing, or lack of notarization).

    Screenshot 2021-08-01 at 19 50 21

  2. When I cloned the repository and tried to build the Xcode project, I couldn't do it because code signing configuration was using a team I do not belong to. I had to disable code signing and choose the "Sign to run locally" option.

  3. After Xcode updated Swift Package dependencies, the project failed to compile again. It looks like there were some API changes in XCResultKit library that breaks xcresultparser. I think these can be fixed easily, but I didn't want to change the code at this point, so I just locked the dependencies.

What was done in this PR

These changes solved all the problems with code signing and simplified the project by removing xcresultparser.xcodeproj. Of course, the project can be still developed with Xcode by opening Package.swift (double click should do the work).

Unresolved issues

a7ex commented 2 years ago

Hello Dariusz, thanks for your help!

  1. The binary attached in the releases tab on GitHub does not work for me, due to code signing issues (I guess it's connected to the certificate used for signing, or lack of notarization).

Thanks for letting me know. I did not sign or create profiles at all. But I see now, that it was set to "Automatic", which does all kinds of (most of the time unwanted) trickery and creates profiles on my behalf without me even knowing about it. But this time it didn't, because I didn't sign anything. It was all the time set to "Sign to Run Locally". This is all the default setup, if you create a "Commandline Tool" from template in Xcode.

If I then "Archive" and "Distribute Content" in Xcode, I can just select "Built Products" and this will export the built binary. That is all. No option for signing.

I have never seen this screenshot with the app. I wasn't aware, that the provided binary doesn't work. Because for me it does?!

I have moved this binary to a few of our build agents, amongst which brand new ones, and could just use the binary from the command line.

But now I realise, that it might have been just a coincidence, and my own development certificate might be installed on the build agents. I will investigate that.

I will check, if your changes still allow me to create a command line tool, which works standalone. And if so, I will merge your PR.

Thanks again for your help!

  1. When I cloned the repository and tried to build the Xcode project, I couldn't do it because code signing configuration was using a team I do not belong to. I had to disable code signing and choose the "Sign to run locally" option.

Just changing the team to "None" didn't help? That's what I usually do, when I build GitHub projects from other developers. Odd. I used the tool with "Sign to run locally" until now myself. It should be set to "Sign to run locally", doesn't it, if you open it on your machine?

  1. After Xcode updated Swift Package dependencies, the project failed to compile again. It looks like there were some API changes in XCResultKit library that breaks xcresultparser. I think these can be fixed easily, but I didn't want to change the code at this point, so I just locked the dependencies.

Thanks for the heads, I didn't check XCResultKit changes and forgot to pin it. I will look into the changes.

Unresolved issues

  • The binary attached to GitHub Releases page is still broken. It needs to be updated after building the xcresultparser like described in README.md.

I will create a new one, as soon as the issues are addressed