Xcode 6.3.1 error: timeout to get a lock file for module "X", where "X" is my infrastructure

I have the following projects in my workspace:

  • Common
  • Security (depends on Common )
  • Data (dependent on Common , Security , (and CoreData ))
  • Api (dependent on Common , Security , Data )
  • MyApp (dependent on Common , Security , Data , Api )

All projects except MyApp are Cocoa Touch Frameworks, mostly written in Swift.

Since Xcode 6.3.1 I can’t compile, because I get the following message when creating the 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 ^ 
+5
source share
4 answers

For other issues in Xcode 6.3.1 , there seems to be a workaround .

I found that compiling the Data.framework target with the following settings solves the problem:

 SWIFT_WHOLE_MODULE_OPTIMIZATION = YES 

Although compilation takes longer (like Xcode pre-6.3), and I have some problems using lldb, especially in the case of or listing subclasses of NSManagedObject :

 (lldb) po object error: Error in auto-import: failed to get module 'NSManagedObjectID' from AST context 
+1
source

I ran into this problem in Xcode 6.3.2 and found that my problem disappeared when I cleaned the build folder.

+17
source
  • Empty build folder
  • Close the project
  • Close Xcode
  • Reboot the computer.

It worked for me!

0
source

This is fixed in Xcode 7.2.1

Fixed an issue where xcodebuild timeout expired while waiting for iOS Simulator to load. (24173400)

https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Chapters/xc7_release_notes.html#//apple_ref/doc/uid/TP40001051-CH5-SW1

0
source

All Articles