I have created a C++ (static) library libFoo.a
.
I wish to create an iOS ObjC app in XCode that uses this library.
I would like to have both projects side-by-side. So that I can modify the library code, rerun the consumer app, and it will automatically rebuild the library.
I also need to be able to single-step through the library code.
do I need to create an Xcode workspace and drop both projects into it?
When I build a library and inspect the 'Products' group, it still appears red even though the build succeeded. Is this okay?
How do I inform the consumer of the existence of the
.a
?It is building to:
/Users/pi/Library/Developer/Xcode/DerivedData/Foo-eedjtiwaewussebwzhplgqpllrnx/Build/Products/Debug-iphonesimulator/libFoo.a
If I hardcode this into the consumer, will this create trouble for another developer that clones my code?
Is there a 'right way'(TM) to do it? Maybe building to a set location and using relative paths...
EDIT: Notes:
- create the new workspace
- create a new ObjC project & add to workspace when prompted
- drag-drop
myLib.xcodeproj
to be a child node ofconsumer.xcodeproj
in project navigator consumer.xcodeproj
->
build phases->
- ... Target dependencies
->
{addmyLib.xcodeproj
} - ... link binary with libraries
->
"+"->
{ "Add workspace"->
libMyLib.a
}
- ... Target dependencies