# Firebase Tutorial: Getting Started

**URL:** <https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964>\
**Category:** 🎓 Courses & Articles\
**Created:** [September 19, 2016, 1:01pm UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964 "2016-09-19T13:01:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cynicalme](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/cynicalme/32/96199_2.png) [@cynicalme](https://forums.kodeco.com/u/cynicalme)\
**Post date:** [September 19, 2016, 1:01pm UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/1 "2016-09-19T13:01:27Z")

</div>

In this Firebase tutorial, you'll learn Firebase fundamentals including saving data, real-time sync, authentication, user status, and offline support.

* * *
 This is a companion discussion topic for the original entry at [https://www.raywenderlich.com/953-firebase-tutorial-getting-started](https://www.raywenderlich.com/953-firebase-tutorial-getting-started)

---

<div class="post-metadata">

**Author:** ![fran2711](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/fran2711/32/41877_2.png) [@fran2711](https://forums.kodeco.com/u/fran2711)\
**Post date:** [September 19, 2016, 5:33pm UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/2 "2016-09-19T17:33:32Z")

</div>

There is an error trying to build in the model GroceryItem. It says: Type “Any” has no subscript members in the init. I don´t know how to make it work.

---

<div class="post-metadata">

**Author:** ![berko](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/berko/32/106527_2.png) [@berko](https://forums.kodeco.com/u/berko)\
**Post date:** [September 19, 2016, 7:04pm UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/3 "2016-09-19T19:04:27Z")

</div>

```
init(snapshot: FIRDataSnapshot) {
    let snapshotValue = snapshot.value as! NSDictionary
    key = snapshot.key
    name = snapshotValue["name"] as! String
    addedByUser = snapshotValue["addedByUser"] as! String
    completed = snapshotValue["completed"] as! Bool
    ref = snapshot.ref
}

func toAnyObject() -> Any {
    return [
        "name": name,
        "addedByUser": addedByUser,
        "completed": completed
    ]
}

```

---

<div class="post-metadata">

**Author:** ![ys\_xs](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ys_xs/32/105896_2.png) [@ys\_xs](https://forums.kodeco.com/u/ys_xs)\
**Post date:** [September 20, 2016, 6:04am UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/4 "2016-09-20T06:04:00Z")

</div>

There was an error when i install Firebase。Why?😖

Installing Firebase (3.5.2)

[!] Error installing Firebase  
[!] /usr/bin/curl -f -L -o /var/folders/3n/0y5gxtl92l76mj\_xc61xzyww0000gn/T/d20160920-20077-zf61bw/file.tgz [https://www.gstatic.com/cpdc/cc5f7aac07ccdd0a/Firebase-3.5.0.tar.gz](https://www.gstatic.com/cpdc/cc5f7aac07ccdd0a/Firebase-3.5.0.tar.gz) --create-dirs --netrc-optional

% Total % Received % Xferd Average Speed Time Time Time Current  
Dload Upload Total Spent Left Speed  
0 0 0 0 0 0 0 0 --:–:-- 0:00:21 --:–:-- 0curl: (7) Failed to connect to [www.gstatic.com](http://www.gstatic.com) port 443: Host is down`

---

<div class="post-metadata">

**Author:** ![pradeeprajkumar](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/pradeeprajkumar/32/39684_2.png) [@pradeeprajkumar](https://forums.kodeco.com/u/pradeeprajkumar)\
**Post date:** [September 20, 2016, 8:24am UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/5 "2016-09-20T08:24:22Z")

</div>

Will there be a tutorial released on implementing Dynamic link with FireBase in iOS ?

---

<div class="post-metadata">

**Author:** ![swiftlearnerforlife](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/swiftlearnerforlife/32/110937_2.png) [@swiftlearnerforlife](https://forums.kodeco.com/u/swiftlearnerforlife)\
**Post date:** [September 20, 2016, 8:27am UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/6 "2016-09-20T08:27:59Z")

</div>

Lots of compile errors and warnings which is annoying. Hope this gets fixed soon.

---

<div class="post-metadata">

**Author:** ![anthonyroani](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/anthonyroani/32/41968_2.png) [@anthonyroani](https://forums.kodeco.com/u/anthonyroani)\
**Post date:** [September 20, 2016, 3:31pm UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/7 "2016-09-20T15:31:02Z")

</div>

Great tutorial ! Thank you 😀

---

<div class="post-metadata">

**Author:** ![chomper](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/chomper/32/47136_2.png) [@chomper](https://forums.kodeco.com/u/chomper)\
**Post date:** [September 20, 2016, 8:27pm UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/8 "2016-09-20T20:27:52Z")

</div>

ERROR

Apple Mach-O Linker Error Group  
clang: error: linker command failed with exit code 1 (use -v to see invocation)

---

<div class="post-metadata">

**Author:** ![ryann786](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@ryann786](https://forums.kodeco.com/u/ryann786)\
**Post date:** [September 20, 2016, 11:50pm UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/9 "2016-09-20T23:50:56Z")

</div>

within the grocery item struct, I get the following error:

Type ‘Any’ has no subscript members.

on these 3 lines

name = snapshot.value![“name”] as! String  
addedByUser = snapshot.value![“addedByUser”] as! String  
completed = snapshot.value![“completed”] as! Bool

---

<div class="post-metadata">

**Author:** ![sloomis7](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sloomis7/32/93091_2.png) [@sloomis7](https://forums.kodeco.com/u/sloomis7)\
**Post date:** [September 21, 2016, 4:48am UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/10 "2016-09-21T04:48:48Z")

</div>

func toAnyObject() → AnyObject {

```
return ["name": name, "addedByUser": addedByUser, "completed": completed] **as AnyObject**

```

}

---

<div class="post-metadata">

**Author:** ![cleota](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/cleota/32/42014_2.png) [@cleota](https://forums.kodeco.com/u/cleota)\
**Post date:** [September 21, 2016, 5:22am UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/11 "2016-09-21T05:22:11Z")

</div>

Hi there, I have used your tutorial and its great. Is there anyway to use Firebase for OS X applications? Or is Firebase specifically designed for Apps and Web Applications alone? Thanks…

---

<div class="post-metadata">

**Author:** ![rcohen](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rcohen/32/81494_2.png) [@rcohen](https://forums.kodeco.com/u/rcohen)\
**Post date:** [September 21, 2016, 3:07pm UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/12 "2016-09-21T15:07:11Z")

</div>

So, I built a shopping list manager app a long time ago and it’s under supported and still in the store. MyShopper. This is feature I’ve long wanted to add.

Also, I’ve been a RayWenderlich customer for a while having used many of the tutorials and purchased some of the books. I have to say, this tutorial is quite ready for prime time. There are a number of things that require tinkering with right out of the box just to get it to build. Sure would like to see a touch more attention to the quality here.

Thanks and please take this as constructive feedback. You’re doing great work.

---

<div class="post-metadata">

**Author:** ![nico75005](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@nico75005](https://forums.kodeco.com/u/nico75005)\
**Post date:** [September 22, 2016, 4:14am UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/13 "2016-09-22T04:14:27Z")

</div>

Great tutorial!

Something I noticed though.  
When exiting the app, the user is removed from the online users, which is normal.  
When putting the app in the background, the user stays in the online users, which I guess might be normal as well.  
When locking the phone, the user is removed from the online users. Let’s pretend it’s normal.

The problem comes when going back to the app. The user isn’t online anymore but he/she should be.

Any idea what’s the reason? Bug within the Firebase library?

---

<div class="post-metadata">

**Author:** ![swiftlearnerforlife](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/swiftlearnerforlife/32/110937_2.png) [@swiftlearnerforlife](https://forums.kodeco.com/u/swiftlearnerforlife)\
**Post date:** [September 22, 2016, 11:53am UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/14 "2016-09-22T11:53:31Z")

</div>

Any chance you could over creating a user with a unique username like Twitter and Instagram? Currently can only authenticate with password and email.

Lots of people seem to be asking for it in relation to Firebase but there doesn’t seem to be an accepted answer out there at the moment. Would be amazing if RW could come to the rescue 🙂

---

<div class="post-metadata">

**Author:** ![cakiem04](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/cakiem04/32/42422_2.png) [@cakiem04](https://forums.kodeco.com/u/cakiem04)\
**Post date:** [September 24, 2016, 3:16pm UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/15 "2016-09-24T15:16:00Z")

</div>

Did you try to launch your project from [project\_name].xcworkspace file?

---

<div class="post-metadata">

**Author:** ![simonqq](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/simonqq/32/83652_2.png) [@simonqq](https://forums.kodeco.com/u/simonqq)\
**Post date:** [September 25, 2016, 4:26am UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/16 "2016-09-25T04:26:30Z")

</div>

Just downloaded the start project and getting a lot of Swift Compiler Errors.

This is on Xcode 8 that was just released. Is anyone else getting this issue?

---

<div class="post-metadata">

**Author:** ![dinsen](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/dinsen/32/81816_2.png) [@dinsen](https://forums.kodeco.com/u/dinsen)\
**Post date:** [September 25, 2016, 10:08am UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/17 "2016-09-25T10:08:17Z")

</div>

I got the same issue.

---

<div class="post-metadata">

**Author:** ![cynicalme](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/cynicalme/32/96199_2.png) [@cynicalme](https://forums.kodeco.com/u/cynicalme)\
**Post date:** [September 25, 2016, 10:30am UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/18 "2016-09-25T10:30:57Z")

</div>

Thanks for the feedback! The sample projects have been updated!

---

<div class="post-metadata">

**Author:** ![cynicalme](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/cynicalme/32/96199_2.png) [@cynicalme](https://forums.kodeco.com/u/cynicalme)\
**Post date:** [September 25, 2016, 10:32am UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/19 "2016-09-25T10:32:11Z")

</div>

Thank you all for your feedback! The sample projects have been updated, no more compiler issues!

---

<div class="post-metadata">

**Author:** ![simonqq](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/simonqq/32/83652_2.png) [@simonqq](https://forums.kodeco.com/u/simonqq)\
**Post date:** [September 26, 2016, 4:39am UTC](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964/20 "2016-09-26T04:39:33Z")

</div>

Thanks @cynicalme! Also, for anyone not being able to download the plist file and getting a forbidden file when attempting to download: try to sign out of all your google accounts and make sure you’re only signed into the one. I was logged into 2 other accounts and only after signing out was I able to download the file. Perhaps @cynicalme can make a note of that in the tutorial.

[Next page](https://forums.kodeco.com/t/firebase-tutorial-getting-started/19964.md?page=2)
