-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Apple API sessions from Fastlane Spaceship #257
Add support for Apple API sessions from Fastlane Spaceship #257
Conversation
This is such a great idea! Something I tinkered with in the past but used ruby to achieve it. I do hope this gets in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Is this ready or still being drafted?
I'll update in the next couple of days and then remove the draft status. |
971de06
to
5dee615
Compare
@adamprice @tahirmt Is this ready for merge? This will solve the issue with CI environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me but we need a review from @MattKiazyk
@MattKiazyk can you please review this. This is very much needed as we are planning to migrate from xcversion to xcodes in our ci environment. xcodes seems to be very fast. |
@ykhandelwal913 I'll try to find some time this weekend to get it through. Sorry for the delay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the time and contribution @adamprice!
Just a couple of picky additions to make the error messages stand out in the console!
Thanks again - sorry for the delay!
@MattKiazyk thanks for looking into it. Are you planning to merge and release a new version of xcodes or it this waiting for some other change? |
@MattKiazyk @adamprice can that be merged? |
@MattKiazyk we have a big dependency on fastlane session to migrate to xcodes. Can this PR request be merge if all checks are ok? |
Thanks @adamprice for all the work! @ykhandelwal913 this will be in the next version. However, I don't have a specific timeline on when that will be. |
As I use fastlane and xcodes, I thought it could be cool if xcodes could use the same Apple API auth session as fastlane to avoid having to authenticate twice.
I've added two new command line options:
With this mode enabled, cookies are copied from either the
FASTLANE_SESSION
environment variable or~/.fastlane/spaceship/<user>/cookie
file into an ephemeralURLSessionConfiguration
that's then used for creating aURLSession
to send requests. It also works with the way cookies are copied into the request foraria2
. Hopefully this should stop the cookies from conficting with any existing sessions present in xcodes and they wont persist after the application has exited.The current implementation is obviously coupled with how fastlane handles its cookies. As there's also a fastlane action for xcodes (https://docs.fastlane.tools/actions/xcodes/), another option could be coming up with a tool agnostic format for the cookies that the fastlane action can provide to xcodes.