iosxcodeswiftcocoapodsezaudio

EZAudio CocoaPods module import error


When adding EZAudio to my swift project using CocoaPods, I get a compiler error that says:
Could not build Objective-C module 'EZAudio'

My Podfile is this:

platform :ios, '9'
use_frameworks!

pod 'CorePlot'
pod 'SWRevealViewController'
pod 'EZAudio'

I add it to a swift file like so:

import EZAudio

I am not using a bridging header. Does anybody have any insight into why this is happening?


Solution

  • The problem is in the EZAudioiOS.m and EZAudioOSX.m files. You can find those in: /Pods/EZAudio/Core/EZAudioiOS.m

    Change the following lines:

    #import <EZAudioiOS/EZAudio.h>
    

    With:

    #import "EZAudio.h"
    

    An alert will popup, to Unlock the file, you are editing. Just click "Unlock".