Including Firebase in a swift framework causes duplicate symbol warnings at runtime

85 views
Skip to first unread message

Andy Chou

unread,
Jan 3, 2017, 4:49:56 PM1/3/17
to Firebase Google Group
There are projects like RxFirebase that provide wrappers for Firebase for Swift. The project deploys as a framework using CocoaPods.

In RxFirebase, running the example project causes many runtime errors like the following:

objc[51573]: Class FIREmailPasswordAuthCredential is implemented in both /Users/achou/Library/Developer/CoreSimulator/Devices/C1890454-12D2-4C6B-A8B8-AAA9EA71DD42/data/Containers/Bundle/Application/45053DF1-3FB0-45C2-9AF9-F4DC54D6A97C/RxFirebase_Example.app/Frameworks/RxFirebase.framework/RxFirebase (0x103dff938) and /Users/achou/Library/Developer/CoreSimulator/Devices/C1890454-12D2-4C6B-A8B8-AAA9EA71DD42/data/Containers/Bundle/Application/45053DF1-3FB0-45C2-9AF9-F4DC54D6A97C/RxFirebase_Example.app/RxFirebase_Example (0x102b83a78). One of the two will be used. Which one is undefined.
objc[51573]: Class FIRAuth is implemented in both /Users/achou/Library/Developer/CoreSimulator/Devices/C1890454-12D2-4C6B-A8B8-AAA9EA71DD42/data/Containers/Bundle/Application/45053DF1-3FB0-45C2-9AF9-F4DC54D6A97C/RxFirebase_Example.app/Frameworks/RxFirebase.framework/RxFirebase (0x103dff988) and /Users/achou/Library/Developer/CoreSimulator/Devices/C1890454-12D2-4C6B-A8B8-AAA9EA71DD42/data/Containers/Bundle/Application/45053DF1-3FB0-45C2-9AF9-F4DC54D6A97C/RxFirebase_Example.app/RxFirebase_Example (0x102b83d98). One of the two will be used. Which one is undefined.


The problem appears to be that Firebase is linked to the RxFirebase framework, and then again against the Example app. The example app only has a dependency on the RxFirebase framework (Podfile), not on Firebase directly. RxFirebase has a dependency on Firebase (see RxFirebase.Podspec).

I'm not a maintainer of RxFirebase but a potential user who would like to see this issue resolved... See comments from the maintainers here: https://github.com/RxSwiftCommunity/RxFirebase/pull/5

Thanks,
Andy

Reply all
Reply to author
Forward
0 new messages