@@ -61,16 +61,27 @@ async function printServerInfo() {
61
61
const settings = await ProjectSettings . readPackagerInfoAsync ( process . cwd ( ) ) ;
62
62
// who knows why qrcode-terminal takes a callback instead of just returning a string
63
63
const address = await UrlUtils . constructManifestUrlAsync ( process . cwd ( ) ) ;
64
+ let emulatorHelp ;
65
+ if ( process . platform === 'darwin' ) {
66
+ emulatorHelp = `Press ${ chalk . bold ( 'a' ) } (Android) or ${ chalk . bold ( 'i' ) } (iOS) to start an emulator.` ;
67
+ } else {
68
+ emulatorHelp = `Press ${ chalk . bold ( 'a' ) } to start an Android emulator.` ;
69
+ }
64
70
qr . generate ( address , qrCode => {
65
- log (
66
- `To view your app with live reloading, point the Expo app to this QR code.
67
- You'll find the QR scanner on the Projects tab of the app.
68
-
71
+ log ( `
69
72
${ indent ( qrCode , 2 ) }
70
73
71
- Or enter this address in the Expo app's search bar:
74
+ Your app is now running at URL: ${ chalk . underline ( chalk . cyan ( address ) ) }
75
+
76
+ ${ chalk . bold ( 'View your app with live reloading:' ) }
72
77
73
- ${ chalk . underline ( chalk . cyan ( address ) ) }
78
+ ${ chalk . underline ( 'Android device:' ) }
79
+ -> Point the Expo app to the QR code above.
80
+ (You'll find the QR scanner on the Projects tab of the app.)
81
+ ${ chalk . underline ( 'iOS device:' ) }
82
+ -> Press ${ chalk . bold ( 's' ) } to email/text the app URL to your phone.
83
+ ${ chalk . underline ( 'Emulator:' ) }
84
+ -> ${ emulatorHelp }
74
85
75
86
Your phone will need to be on the same local network as this computer.
76
87
For links to install the Expo app, please visit ${ chalk . underline ( chalk . cyan ( 'https://expo.io' ) ) } .
@@ -87,13 +98,13 @@ function printUsage() {
87
98
}
88
99
const { dim, bold } = chalk ;
89
100
const devMode = dev ? 'development' : 'production' ;
90
- const iosInfo = process . platform === 'win32 '
91
- ? dim ( '.' )
92
- : ` ${ dim ( `, or` ) } i ${ dim ( `to open iOS emulator.` ) } ` ;
101
+ const iosInfo = process . platform === 'darwin '
102
+ ? ` ${ dim ( `, or` ) } i ${ dim ( `to open iOS emulator.` ) } `
103
+ : dim ( '.' ) ;
93
104
log (
94
105
`
95
106
${ dim ( `\u203A Press` ) } a ${ dim ( `to open Android device or emulator` ) } ${ iosInfo }
96
- ${ dim ( `\u203A Press` ) } s ${ dim ( `to send the packager URL to your phone number or email address` ) }
107
+ ${ dim ( `\u203A Press` ) } s ${ dim ( `to send the app URL to your phone number or email address` ) }
97
108
${ dim ( `\u203A Press` ) } q ${ dim ( `to display QR code.` ) }
98
109
${ dim ( `\u203A Press` ) } r ${ dim ( `to restart packager, or` ) } R ${ dim ( `to restart packager and clear cache.` ) }
99
110
${ dim ( `\u203A Press` ) } d ${ dim ( `to toggle development mode. (current mode: ${ bold ( devMode ) } ${ chalk . reset . dim ( ')' ) } ` ) }
0 commit comments