0

I'm trying to reference my Firebase class but it's saying I can't find the module...This is strange because everything else in my Firebase is working like: FIRAuth.auth()?.createUserWithEmail is working no problem and signing in works too but when I'm trying to do let firebase = Firebase(url: "url.com") I get my module not found problem... error

I'm fairly certain I installed it correctly and I tried to follow the advice that people have posted on here already but I'm either doing it wrong or can't figure it out. This is what my build phases looks like. build phase

3 Answers 3

2

If you want to use old firebase, use Firebase sdk 2.5.0.

If you are using cocoapods:

pod 'Firebase', '>= 2.5.0'

This will fix your problem and you wont need google service plist

This is just if you want to use the old one. Using new sdk will solve your problem as well.

Sign up to request clarification or add additional context in comments.

Comments

1

Firebase has been updated to firebase 3 recently. In firebase 3, the information to your firebase url is provided in GoogleService-Info.plist. you just have to download it from your firebase console and put in your folders

more information can be found here https://firebase.google.com/docs/ios/setup#add_firebase_to_your_app

4 Comments

what i meant is that you do not need to put let firebase = Firebase(url: "url.com"). googleservice-info.plist settles that for you
ohhh thank you! That would explain why everything else works
just wondering, since i don't need to do let firebase = Firebase(url: "url.com"), how would i want to reference that variable later? I'm trying to do: ref.observeEventType(.Value, withBlock: { snapshot in println(snapshot.value) }, withCancelBlock: { error in println(error.description) }) } but I don't have the variable ref since i never did let var = Firebase(url:"")
ref = FIRDatabase.database().reference() and you can start doing things like filesRef = ref.child("files")
1

FireBase(url:) is depreciated.replace with the below code for swift 3

let dataBaseReference = FIRDatabase.database().reference().child("child name").child(subchildname)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.