한국어

Coding

온누리070 플레이스토어 다운로드
    acrobits softphone
     온누리 070 카카오 프러스 친구추가온누리 070 카카오 프러스 친구추가친추
     카카오톡 채팅 상담 카카오톡 채팅 상담카톡
    
     라인상담
     라인으로 공유

     페북공유

   ◎위챗 : speedseoul


  
     PAYPAL
     
     PRICE
     

pixel.gif

    before pay call 0088 from app


글 수 101
2018.04.26 07:17:03 (*.160.88.18)
4007

https://www.firebase.com/docs/ios-api/Classes/Firebase.html


Firebase Class Reference

Inherits fromFQuery : NSObject
Declared inFirebase.h

Overview

A Firebase reference represents a particular location in your Firebase database and can be used for reading or writing data to that Firebase database location.

This class is the starting point for all Firebase operations. After you’ve initialized it with initWithUrl: you can use it to read data (ie. observeEventType:withBlock:), write data (ie. setValue:), and to create new Firebase references (ie. child:).

Initializing a Firebase object

– initWithUrl:

Initialize this Firebase reference with an absolute URL.

- (id)initWithUrl:(NSString *)url

Parameters

url

The Firebase URL (ie: https://SampleChat.firebaseIO-demo.com)

Discussion

Initialize this Firebase reference with an absolute URL.

Declared In

Firebase.h

Getting references to children locations

– childByAppendingPath:

Get a Firebase reference for the database location at the specified relative path. The relative path can either be a simple child key (e.g. ‘fred’) or a deeper slash-separated path (e.g. ‘fred/name/first’).

- (Firebase *)childByAppendingPath:(NSString *)pathString

Parameters

pathString

A relative path from this location to the desired child location.

Return Value

A Firebase reference for the specified relative path.

Discussion

Get a Firebase reference for the database location at the specified relative path. The relative path can either be a simple child key (e.g. ‘fred’) or a deeper slash-separated path (e.g. ‘fred/name/first’).

Declared In

Firebase.h

– childByAutoId

childByAutoId generates a new child location using a unique key and returns a Firebase reference to it. This is useful when the children of a Firebase database location represent a list of items.

- (Firebase *)childByAutoId

Return Value

A Firebase reference for the generated database location.

Discussion

childByAutoId generates a new child location using a unique key and returns a Firebase reference to it. This is useful when the children of a Firebase database location represent a list of items.

The unique key generated by childByAutoId: is prefixed with a client-generated timestamp so that the resulting list will be chronologically-sorted.

Declared In

Firebase.h

Writing data

– setValue:

Write data to this Firebase database location.

- (void)setValue:(id)value

Parameters

value

The value to be written.

Discussion

Write data to this Firebase database location.

This will overwrite any data at this location and all child locations.

Data types that can be set are:

  • NSString – @“Hello World”
  • NSNumber (also includes boolean) – @YES, @43, @4.333
  • NSDictionary – @{@“key”: @“value”, @“nested”: @{@“another”: @“value”} }
  • NSArray

The effect of the write will be visible immediately and the corresponding events will be triggered. Synchronization of the data to the Firebase database servers will also be started.

Passing null for the new value is equivalent to calling remove:; all data at this location or any child location will be deleted.

Note that setValue: will remove any priority stored at this location, so if priority is meant to be preserved, you should use setValue:andPriority:instead.

Server Values - Placeholder values you may write into a Firebase database as a value or priority that will automatically be populated before writing to the Firebase database.

  • kFirebaseServerValueTimestamp - The number of milliseconds since the Unix epoch

Declared In

Firebase.h

– setValue:withCompletionBlock:

The same as setValue: with a block that gets triggered after the write operation has been committed to the Firebase database.

- (void)setValue:(id)value withCompletionBlock:(void ( ^ ) ( NSError *error , Firebase *ref ))block

Parameters

value

The value to be written.

block

The block to be called after the write has been committed to the Firebase database.

Discussion

The same as setValue: with a block that gets triggered after the write operation has been committed to the Firebase database.

Declared In

Firebase.h

– setValue:andPriority:

The same as setValue: with an additional priority to be attached to the data being written. Priorities are used to order items.

- (void)setValue:(id)value andPriority:(id)priority

Parameters

value

The value to be written.

priority

The priority to be attached to that data.

Discussion

The same as setValue: with an additional priority to be attached to the data being written. Priorities are used to order items.

Declared In

Firebase.h

– setValue:andPriority:withCompletionBlock:

The same as setValue:andPriority: with a block that gets triggered after the write operation has been committed to the Firebase database.

- (void)setValue:(id)value andPriority:(id)priority withCompletionBlock:(void ( ^ ) ( NSError *error , Firebase *ref ))block

Parameters

value

The value to be written.

priority

The priority to be attached to that data.

block

The block to be called after the write has been committed to the Firebase database.

Discussion

The same as setValue:andPriority: with a block that gets triggered after the write operation has been committed to the Firebase database.

Declared In

Firebase.h

– removeValue

Remove the data at this Firebase database location. Any data at child locations will also be deleted.

- (void)removeValue

Discussion

Remove the data at this Firebase database location. Any data at child locations will also be deleted.

The effect of the delete will be visible immediately and the corresponding events will be triggered. Synchronization of the delete to the Firebase database will also be started.

remove: is equivalent to calling setValue:nil.

Declared In

Firebase.h

– removeValueWithCompletionBlock:

The same as remove: with a block that gets triggered after the remove operation has been committed to the Firebase database.

- (void)removeValueWithCompletionBlock:(void ( ^ ) ( NSError *error , Firebase *ref ))block

Parameters

block

The block to be called after the remove has been committed to the Firebase database.

Discussion

The same as remove: with a block that gets triggered after the remove operation has been committed to the Firebase database.

Declared In

Firebase.h

– setPriority:

Set a priority for the data at this Firebase database location. Priorities can be used to provide a custom ordering for the children at a location (if no priorities are specified, the children are ordered by key).

- (void)setPriority:(id)priority

Parameters

priority

The priority to set at the specified location.

Discussion

Set a priority for the data at this Firebase database location. Priorities can be used to provide a custom ordering for the children at a location (if no priorities are specified, the children are ordered by key).

You cannot set a priority on an empty location. For this reason setValue:andPriority: should be used when setting initial data with a specific priority and setPriority: should be used when updating the priority of existing data.

Children are sorted based on this priority using the following rules:

Children with no priority come first. Children with a number as their priority come next. They are sorted numerically by priority (small to large). Children with a string as their priority come last. They are sorted lexicographically by priority. Whenever two children have the same priority (including no priority), they are sorted by key. Numeric keys come first (sorted numerically), followed by the remaining keys (sorted lexicographically).

Note that priorities are parsed and ordered as IEEE 754 double-precision floating-point numbers. Keys are always stored as strings and are treated as numbers only when they can be parsed as a 32-bit integer.

Declared In

Firebase.h

– setPriority:withCompletionBlock:

The same as setPriority: with a block block that is called once the priority has been committed to the Firebase database.

- (void)setPriority:(id)priority withCompletionBlock:(void ( ^ ) ( NSError *error , Firebase *ref ))block

Parameters

priority

The priority to set at the specified location.

block

The block that is triggered after the priority has been written on the servers.

Discussion

The same as setPriority: with a block block that is called once the priority has been committed to the Firebase database.

Declared In

Firebase.h

– updateChildValues:

Update changes the values of the keys specified in the dictionary without overwriting other keys at this location.

- (void)updateChildValues:(NSDictionary *)values

Parameters

values

A dictionary of the keys to change and their new values.

Discussion

Update changes the values of the keys specified in the dictionary without overwriting other keys at this location.

Declared In

Firebase.h

– updateChildValues:withCompletionBlock:

The same as update: with a block block that is called once the update has been committed to the Firebase database.

- (void)updateChildValues:(NSDictionary *)values withCompletionBlock:(void ( ^ ) ( NSError *error , Firebase *ref ))block

Parameters

values

A dictionary of the keys to change and their new values.

block

The block that is triggered after the update has been written on the Firebase database.

Discussion

The same as update: with a block block that is called once the update has been committed to the Firebase database.

Declared In

Firebase.h

Attaching observers to read data

– observeEventType:withBlock:

observeEventType:withBlock: is used to listen for data changes at a particular location.

- (FirebaseHandle)observeEventType:(FEventType)eventType withBlock:(void ( ^ ) ( FDataSnapshot *snapshot ))block

Parameters

eventType

The type of event to listen for.

block

The block that should be called with initial data and updates as a FDataSnapshot.

Return Value

A handle used to unregister this block later using removeObserverWithHandle:

Discussion

observeEventType:withBlock: is used to listen for data changes at a particular location.

This is the primary way to read data from a Firebase database. Your block will be triggered for the initial data and again whenever the data changes.

Use removeObserverWithHandle: to stop receiving updates.

Supported events types for all realtime observers are specified in FEventType as:

typedef NS_ENUM(NSInteger, FEventType) {
  FEventTypeChildAdded,    // 0, fired when a new child node is added to a location
  FEventTypeChildRemoved,  // 1, fired when a child node is removed from a location
  FEventTypeChildChanged,  // 2, fired when a child node at a location changes
  FEventTypeChildMoved,    // 3, fired when a child node moves relative to the other child nodes at a location
  FEventTypeValue          // 4, fired when any data changes at a location and, recursively, any children
};

Declared In

Firebase.h

– observeEventType:andPreviousSiblingKeyWithBlock:

observeEventType:andPreviousSiblingKeyWithBlock: is used to listen for data changes at a particular location. This is the primary way to read data from a Firebase database. Your block will be triggered for the initial data and again whenever the data changes. In addition, for FEventTypeChildAdded, FEventTypeChildMoved, and FEventTypeChildChanged events, your block will be passed the key of the previous node by priority order.

- (FirebaseHandle)observeEventType:(FEventType)eventType andPreviousSiblingKeyWithBlock:(void ( ^ ) ( FDataSnapshot *snapshot , NSString *prevKey ))block

Parameters

eventType

The type of event to listen for.

block

The block that should be called with initial data and updates as a FDataSnapshot, as well as the previous child’s key.

Return Value

A handle used to unregister this block later using removeObserverWithHandle:

Discussion

observeEventType:andPreviousSiblingKeyWithBlock: is used to listen for data changes at a particular location. This is the primary way to read data from a Firebase database. Your block will be triggered for the initial data and again whenever the data changes. In addition, for FEventTypeChildAdded, FEventTypeChildMoved, and FEventTypeChildChanged events, your block will be passed the key of the previous node by priority order.

Use removeObserverWithHandle: to stop receiving updates.

Declared In

Firebase.h

– observeEventType:withBlock:withCancelBlock:

observeEventType:withBlock: is used to listen for data changes at a particular location. This is the primary way to read data from a Firebase database. Your block will be triggered for the initial data and again whenever the data changes.

- (FirebaseHandle)observeEventType:(FEventType)eventType withBlock:(void ( ^ ) ( FDataSnapshot *snapshot ))block withCancelBlock:(void ( ^ ) ( NSError *error ))cancelBlock

Parameters

eventType

The type of event to listen for.

block

The block that should be called with initial data and updates as a FDataSnapshot.

cancelBlock

The block that should be called if this client no longer has permission to receive these events.

Return Value

A handle used to unregister this block later using removeObserverWithHandle:

Discussion

observeEventType:withBlock: is used to listen for data changes at a particular location. This is the primary way to read data from a Firebase database. Your block will be triggered for the initial data and again whenever the data changes.

The cancelBlock will be called if you will no longer receive new events due to no longer having permission.

Use removeObserverWithHandle: to stop receiving updates.

Declared In

Firebase.h

– observeEventType:andPreviousSiblingKeyWithBlock:withCancelBlock:

observeEventType:andPreviousSiblingKeyWithBlock: is used to listen for data changes at a particular location. This is the primary way to read data from a Firebase database. Your block will be triggered for the initial data and again whenever the data changes. In addition, for FEventTypeChildAdded, FEventTypeChildMoved, and FEventTypeChildChanged events, your block will be passed the key of the previous node by priority order.

- (FirebaseHandle)observeEventType:(FEventType)eventType andPreviousSiblingKeyWithBlock:(void ( ^ ) ( FDataSnapshot *snapshot , NSString *prevKey ))block withCancelBlock:(void ( ^ ) ( NSError *error ))cancelBlock

Parameters

eventType

The type of event to listen for.

block

The block that should be called with initial data and updates as a FDataSnapshot, as well as the previous child’s key.

cancelBlock

The block that should be called if this client no longer has permission to receive these events.

Return Value

A handle used to unregister this block later using removeObserverWithHandle:

Discussion

observeEventType:andPreviousSiblingKeyWithBlock: is used to listen for data changes at a particular location. This is the primary way to read data from a Firebase database. Your block will be triggered for the initial data and again whenever the data changes. In addition, for FEventTypeChildAdded, FEventTypeChildMoved, and FEventTypeChildChanged events, your block will be passed the key of the previous node by priority order.

The cancelBlock will be called if you will no longer receive new events due to no longer having permission.

Use removeObserverWithHandle: to stop receiving updates.

Declared In

Firebase.h

– observeSingleEventOfType:withBlock:

This is equivalent to observeEventType:withBlock:, except the block is immediately canceled after the initial data is returned.

- (void)observeSingleEventOfType:(FEventType)eventType withBlock:(void ( ^ ) ( FDataSnapshot *snapshot ))block

Parameters

eventType

The type of event to listen for.

block

The block that should be called with initial data and updates as a FDataSnapshot.

Discussion

This is equivalent to observeEventType:withBlock:, except the block is immediately canceled after the initial data is returned.

Declared In

Firebase.h

– observeSingleEventOfType:andPreviousSiblingKeyWithBlock:

This is equivalent to observeEventType:withBlock:, except the block is immediately canceled after the initial data is returned. In addition, for FEventTypeChildAdded, FEventTypeChildMoved, and FEventTypeChildChanged events, your block will be passed the key of the previous node by priority order.

- (void)observeSingleEventOfType:(FEventType)eventType andPreviousSiblingKeyWithBlock:(void ( ^ ) ( FDataSnapshot *snapshot , NSString *prevKey ))block

Parameters

eventType

The type of event to listen for.

block

The block that should be called with initial data and updates as a FDataSnapshot, as well as the previous child’s key.

Discussion

This is equivalent to observeEventType:withBlock:, except the block is immediately canceled after the initial data is returned. In addition, for FEventTypeChildAdded, FEventTypeChildMoved, and FEventTypeChildChanged events, your block will be passed the key of the previous node by priority order.

Declared In

Firebase.h

– observeSingleEventOfType:withBlock:withCancelBlock:

This is equivalent to observeEventType:withBlock:, except the block is immediately canceled after the initial data is returned.

- (void)observeSingleEventOfType:(FEventType)eventType withBlock:(void ( ^ ) ( FDataSnapshot *snapshot ))block withCancelBlock:(void ( ^ ) ( NSError *error ))cancelBlock

Parameters

eventType

The type of event to listen for.

block

The block that should be called with initial data and updates as a FDataSnapshot.

cancelBlock

The block that will be called if you don’t have permission to access this data.

Discussion

This is equivalent to observeEventType:withBlock:, except the block is immediately canceled after the initial data is returned.

The cancelBlock will be called if you do not have permission to read data at this location.

Declared In

Firebase.h

– observeSingleEventOfType:andPreviousSiblingKeyWithBlock:withCancelBlock:

This is equivalent to observeEventType:withBlock:, except the block is immediately canceled after the initial data is returned. In addition, for FEventTypeChildAdded, FEventTypeChildMoved, and FEventTypeChildChanged events, your block will be passed the key of the previous node by priority order.

- (void)observeSingleEventOfType:(FEventType)eventType andPreviousSiblingKeyWithBlock:(void ( ^ ) ( FDataSnapshot *snapshot , NSString *prevKey ))block withCancelBlock:(void ( ^ ) ( NSError *error ))cancelBlock

Parameters

eventType

The type of event to listen for.

block

The block that should be called with initial data and updates as a FDataSnapshot, as well as the previous child’s key.

cancelBlock

The block that will be called if you don’t have permission to access this data.

Discussion

This is equivalent to observeEventType:withBlock:, except the block is immediately canceled after the initial data is returned. In addition, for FEventTypeChildAdded, FEventTypeChildMoved, and FEventTypeChildChanged events, your block will be passed the key of the previous node by priority order.

The cancelBlock will be called if you do not have permission to read data at this location.

Declared In

Firebase.h

Detaching observers

– removeObserverWithHandle:

Detach a block previously attached with observeEventType:withBlock:.

- (void)removeObserverWithHandle:(FirebaseHandle)handle

Parameters

handle

The handle returned by the call to observeEventType:withBlock: which we are trying to remove.

Discussion

Detach a block previously attached with observeEventType:withBlock:.

Declared In

Firebase.h

– keepSynced:

By calling keepSynced:YES on a location, the data for that location will automatically be downloaded and kept in sync, even when no listeners are attached for that location. Additionally, while a location is kept synced, it will not be evicted from the persistent disk cache.

- (void)keepSynced:(BOOL)keepSynced

Parameters

keepSynced

Pass YES to keep this location synchronized, pass NO to stop synchronization.

Discussion

By calling keepSynced:YES on a location, the data for that location will automatically be downloaded and kept in sync, even when no listeners are attached for that location. Additionally, while a location is kept synced, it will not be evicted from the persistent disk cache.

Declared In

Firebase.h

– removeAllObservers

Detach all blocks previously attached to this Firebase database location with observeEventType:withBlock:

- (void)removeAllObservers

Discussion

Detach all blocks previously attached to this Firebase database location with observeEventType:withBlock:

Declared In

Firebase.h

Querying and limiting

– queryStartingAtPriority:

This method is deprecated in favor of using queryStartingAtValue:. This can be used with queryOrderedByPriority to query by priority.

- (FQuery *)queryStartingAtPriority:(id)startPriority

Parameters

startPriority

The lower bound, inclusive, for the priority of data visible to the returned FQuery

Return Value

An FQuery instance, limited to data with priority greater than or equal to startPriority.

Discussion

This method is deprecated in favor of using queryStartingAtValue:. This can be used with queryOrderedByPriority to query by priority.

queryStartingAtPriority: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryStartingAtPriority: will respond to events at nodes with a priority greater than or equal to startPriority.

Declared In

Firebase.h

– queryStartingAtPriority:andChildName:

This method is deprecated in favor of using queryStartingAtValue:childKey:. This can be used with queryOrderedByPriority to query by priority.

- (FQuery *)queryStartingAtPriority:(id)startPriority andChildName:(NSString *)childName

Parameters

startPriority

The lower bound, inclusive, for the priority of data visible to the returned FQuery

childName

The lower bound, inclusive, for the name of nodes with priority equal to startPriority.

Return Value

An FQuery instance, limited to data with priority greater than or equal to startPriority.

Discussion

This method is deprecated in favor of using queryStartingAtValue:childKey:. This can be used with queryOrderedByPriority to query by priority.

queryStartingAtPriority:andChildName: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryStartingAtPriority:andChildName will respond to events at nodes with a priority greater than startPriority, or equal to startPriority and with a name greater than or equal to childName.

Declared In

Firebase.h

– queryEndingAtPriority:

This method is deprecated in favor of using queryEndingAtValue:. This can be used with queryOrderedByPriority to query by priority.

- (FQuery *)queryEndingAtPriority:(id)endPriority

Parameters

endPriority

The upper bound, inclusive, for the priority of data visible to the returned FQuery

Return Value

An FQuery instance, limited to data with priority less than or equal to endPriority.

Discussion

This method is deprecated in favor of using queryEndingAtValue:. This can be used with queryOrderedByPriority to query by priority.

queryEndingAtPriority: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryEndingAtPriority: will respond to events at nodes with a priority less than or equal to startPriority and with a name greater than or equal to childName.

Declared In

Firebase.h

– queryEndingAtPriority:andChildName:

This method is deprecated in favor of using queryEndingAtValue:childKey:. This can be used with queryOrderedByPriority to query by priority.

- (FQuery *)queryEndingAtPriority:(id)endPriority andChildName:(NSString *)childName

Parameters

endPriority

The upper bound, inclusive, for the priority of data visible to the returned FQuery

childName

The upper bound, inclusive, for the name of nodes with priority equal to endPriority.

Return Value

An FQuery instance, limited to data with priority less than endPriority or equal to endPriority and with a name less than or equal to childName.

Discussion

This method is deprecated in favor of using queryEndingAtValue:childKey:. This can be used with queryOrderedByPriority to query by priority.

queryEndingAtPriority:andChildName: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryEndingAtPriority:andChildName will respond to events at nodes with a priority less than endPriority, or equal to endPriority and with a name less than or equal to childName.

Declared In

Firebase.h

– queryEqualToPriority:

This method is deprecated in favor of using queryEqualToValue:. This can be used with queryOrderedByPriority to query by priority.

- (FQuery *)queryEqualToPriority:(id)priority

Parameters

priority

The priority that the data returned by this FQuery will have.

Return Value

An Fquery instance, limited to data with the supplied priority.

Discussion

This method is deprecated in favor of using queryEqualToValue:. This can be used with queryOrderedByPriority to query by priority.

queryEqualToPriority: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryEqualToPriority: will respond to events at nodes with a priority equal to supplied argument.

Declared In

Firebase.h

– queryEqualToPriority:andChildName:

This method is deprecated in favor of using queryEqualAtValue:childKey:. This can be used with queryOrderedByPriority to query by priority.

- (FQuery *)queryEqualToPriority:(id)priority andChildName:(NSString *)childName

Parameters

priority

The priority that the data returned by this FQuery will have.

childName

The name of nodes with the right priority.

Return Value

An FQuery instance, limited to data with the supplied priority and the name.

Discussion

This method is deprecated in favor of using queryEqualAtValue:childKey:. This can be used with queryOrderedByPriority to query by priority.

queryEqualToPriority:andChildName: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryEqualToPriority:andChildName will respond to events at nodes with a priority equal to the supplied argument with a name equal to childName. There will be at most one node that matches because child names are unique.

Declared In

Firebase.h

– queryLimitedToNumberOfChildren:

This method is deprecated in favor of using queryLimitedToFirst:limit or queryLimitedToLast:limit instead.

- (FQuery *)queryLimitedToNumberOfChildren:(NSUInteger)limit

Parameters

limit

The upper bound, inclusive, for the number of child nodes to receive events for.

Return Value

An FQuery instance, limited to at most limit child nodes.

Discussion

This method is deprecated in favor of using queryLimitedToFirst:limit or queryLimitedToLast:limit instead.

queryLimitedToNumberOfChildren: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryLimitedToNumberOfChildren: will respond to events from at most limit child nodes.

Declared In

Firebase.h

– queryLimitedToFirst:

queryLimitedToFirst: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryLimitedToFirst: will respond to at most the first limit child nodes.

- (FQuery *)queryLimitedToFirst:(NSUInteger)limit

Parameters

limit

The upper bound, inclusive, for the number of child nodes to receive events for.

Return Value

An FQuery instance, limited to at most limit child nodes.

Discussion

queryLimitedToFirst: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryLimitedToFirst: will respond to at most the first limit child nodes.

Declared In

Firebase.h

– queryLimitedToLast:

queryLimitedToLast: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryLimitedToLast: will respond to at most the last limit child nodes.

- (FQuery *)queryLimitedToLast:(NSUInteger)limit

Parameters

limit

The upper bound, inclusive, for the number of child nodes to receive events for.

Return Value

An FQuery instance, limited to at most limit child nodes.

Discussion

queryLimitedToLast: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryLimitedToLast: will respond to at most the last limit child nodes.

Declared In

Firebase.h

– queryOrderedByChild:

queryOrderBy: is used to generate a reference to a view of the data that’s been sorted by the values of a particular child key. This method is intended to be used in combination with queryStartingAtValue:queryEndingAtValue:, or queryEqualToValue:.

- (FQuery *)queryOrderedByChild:(NSString *)key

Parameters

key

The child key to use in ordering data visible to the returned FQuery

Return Value

An FQuery instance, ordered by the values of the specified child key.

Discussion

queryOrderBy: is used to generate a reference to a view of the data that’s been sorted by the values of a particular child key. This method is intended to be used in combination with queryStartingAtValue:queryEndingAtValue:, or queryEqualToValue:.

Declared In

Firebase.h

– queryOrderedByKey

queryOrderedByKey: is used to generate a reference to a view of the data that’s been sorted by child key. This method is intended to be used in combination with queryStartingAtValue:queryEndingAtValue:, or queryEqualToValue:.

- (FQuery *)queryOrderedByKey

Return Value

An FQuery instance, ordered by child keys.

Discussion

queryOrderedByKey: is used to generate a reference to a view of the data that’s been sorted by child key. This method is intended to be used in combination with queryStartingAtValue:queryEndingAtValue:, or queryEqualToValue:.

Declared In

Firebase.h

– queryOrderedByPriority

queryOrderedByPriority: is used to generate a reference to a view of the data that’s been sorted by child priority. This method is intended to be used in combination with queryStartingAtValue:queryEndingAtValue:, or queryEqualToValue:.

- (FQuery *)queryOrderedByPriority

Return Value

An FQuery instance, ordered by child priorities.

Discussion

queryOrderedByPriority: is used to generate a reference to a view of the data that’s been sorted by child priority. This method is intended to be used in combination with queryStartingAtValue:queryEndingAtValue:, or queryEqualToValue:.

Declared In

Firebase.h

– queryStartingAtValue:

queryStartingAtValue: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryStartingAtValue: will respond to events at nodes with a value greater than or equal to startValue.

- (FQuery *)queryStartingAtValue:(id)startValue

Parameters

startValue

The lower bound, inclusive, for the value of data visible to the returned FQuery

Return Value

An FQuery instance, limited to data with value greater than or equal to startValue

Discussion

queryStartingAtValue: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryStartingAtValue: will respond to events at nodes with a value greater than or equal to startValue.

Declared In

Firebase.h

– queryStartingAtValue:childKey:

queryStartingAtValue:childKey: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryStartingAtValue:childKey will respond to events at nodes with a value greater than startValue, or equal to startValue and with a key greater than or equal to childKey.

- (FQuery *)queryStartingAtValue:(id)startValue childKey:(NSString *)childKey

Parameters

startValue

The lower bound, inclusive, for the value of data visible to the returned FQuery

childKey

The lower bound, inclusive, for the key of nodes with value equal to startValue.

Return Value

An FQuery instance, limited to data with value greater than or equal to startValue.

Discussion

queryStartingAtValue:childKey: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryStartingAtValue:childKey will respond to events at nodes with a value greater than startValue, or equal to startValue and with a key greater than or equal to childKey.

Declared In

Firebase.h

– queryEndingAtValue:

queryEndingAtValue: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryEndingAtValue: will respond to events at nodes with a value less than or equal to endValue.

- (FQuery *)queryEndingAtValue:(id)endValue

Parameters

endValue

The upper bound, inclusive, for the value of data visible to the returned FQuery

Return Value

An FQuery instance, limited to data with value less than or equal to endValue.

Discussion

queryEndingAtValue: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryEndingAtValue: will respond to events at nodes with a value less than or equal to endValue.

Declared In

Firebase.h

– queryEndingAtValue:childKey:

queryEndingAtValue:childKey: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryEndingAtValue:childKey will respond to events at nodes with a value less than endValue, or equal to endValue and with a key less than or equal to childKey.

- (FQuery *)queryEndingAtValue:(id)endValue childKey:(NSString *)childKey

Parameters

endValue

The upper bound, inclusive, for the value of data visible to the returned FQuery

childKey

The upper bound, inclusive, for the key of nodes with value equal to endValue.

Return Value

An FQuery instance, limited to data with value less than or equal to endValue.

Discussion

queryEndingAtValue:childKey: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryEndingAtValue:childKey will respond to events at nodes with a value less than endValue, or equal to endValue and with a key less than or equal to childKey.

Declared In

Firebase.h

– queryEqualToValue:

queryEqualToValue: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryEqualToValue: will respond to events at nodes with a value equal to the supplied argument.

- (FQuery *)queryEqualToValue:(id)value

Parameters

value

The value that the data returned by this FQuery will have.

Return Value

An Fquery instance, limited to data with the supplied value.

Discussion

queryEqualToValue: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryEqualToValue: will respond to events at nodes with a value equal to the supplied argument.

Declared In

Firebase.h

– queryEqualToValue:childKey:

queryEqualToValue:childKey: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryEqualToValue:childKey will respond to events at nodes with a value equal to the supplied argument with a name equal to childKey. There will be at most one node that matches because child keys are unique.

- (FQuery *)queryEqualToValue:(id)value childKey:(NSString *)childKey

Parameters

value

The value that the data returned by this FQuery will have.

childKey

The name of nodes with the right value.

Return Value

An FQuery instance, limited to data with the supplied value and the key.

Discussion

queryEqualToValue:childKey: is used to generate a reference to a limited view of the data at this location. The FQuery instance returned by queryEqualToValue:childKey will respond to events at nodes with a value equal to the supplied argument with a name equal to childKey. There will be at most one node that matches because child keys are unique.

Declared In

Firebase.h

Managing presence

– onDisconnectSetValue:

Ensure the data at this location is set to the specified value when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).

