2015-04-17 14 views
0

我是新來的減速板,我可能只是在做一些愚蠢的,但我已經跟着一個斯威夫特項目概述這裏設置減速板的步驟: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

回答

0

要修正這個錯誤你在評論中提及...

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>