CocoaPods / fourflusher

A library for interacting with Xcode simulators.
MIT License
32 stars 15 forks source link

fourflusher not honouring selected xcode #20

Open ghost opened 5 years ago

ghost commented 5 years ago

I'm aware there are a few issues in this repo already regarding disparity between current xcode version and cocoapods/fourflusher version, however I feel only the symptoms are being addressed and not the issue.

I could be wrong (so please correct me if I am), but it seems fourflusher isn't honouring the selected xcode version on the machine.

For example, we have a few build machines that have Xcode 10.1 and 10.2 installed alongside CocoaPods 1.5.3. With Xcode 10.1 selected, when I run xcrun simctl list I see a list of 12.1 simulators. Here is a snippet of the output:

== Runtimes ==
iOS 12.1 (12.1 - 16B91) - com.apple.CoreSimulator.SimRuntime.iOS-12-1 
tvOS 12.1 (12.1 - 16J602) - com.apple.CoreSimulator.SimRuntime.tvOS-12-1 
watchOS 5.1 (5.1 - 16R591) - com.apple.CoreSimulator.SimRuntime.watchOS-5-1 
== Devices ==
-- iOS 12.1 --
    iPhone 5s (62CAB7B3-76E1-4C65-8886-51ED36CA87D9) (Shutdown) 
    iPhone 6 (0AADE35F-36AA-40C2-B4C9-A67E576A2C2C) (Shutdown) 
    iPhone 6 Plus (3BBA817A-0CD7-4B84-BBD7-7B933315C5C2) (Shutdown) 
...

However, when I run pod spec lint it says it can't find simulators that match the output (e.g. com.apple.coresimulator.simruntime.ios-12-1)

Fourflusher should use the selected / active version of Xcode (based on the output from xcode-select -p or xcversion selected).