- (void)onDisconnectSetValue:(id)value

Parameters

value

The value to be set after the connection is lost.

Discussion

Ensure the data at this location is set to the specified value when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).

onDisconnectSetValue: is especially useful for implementing “presence” systems, where a value should be changed or cleared when a user disconnects so that he appears “offline” to other users.

Declared In

Firebase.h

– onDisconnectSetValue:withCompletionBlock:

Ensure the data at this location is set to the specified value when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).

- (void)onDisconnectSetValue:(id)value withCompletionBlock:(void ( ^ ) ( NSError *error , Firebase *ref ))block

Parameters

value

The value to be set after the connection is lost.

block

Block to be triggered when the operation has been queued up on the Firebase database.

Discussion

Ensure the data at this location is set to the specified value when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).

The completion block will be triggered when the operation has been successfully queued up on the Firebase database.

Declared In

Firebase.h

– onDisconnectSetValue:andPriority:

Ensure the data at this location is set to the specified value and priority when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).

- (void)onDisconnectSetValue:(id)value andPriority:(id)priority

Parameters

value

The value to be set after the connection is lost.

priority

The priority to be set after the connection is lost.

Discussion

Ensure the data at this location is set to the specified value and priority when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).

Declared In

Firebase.h

– onDisconnectSetValue:andPriority:withCompletionBlock:

