Skip to content

Commit

Permalink
Improve selection of iOS device in mobile example (bevyengine#9282)
Browse files Browse the repository at this point in the history
# Objective

- Make sure that users can "just run" the mobile example
- Device descriptions like `iPhone SE (3rd generation)
(F647334F-D7C1-4BD6-9B5F-0E3D9713C02B) (Shutdown)` currently fail
([issue
found](NiklasEi/bevy_game_template#61 (comment))
by @CleanCut)

## Solution

- Improve the script that grabs the device UUID from the device list
  • Loading branch information
NiklasEi authored and ameknite committed Nov 6, 2023
1 parent c0047cb commit b8e1de7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/mobile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DEVICE = ${DEVICE_ID}
ifndef DEVICE_ID
DEVICE=$(shell xcrun simctl list devices 'iOS' | grep -v 'unavailable' | grep -v '^--' | grep -v '==' | head -n 1 | cut -d ' ' -f 7 | sed 's/[()]//g')
DEVICE=$(shell xcrun simctl list devices 'iOS' | grep -v 'unavailable' | grep -v '^--' | grep -v '==' | head -n 1 | grep -E -o -i "([0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12})")
endif

run: install
Expand Down

0 comments on commit b8e1de7

Please sign in to comment.