简体   繁体   中英

How to open an existing GitHub project with Xcode?

I am new to and I want to learn iphone development.

I found one demo project on github , I want to know how to open this existing project?

  • Download the project via git / or zip
  • Open folder
  • Double click on .xcodeproj file
  • if on the top left, you see a something like "Base sdk missing"
    • Double click on the first item in the three
    • Go to tag build
      • Select a sdk for the Base SDK
    • Close the opened popup
    • Click on build an run
    • If you have error, you should see a red icon on the right bottom

Note: since June 2016, you can open your demo GitHub project in Xcode directly from the GitHub site!

But you will need the latest Xcode 9 , announced at the 2017 WWDC

See " Clone in Xcode "

It's easy to explore code in your browser when you visit a GitHub repository, but you often want to pull that code directly into the appropriate editor and try it out.
For example, if the repository contains an .xcodeproj or .xcworkspace file, you might want to open that code in Xcode.

This is possible starting today with the new " Open in Xcode " button.

https://cloud.githubusercontent.com/assets/19977/26796930/158f0a5c-49e0-11e7-8c26-eb666b7f666c.gif

That will trigger the git clone for you.

Note : as illustrated in " Unable to see “Open in Xcode” button on GitHub ", you also have to be logged in to GitHub in Xcode as well.

In Xcode, navigate to Preferences.../Accounts , select GitHub and enter your login credentials.

Using xed./ios in the terminal of the root of the app worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM