Getting compile problems after updating 'InstantSearch' in my podfile

Hello everyone,

I am getting following compile issue after updating the version of InstantSearch.

:2:9: note: in file included from :2:
#import “Headers/InstantSearchCore-Swift.h”
/Users/kaan548/Library/Developer/Xcode/DerivedData/Delgado-cdpmclffbdxsflgaoquwrokfyoed/Build/Products/Debug-iphoneos/InstantSearchCore/InstantSearchCore.framework/Headers/InstantSearchCore-Swift.h:206:1: error: duplicate interface definition for class ‘AsyncOperation’
@interface AsyncOperation : NSOperation
/Users/kaan548/Library/Developer/Xcode/DerivedData/Delgado-cdpmclffbdxsflgaoquwrokfyoed/Build/Products/Debug-iphoneos/InstantSearchClient/InstantSearchClient.framework/Headers/InstantSearchClient-Swift.h:426:12: note: previous definition is here
@interface AsyncOperation : NSOperation
:0: error: could not build Objective-C module ‘InstantSearchCore’

My pod file looks like this:

target 'Delgado' do
 pod 'Firebase/Database'
 pod 'Firebase/Storage'
 pod 'Firebase/Firestore'
 pod 'Firebase/Auth' 
 pod  'Firebase/Messaging'
 pod 'AZDropdownMenu'
 pod  'Firebase/Core'
 pod 'InstantSearch', '~> 5.0'
 pod 'OneSignal', '>= 2.11.2', '< 3.0'
 target 'OneSignalNotificationServiceExtension' do
 pod 'OneSignal', '>= 2.11.2', '< 3.0' 

Anyone know what to do? I deleted my files within derived data couple of time but didn’t help. Thanks in advance!

Hello @kaan548,

If I see correctly, you are using Objective-C, and unfortunately InstantSearch v5 only supports Swift.

You could try to use versions 3 or 4, there’s legacy documentation that you could find here: getting started programmatic - getting started storyboard - getting started part 2 - API Ref. But as you can see, all the documentation is in Swift, and those InstantSearch versions have been deprecated.

Also note that the API Client fully supports Objective-C in case you want to use this one in order to use Algolia in your project.


Hi @guy.daher

I am not using Objective-C actually. I added

pod ‘InstantSearch’, ‘~> 5.0’

to my podfile. Build setting is set to Swift 5.0