Xcode Archive将无法在子项目中找到头文件

前端之家收集整理的这篇文章主要介绍了Xcode Archive将无法在子项目中找到头文件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
现在对XCode感到很沮丧.我可以完美地构建和运行代码.但是,尝试存档是一场灾难.

我创建了一个项目,然后将.xcodeproj拖到项目导航器上的XCode中.显示很好,很酷.父项目构建设置:

其他链接器标志:-all_load,-ObjC

目标依赖项:CocoaLibSpotify(我正在合并的子项目)

链接二进制文件与库:libCocoaLibSpotify.a

当我构建项目时,以下几行有效

#import "CocoaLibSpotify.h"
#import <CocoaLibSpotify.h>

但是,当我存档时,我的项目无法找到这些文件.值得注意的是,子项目文件与父项目不在同一目录中.但是,这不是目标依赖/链接二进制文件与库的关键吗?为什么没有归档?这似乎应该比现在容易得多.

谢谢.

编辑:编译错误

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.`

解决方法

存档在构建时使用不同的目录结构,这可能很痛苦.通过将以下内容添加到应用程序目标的用户标题搜索路径构建设置中,我找到了成功:

“$(BUILD_ROOT)/../ IntermediateBuildFilesPath / UninstalledProducts / include”(包括引号).

此外,请确保始终搜索用户路径设置为是.

另外,我在我的页眉搜索路径设置中有$CONFIGURATION_BUILD_DIR / include,但我认为这不会有助于归档.

原文链接:https://www.f2er.com/iOS/332680.html

猜你在找的iOS相关文章