2020-10-31 21:36:24 +00:00
|
|
|
.PHONY: xcodebuild run install boot-sim generate clean
|
|
|
|
|
|
|
|
DEVICE = ${DEVICE_ID}
|
|
|
|
ifndef DEVICE_ID
|
2023-10-08 20:57:41 +00:00
|
|
|
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})")
|
2020-10-31 21:36:24 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
run: install
|
2023-03-28 23:16:07 +00:00
|
|
|
xcrun simctl launch --console $(DEVICE) org.bevyengine.example
|
2020-10-31 21:36:24 +00:00
|
|
|
|
|
|
|
boot-sim:
|
|
|
|
xcrun simctl boot $(DEVICE) || true
|
|
|
|
|
|
|
|
install: xcodebuild-simulator boot-sim
|
2023-02-06 18:08:49 +00:00
|
|
|
xcrun simctl install $(DEVICE) build/Build/Products/Debug-iphonesimulator/bevy_mobile_example.app
|
2020-10-31 21:36:24 +00:00
|
|
|
|
|
|
|
xcodebuild-simulator:
|
2023-02-06 18:08:49 +00:00
|
|
|
IOS_TARGETS=x86_64-apple-ios xcodebuild -scheme bevy_mobile_example -configuration Debug -derivedDataPath build -destination "id=$(DEVICE)"
|
2020-10-31 21:36:24 +00:00
|
|
|
|
|
|
|
xcodebuild-iphone:
|
2023-02-06 18:08:49 +00:00
|
|
|
IOS_TARGETS=aarch64-apple-ios xcodebuild -scheme bevy_mobile_example -configuration Debug -derivedDataPath build -arch arm64
|
2020-10-31 21:36:24 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -r build
|
|
|
|
cargo clean
|