react-native運行iOS真機、模擬器命令


 

zdeMacBook-Pro:sometest z$ react-native run-ios -h
react-native run-ios 

builds your app and starts it on iOS simulator

Options:
  --simulator [string]      Explicitly set simulator to use. Optionally include iOS version between parenthesis at the end to match an exact version: "iPhone 6 (10.0)" (default: "iPhone 11")
  --configuration [string]  Explicitly set the scheme configuration to use (default: "Debug")
  --scheme [string]         Explicitly set Xcode scheme to use
  --project-path [string]   Path relative to project root where the Xcode project (.xcodeproj) lives. (default: "ios")
  --device [string]         Explicitly set device to use by name.  The value is not required if you have a single device connected.
  --udid [string]           Explicitly set device to use by udid
  --no-packager             Do not launch packager while building
  --verbose                 Do not use xcpretty even if installed
  --port [number]            (default: 8081)
  --terminal [string]       Launches the Metro Bundler in a new window using the specified terminal path. (default: "Apple_Terminal")
  -h, --help                output usage information

Example usage:
  Run on a different simulator, e.g. iPhone SE: 
  react-native run-ios --simulator "iPhone SE" //運行在模擬器命令

  Pass a non-standard location of iOS directory: 
  react-native run-ios --project-path "./app/ios"

  Run on a connected device, e.g. Max's iPhone: 
//1,Xcode連接上真機之后,
//2 ,再在命令行中執行這個命令,這個命令會安裝app
react-native run-ios --device "zhuiPhoneX" 

Run on the AppleTV simulator: react-native run-ios --simulator "Apple TV" --scheme "helloworld-tvOS"

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM