I’m having the same issue in my project. The error that lldb spits out when attempting to po
an object highlights the issue:
(lldb)po fileURL
warning: Swift error in module <APP_NAME>:
Swift had fatal errors constructing the ast context for this module: <module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/Crashlytics.h"
^
<APP_PATH>/Pods/Crashlytics/Crashlytics.framework/Headers/Crashlytics.h:10:9: error: include of non-modular header inside framework module 'Crashlytics'
#import <Fabric/FABAttributes.h>
^
The Crashlytics.h
umbrella header in Crashlytics.framework
is importing Fabric/FABAttributes.h
, which is not part of the Crashlytics module (i.e. not in its module.modulemap
). This is Crashlytics 3.1.0 installed using CocoaPods.
Why Xcode 7 treats this as a fatal error is beyond me (it was just a warning in 6). In Xcode 6 you could work around this sort of “non-modular header include” by enabling the “Allow Non-modular includes in Framework Modules” (CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES
) build setting in your application target.
I’ve had no luck getting the Xcode 7 betas to honor the above flag (rdar://22044453 <– please dup).
The only solution I’ve found to get the debugger working is to remove the Crashlytics pod. I comment out the Crashlytics and Fabric pods, run pod install
, resume debugging and then reinstall the pods before a release.
I really hope this is fixed in Xcode 7 by the time it comes out of beta.