3

As I am new to Xcode, I do not understand clearly how Xcode organizes workspaces and projects. By using Google, I believe the following:

  1. A workspace contains many projects.
  2. Project contains many Targets
  3. A project should have at least one target.

Are all of the above statements are true?

  1. If i have one class called (login.h,login.m,login.xib) in my project, can I use the same login file in different targets?

  2. Can i use the same file in different Projects.

If there is a tutorial or other articles that explain, please let me know of them.

heckj
  • 7,136
  • 3
  • 39
  • 50
siva
  • 251
  • 2
  • 16
  • Did you read [this](https://developer.apple.com/library/ios/featuredarticles/XcodeConcepts/Concept-Workspace.html)? – trojanfoe Nov 10 '14 at 11:43
  • Not yet will go through it – siva Nov 10 '14 at 11:46
  • @trojanfoe i just read it.i think All of my statements are correct.if i need to maintain same login class with some modifications for each target.how can i achieve it – siva Nov 10 '14 at 11:56
  • Add a constant to the build settings of each target (for example `SOME_TARGET=1` or `LOGIN_BEHAVIOUR=X`) and then test that within the source file (i.f `#if LOGIN_BEHAVIOUR == X .... #endif`). – trojanfoe Nov 10 '14 at 11:58
  • k.i want to know clearly.My requirement is i have 10 targets with slight change in Appdelegate.m file. (i.e. A string StrAppId for each target varies).For this shall i need to use differenet Appdelgate files for eact target? – siva Nov 10 '14 at 12:05
  • 1
    Your question is already answered over [here][1] [1]: http://stackoverflow.com/questions/21631313/xcode-project-vs-xcode-workspace-differences – ASANIAN Apr 03 '15 at 08:39
  • Possible duplicate of [Xcode Project vs. Xcode Workspace - Differences](https://stackoverflow.com/questions/21631313/xcode-project-vs-xcode-workspace-differences) – Banghua Zhao Nov 03 '18 at 14:16

0 Answers0