It took me almost an entire day to figure out that the following issue is caused by some indeterministic behavior of Xcode. As a developer, you expect to see the same results if you use the same parameters (i.e. “deterministic”), but this is a situation that sometimes succeeds, sometimes doesn’t.
In DTFoundation I have two targets that produce a DTFoundation.framework, for iOS and OS X respectively. Now the problems seems to be that since I set both to define a module “DTFoundation”, Xcode randomly gets confused during building an iOS app and sometimes might try to build the OS X framework for iOS.
This was filed as rdar://22008701 and on Open Radar. From the looks of things Rob Rix has filed bug report rdar://20490378 that appears to be describing the same issue. If you disable implicit dependency finding in the scheme, the problem also goes away.
Read more
Read more