Reputation: 23935
Im playing around with the soundcloud api, in its instructions it says to
I can drag the project in pretty easily, but how does one accomplish the next step?
Upvotes: 56
Views: 118319
Reputation: 34215
Xcode add a project as a dependency
Xcode 10
cross-project references
[About]Explicit dependency
[About]//Xcode 10
Build Phases -> Target Dependencies -> + Add items
//Xcode 11
Build Phases -> Dependencies -> + Add items
In Choose items to add:
dialog you will see only targets from your project and the sub-project
Upvotes: 3
Reputation: 266
Just close the Project you want to add , then drag and drop the file .
Upvotes: 3
Reputation: 5143
Tough one for a newbie like me - here is a screenshot that describes it.
Xcode 10.2.1
Upvotes: 14
Reputation: 1426
Today I faced with the same problem. As the result of the first run I got next error:
Lexical or Preprocessor Issue: 'SDKProjectName*/*SDKProjectName.h' file not found.
But before running, I, obviously, added my SDK into the demo project, just drag&drop .xcodeproj file into my test project's source tree. After that, I moved into Build Phases tab in setting of the main xcodeproj file (of the demo) and added my SDK as target dependency and embed framework into corresponding tabs.
But at the result, I got an error above!
So, the problem was into empty line on the Header Search Paths option. I just wrote "../**"
as value for this key and project compiled successfully. So, after that, you can add #include <SDKName/SDKName.h>
into any project, which includes this SDK.
ps. My test app was created into root SDK folder.
Upvotes: 0
Reputation: 1163
Upvotes: 13
Reputation: 15099
To add it as a dependency do the following:
Upvotes: 29
Reputation: 50707
Under TARGETS
in your project, right-click on your project target (should be the same name as your project) and choose GET INFO
, then on GENERAL
tab you will see DIRECT DEPENDENCIES
, simply click the [+]
and select SoundCloudAPI
.
Upvotes: 4