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
Conversation
2d68d44
to
16b50e1
Compare
snapshot/lib/snapshot/collector.rb
Outdated
@@ -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"] |
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.
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
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.
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") |
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.
Yesss 👍
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.
Wohooo, awesome 👍
snapshot/lib/snapshot/collector.rb
Outdated
@@ -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"] |
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.
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.") |
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.
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.
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.
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?
Congratulations! 🎉 This was released as part of fastlane 2.41.0 🚀 |
In Xcode 9, Apple decided to use
Filename
rather than Xcode 8'sFileName
as a key in the plist generated by tests. This change just looks for that key if using Xcode 9.