首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在AppDelegate.m -react本机-intercom中使用未声明的标识符“intercom”

在AppDelegate.m -react本机-intercom中使用未声明的标识符“intercom”
EN

Stack Overflow用户
提问于 2021-03-24 06:36:10
回答 1查看 1.4K关注 0票数 1

我正在使用react-native-intercom来管理我的应用程序中的内部通讯。我已经使用iOS安装了对讲机CocoaPods SDK,并链接了react-native-intercom。但是生成失败,错误Use of undeclared identifier 'Intercom' in AppDelegate.m - react-native-intercom

代码语言:javascript
复制
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];
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-03-24 06:36:10

我正在使用react本机,并通过将intercom转换为Intercom来解决这个问题。

#导入"Intercom/Intercom.h“

#import "Intercom/Intercom.h"文件中使用#import "Intercom/intercom.h"代替#import "Intercom/intercom.h"

如果进入工作区(Workspace -> Intercom.framework -> Headers)中框架的Header文件夹,您将看到Intercom.h文件。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66775876

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档