设置减速板与斯威夫特项目

设置减速板与斯威夫特项目

问题描述:

我是新来的减速板,我可能只是在做一些愚蠢的,但我已经跟着一个斯威夫特项目概述这里设置减速板的步骤:https://github.com/airbrake/airbrake-ios设置减速板与斯威夫特项目

看似简单不够好,但我得到两个错误,我不能解析:

1)

Use of unresolved identifier 'ABNotifier'

2)

Use of unresolved identifier 'ABNotifierAutomaticEngironment'

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

我想知道如果别人有这个问题,这是一个简单的修复。下面是我的线路抛出的错误:

let key = "123456789"

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

任何想法?

+0

提交支持票,空气制动,他们更新了自己在github自述这有助于一点后。基本上有关如何创建桥接文件的说明... 事情是,现在我在他们的文件:GCAlertView.h中收到以下错误:“此项目使用仅在iOS 4.0和更高版本中可用的功能”。有任何想法吗? – TheGarden

要修正这个错误你在评论中提及...

error: "This project uses features only available in iOS 4.0 and later" in their file: GCAlertView.h

我结束了在GCAlertView.h在空中刹车删除此行代码。它编译得很好。应用程序包中已指定最低iOS版本,可防止应用程序安装。所以我会说检查这是毫无意义的。 https://github.com/airbrake/airbrake-ios#running-the-notifier-in-swift:

#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>