mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
46f3b26724
# 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](https://github.com/NiklasEi/bevy_game_template/pull/61#discussion_r1269747507) by @CleanCut) ## Solution - Improve the script that grabs the device UUID from the device list
25 lines
888 B
Makefile
25 lines
888 B
Makefile
.PHONY: xcodebuild run install boot-sim generate clean
|
|
|
|
DEVICE = ${DEVICE_ID}
|
|
ifndef DEVICE_ID
|
|
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
|
|
xcrun simctl launch --console $(DEVICE) org.bevyengine.example
|
|
|
|
boot-sim:
|
|
xcrun simctl boot $(DEVICE) || true
|
|
|
|
install: xcodebuild-simulator boot-sim
|
|
xcrun simctl install $(DEVICE) build/Build/Products/Debug-iphonesimulator/bevy_mobile_example.app
|
|
|
|
xcodebuild-simulator:
|
|
IOS_TARGETS=x86_64-apple-ios xcodebuild -scheme bevy_mobile_example -configuration Debug -derivedDataPath build -destination "id=$(DEVICE)"
|
|
|
|
xcodebuild-iphone:
|
|
IOS_TARGETS=aarch64-apple-ios xcodebuild -scheme bevy_mobile_example -configuration Debug -derivedDataPath build -arch arm64
|
|
|
|
clean:
|
|
rm -r build
|
|
cargo clean
|