6

I have the following projects in my workspace:

  1. Common
  2. Security (dependent on Common)
  3. Data (dependent on Common, Security, (and CoreData))
  4. Api (dependent on Common, Security, Data)
  5. MyApp (dependent on Common, 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
       ^
Tom Kraina
  • 3,569
  • 1
  • 38
  • 58
  • For me, the problem went away when I removed and re-added the `#import ` statement. – Dan Jul 02 '15 at 16:28

4 Answers4

17

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

CodeReaper
  • 5,988
  • 3
  • 35
  • 56
0

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
Community
  • 1
  • 1
Tom Kraina
  • 3,569
  • 1
  • 38
  • 58
0
  1. Clean build folder
  2. Close the project
  3. Close Xcode
  4. Restart the computer

This worked for me!

Carlos
  • 1,121
  • 12
  • 26
0

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

danieljimenez
  • 1,390
  • 4
  • 17
  • 26