Skip to content

Commit 0bc8d8d

Browse files
Josh Caswelltaku0
authored andcommitted
Use isAvailable when reading simctl device JSON
`swift-mode:debug-ios-app` was failing because no simulator could be configured; the output of `simctl` was not as expected. The `availability` field of the `device` object had been deprecated and was removed as of Xcode 11 (see https://developer.apple.com/documentation/xcode-release-notes/xcode-11-release-notes heading "Resolved Issues") in favor of a boolean `isAvailable`.
1 parent 02a1726 commit 0bc8d8d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

swift-mode-repl.el

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,7 @@ or its ancestors."
431431
(flattened (apply 'seq-concatenate 'list (seq-map 'cdr devices)))
432432
(available-devices
433433
(seq-filter
434-
(lambda (device)
435-
(string-equal (cdr (assoc 'availability device)) "(available)"))
434+
(lambda (device) (cdr (assoc 'isAvailable device)))
436435
flattened)))
437436
available-devices))
438437

0 commit comments

Comments
 (0)