Reputation: 604
Sample Project: https://github.com/mike011/CrashlyticsDelegateExample
Steps to reproduce:
extension AppDelegate: CrashlyticsDelegate {
func crashlyticsDidDetectReport(forLastExecution report: CLSReport) { }
}
#import <UIKit/UIKit.h>
#import "CrashlyticsSampleApp-Swift.h"
The error "Cannot find protocol declaration for 'CrashlyticsDelegate' is produced from the 'CrashlyticsSampleApp-Swift.h' file.
Environment: MacOS 10.14 with xCode 9.4
Upvotes: 2
Views: 491
Reputation: 2928
You will need to create a bridging header for obj-c/swift and add the following import to it:
#import <Crashlytics/Crashlytics.h>
I haven't tested, but you probably can get away with it by adding that import to your sample objc file (ObjectiveCMMFile.mm
) if you do not need the bridging header (would be great if you could confirm).
Upvotes: 1