Ensure the data at this location is set to the specified value and priority when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).

- (void)onDisconnectSetValue:(id)value andPriority:(id)priority withCompletionBlock:(void ( ^ ) ( NSError *error , Firebase *ref ))block

Parameters

value

The value to be set after the connection is lost.

priority

The priority to be set after the connection is lost.

block

Block to be triggered when the operation has been queued up on the Firebase database.

Discussion

Ensure the data at this location is set to the specified value and priority when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).

The completion block will be triggered when the operation has been successfully queued up on the Firebase database.

Declared In

Firebase.h

– onDisconnectRemoveValue

Ensure the data at this location is removed when the client is disconnected (due to closing the app, navigating to a new page, or network issues).

- (void)onDisconnectRemoveValue

Discussion

Ensure the data at this location is removed when the client is disconnected (due to closing the app, navigating to a new page, or network issues).

onDisconnectRemoveValue is especially useful for implementing “presence” systems.

Declared In

Firebase.h

– onDisconnectRemoveValueWithCompletionBlock:

Ensure the data at this location is removed when the client is disconnected (due to closing the app, navigating to a new page, or network issues).

- (void)onDisconnectRemoveValueWithCompletionBlock:(void ( ^ ) ( NSError *error , Firebase *ref ))block

Parameters

block

Block to be triggered when the operation has been queued up on the Firebase database.

Discussion

Ensure the data at this location is removed when the client is disconnected (due to closing the app, navigating to a new page, or network issues).

onDisconnectRemoveValueWithCompletionBlock: is especially useful for implementing “presence” systems.

Declared In

Firebase.h

– onDisconnectUpdateChildValues:

Ensure the data has the specified child values updated when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).

- (void)onDisconnectUpdateChildValues:(NSDictionary *)values

Parameters

values

A dictionary of child node keys and the values to set them to after the connection is lost.

Discussion

Ensure the data has the specified child values updated when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).

Declared In

Firebase.h

– onDisconnectUpdateChildValues:withCompletionBlock:

Ensure the data has the specified child values updated when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).

- (void)onDisconnectUpdateChildValues:(NSDictionary *)values withCompletionBlock:(void ( ^ ) ( NSError *error , Firebase *ref ))block

Parameters

values

A dictionary of child node keys and the values to set them to after the connection is lost.

block

A block that will be called once the operation has been queued up on the Firebase database.

Discussion

Ensure the data has the specified child values updated when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).

Declared In

Firebase.h

– cancelDisconnectOperations

Cancel any operations that are set to run on disconnect. If you previously called onDisconnectSetValue:, onDisconnectRemoveValue:, or onDisconnectUpdateChildValues:, and no longer want the values updated when the connection is lost, call cancelDisconnectOperations:

- (void)cancelDisconnectOperations

Discussion

Cancel any operations that are set to run on disconnect. If you previously called onDisconnectSetValue:, onDisconnectRemoveValue:, or onDisconnectUpdateChildValues:, and no longer want the values updated when the connection is lost, call cancelDisconnectOperations:

Declared In

Firebase.h

– cancelDisconnectOperationsWithCompletionBlock:

Cancel any operations that are set to run on disconnect. If you previously called onDisconnectSetValue:, onDisconnectRemoveValue:, or onDisconnectUpdateChildValues:, and no longer want the values updated when the connection is lost, call cancelDisconnectOperations:

- (void)cancelDisconnectOperationsWithCompletionBlock:(void ( ^ ) ( NSError *error , Firebase *ref ))block

Parameters

block

A block that will be triggered once the Firebase database has acknowledged the cancel request.

Discussion

Cancel any operations that are set to run on disconnect. If you previously called onDisconnectSetValue:, onDisconnectRemoveValue:, or onDisconnectUpdateChildValues:, and no longer want the values updated when the connection is lost, call cancelDisconnectOperations:

Declared In

Firebase.h

Reading and observing authentication data

  authData

Get the authentication data of the current user.

@property (nonatomic, strong, readonly) FAuthData *authData

Return Value

Authentication data of the current user.

Discussion

Get the authentication data of the current user.

Declared In

Firebase.h

– observeAuthEventWithBlock:

Observer block will be triggered whenever a user gets authenticated or logged out.

- (FirebaseHandle)observeAuthEventWithBlock:(void ( ^ ) ( FAuthData *authData ))block

Parameters

block

The block that should be called with initial authentication data and future updates.

Return Value

A handle used to unregister this block later with removeAuthEventObserverWithHandle:

Discussion

Observer block will be triggered whenever a user gets authenticated or logged out.

Authentication data is persisted across app restarts. If your have an old authentication, Firebase will attempt to resume your old session. This approach does not wait for a server roundtrip. Rather, it inspects the contents of the persisted JWT and assumes that the Firebase secret used to generate the token has not been revoked.

In the event that the Firebase secret used to generate the token has been revoked, observers will likely see one flicker / rapid flip-flop of authentication state once the server rejects the token.

Use removeAuthEventObserverWithHandle: to stop receiving updates.

Declared In

Firebase.h

– removeAuthEventObserverWithHandle:

Detach a block previously attached with observeAuthEventWithBlock:.

- (void)removeAuthEventObserverWithHandle:(FirebaseHandle)handle

Parameters

handle

The handle returned by the call to observeAuthEventWithBlock: which we are trying to remove.

Discussion

Detach a block previously attached with observeAuthEventWithBlock:.

Declared In

Firebase.h

User creation and modification

– createUser:password:withCompletionBlock:

Used to create a new user account with the given email and password combo. The results will be passed to the given block. Note that this method will not log the new user in.

- (void)createUser:(NSString *)email password:(NSString *)password withCompletionBlock:(void ( ^ ) ( NSError *error ))block

Parameters

email

The email for the account to be created.

password

The password for the account to be created.

block

The block to be called with the results of the operation.

Discussion

Used to create a new user account with the given email and password combo. The results will be passed to the given block. Note that this method will not log the new user in.

Declared In

Firebase.h

– createUser:password:withValueCompletionBlock:

Used to create a new user account with the given email and password combo. The results will be passed to the given block. Note that this method will not log the new user in. On success, invokes the result block with an dictionary of user data, including the user id.

- (void)createUser:(NSString *)email password:(NSString *)password withValueCompletionBlock:(void ( ^ ) ( NSError *error , NSDictionary *result ))block

Parameters

email

The email for the account to be created.

password

The password for the account to be created.

block

The block to be called with the results of the operation.

Discussion

Used to create a new user account with the given email and password combo. The results will be passed to the given block. Note that this method will not log the new user in. On success, invokes the result block with an dictionary of user data, including the user id.

Declared In

Firebase.h

– removeUser:password:withCompletionBlock:

Remove a user account with the given email and password.

- (void)removeUser:(NSString *)email password:(NSString *)password withCompletionBlock:(void ( ^ ) ( NSError *error ))block

Parameters

email

The email of the account to be removed.

password

The password for the account to be removed.

block

A block to receive the results of the operation.

Discussion

Remove a user account with the given email and password.

Declared In

Firebase.h

– changePasswordForUser:fromOld:toNew:withCompletionBlock:

Attempts to change the password for the account with the given credentials to the new password given. Results are reported to the supplied block.

- (void)changePasswordForUser:(NSString *)email fromOld:(NSString *)oldPassword toNew:(NSString *)newPassword withCompletionBlock:(void ( ^ ) ( NSError *error ))block

Parameters

email

The email for the account to be changed.

oldPassword

The old password for the account to be changed.

newPassword

The desired newPassword for the account.

block

A block to receive the results of the operation.

Discussion

Attempts to change the password for the account with the given credentials to the new password given. Results are reported to the supplied block.

Declared In

Firebase.h

– changeEmailForUser:password:toNewEmail:withCompletionBlock:

Attempts to change the email for the account with the given credentials to the new email given. Results are reported to the supplied block.

- (void)changeEmailForUser:(NSString *)email password:(NSString *)password toNewEmail:(NSString *)newEmail withCompletionBlock:(void ( ^ ) ( NSError *error ))block

Parameters

email

The email for the account to be changed.

password

The password for the account to be changed.

newEmail

The desired newEmail for the account.

block

A block to receive the results of the operation.

Discussion

Attempts to change the email for the account with the given credentials to the new email given. Results are reported to the supplied block.

Declared In

Firebase.h

– resetPasswordForUser:withCompletionBlock:

Send a password reset email to the owner of the account with the given email. Results are reported to the supplied block.

- (void)resetPasswordForUser:(NSString *)email withCompletionBlock:(void ( ^ ) ( NSError *error ))block

Parameters

email

The email of the account to be removed.

block

A block to receive the results of the operation.

Discussion

Send a password reset email to the owner of the account with the given email. Results are reported to the supplied block.

Declared In

Firebase.h

Authenticating

– authAnonymouslyWithCompletionBlock:

Attempts to log the user in anonymously. The block will receive the results of the attempt.

- (void)authAnonymouslyWithCompletionBlock:(void ( ^ ) ( NSError *error , FAuthData *authData ))block

Parameters

block

A block to receive the results of the authentication attempt.

Discussion

Attempts to log the user in anonymously. The block will receive the results of the attempt.

Declared In

Firebase.h

– authUser:password:withCompletionBlock:

Attempts to authenticate to Firebase with the given credentials. The block will receive the results of the attempt.

- (void)authUser:(NSString *)email password:(NSString *)password withCompletionBlock:(void ( ^ ) ( NSError *error , FAuthData *authData ))block

Parameters

email

The email of the account.

password

The password for the account.

block

A block to receive the results of the authentication attempt.

Discussion

Attempts to authenticate to Firebase with the given credentials. The block will receive the results of the attempt.

Declared In

Firebase.h

– authWithCustomToken:withCompletionBlock:

Authenticate to this Firebase app using the provided credentials.

- (void)authWithCustomToken:(NSString *)token withCompletionBlock:(void ( ^ ) ( NSError *error , FAuthData *authData ))block

Parameters

token

The Firebase Authentication JWT generated by a secure code on a remote server.

block

This block will be called with the results of the authentication attempt.

Discussion

Authenticate to this Firebase app using the provided credentials.

The completion block will be called with the results of the authenticated attempt. UnlikeauthWithCredential:withCompletionBlock:withCancelBlock:, no block will be called when the credentials become invalid.

Instead, please use observeAuthEventWithBlock: to observe if a user gets logged out.

Declared In

Firebase.h

– authWithOAuthProvider:token:withCompletionBlock:

Authenticate to the Firebase app with an OAuth token from a provider.

- (void)authWithOAuthProvider:(NSString *)provider token:(NSString *)oauthToken withCompletionBlock:(void ( ^ ) ( NSError *error , FAuthData *authData ))block

Parameters

provider

The provider, all lower case with no spaces.

oauthToken

The OAuth Token to authenticate with the provider.

block

A block to receive the results of the authentication attempt.

Discussion

Authenticate to the Firebase app with an OAuth token from a provider.

This method works with current OAuth 2.0 providers such as Facebook, Google+, and Github.

For other providers that Firebase supports which require additional parameters for login, such as Twitter, please use authWithOAuthProvider:parameters:withCompletionBlock:.

Declared In

Firebase.h

– authWithOAuthProvider:parameters:withCompletionBlock:

Authenticate to the Firebase app with an OAuth token from a provider.

- (void)authWithOAuthProvider:(NSString *)provider parameters:(NSDictionary *)parameters withCompletionBlock:(void ( ^ ) ( NSError *error , FAuthData *authData ))block

Parameters

provider

The provider, all lowercase with no spaces.

parameters

The parameters necessary to authenticate with the provider.

block

A block to receive the results of the authentication attempt.

Discussion

Authenticate to the Firebase app with an OAuth token from a provider.

This method is for OAuth providers that require extra parameters when authentication with the server, such as Twitter. The OAuth token should be included as a parameter.

Declared In

Firebase.h

– makeReverseOAuthRequestTo:withCompletionBlock:

Make a reverse OAuth Request to a provider.

- (void)makeReverseOAuthRequestTo:(NSString *)provider withCompletionBlock:(void ( ^ ) ( NSError *error , NSDictionary *json ))block

Parameters

provider

The provider, all lowercase with no spaces.

block

The block to receive the results of the reverse OAuth request.

Discussion

Make a reverse OAuth Request to a provider.

This method is for OAuth providers that require a reverse request be made first. The json output of this block.

Declared In

Firebase.h

– unauth

Removes any credentials associated with this Firebase app.

- (void)unauth

Discussion

Removes any credentials associated with this Firebase app.

Declared In

Firebase.h

– authWithCredential:withCompletionBlock:withCancelBlock:

This method is deprecated. Use authWithCustomToken:withCompletionBlock: instead.

- (void)authWithCredential:(NSString *)credential withCompletionBlock:(void ( ^ ) ( NSError *error , id data ))block withCancelBlock:(void ( ^ ) ( NSError *error ))cancelBlock

Parameters

credential

The Firebase Authentication JWT generated by a secure code on a remote server.

block

This block will be called with the results of the authentication attempt.

cancelBlock

This block will be called if at any time in the future the credentials become invalid.

Discussion

This method is deprecated. Use authWithCustomToken:withCompletionBlock: instead.

Authenticate to this Firebase app using the provided credentials. The completion block will be called with the results of the authenticated attempt, and the cancelBlock will be called if the credentials become invalid at some point after authentication has succeeded.

Declared In

Firebase.h

– unauthWithCompletionBlock:

This method is deprecated. Use unauth: instead.

- (void)unauthWithCompletionBlock:(void ( ^ ) ( NSError *error ))block

Parameters

block

This block will be called once the unauth has completed.

Discussion

This method is deprecated. Use unauth: instead.

Removes any credentials associated with this Firebase app. The callback block will be triggered after this operation has been acknowledged by the Firebase Authentication servers.

Declared In

Firebase.h

Manual Connection Management

+ goOffline

Manually disconnect the Firebase client from the database and disable automatic reconnection.

+ (void)goOffline

Discussion

Manually disconnect the Firebase client from the database and disable automatic reconnection.

The Firebase client automatically maintains a persistent connection to the Firebase server, which will remain active indefinitely and reconnect when disconnected. However, the goOffline( ) and goOnline( ) methods may be used to manually control the client connection in cases where a persistent connection is undesirable.

While offline, the Firebase client will no longer receive data updates from the database. However, all Firebase operations performed locally will continue to immediately fire events, allowing your application to continue behaving normally. Additionally, each operation performed locally will automatically be queued and retried upon reconnection to the Firebase server.

To reconnect to the Firebase server and begin receiving remote events, see goOnline( ). Once the connection is reestablished, the Firebase client will transmit the appropriate data and fire the appropriate events so that your client “catches up” automatically.

Note: Invoking this method will impact all Firebase connections.

Declared In

Firebase.h

+ goOnline

Manually reestablish a connection to the Firebase database and enable automatic reconnection.

+ (void)goOnline

Discussion

Manually reestablish a connection to the Firebase database and enable automatic reconnection.

The Firebase client automatically maintains a persistent connection to the Firebase server, which will remain active indefinitely and reconnect when disconnected. However, the goOffline( ) and goOnline( ) methods may be used to manually control the client connection in cases where a persistent connection is undesirable.

This method should be used after invoking goOffline( ) to disable the active connection. Once reconnected, the Firebase client will automatically transmit the proper data and fire the appropriate events so that your client “catches up” automatically.

To disconnect from the Firebase servers, see goOffline( ).

Note: Invoking this method will impact all Firebase connections.

Declared In

Firebase.h

Transactions

– runTransactionBlock:

Performs an optimistic-concurrency transactional update to the data at this location. Your block will be called with an FMutableData instance that contains the current data at this location. Your block should update this data to the value you wish to write to this location, and then return an instance of FTransactionResult with the new data.

- (void)runTransactionBlock:(FTransactionResult *( ^ ) ( FMutableData *currentData ))block

Parameters

block

This block receives the current data at this location and must return an instance of FTransactionResult

Discussion

Performs an optimistic-concurrency transactional update to the data at this location. Your block will be called with an FMutableData instance that contains the current data at this location. Your block should update this data to the value you wish to write to this location, and then return an instance of FTransactionResult with the new data.

If, when the operation reaches the server, it turns out that this client had stale data, your block will be run again with the latest data from the server.

When your block is run, you may decide to abort the transaction by return [FTransactionResult abort].

Declared In

Firebase.h

– runTransactionBlock:andCompletionBlock:

Performs an optimistic-concurrency transactional update to the data at this location. Your block will be called with an FMutableData instance that contains the current data at this location. Your block should update this data to the value you wish to write to this location, and then return an instance of FTransactionResult with the new data.

- (void)runTransactionBlock:(FTransactionResult *( ^ ) ( FMutableData *currentData ))block andCompletionBlock:(void ( ^ ) ( NSError *error , BOOL committed , FDataSnapshot *snapshot ))completionBlock

Parameters

block

This block receives the current data at this location and must return an instance of FTransactionResult

completionBlock

This block will be triggered once the transaction is complete, whether it was successful or not. It will indicate if there was an error, whether or not the data was committed, and what the current value of the data at this location is.

Discussion

Performs an optimistic-concurrency transactional update to the data at this location. Your block will be called with an FMutableData instance that contains the current data at this location. Your block should update this data to the value you wish to write to this location, and then return an instance of FTransactionResult with the new data.

If, when the operation reaches the server, it turns out that this client had stale data, your block will be run again with the latest data from the server.

When your block is run, you may decide to abort the transaction by return [FTransactionResult abort].

Declared In

Firebase.h

– runTransactionBlock:andCompletionBlock:withLocalEvents:

Performs an optimistic-concurrency transactional update to the data at this location. Your block will be called with an FMutableData instance that contains the current data at this location. Your block should update this data to the value you wish to write to this location, and then return an instance of FTransactionResult with the new data.

- (void)runTransactionBlock:(FTransactionResult *( ^ ) ( FMutableData *currentData ))block andCompletionBlock:(void ( ^ ) ( NSError *error , BOOL committed , FDataSnapshot *snapshot ))completionBlock withLocalEvents:(BOOL)localEvents

Parameters

block

This block receives the current data at this location and must return an instance of FTransactionResult

completionBlock

This block will be triggered once the transaction is complete, whether it was successful or not. It will indicate if there was an error, whether or not the data was committed, and what the current value of the data at this location is.

localEvents

Set this to NO to suppress events raised for intermediate states, and only get events based on the final state of the transaction.

Discussion

Performs an optimistic-concurrency transactional update to the data at this location. Your block will be called with an FMutableData instance that contains the current data at this location. Your block should update this data to the value you wish to write to this location, and then return an instance of FTransactionResult with the new data.

If, when the operation reaches the server, it turns out that this client had stale data, your block will be run again with the latest data from the server.

When your block is run, you may decide to abort the transaction by return [FTransactionResult abort].

Since your block may be run multiple times, this client could see several immediate states that don’t exist on the server. You can suppress those immediate states until the server confirms the final state of the transaction.

Declared In

Firebase.h

Retrieving String Representation

– description

Gets the absolute URL of this Firebase database location.

- (NSString *)description

Return Value

The absolute URL of the referenced Firebase database location.

Discussion

Gets the absolute URL of this Firebase database location.

Declared In

Firebase.h

Properties

  parent

Get a Firebase reference for the parent location. If this instance refers to the root of your Firebase, it has no parent, and therefore parent( ) will return null.

@property (strong, readonly, nonatomic) Firebase *parent

Return Value

A Firebase reference for the parent location.

Discussion

Get a Firebase reference for the parent location. If this instance refers to the root of your Firebase, it has no parent, and therefore parent( ) will return null.

Declared In

Firebase.h

  root

Get a Firebase reference for the root location.

@property (strong, readonly, nonatomic) Firebase *root

Return Value

A new Firebase reference to root location.

Discussion

Get a Firebase reference for the root location.

Declared In

Firebase.h

  key

Gets last token in a Firebase database location (e.g. ‘fred’ in https://SampleChat.firebaseIO-demo.com/users/fred))

@property (strong, readonly, nonatomic) NSString *key

Return Value

The key of the location this reference points to.

Discussion

Gets last token in a Firebase database location (e.g. ‘fred’ in https://SampleChat.firebaseIO-demo.com/users/fred))

Declared In

Firebase.h

  app

Gets the FirebaseApp instance associated with this reference.

@property (strong, readonly, nonatomic) FirebaseApp *app

Return Value

The FirebaseApp object for this reference.

Discussion

Gets the FirebaseApp instance associated with this reference.

Declared In

Firebase.h

Global configuration and settings

+ setDispatchQueue:

Set the default dispatch queue for event blocks. (Deprecated: This method is deprecated)

+ (void)setDispatchQueue:(dispatch_queue_t)queue

Parameters

queue

The queue to set as the default for running blocks for all Firebase event types.

Discussion

Set the default dispatch queue for event blocks.

Note: Please use [Firebase defaultConfig].callbackQueue instead.

Declared In

Firebase.h

+ sdkVersion

Retrieve the Firebase SDK version.

+ (NSString *)sdkVersion

Discussion

Retrieve the Firebase SDK version.

Declared In

Firebase.h

+ defaultConfig

Returns the default config object, used for configuring Firebase client behavior.

+ (FConfig *)defaultConfig

Discussion

Returns the default config object, used for configuring Firebase client behavior.

This can be modified until you create your first Firebase instance.

Declared In

Firebase.h

+ setOption:to:

This method is deprecated (Deprecated: This method is deprecated)

+ (void)setOption:(NSString *)option to:(id)value

Parameters

option

Option to set.

value

Value to set.

Discussion

Note: Please enable persistence by setting [Firebase defaultConfig].persistenceEnabled = YES instead.

Declared In

Firebase.h

번호
제목
글쓴이
101 아이폰 카톡 푸시 알림이 안올때! 상세안내 체크
admin
2019-01-10 24115
100 mac OS 여러가지 맥 버젼 별 설명 구분 시에라 까지
admin
2018-05-11 13848
99 오브젝트의 해방
admin
2018-06-01 12163
98 재정
admin
2018-06-01 10430
97 What is a Composite Object? objective c 강의 사이트 아주 훌륭한 유익한 좋은
admin
2019-05-22 9782
96 CallKit Tutorial for iOS 콜킷 사용
admin
2019-04-02 9759
95 Apple iPhone XS Max 셀룰러 데이터가 작동하지 않는 문제 해결 가이드
admin
2018-11-09 9675
94 IOS 앱이 시스템 수준 전화 통합을 위해 CallKit을 사용하는 방법과 통화
admin
2019-04-02 8789
93 iPhone XS Max 시스템 가이드 소프트 강제 재시작 모든 설정 네트워크 설정 초기화
admin
2018-11-08 8606
92 iOS 인증서 및 프로비저닝 프로파일 만들기
admin
2019-04-04 8255
91 Voice Over IP (VoIP) Best Practices Xcode
admin
2019-04-19 8178
90 PushKit이란 ? 푸시 알람을 앱에 보내는 것
admin
2019-04-08 7839
89 VMWare를 이용한 mac os를 설치방법
admin
2018-05-11 7432
88 Easy APNs Provider 사용방법 iOS Push발송 테스트
admin
2019-04-23 7182
87 iOS Notification 만들기 push 푸시
admin
2019-04-04 7142
86 Apple iPhone XS Max 작동하지 않는 얼굴 ID를 수정하는 방법 문제 해결 가이드
admin
2018-11-09 7019
85 Xcode 글꼴 크기 변경
admin
2019-05-25 6904
84 Apple iPhone XS Max 배터리가 빨리 소모되면 어떻게해야합니까? 문제 해결 가이드 및 배터리 절약 팁
admin
2018-11-09 6631
83 iPhone XS Max를 문제 해결, iPhone 과열 문제 해결 [문제 해결 가이드]
admin
2018-11-09 6443
82 [프로그래밍]아이폰 SDK와 Xcode 통합 개발환경
admin
2018-06-01 6248
81 [프로그래밍]Objective-C 셀렉터(@selector)
admin
2018-06-01 6194
80 클래스의 선언과 정의
admin
2018-06-01 6191
79 APNs 애플 푸시 앱 개발 push 키 등록 만들기 가장 잘된 동영상 설명
admin
2019-04-08 6142
78 작동하지 않는 Apple iPhone XS Max 마이크를 해결 방법 문제 해결 가이드
admin
2018-11-09 6100
77 Objective-C는?
admin
2018-06-01 6082
76 가져 오기
admin
2018-06-01 6047
75 매우 천천히 반응하는 Apple iPhone XS Max 터치 스크린을 수정하는 방법, 터치 스크린 응답 지연됨 문제 해결 가이드
admin
2018-11-09 6040
74 IOS12 업데이트 후 작동하지 않는 Apple iPhone X 알림 수정 방법
admin
2018-11-08 6038
73 메소드
admin
2018-06-01 6024
72 Apple iPhone XS Max에서 지속적으로 충돌하는 응용 프로그램을 수정하는 방법 문제 해결 가이드
admin
2018-11-09 5732
71 이니셜 라이저
admin
2018-06-01 5688
70 Sample app in Swift Objective C receive VoIP push notifications 푸시 테스트 앱
admin
2019-04-19 5625
69 상속
admin
2018-06-01 5602
68 Objective-C (전역) 상수 선언 및 사용
admin
2019-05-18 5596
67 Objective-C 입문
admin
2018-06-01 5596
66 가시성
admin
2018-06-01 5596
65 VoIP Push Notifications using iOS Pushkit
admin
2019-04-08 5568
64 애플 개발자 사이트 apple 앱스토어에 앱을 등록하는 순서
admin
2019-03-24 5560
63 프로토콜
admin
2018-06-01 5555
62 메소드의 포인터
admin
2018-06-01 5551
61 클래스 형
admin
2018-06-01 5548
60 클래스 메소드
admin
2018-06-01 5525
59 정적 형식
admin
2018-06-01 5499
58 카테고리
admin
2018-06-01 5482
57 선택기
admin
2018-06-01 5471
56 IPad Air와 iPad Pro의 차이점
admin
2018-11-08 5469
55 IPHONE 아이폰 푸쉬 노티피케이션 동작 안되는 현상 해결방법
admin
2018-11-08 5410
54 HybridApp Cordova 코르도바 란
admin
2019-04-15 5403
53 푸시 알림을 수신하려면 응용 프로그램이 Apple 푸시 알림 서비스 APN
admin
2019-01-10 5393
52 Push Notifications by Tutorials iOS developers
admin
2019-04-19 5371
51 iOS Application 개발 시작하기 프로비저닝 생성, XCode 프로젝트 설정
admin
2019-04-25 5365
50 맥 모하비 설치 VM Vmware Workstation Pro 15 설치 ebay 싸게구매
admin
2019-03-23 5359
49 Mac용 키체인 접근이란 무엇입니까?
admin
2019-04-04 5311
48 아이폰 푸시 노티피케이션 온/오프
admin
2018-11-08 5286
47 Apple Push Notification Service 시작하기 AWS 샘플앱 이용 푸시 테스트
admin
2019-04-04 5272
46 iOS Application 개발 시작하기 개발자 등록, 등록요청서 , 인증서 다운
admin
2019-04-25 5178
45 Xcode 9, Swift 4 Remote Push Notification Setup W/ Firebase
admin
2019-04-08 5175
44 맥 개발 환경 설정하기
admin
2019-04-01 5135
43 Push Notifications and Local Notifications – Tutorial
admin
2019-04-19 5127
42 iOS Beginner : Messaging & Phone call (Swift 4 & Xcode 9)
admin
2019-04-01 5091
41 MacPorts to use system for compiling, installing, and managing open source software. file
admin
2019-04-01 5088
40 아이폰 UserNotifications 사용법
admin
2019-04-08 5057
39 MacPorts 설치 및 사용법
admin
2019-04-01 5053
38 Push Notifications and Local Notifications (Xcode 9, iOS 11)
admin
2019-04-19 5052
37 hide/show text fields with auto layouts and programmatically objective c
admin
2019-05-19 5037
36 아이폰 VoIP Services Certificate 생성 방법 - 서비스 인증서 생성하는 방법
admin
2019-04-08 5032
35 개발자 등록 인증서 다운로드 푸시 인증요청서 등록 인증서 다운
admin
2019-04-27 5028
34 UILocalNotification is deprecated in iOS10
admin
2019-04-08 5018
33 애플앱개발 앱스토어등록 개발자사이트등록 앱튠스콘넥트사이트등록
admin
2019-03-24 5013
32 IPAD IPHONE X 아이패드 아이폰 전문가 리뷰 트러블슈팅 문제해결
admin
2018-11-08 5011
31 OSX 키체인접근 p12 파일 인증서, 개인키를 PEM 파일로 openssl
admin
2019-04-08 4960
30 Part 2: Implementing PushBots SDK for your iOS App
admin
2019-04-08 4952
29 APNS 또는 GCM 사용을 위한 앱 구성 방법 순서
admin
2019-04-06 4947
28 installing MacPorts on macOS Sierra (plus installing ffmpeg)
admin
2019-04-01 4898
27 How to create Apple Certificates - Step 1: CSR file creation CSR 생성
admin
2019-04-19 4890
26 Homebrew 설치 (MacOSX) 동영상
admin
2019-04-01 4879
25 iOS12 Chat, Learn Swift 4.2, build iOS 12 Chat Application 스터디
admin
2019-04-03 4865
24 How to rename Xcode project
admin
2019-04-08 4852
23 Enhancing VoIP Apps with CallKit - Apple WWDC 2016 콜킷
admin
2019-04-02 4849
22 MacPort 의 소개와 간단 사용법 - OSX 환경 세팅하기
admin
2019-04-01 4847
21 Part 1: Preparing Certificates + Provisioning Profile (iOS)
admin
2019-04-08 4823
20 포인터에 익숙해지기 포인터 정리
admin
2019-01-20 4808
19 How to rename an XCode project
admin
2019-04-20 4731
18 개발자를 위한 맥(Mac) 정보 - 패키지관리자 Homebrew
admin
2019-04-01 4728
17 [아이폰] PushKit 앱 개발 방법
admin
2019-04-08 4699
16 사용자 정의 컨테이너보기 컨트롤러 전환 xcode objective c
admin
2019-05-25 4605
15 ios 개발자 계정 만들기 지불 방법 핵심 키포인트 인증서요청 앱등록 앱출시 요점만 쉽게 설명
admin
2019-04-17 4578
14 Mac OS X에서 Java(JDK) 설치 및 삭제하기
admin
2019-04-03 4535
13 IOS Push php
admin
2019-04-20 4506
12 Objective-c JSON Parsing 제이슨 파싱 Dictionary Array 구분 기호
admin
2019-06-06 4400
11 ios push notification pushkit xcode swift
admin
2019-04-08 4395
10 Linphone rebuild
admin
2019-04-09 4384
9 푸시 메시지를 활성화하기 위한 전제 조건 사전작업
admin
2019-04-06 4382
8 실습 Objective C Code 연습 실행 온라인 무료 사이트 회원가입 불필요 광고 무
admin
2019-05-22 4337
7 푸시 메시지 구성
admin
2019-04-06 4332
6 A macOS, Linux, Windows app to test push notifications on iOS and Android
admin
2019-04-19 4299
5 키체인 uuid keychaine 설명 및 사용
admin
2019-04-29 4293
4 Text field 숨기기
admin
2019-05-19 4281
3 Segue를 통한 뷰 컨트롤러 전환과 데이터 교환 방법. Delegate 가장 정확하게 설명 쉽게
admin
2019-05-21 4247
2 초보) delegate 는 왜필요한가 이것만알면 간단 쉽게 이해 objective C 날로먹기가능
admin
2019-05-22 4197