I modularize applications I create with Cocoapods (all in Objective C), which use SCFacebook as a subspec which in turn, has subspec's for Faceebook. Currently, I may use the Facebook subspec's directly without issue, and may likewise use the sample app included in SCFacebook which also uses the Facebook spec's without issue (though all in Obj-C), yet using SCFacebook as a subspec causes problems when imported into a new Swift project with various messages which are likewise returned in the cocoapods lint of the podspec:
pod lib lint SCFacebook.podspec
-> SCFacebook (4.0)
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
- ERROR | xcodebuild: FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h:21:9: error: include of non-modular header inside framework module 'FBSDKLoginKit.FBSDKLoginButton' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginConstants.h:21:9: error: include of non-modular header inside framework module 'FBSDKLoginKit.FBSDKLoginConstants' [-Werror,-Wnon-modular-include-in-framework-module]
- NOTE | xcodebuild: /Users/ghost/Documents/projects/ic2/SCFacebook/SCFacebook/SCFacebook.h:28:9: fatal error: could not build module 'FBSDKLoginKit'
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKAppGroupContent.h:21:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKAppGroupContent' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKAppGroupContent.h:22:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKAppGroupContent' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKAppInviteContent.h:21:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKAppInviteContent' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKGameRequestContent.h:21:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKGameRequestContent' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKLikeButton.h:21:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKLikeButton' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKLikeObjectType.h:21:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKLikeObjectType' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKLikeControl.h:21:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKLikeControl' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKSharingContent.h:21:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKSharingContent' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKSendButton.h:21:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKSendButton' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphObject.h:21:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKShareOpenGraphObject' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareButton.h:21:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKShareButton' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareConstants.h:21:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKShareConstants' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareDialogMode.h:21:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKShareDialogMode' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphAction.h:21:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKShareOpenGraphAction' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKSharePhoto.h:21:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKSharePhoto' [-Werror,-Wnon-modular-include-in-framework-module]
- ERROR | xcodebuild: FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareVideo.h:21:9: error: include of non-modular header inside framework module 'FBSDKShareKit.FBSDKShareVideo' [-Werror,-Wnon-modular-include-in-framework-module]
It seems related to the matters concerning subspecs hinted in post announcing Swift support:
http://blog.cocoapods.org/Pod-Authors-Guide-to-CocoaPods-Frameworks/
I will continue to try and resolve it myself and share any findings in a pull request if discovered in a timely manner, etc. As direct usage of Facebook seems to work fine, but I prefer the simplicity of your API all things being equal. Thanks in advance if you have a few cycles, regardless, happy coding :)