This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 478
[xdl] Allow dev client apps to be launched in the iOS simulator #3182
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8eb4619
to
e2d7fb2
Compare
e2d7fb2
to
96cf45b
Compare
EvanBacon
reviewed
Feb 8, 2021
packages/xdl/src/Simulator.ts
Outdated
@@ -603,6 +614,20 @@ export async function openUrlInSimulatorSafeAsync({ | |||
}; | |||
} | |||
|
|||
async function ensureDevClientInstalledAsync( |
There was a problem hiding this comment.
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( |
EvanBacon
reviewed
Feb 8, 2021
packages/xdl/src/BundleIdentifier.ts
Outdated
} | ||
|
||
export async function configureBundleIdentifierAsync( | ||
projectDir: string, |
There was a problem hiding this comment.
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, |
brentvatne
approved these changes
Feb 8, 2021
@@ -0,0 +1,132 @@ | |||
import { ExpoConfig, getConfigFilePaths, getProjectConfigDescription } from '@expo/config'; |
There was a problem hiding this comment.
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
EvanBacon
approved these changes
Feb 9, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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, includingUrlUtils
,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 theSimulator
module, so it can't be moved toexpo-cli
itself, as of now.For this reason, I've added the dev client support in the existing
Simulator
module in XDL. Refactoring theSimulator
module should be done in a separate PR. Additonally, the newBundleIdentifier
module should be moved to a different package and parts of it potentially shared betweenexpo-cli
andeas-cli
.