Day-15 Flashcards

1
Q

Firebase Storage

A

Analytics are embedded in the framework

Support - nsstring nsnumber nsarray nsdictionary

Its a smart database, it can call an API, get data, store it in the data base and present it to you!

  • Everything is stored as a single JSON file

Firebase Auth - User Authentication for login/signup

Sync engine to have data in sync among devices or users.. it tracks a cache when the user is offline and persist data to disk. Once we are back online, it syncs it with the database.

Ideally, We can build iMessage and chatting apps with this because its a realtime database. It fires off notifications whenever theres a change in data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

JSON Tree with Firebase

A

Unlike a SQL database, there are NO tables or records.

Avoid nesting objects/data ; Flatten data structure is the common term here.

All Firebase Realtime Database data is stored as JSON objects. You can think of the database as a cloud-hosted JSON tree.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Carthage vs. Cocoa Pods

A

If you had the choice, always go for Carthage.
Otherwise Cocoa Pods are not bad.

Pros: any of the framework can be built into a new thing (workSpace). Anytime we wanna update it, we do it in the command line.
Cons: XC work space, it gets very bulky and heavy whenever we build more stuff on it

Uses a handful of dependencies and keep things lighter to use, update and incorporate to our DataBase.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

FireBase workflow

A

FIRDatabaseReference : We instantiate it to be able to read/write from the database

//if theres a change go to the block
ObserveEventType:withBlock

FIRDataEventTypeValue listens to updates

Whenever there’s a change a snapshot is taken with:
FIRDataSnapshot - to get notified on the json tree updates

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Container View Controllers

A
class ViewController: UIViewController
{
    func setup()
    {
        guard let storyboard = self.storyboard else { return }
        guard let anotherVC = storyboard.instantiate..
    self. addChildViewController(anotherVC)
    self. view.addSubview(anotherVC.view)

    anotherVC.didMoveToParentViewController(self)
} }
func remove(vc: UIViewController)
{
    vc.willMoveToParentViewController(nil)
    vc.view.removeFromSuperview()
    vc.removeFromParentViewController()
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

NSError

&Error

A

A status code
A corresponding error domain
Additional context provided in the userInfo dictionary week

How well did you know this?
1
Not at all
2
3
4
5
Perfectly