Văn Hải Cao
Văn Hải Cao

Reputation: 31

Crash when Use Firebase Analytics in a project SDK Cocoa Touch Framework

I created a CocoaTouch Framework SDK, which uses the Firebase library for checking. However, I have the following problem: - Added Firebase Analytics to the SDK, build successful, however if in SDK there is a function call in the class FIRAnalytics, for example:

[FIRAnalytics logEventWithName:@"share_image"
                    parameters:@{
                                 @"name": name,
                                 @"full_text": text
                                 }];

Then in Project A(example) using our SDK crashed in the function:

- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];

}

Add Framework Firebase Analytics

Log

Upvotes: 3

Views: 937

Answers (1)

yvzzztrk
yvzzztrk

Reputation: 424

For people who wants to use firebase sdks in swift framework without cocoapods, I managed to resolve this crash by just adding following #import to framework's public header file "YourCocoaTouchFrameworkNameSwift.h"

#import <YourCocoaTouchFrameworkName/Firebase.h>

and also followed all the integration instructions in README file.

You can checkout my sample cocoa touch framework and project on github

Upvotes: 1

Related Questions