Can't create Archive with Static Library
I'm trying to create a archive for a app linking to a static library but with no luck.
I can built the app in both release and debug mode just fine. I can even built it for Archiv开发者_如何学编程e (product->built for->archiving) but it fails miserably when I try to create the archive (products->Archive)
XCode can't seem to find the headers for the Static lib:
In file included from /Data/Code/iPhoneDev/ArchiveTest/ArchiveTestApp/ArchiveTestApp/ArchiveTestAppAppDelegate.m:9:
/Data/Code/iPhoneDev/ArchiveTest/ArchiveTestApp/ArchiveTestApp/ArchiveTestAppAppDelegate.h:10:24: error: DataFetcher.h: No such file or directory
In file included from /Data/Code/iPhoneDev/ArchiveTest/ArchiveTestApp/ArchiveTestApp/ArchiveTestAppAppDelegate.m:9:
/Data/Code/iPhoneDev/ArchiveTest/ArchiveTestApp/ArchiveTestApp/ArchiveTestAppAppDelegate.h:13: error: cannot find protocol declaration for 'DataFetcherDelegate'
Any ideas or suggestions on what I'm missing here?
I ended up roughly following the suggestions in this Questions:
Compile, Build or Archive problems with Xcode 4 (and dependencies)
Create a group call "Indexing headers" in your project and drag the headers to this group, DO NOT add to any targets when prompted. This includes any headers inside your dependency
For all dependancies set "Skip Install" build setting to "Yes"
Moving any "Public" headers in Build Phases to "Project" for dependency
Set the Build Setting "Installation Directory" on your Target to $(LOCAL_APPS_DIR)
The archive was created with no errors with step 1-3, but for it to become a valid app step 4) was needed.
Amazing how half baked XCode4 seems
精彩评论