问题
I have the following projects in my workspace:
Common
Security
(dependent onCommon
)Data
(dependent onCommon
,Security
, (andCoreData
))Api
(dependent onCommon
,Security
,Data
)MyApp
(dependent onCommon
,Security
,Data
,Api
)
All of the projects except MyApp
are Cocoa Touch Frameworks, mostly written in Swift.
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
^
回答1:
I ran into this issue in Xcode 6.3.2 and found that my problem went away when I cleaned the build folder.
回答2:
As for other issues in Xcode 6.3.1, there seems to be a workaround.
I have found that compiling the Data.framework
target with the following settings solves the issue:
SWIFT_WHOLE_MODULE_OPTIMIZATION = YES
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
回答3:
- Clean build folder
- Close the project
- Close Xcode
- Restart the computer
This worked for me!
回答4:
This is fixed in Xcode 7.2.1
Fixed the problem where xcodebuild test timed out while waiting for iOS Simulator to boot. (24173400)
https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Chapters/xc7_release_notes.html#//apple_ref/doc/uid/TP40001051-CH5-SW1
来源:https://stackoverflow.com/questions/29825180/xcode-6-3-1-error-timed-out-waiting-to-acquire-lock-file-for-module-x-where