4

I want to copy some files "Classes" from another project to my current project, but when I run it I get dozen of errors, its seem there are some steps to copying file from one project to another project using Xcode ,

I can make a collection of files "Classes" accessible in my project?

One project is Objective c, the another one seems to be Objective C++

SwiftArchitect
  • 47,376
  • 28
  • 140
  • 179
user2698307
  • 55
  • 2
  • 6

2 Answers2

4

No there are not exactly steps we need to follow. Just make sure all dependencies are fulfilled while importing classes from other project. Don't forget to click at checkbox Copy files if needed so that Xcode can make separate copy for your project.
In order to import files in your project click following sequence:

command + option + A

or you can also add files by

Xcode -> File -> Add files to "Project Name"

Aamir
  • 16,329
  • 10
  • 59
  • 65
4

Individual Files

Organize your files

Place the files you will need at a location that is accessible by the Xcode project. Usually, you place these files is a directory below your Xcode project, but that is absolutely not necessary.

Drag & drop

Grab all the files you need and drop them onto your project organizer. You will be prompted with this dialog, to which the settings should look like this (ensure that your target is selected):

enter image description here


Projects

If you want to include a Cocoa Touch Static Library, in the form of an Xcode project, drag & drop will suffice.

Community
  • 1
  • 1
SwiftArchitect
  • 47,376
  • 28
  • 140
  • 179
  • Brother thank u every thing work fine , now I have two static library one written in c++ and other objective c , when I run project its build successful , but now I want to import one method from objective c++ into my objective c , how ? – user2698307 Jan 15 '16 at 21:17
  • See http://stackoverflow.com/a/32554229/218152 and http://stackoverflow.com/a/32546879/218152. The describe all combinations of C, C++, Swift, Objective-C and Objective-C++ – SwiftArchitect Jan 15 '16 at 23:26