我正在使用react-native-intercom来管理我的应用程序中的内部通讯。我已经使用iOS安装了对讲机CocoaPods 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];
}发布于 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文件。
https://stackoverflow.com/questions/66775876
复制相似问题