Cov txheej txheem:

Kuv yuav khiav ib tsab ntawv hauv Xcode li cas?
Kuv yuav khiav ib tsab ntawv hauv Xcode li cas?

Video: Kuv yuav khiav ib tsab ntawv hauv Xcode li cas?

Video: Kuv yuav khiav ib tsab ntawv hauv Xcode li cas?
Video: Tsis Deev Koj Thiaj Tsis Seev BY Aka 2024, Hlis ntuj nqeg
Anonim

Qhib Terminal los ntawm Xcode

  1. Tsim ib lub plhaub 2 kab tsab ntawv thiab muab cov ntaub ntawv ua kev tso cai.
  2. Mus rau Xcode Kev nyiam.
  3. Ntxiv tus cwj pwm hauv Xcode . Sau npe thiab muab tus yuam sij shortcut.
  4. Nyob rau sab xis cov ntsiab lus pane kos lub Khiav kev xaiv.
  5. Los ntawm cov ntawv qhia zaub mov uas nyob ib sab xaiv lub tsab ntawv koj nyuam qhuav khaws tseg hauv kauj ruam 1.

Ua raws li qhov no hauv kev txiav txim siab, Kuv yuav ua li cas thiaj li khiav ib tsab ntawv hauv Xcode 10?

Kauj ruam 1: Xaiv koj daim ntawv thov Xcode qhov project, ces koj lub hom phiaj daim ntawv thov, ces xaiv "Tsim Phase". Kauj ruam 2: Hauv Xcode ntawv qhia zaub mov, xaiv "Editor", ces xaiv " Ntxiv Tsim Phase", thiab tom qab ntawd nyem rau ntawm " Ntxiv Run Script Kauj ruam 3: Tam sim no koj yuav tsum pom ib Khiav Script ntu hauv koj qhov Build Phase xaiv, raws li qhia saum toj no.

Ib yam li ntawd, kuv yuav ua li cas los tsim cov theem hauv Xcode? Mus mus rau Tsim Phase ntu ntawm koj qhov project. (Nyem rau ntawm qhov project, tom qab ntawd ntawm lub hom phiaj tseem ceeb, tom qab ntawd ntawm " Tsim Phase " tab nyob rau sab saum toj.) Nyem qhov + nyob rau sab saum toj sab laug los tsim ib qho tshiab tsim theem ; xaiv "New Run Script Theem ." Xcode tsim tsab ntawv kawg ntawm daim ntawv, npe nws "Run Script."

Nyob rau hauv no txoj kev, yuav ua li cas kuv khiav lub plhaub ntawv ntawm ib tug Mac?

Koj tuaj yeem siv chmod hais kom ua los qhia tias cov ntawv nyeem tau ua tiav (uas yog, nws cov ntsiab lus tuaj yeem khiav raws li daim ntawv plhaub)

  1. Hauv Terminal app ntawm koj Mac, siv cd hais kom txav mus rau hauv cov npe uas muaj cov ntaub ntawv koj xav ua kom tiav. Piv txwv li:
  2. Nkag mus rau chmod hais kom ua. Piv txwv li:

Kuv yuav ua li cas khiav ib qhov kev pab cuam sai?

Yog tias koj tau teeb tsa qhov tseeb version ntawm Xcode koj yuav tsum muaj nrawm hais kom muaj nyob rau hauv koj lub davhlau ya nyob twg, uas launches a Swift REPL 1. Koj ua tau khiav tus Swift REPL los ntawm kab hais kom ua thiab nkag mus Swift code ncaj qha rau hauv nws. Thaum twg koj nkag mus siv tau Swift code nyob rau hauv lub REPL, nws yuav tam sim compile thiab khiav nws.

Pom zoo: