我正在使用react-native-intercom
在我的应用程序中管理对讲机。我已经使用 CocoaPods 安装了 Intercom iOS SDK,并链接了react-native-intercom
. 但是构建失败并出现错误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];
}