Domanda

I am creating a podspec file for an open-source project I created, and I am utilizing Apple's UIImage+ImageEffects.h/.m for a blur effect, and inside there, they use the new @import Accelerate; syntax versus #import <Accelerate/Accelerate.h>. When I run pod spec lint SFSCollectionMenu.podspec, I receive the error:

  • ERROR | [xcodebuild] SFSCollectionMenu/UIImage+ImageEffects.h:96:1: error: unexpected '@' in program

Does the CocoaPods platform not like the new modules syntax? I'm relatively new to CocoaPods so there very well could be something I'm missing. I followed Nils Hayat's blog for creating a simple pod (which fit my scenario perfectly -- nothing outlandish), http://nilsou.com/blog/2013/07/21/how-to-open-source-objective-c-code/, and receive this error in his section about verifying the pod via lint.

Here's relevant lines from podspec file:

s.source_files = 'SFSCollectionMenuController.*{h,m}', 'SFSCircleLayout.*{h,m}', 'SFSMenuCell.*{h,m}', 'UIImage+ImageEffects.*{h,m}'

s.frameworks = 'Accelerate', 'QuartzCore', 'AVFoundation'

Thank you for any help!

È stato utile?

Soluzione

I don't think Modules are turned on by default in Xcode, can you test whether adding spec.compiler_flags = "-fmodules" to turn on modules in your generated library fixes this?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top