I am using react-native-intercom
to manage Intercom in my app. I have installed the Intercom iOS SDK using CocoaPods, and linked the react-native-intercom
. But Build failed with error Use of undeclared identifier 'Intercom' in AppDelegate.m - react-native-intercom
steps 1 (Install and Link Intercom)
npm install react-native-intercom
react-native link react-native-intercom
step 2 (Import Intercom in AppDelegate.m)
#import "Intercom/intercom.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[Intercom setApiKey:@"myApiKey" forAppId:@"myAppId"];
[Intercom registerUnidentifiedUser];
}
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
[Intercom setDeviceToken:deviceToken];
}
I am using react-native and fixed this issue by changing
intercom
intoIntercom
.use
#import "Intercom/Intercom.h"
instead of#import "Intercom/intercom.h"
inAppDelegate.m
fileIf you go into the framework's Headers folder in your workspace
(Workspace -> Intercom.framework -> Headers)
you will see theIntercom.h
file.