0

我是 Airbrake 的新手,我可能只是在做一些愚蠢的事情,但我已经按照此处列出的步骤在 Swift 项目中设置 Airbrake:https ://github.com/airbrake/airbrake-ios

看起来很简单,但我遇到了两个我无法解决的错误:

1)

使用未解析的标识符“ABNotifier”

2)

使用未解析的标识符“ABNotifierAutomaticEngironment”

我删除了所有文件、框架和目录,并再次尝试以防出现问题但出现相同的错误。我猜出于某种原因这个ABNotifier类没有被识别/不在范围内?

我想知道其他人是否遇到过这个问题,这是一个简单的解决方法。以下是我抛出错误的行:

让键=“123456789”

ABNotifier.startNotifierWithAPIKey(key, environmentName: ABNotifierAutomaticEnvironment, useSSL: true, delegate: self)

有任何想法吗?

4

1 回答 1

0

要解决您在评论中提到的此错误...

错误:“此项目使用仅在 iOS 4.0 及更高版本中可用的功能”在他们的文件中:GCAlertView.h

我最终GCAlertView.h在 Airbrake 中删除了这行代码。它编译得很好。应用程序包中已经指定了阻止应用程序安装的最低 iOS 版本。所以我想说无论如何检查这是没有意义的。

#import <TargetConditionals.h>
#if TARGET_OS_IPHONE
//#ifndef __IPHONE_4_0 // hlung: this is not working correctly, remove for now
//#error This project uses features only available in iOS 4.0 and later
//#endif
#import <UIKit/UIKit.h>
于 2015-05-09T09:59:52.367 回答