我安装了 sinch(在 swift 中工作)
在 pod 文件夹“SINAPSEnvironment.h”中
#ifndef SINAPSEnvironmentAutomatic
#ifdef NDEBUG
#define SINAPSEnvironmentAutomatic SINAPSEnvironmentProduction
#else
#ifdef DEBUG
#define SINAPSEnvironmentAutomatic SINAPSEnvironmentDevelopment
#else
#define SINAPSEnvironmentAutomatic SINAPSEnvironmentProduction
#endif // ifdef DEBUG
#endif // ifdef NDEBUG
#endif // ifndef SINAPSEnvironmentAutomatic
在我使用的 UIViewcontroller.swift 中
push = Sinch.managedPush(with: SINAPSEnvironmentAutomatic)
push?.delegate = self
push?.registerUserNotificationSettings()
push?.setDesiredPushType(SINPushTypeVoIP)
在这里“SINAPSEnvironmentAutomatic”出现错误。 (使用未解析的标识符“SINAPSEnvironmentAutomatic”)
我该如何解决这个问题。
最佳答案
在顶部的 ViewController 中, 确保你添加了模块
import //Module name
在 UIKit 下, 在你的情况下,我认为它是这个 pod,
SinchRTC
只要确保它是导入的,以及如何使用它阅读文档 here
关于ios - 如何在 UIViewcontroller 中访问已安装的 pod 库宏字符串?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52384335/