Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode - How could you copy paste classes / files from one project into another?

Tags:

xcode

Copy pasting files in finder works, but I cannot view them in xcode. I am an xcode newbie, so pardon me if its a noob question.

like image 706
Suchi Avatar asked Jul 25 '11 19:07

Suchi


People also ask

How do I copy a file from one project to another in Xcode?

Knowledge BaseClick the arrow button to the right of the file and select Move or Copy file from the dropdown menu. When you choose Copy this file from the move or copy dropdown, you will then be able to select which project to copy it to. You can make a copy of the file in the existing project or in another project.

How do I transfer Xcode project to another Mac?

Transferring Between MacsOpen Xcode and go to Organiser. Select your team or developer profile on the left toolbar. Click export at the bottom. Type in a useful filename then press save.

How do I import files into Xcode?

I include them in the project by right-clicking on the project folder in the project view in Xcode, and selecting "Add Files to ...". I then navigate to the folder containing the source files, click on the folder and select "Add." With the options "Create folder references" and "Add to target [target name]".


1 Answers

I know, I'm late to the party but posting the answer here. so it could help someone.

Basically copying files from the finder won't show in Xcode. You have to add files explicitly from Xcode. Follow below steps

  1. Copy files to your project folder first
  2. And then in Xcode project navigator, right-click on the folder and click on Add Files to "project-name"

Note: Don't directly add files from another project folder, Xcode will copy the reference of the file instead of copying it.

enter image description here

voila! now the file is added to the project, under the selected folder

like image 191
ABHISHEK G Avatar answered Nov 04 '22 12:11

ABHISHEK G