So frustrated with XCode right now. I can build and run from code perfectly fine. However, trying to archive is a disaster.
I created a project, then dragged the .xcodeproj into XCode on the project navigator. Shows up fine, cool. Parent project build settings:
Other linker flags: -all_load, -ObjC
Target Dependencies : CocoaLibSpotify (subproject I'm incorporating)
Link Binary with Libraries : libCocoaLibSpotify.a
When I build my project, the following lines work
#import "CocoaLibSpotify.h"
#import <CocoaLibSpotify.h>
However, when I archive, my project fails to find these files. It's worth noting that the subproject files aren't in the same directory as the parent project. However, isn't that the point of the target dependency/link binary with library? Why is it failing to archive? This seems like it should be a lot easier than it's being.
Thanks.
Edit: Errors from compiling
In file included from /Users/ericharmon/Projects/teamsync/teamsync/TeamSync/AppDelegate.m:12:
In file included from /Users/ericharmon/Projects/teamsync/teamsync/TeamSync/Classes/GUI/ViewControllers/LoginViewControll er.h:9:
In file included from /Users/ericharmon/Projects/teamsync/teamsync/TeamSync/Classes/GUI/BaseViewController.h:10:
In file included from /Users/ericharmon/Projects/teamsync/teamsync/TeamSync/Classes/Model/Managers/Managers.h:9:
In file included from /Users/ericharmon/Projects/teamsync/teamsync/TeamSync/Classes/Model/Managers/AppLogicManager.h:11:
In file included from /Users/ericharmon/Projects/teamsync/teamsync/TeamSync/Classes/Model/CoreData/CoreDataObjects.h:13:
/Users/ericharmon/Projects/teamsync/teamsync/TeamSync/Classes/Model/CoreData/Track.h:13:9: fatal error: 'CocoaLibSpotify.h' file not found
#import <CocoaLibSpotify.h>
^
1 error generated.`
Archive uses a different directory structure when building, which can be a pain. I've found success by adding the following to the User Header Search Paths
build setting of your application's target:
"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/include"
(including the quotes).
Also, make sure Always Search User Paths
is set to Yes
.
In addition, I have $CONFIGURATION_BUILD_DIR/include
in my Header Search Paths
setting, but I don't think that'll help archiving.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With