Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul how iOS build distribution installation works #49

Merged
merged 20 commits into from
Jan 22, 2025

Conversation

trevor-e
Copy link
Collaborator

@trevor-e trevor-e commented Jan 21, 2025

Lots of UX improvements here:

  • Check the app's supported platforms to see whether we should install via a connected device or simulator
  • Now supports installing to simulators! And we automatically pick the most recently used simulator to avoid having to muck around simulator lists
  • Adds a new --device-type flag to force installation on a connected or simulator device
  • Shows helpful error messages for cases like the provisioning profile not having the device udid
  • Launches the app after installation

Detects a simulator build:

➜  emerge-cli git:(telkins/install-build) ✗ bundle exec ruby exe/emerge build-distribution install --build-id "f0f00251-2e9a-4ace-8941-2232b387241c"
[2025-01-21 17:14:04.245] INFO  -- : Getting build URL...
[2025-01-21 17:14:04.593] INFO  -- : Downloading build...
################################################################################################################################# 100.0%
[2025-01-21 17:14:05.805] INFO  -- : ✅ Build downloaded to f0f00251-2e9a-4ace-8941-2232b387241c.ipa
[2025-01-21 17:14:05.809] INFO  -- : Finding and booting most recently used simulator...
[2025-01-21 17:14:06.275] INFO  -- : Found simulator A164B24C-B80C-4A98-AB2F-0D9CFB3CB0B6 (18.2) (Booted, last booted: 2025-01-21 20:00:05)
[2025-01-21 17:14:07.213] INFO  -- : ✅ Build installed
[2025-01-21 17:14:07.213] INFO  -- : Launching app com.emergetools.hackernews on simulator A164B24C-B80C-4A98-AB2F-0D9CFB3CB0B6...
[2025-01-21 17:14:07.552] INFO  -- : ✅ Build launched

Detects a device build:

➜  emerge-cli git:(telkins/install-build) ✗ bundle exec ruby exe/emerge build-distribution install --build-id "a6de54ff-91cd-49d7-8a93-3630088b5c58"
[2025-01-21 17:18:25.407] INFO  -- : Getting build URL...
[2025-01-21 17:18:25.778] INFO  -- : Downloading build...
################################################################################################################################# 100.0%
[2025-01-21 17:18:26.934] INFO  -- : ✅ Build downloaded to a6de54ff-91cd-49d7-8a93-3630088b5c58.ipa
[2025-01-21 17:18:26.937] INFO  -- : Finding connected device...
[2025-01-21 17:18:33.430] INFO  -- : Found connected physical device: Trevor iPhone 15 (0000XXXX-XXXXXXXXXXXXXX)
[2025-01-21 17:18:33.431] INFO  -- : Installing app to device 0000XXXX-XXXXXXXXXXXXXX...
[2025-01-21 17:18:39.430] INFO  -- : ✅ Build installed
[2025-01-21 17:18:39.430] INFO  -- : Launching app com.emergetools.hackernews on device 0000XXXX-XXXXXXXXXXXXXX...
[2025-01-21 17:18:44.284] INFO  -- : ✅ Build launched

require 'cfpropertylist'

module EmergeCLI
class XcodeDeviceManager
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went back and forth on the naming here and whether I should just use IosDeviceManager but didn't want to lock us into iOS platform

Copy link
Collaborator

@Itaybre Itaybre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but left a comment

@trevor-e trevor-e merged commit de5babc into main Jan 22, 2025
5 checks passed
@trevor-e trevor-e deleted the telkins/install-build branch January 22, 2025 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants