Skip to content
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

[snapshot] Add support for Xcode 9 #9559

Merged
merged 3 commits into from Jun 22, 2017
Merged

[snapshot] Add support for Xcode 9 #9559

merged 3 commits into from Jun 22, 2017

Conversation

ohayon
Copy link
Contributor

@ohayon ohayon commented Jun 22, 2017

In Xcode 9, Apple decided to use Filename rather than Xcode 8's FileName as a key in the plist generated by tests. This change just looks for that key if using Xcode 9.

@ohayon ohayon force-pushed the snapshot-9 branch 2 times, most recently from 2d68d44 to 16b50e1 Compare June 22, 2017 20:46
@@ -97,7 +97,9 @@ def self.find_screenshot(activity)
return find_screenshot(subactivity) if subactivity["Title"] == "Synthesize event"
end

if activity["Attachments"]
if Helper.xcode_at_least?("9") && activity["Attachments"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we shouldn't actually check the version, but just see if the key is available? Not sure if that's better, both approaches are totally fine I think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was just thinking that myself. 👍

@@ -18,10 +18,6 @@ def work
sleep 3 # to be sure the user sees this, as compiling clears the screen
end

if Helper.xcode_at_least?("9")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yesss 👍

Copy link
Member

@KrauseFx KrauseFx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wohooo, awesome 👍

@KrauseFx KrauseFx changed the title [snapshot] Support Xcode 9 [snapshot] Add support for Xcode 9 Jun 22, 2017
@@ -97,7 +97,9 @@ def self.find_screenshot(activity)
return find_screenshot(subactivity) if subactivity["Title"] == "Synthesize event"
end

if activity["Attachments"]
if activity["Attachments"] && activity["Attachments"].last["Filename"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhhhh, this line might crash when activity["Attachments"] is an empty array, right?

@@ -2,6 +2,10 @@ module Fastlane
module Actions
class ResetSimulatorContentsAction < Action
def self.run(params)
if Helper.xcode_at_least?("9")
UI.user_error!("resetting simulators currently doesn't work with Xcode 9, stay tuned as we are working to add support for all new tools.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for nitpicking, didn't see this before, could we also include "\nYou can change the Xcode version to use using sudo xcode-select -s /Applications/Xcode...app" as we did on the other message, to let people know how to change the selected Xcode version for command line apps? Most people are probably not aware.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But if they are building the app with Xcode 9 and Swift 4 or using any of the new XCTest stuff, it wont work for them if they use xcode-select to change to version 8 right?

@ohayon ohayon merged commit 7510a8d into master Jun 22, 2017
@ohayon ohayon deleted the snapshot-9 branch June 22, 2017 21:15
@KrauseFx KrauseFx mentioned this pull request Jun 23, 2017
@fastlane-bot
Copy link

Congratulations! 🎉 This was released as part of fastlane 2.41.0 🚀

dvdchr pushed a commit to dvdchr/fastlane that referenced this pull request Sep 5, 2017
@fastlane fastlane locked and limited conversation to collaborators Sep 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants