Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

[xdl] Allow dev client apps to be launched in the iOS simulator #3182

Merged
merged 4 commits into from
Feb 12, 2021

Conversation

fson
Copy link
Contributor

@fson fson commented Feb 3, 2021

This is the "v0" version of the dev client simulator flow for iOS. In this version you can open an app in its dev client in the iOS simulator, provided that the dev client has already been built and installed to the device. The v1 version will also build the app and install it on the device.

Why is this in XDL?

We're currently splitting up XDL and making it lighter. However, the existing simulator functionality is in included in the Simulator module of XDL. It depends on many XDL modules, including UrlUtils, Versions, Logger, UserSettings, etc. making it difficult to extract to a separate package until these modules have been moved out. Additionally, Expo Dev Tools depends on the Simulator module, so it can't be moved to expo-cli itself, as of now.

For this reason, I've added the dev client support in the existing Simulator module in XDL. Refactoring the Simulator module should be done in a separate PR. Additonally, the new BundleIdentifier module should be moved to a different package and parts of it potentially shared between expo-cli and eas-cli.

Screen Shot 2021-02-04 at 17 04 42

Screen Shot 2021-02-04 at 17 05 50

@fson fson marked this pull request as draft February 3, 2021 16:18
@fson fson force-pushed the @fson/dev-client-simulator-v0 branch from 8eb4619 to e2d7fb2 Compare February 4, 2021 14:51
@fson fson force-pushed the @fson/dev-client-simulator-v0 branch from e2d7fb2 to 96cf45b Compare February 4, 2021 15:08
@fson fson requested a review from brentvatne February 4, 2021 15:27
@fson fson marked this pull request as ready for review February 4, 2021 15:27
@@ -603,6 +614,20 @@ export async function openUrlInSimulatorSafeAsync({
};
}

async function ensureDevClientInstalledAsync(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
async function ensureDevClientInstalledAsync(
async function assertDevClientInstalledAsync(

}

export async function configureBundleIdentifierAsync(
projectDir: string,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
projectDir: string,
projectRoot: string,

@@ -0,0 +1,132 @@
import { ExpoConfig, getConfigFilePaths, getProjectConfigDescription } from '@expo/config';
Copy link
Member

Choose a reason for hiding this comment

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

let's add a big doc block here to point to the canonical version of this code in eas-cli, so it's clearly documented that this is a copy/paste fork of it

@brentvatne brentvatne merged commit 32bbf58 into master Feb 12, 2021
@brentvatne brentvatne deleted the @fson/dev-client-simulator-v0 branch February 12, 2021 18:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants