问题描述
我的工作区中有以下项目:
I have the following projects in my workspace:
-
Common
-
安全
(取决于Common
) -
数据
(取决于Common
,Security
,(和CoreData
)) -
Api
(取决于 Common ,Security
,Data
) -
MyApp
(取决于Common
,Security
,数据
,Api
)
Common
Security
(dependent onCommon
)Data
(dependent onCommon
,Security
, (andCoreData
))Api
(dependent onCommon
,Security
,Data
)MyApp
(dependent onCommon
,Security
,Data
,Api
)
除了 MyApp
之外的所有项目都是Cocoa Touch Frameworks,主要是用Swift编写的。
All of the projects except MyApp
are Cocoa Touch Frameworks, mostly written in Swift.
自Xcode 6.3.1以来我无法编译,因为我在构建我的'Api'框架时收到以下消息:
Since Xcode 6.3.1 I'm unable to compile as I'm getting the following message while building my 'Api' framework:
<unknown>:0: error: timed out waiting to acquire lock file for module 'Data'
~/Developer/myapp/src/Api/Api/SomeClass.swift:4:8: error: cannot load underlying module for 'Data'
import Data
^
推荐答案
对于,似乎。
我发现编译 Data.framework
具有以下设置的目标解决了问题:
I have found that compiling the Data.framework
target with the following settings solves the issue:
SWIFT_WHOLE_MODULE_OPTIMIZATION = YES
虽然编译需要更长的时间(如Xcode 6.3之前的版本),但我在使用lldb时遇到了一些麻烦,特别是在情况下或打印出 NSManagedObject
子类:
Although, the compilation takes longer (as Xcode pre-6.3) and I have some troubles using lldb especially in case or printing out NSManagedObject
subclasses:
(lldb) po object
error: Error in auto-import:
failed to get module 'NSManagedObjectID' from AST context
这篇关于Xcode 6.3.1错误:等待获取模块“X”的锁定文件超时,其中“X”是我的框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!