Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Firebase to custom framework in iOS does not work

Adding Firebase to custom framework in iOS does not work. When I import my framework to app it gives:

FirebaseManager.swift:11:8: No such module 'Firebase'

Is this something due to the way the lib is built for Firebase? Rest of the third-party cocopods work fine like alamofire. In podspec I have:

    s.ios.dependency  'Firebase/Database'
    s.ios.dependency  'Firebase/Core'

podfile for framework looks like this:

target 'abcSDK' do



# Pods for abcSDK

target 'abcSDKUnitTests' do
    inherit! :search_paths
    # Pods for testing
    pod 'Alamofire', '~> 4.0'
    pod 'AlamofireObjectMapper', '~> 4.0'
    pod 'Firebase/Core'
    pod 'Firebase/Database'
end


pod 'Alamofire', '~> 4.0'
pod 'AlamofireObjectMapper', '~> 4.0'
pod 'Firebase/Core'
pod 'Firebase/Database' 
end
like image 284
user7005607 Avatar asked Oct 12 '16 05:10

user7005607


1 Answers

Firebase pods include static (instead of dynamic) libraries to enable supporting a minimum iOS version of 7.0. The downside of static libraries is that they don't work as custom framework dependencies.

like image 177
Paul Beusterien Avatar answered Nov 15 '22 11:11

Paul Beusterien