Skip to main content
Answered

iOS - Use of undeclared identifier 'IntercomModule'


  • New Participant
  • 2 replies

Hey, I'm getting the following build error trying to integrate the React Native SDK with iOS builds. Android build works fine. I have tried the both ways (Automatic & Manual) of installation the sdk.

Intercom package version : 5.2.0

X-Code - 14.2

React-Native Version: 0.66.4

Node : 14.17.0

Best answer by Racheal

Great- thanks for trying! 

 

I know you told me this but could you double-check you run pod install command. Additionally, you imported the <IntercomModule.h> on the top (among the other imports) before the didFinishLaunchingWithOptions method and they are in the same file (iOS/AppDelegate.m), right? It doesn't recognise the IntercomModule identifier, so it is either related to #import not being done before you used initialize code, or the pod is not installed.

View original
Did this topic help you find an answer to your question?

4 replies

Racheal
Intercom Team
Forum|alt.badge.img+5
  • Customer Support Engineer
  • 512 replies
  • August 8, 2023

Hey @Viren Racheal from the support engineer team here👋 

Two questions for you!

  1. Did you have a successful pod install ?
  2. Without adding that IntercomModule.initialize(this, "apiKey", "appId"); line, does the project build successfully?

  • Author
  • New Participant
  • 2 replies
  • August 8, 2023

Hi @Racheal, Thanks for your quick response. 

  1. Yes, we have successfully installed the pod in the project. 
  2. When we create the build without adding IntercomModule.initialize(this, "apiKey", "appId");  line the project build successfully.

Racheal
Intercom Team
Forum|alt.badge.img+5
  • Customer Support Engineer
  • 512 replies
  • Answer
  • August 10, 2023

Great- thanks for trying! 

 

I know you told me this but could you double-check you run pod install command. Additionally, you imported the <IntercomModule.h> on the top (among the other imports) before the didFinishLaunchingWithOptions method and they are in the same file (iOS/AppDelegate.m), right? It doesn't recognise the IntercomModule identifier, so it is either related to #import not being done before you used initialize code, or the pod is not installed.


  • Author
  • New Participant
  • 2 replies
  • August 11, 2023

Hi @Racheal, thanks for your response really appreciated.

Finally I have found the issue which was causing the error.

When i have checked the installation document first i might have seen the setup for the ios native version.

And by mistake i forgot to delete the pod ‘Intercom’ line from pod file.

So the compiler are getting two references for the intercom module and couldn’t decide where to reference from.

 

Thank You.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings