motion-firebase 1.0.9 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. data/README.md +5 -5
  2. data/lib/firebase/fdata_snapshot.rb +19 -0
  3. data/lib/firebase/firebase.rb +1 -0
  4. data/lib/firebase/version.rb +1 -1
  5. data/lib/firebase-auth/{firebase_auth_client.rb → firebase_simple_login.rb} +2 -2
  6. data/lib/motion-firebase-auth.rb +5 -2
  7. data/lib/vendor/FacebookSDK.framework/FacebookSDK.framework.bridgesupport +2646 -0
  8. data/lib/vendor/Firebase.framework/Firebase +0 -0
  9. data/lib/vendor/Firebase.framework/Firebase.framework.bridgesupport +552 -0
  10. data/lib/vendor/Firebase.framework/Versions/A/Firebase +0 -0
  11. data/lib/vendor/Firebase.framework/Versions/A/Headers/FDataSnapshot.h +4 -4
  12. data/lib/vendor/Firebase.framework/Versions/A/Headers/FEventType.h +1 -1
  13. data/lib/vendor/Firebase.framework/Versions/A/Headers/FMutableData.h +9 -4
  14. data/lib/vendor/Firebase.framework/Versions/A/Headers/Firebase.h +89 -64
  15. data/lib/vendor/FirebaseSimpleLogin.framework/FirebaseSimpleLogin +0 -0
  16. data/lib/vendor/FirebaseSimpleLogin.framework/FirebaseSimpleLogin.framework.bridgesupport +154 -0
  17. data/lib/vendor/FirebaseSimpleLogin.framework/Versions/A/FirebaseSimpleLogin +0 -0
  18. data/lib/vendor/{FirebaseAuthClient.framework → FirebaseSimpleLogin.framework/Versions/A}/Headers/FATypes.h +4 -2
  19. data/lib/vendor/{FirebaseAuthClient.framework → FirebaseSimpleLogin.framework/Versions/A}/Headers/FAUser.h +0 -0
  20. data/lib/vendor/{FirebaseAuthClient.framework/Headers/FirebaseAuthClient.h → FirebaseSimpleLogin.framework/Versions/A/Headers/FirebaseSimpleLogin.h} +5 -4
  21. data/motion-firebase.gemspec +1 -1
  22. metadata +63 -86
  23. data/.gitignore +0 -18
  24. data/.travis.yml +0 -2
  25. data/Gemfile +0 -6
  26. data/Gemfile.lock +0 -28
  27. data/Rakefile +0 -11
  28. data/app/app_delegate.rb +0 -156
  29. data/lib/vendor/Firebase.framework/Headers/FDataSnapshot.h +0 -146
  30. data/lib/vendor/Firebase.framework/Headers/FEventType.h +0 -43
  31. data/lib/vendor/Firebase.framework/Headers/FMutableData.h +0 -134
  32. data/lib/vendor/Firebase.framework/Headers/FQuery.h +0 -229
  33. data/lib/vendor/Firebase.framework/Headers/FTransactionResult.h +0 -50
  34. data/lib/vendor/Firebase.framework/Headers/Firebase.h +0 -629
  35. data/lib/vendor/Firebase.framework/Versions/Current/Firebase +0 -0
  36. data/lib/vendor/Firebase.framework/Versions/Current/Headers/FDataSnapshot.h +0 -146
  37. data/lib/vendor/Firebase.framework/Versions/Current/Headers/FEventType.h +0 -43
  38. data/lib/vendor/Firebase.framework/Versions/Current/Headers/FMutableData.h +0 -134
  39. data/lib/vendor/Firebase.framework/Versions/Current/Headers/FQuery.h +0 -229
  40. data/lib/vendor/Firebase.framework/Versions/Current/Headers/FTransactionResult.h +0 -50
  41. data/lib/vendor/Firebase.framework/Versions/Current/Headers/Firebase.h +0 -629
  42. data/lib/vendor/FirebaseAuthClient.framework/FirebaseAuthClient +0 -0
  43. data/lib/vendor/FirebaseAuthClient.framework/Versions/A/FirebaseAuthClient +0 -0
  44. data/lib/vendor/FirebaseAuthClient.framework/Versions/A/Headers/FATypes.h +0 -48
  45. data/lib/vendor/FirebaseAuthClient.framework/Versions/A/Headers/FAUser.h +0 -85
  46. data/lib/vendor/FirebaseAuthClient.framework/Versions/A/Headers/FirebaseAuthClient.h +0 -149
  47. data/lib/vendor/FirebaseAuthClient.framework/Versions/Current/FirebaseAuthClient +0 -0
  48. data/lib/vendor/FirebaseAuthClient.framework/Versions/Current/Headers/FATypes.h +0 -48
  49. data/lib/vendor/FirebaseAuthClient.framework/Versions/Current/Headers/FAUser.h +0 -85
  50. data/lib/vendor/FirebaseAuthClient.framework/Versions/Current/Headers/FirebaseAuthClient.h +0 -149
  51. data/resources/Default-568h@2x.png +0 -0
@@ -33,6 +33,7 @@
33
33
  #import "FMutableData.h"
34
34
  #import "FTransactionResult.h"
35
35
 
36
+
36
37
  /**
37
38
  * A Firebase reference represents a particular location in your Firebase
38
39
  * and can be used for reading or writing data to that Firebase location.
@@ -48,7 +49,7 @@
48
49
  /** @name Initializing a Firebase object */
49
50
 
50
51
  /**
51
- * Initialize this Firebase reference with an absolute URL.
52
+ * Initialize this Firebase reference with an absolute URL.
52
53
  *
53
54
  * @param url The Firebase URL (ie: https://SampleChat.firebaseIO-demo.com)
54
55
  */
@@ -58,7 +59,7 @@
58
59
 
59
60
  /**
60
61
  * Get a Firebase reference for the location at the specified relative path.
61
- * The relative path can either be a simple child name (e.g. 'fred') or a
62
+ * The relative path can either be a simple child name (e.g. 'fred') or a
62
63
  * deeper slash-separated path (e.g. 'fred/name/first').
63
64
  *
64
65
  * @param pathString A relative path from this location to the desired child location.
@@ -82,31 +83,42 @@
82
83
 
83
84
  /** @name Writing data */
84
85
 
85
- /**
86
- * Write data to this Firebase location. This will overwrite any data
87
- * at this location and all child locations.
88
- *
89
- * Data types that can be set are:
90
- * * NSString -- @"Hello World"
91
- * * NSNumber (also includes boolean) -- @YES, @43, @4.333
92
- * * NSDictionary -- @{@"key": @"value"}
93
- * * NSArray
94
- *
95
- * The effect of the write will be visible immediately and the corresponding
96
- * events will be triggered. Synchronization of the data to the Firebase
97
- * servers will also be started.
98
- *
99
- * Passing null for the new value is equivalent to calling remove:;
100
- * all data at this location or any child location will be deleted.
101
- *
102
- * Note that setValue: will remove any priority stored at this location, so if priority
103
- * is meant to be preserved, you should use setValue:andPriority: instead.
104
- *
105
- * @param value The value to be written.
86
+ /*! Write data to this Firebase location.
87
+
88
+ This will overwrite any data at this location and all child locations.
89
+
90
+ Data types that can be set are:
91
+
92
+ - NSString -- @"Hello World"
93
+ - NSNumber (also includes boolean) -- @YES, @43, @4.333
94
+ - NSDictionary -- @{@"key": @"value", @"nested": @{@"another": @"value"} }
95
+ - NSArray
96
+
97
+ The effect of the write will be visible immediately and the corresponding
98
+ events will be triggered. Synchronization of the data to the Firebase
99
+ servers will also be started.
100
+
101
+ Passing null for the new value is equivalent to calling remove:;
102
+ all data at this location or any child location will be deleted.
103
+
104
+ Note that setValue: will remove any priority stored at this location, so if priority
105
+ is meant to be preserved, you should use setValue:andPriority: instead.
106
+
107
+
108
+ **Server Values** - Placeholder values you may write into Firebase as a value or priority
109
+ that will automatically be populated by the Firebase Server.
110
+
111
+ - kFirebaseServerValueTimestamp - The number of milliseconds since the Unix epoch
112
+
113
+
114
+ @param value The value to be written.
106
115
  */
107
116
  - (void) setValue:(id)value;
108
117
 
109
118
 
119
+ #define kFirebaseServerValueTimestamp @{ @".sv": @"timestamp" }
120
+
121
+
110
122
  /**
111
123
  * The same as setValue: with a block that gets triggered after the write operation has
112
124
  * been committed to the Firebase servers.
@@ -114,7 +126,7 @@
114
126
  * @param value The value to be written.
115
127
  * @param block The block to be called after the write has been committed to the Firebase servers.
116
128
  */
117
- - (void) setValue:(id)value withCompletionBlock:(void (^)(NSError* error))block;
129
+ - (void) setValue:(id)value withCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
118
130
 
119
131
 
120
132
  /**
@@ -135,14 +147,14 @@
135
147
  * @param priority The priority to be attached to that data.
136
148
  * @param block The block to be called after the write has been committed to the Firebase servers.
137
149
  */
138
- - (void) setValue:(id)value andPriority:(id)priority withCompletionBlock:(void (^)(NSError* error))block;
150
+ - (void) setValue:(id)value andPriority:(id)priority withCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
139
151
 
140
152
 
141
153
  /**
142
154
  * Remove the data at this Firebase location. Any data at child locations will also be deleted.
143
- *
155
+ *
144
156
  * The effect of the delete will be visible immediately and the corresponding events
145
- * will be triggered. Synchronization of the delete to the Firebase servers will
157
+ * will be triggered. Synchronization of the delete to the Firebase servers will
146
158
  * also be started.
147
159
  *
148
160
  * remove: is equivalent to calling setValue:nil
@@ -156,7 +168,7 @@
156
168
  *
157
169
  * @param block The block to be called after the remove has been committed to the Firebase servers.
158
170
  */
159
- - (void) removeValueWithCompletionBlock:(void (^)(NSError* error))block;
171
+ - (void) removeValueWithCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
160
172
 
161
173
  /**
162
174
  * Set a priority for the data at this Firebase location.
@@ -170,11 +182,11 @@
170
182
  * Children are sorted based on this priority using the following rules:
171
183
  *
172
184
  * Children with no priority (a null priority) come first. They are ordered lexicographically by name.
173
- * Children with a priority that is parsable as a number come next. They are
185
+ * Children with a priority that is parsable as a number come next. They are
174
186
  * sorted numerically by priority first (small to large) and lexicographically by name second (A to z).
175
- * Children with non-numeric priorities come last. They are sorted lexicographically
187
+ * Children with non-numeric priorities come last. They are sorted lexicographically
176
188
  * by priority first and lexicographically by name second.
177
- * Setting the priority to null removes any existing priority.
189
+ * Setting the priority to null removes any existing priority.
178
190
  * Note that priorities are parsed and ordered as IEEE 754 double-precision floating-point numbers.
179
191
  *
180
192
  * @param priority The priority to set at the specified location.
@@ -189,39 +201,49 @@
189
201
  * @param priority The priority to set at the specified location.
190
202
  * @param block The block that is triggered after the priority has been written on the servers.
191
203
  */
192
- - (void) setPriority:(id)priority withCompletionBlock:(void (^)(NSError* error))block;
204
+ - (void) setPriority:(id)priority withCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
193
205
 
194
206
  /**
195
207
  * Update changes the values of the keys specified in the dictionary without overwriting other
196
208
  * keys at this location.
197
209
  *
198
- * @param value A dictionary of the keys to change and their new values
210
+ * @param values A dictionary of the keys to change and their new values
199
211
  */
200
212
  - (void) updateChildValues:(NSDictionary *)values;
201
213
 
202
214
  /**
203
- * The same as update: with a block block that is called once the update has been committed to the
215
+ * The same as update: with a block block that is called once the update has been committed to the
204
216
  * Firebase servers
205
217
  *
206
- * @param value A dictionary of the keys to change and their new values
218
+ * @param values A dictionary of the keys to change and their new values
207
219
  * @param block The block that is triggered after the update has been written on the Firebase servers
208
220
  */
209
- - (void) updateChildValues:(NSDictionary *)values withCompletionBlock:(void (^)(NSError* error))block;
221
+ - (void) updateChildValues:(NSDictionary *)values withCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
210
222
 
211
223
 
212
224
  /** @name Attaching observers to read data */
213
225
 
214
- /**
215
- * observeEventType:withBlock: is used to listen for data changes at a particular location.
216
- * This is the primary way to read data from Firebase. Your block will be triggered
217
- * for the initial data and again whenever the data changes.
218
- *
219
- * Use removeObserverWithHandle: to stop receiving updates.
220
- *
221
- * @param eventType The type of event to listen for.
222
- * @param block The block that should be called with initial data and updates.
223
- * @return A handle used to unregister this block later using removeObserverWithHandle:
224
- */
226
+ /*! observeEventType:withBlock: is used to listen for data changes at a particular location.
227
+
228
+ This is the primary way to read data from Firebase. Your block will be triggered
229
+ for the initial data and again whenever the data changes.
230
+
231
+ Use removeObserverWithHandle: to stop receiving updates.
232
+
233
+ Supported events types for all realtime observers are specified in FEventType as:
234
+
235
+ typedef enum {
236
+ FEventTypeChildAdded, // 0, fired when a new child node is added to a location
237
+ FEventTypeChildRemoved, // 1, fired when a child node is removed from a location
238
+ FEventTypeChildChanged, // 2, fired when a child node at a location changes
239
+ FEventTypeChildMoved, // 3, fired when a child node moves relative to the other child nodes at a location
240
+ FEventTypeValue // 4, fired when any data changes at a location and, recursively, any children
241
+ } FEventType;
242
+
243
+ @param eventType The type of event to listen for.
244
+ @param block The block that should be called with initial data and updates as a FDataSnapshot.
245
+ @return A handle used to unregister this block later using removeObserverWithHandle:
246
+ */
225
247
  - (FirebaseHandle) observeEventType:(FEventType)eventType withBlock:(void (^)(FDataSnapshot* snapshot))block;
226
248
 
227
249
 
@@ -234,7 +256,7 @@
234
256
  * Use removeObserverWithHandle: to stop receiving updates.
235
257
  *
236
258
  * @param eventType The type of event to listen for.
237
- * @param block The block that should be called with initial data and updates, as well as the previous child's name.
259
+ * @param block The block that should be called with initial data and updates as a FDataSnapshot, as well as the previous child's name.
238
260
  * @return A handle used to unregister this block later using removeObserverWithHandle:
239
261
  */
240
262
  - (FirebaseHandle) observeEventType:(FEventType)eventType andPreviousSiblingNameWithBlock:(void (^)(FDataSnapshot* snapshot, NSString* prevName))block;
@@ -250,7 +272,7 @@
250
272
  * Use removeObserverWithHandle: to stop receiving updates.
251
273
  *
252
274
  * @param eventType The type of event to listen for.
253
- * @param block The block that should be called with initial data and updates.
275
+ * @param block The block that should be called with initial data and updates as a FDataSnapshot.
254
276
  * @param cancelBlock The block that should be called if this client no longer has permission to receive these events
255
277
  * @return A handle used to unregister this block later using removeObserverWithHandle:
256
278
  */
@@ -268,7 +290,7 @@
268
290
  * Use removeObserverWithHandle: to stop receiving updates.
269
291
  *
270
292
  * @param eventType The type of event to listen for.
271
- * @param block The block that should be called with initial data and updates, as well as the previous child's name.
293
+ * @param block The block that should be called with initial data and updates as a FDataSnapshot, as well as the previous child's name.
272
294
  * @param cancelBlock The block that should be called if this client no longer has permission to receive these events
273
295
  * @return A handle used to unregister this block later using removeObserverWithHandle:
274
296
  */
@@ -279,7 +301,7 @@
279
301
  * This is equivalent to observeEventType:withBlock:, except the block is immediately canceled after the initial data is returned.
280
302
  *
281
303
  * @param eventType The type of event to listen for.
282
- * @param block The block that should be called with initial data and updates.
304
+ * @param block The block that should be called with initial data and updates as a FDataSnapshot.
283
305
  */
284
306
  - (void) observeSingleEventOfType:(FEventType)eventType withBlock:(void (^)(FDataSnapshot* snapshot))block;
285
307
 
@@ -289,7 +311,7 @@
289
311
  * FEventTypeChildChanged events, your block will be passed the name of the previous node by priority order.
290
312
  *
291
313
  * @param eventType The type of event to listen for.
292
- * @param block The block that should be called with initial data and updates.
314
+ * @param block The block that should be called with initial data and updates as a FDataSnapshot, as well as the previous child's name.
293
315
  */
294
316
  - (void) observeSingleEventOfType:(FEventType)eventType andPreviousSiblingNameWithBlock:(void (^)(FDataSnapshot* snapshot, NSString* prevName))block;
295
317
 
@@ -300,7 +322,7 @@
300
322
  * The cancelBlock will be called if you do not have permission to read data at this location.
301
323
  *
302
324
  * @param eventType The type of event to listen for.
303
- * @param block The block that should be called with initial data and updates.
325
+ * @param block The block that should be called with initial data and updates as a FDataSnapshot.
304
326
  * @param cancelBlock The block that will be called if you don't have permission to access this data
305
327
  */
306
328
  - (void) observeSingleEventOfType:(FEventType)eventType withBlock:(void (^)(FDataSnapshot* snapshot))block withCancelBlock:(void (^)(void))cancelBlock;
@@ -313,7 +335,7 @@
313
335
  * The cancelBlock will be called if you do not have permission to read data at this location.
314
336
  *
315
337
  * @param eventType The type of event to listen for.
316
- * @param block The block that should be called with initial data and updates.
338
+ * @param block The block that should be called with initial data and updates as a FDataSnapshot, as well as the previous child's name.
317
339
  * @param cancelBlock The block that will be called if you don't have permission to access this data
318
340
  */
319
341
  - (void) observeSingleEventOfType:(FEventType)eventType andPreviousSiblingNameWithBlock:(void (^)(FDataSnapshot* snapshot, NSString* prevName))block withCancelBlock:(void (^)(void))cancelBlock;
@@ -321,7 +343,7 @@
321
343
  /** @name Detaching observers */
322
344
 
323
345
  /**
324
- * Detach a block previously attached with observeEventType:withBlock:.
346
+ * Detach a block previously attached with observeEventType:withBlock:.
325
347
  *
326
348
  * @param handle The handle returned by the call to observeEventType:withBlock: which we are trying to remove.
327
349
  */
@@ -376,7 +398,7 @@
376
398
  *
377
399
  * @param endPriority The upper bound, inclusive, for the priority of data visible to the returned FQuery
378
400
  * @param childName The upper bound, inclusive, for the name of nodes with priority equal to endPriority
379
- * @return 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
401
+ * @return 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
380
402
  */
381
403
  - (FQuery *) queryEndingAtPriority:(id)endPriority andChildName:(NSString *)childName;
382
404
 
@@ -387,7 +409,7 @@
387
409
  * The FQuery instance returned by queryLimitedToNumberOfChildren: will respond to events at from at most limit child nodes
388
410
  *
389
411
  * @param limit The upper bound, inclusive, for the number of child nodes to receive events for
390
- * @return An FQuery instance, limited to at most limit child nodes.
412
+ * @return An FQuery instance, limited to at most limit child nodes.
391
413
  */
392
414
  - (FQuery *) queryLimitedToNumberOfChildren:(NSUInteger)limit;
393
415
 
@@ -417,7 +439,7 @@
417
439
  * @param value The value to be set after the connection is lost.
418
440
  * @param block Block to be triggered when the operation has been queued up on the Firebase servers
419
441
  */
420
- - (void) onDisconnectSetValue:(id)value withCompletionBlock:(void (^)(NSError* error))block;
442
+ - (void) onDisconnectSetValue:(id)value withCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
421
443
 
422
444
 
423
445
  /**
@@ -442,7 +464,7 @@
442
464
  * @param priority The priority to be set after the connection is lost.
443
465
  * @param block Block to be triggered when the operation has been queued up on the Firebase servers
444
466
  */
445
- - (void) onDisconnectSetValue:(id)value andPriority:(id)priority withCompletionBlock:(void (^)(NSError* error))block;
467
+ - (void) onDisconnectSetValue:(id)value andPriority:(id)priority withCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
446
468
 
447
469
 
448
470
  /**
@@ -464,7 +486,7 @@
464
486
  *
465
487
  * @param block Block to be triggered when the operation has been queued up on the Firebase servers
466
488
  */
467
- - (void) onDisconnectRemoveValueWithCompletionBlock:(void (^)(NSError* error))block;
489
+ - (void) onDisconnectRemoveValueWithCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
468
490
 
469
491
 
470
492
 
@@ -488,12 +510,12 @@
488
510
  * @param values A dictionary of child node names and the values to set them to after the connection is lost.
489
511
  * @param block A block that will be called once the operation has been queued up on the Firebase servers
490
512
  */
491
- - (void) onDisconnectUpdateChildValues:(NSDictionary *)values withCompletionBlock:(void (^)(NSError* error))block;
513
+ - (void) onDisconnectUpdateChildValues:(NSDictionary *)values withCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
492
514
 
493
515
 
494
516
  /**
495
517
  * Cancel any operations that are set to run on disconnect. If you previously called onDisconnectSetValue:,
496
- * onDisconnectRemoveValue:, or onDisconnectUpdateChildValues:, and no longer want the values updated when the
518
+ * onDisconnectRemoveValue:, or onDisconnectUpdateChildValues:, and no longer want the values updated when the
497
519
  * connection is lost, call cancelDisconnectOperations:
498
520
  */
499
521
  - (void) cancelDisconnectOperations;
@@ -506,7 +528,7 @@
506
528
  *
507
529
  * @param block A block that will be triggered once the Firebase servers have acknowledged the cancel request.
508
530
  */
509
- - (void) cancelDisconnectOperationsWithCompletionBlock:(void (^)(NSError* error))block;
531
+ - (void) cancelDisconnectOperationsWithCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
510
532
 
511
533
 
512
534
  /** @name Authenticating */
@@ -516,6 +538,7 @@
516
538
  * the results of the authenticated attempt, and the cancelBlock will be called if the credentials become invalid
517
539
  * at some point after authentication has succeeded.
518
540
  *
541
+ * @param credential The Firebase authentication JWT generated by a secure code on a remote server.
519
542
  * @param block This block will be called with the results of the authentication attempt
520
543
  * @param cancelBlock This block will be called if at any time in the future the credentials become invalid
521
544
  */
@@ -584,7 +607,7 @@
584
607
  /** @name Retrieving String Representation */
585
608
 
586
609
  /**
587
- * Gets the absolute URL of this Firebase location.
610
+ * Gets the absolute URL of this Firebase location.
588
611
  *
589
612
  * @return The absolute URL of the referenced Firebase location.
590
613
  */
@@ -620,6 +643,8 @@
620
643
  /** @name Global configuration and settings */
621
644
 
622
645
  /** Set the default dispatch queue for event blocks.
646
+ *
647
+ * @param queue The queue to set as the default for running blocks for all Firebase event types.
623
648
  */
624
649
  + (void) setDispatchQueue:(dispatch_queue_t)queue;
625
650
 
@@ -0,0 +1,154 @@
1
+ <?xml version='1.0'?>
2
+ <signatures version='1.0'>
3
+ <enum name='FAErrorAccessNotGranted' value='-3'/>
4
+ <enum name='FAErrorAccountNotFound' value='-4'/>
5
+ <enum name='FAErrorAuthenticationProviderNotEnabled' value='-5'/>
6
+ <enum name='FAErrorBadSystemToken' value='-7'/>
7
+ <enum name='FAErrorInvalidEmail' value='-6'/>
8
+ <enum name='FAErrorInvalidPassword' value='-2'/>
9
+ <enum name='FAErrorUnknown' value='-9999'/>
10
+ <enum name='FAErrorUserDoesNotExist' value='-1'/>
11
+ <enum name='FAProviderFacebook' value='2'/>
12
+ <enum name='FAProviderInvalid' value='-1'/>
13
+ <enum name='FAProviderPassword' value='1'/>
14
+ <enum name='FAProviderTwitter' value='3'/>
15
+ <class name='FAUser'>
16
+ <method selector='authToken'>
17
+ <retval declared_type='NSString*' type='@'/>
18
+ </method>
19
+ <method selector='email'>
20
+ <retval declared_type='NSString*' type='@'/>
21
+ </method>
22
+ <method selector='provider'>
23
+ <retval declared_type='FAProvider' type='i'/>
24
+ </method>
25
+ <method selector='setAuthToken:'>
26
+ <arg name='authToken' index='0' declared_type='NSString*' type='@'/>
27
+ <retval declared_type='void' type='v'/>
28
+ </method>
29
+ <method selector='setEmail:'>
30
+ <arg name='email' index='0' declared_type='NSString*' type='@'/>
31
+ <retval declared_type='void' type='v'/>
32
+ </method>
33
+ <method selector='setProvider:'>
34
+ <arg name='provider' index='0' declared_type='FAProvider' type='i'/>
35
+ <retval declared_type='void' type='v'/>
36
+ </method>
37
+ <method selector='setThirdPartyUserAccount:'>
38
+ <arg name='thirdPartyUserAccount' index='0' declared_type='ACAccount*' type='@'/>
39
+ <retval declared_type='void' type='v'/>
40
+ </method>
41
+ <method selector='setThirdPartyUserData:'>
42
+ <arg name='thirdPartyUserData' index='0' declared_type='NSDictionary*' type='@'/>
43
+ <retval declared_type='void' type='v'/>
44
+ </method>
45
+ <method selector='setUserId:'>
46
+ <arg name='userId' index='0' declared_type='NSString*' type='@'/>
47
+ <retval declared_type='void' type='v'/>
48
+ </method>
49
+ <method selector='thirdPartyUserAccount'>
50
+ <retval declared_type='ACAccount*' type='@'/>
51
+ </method>
52
+ <method selector='thirdPartyUserData'>
53
+ <retval declared_type='NSDictionary*' type='@'/>
54
+ </method>
55
+ <method selector='userId'>
56
+ <retval declared_type='NSString*' type='@'/>
57
+ </method>
58
+ </class>
59
+ <class name='FirebaseSimpleLogin'>
60
+ <method selector='changePasswordForEmail:oldPassword:newPassword:completionBlock:'>
61
+ <arg name='email' index='0' declared_type='NSString*' type='@'/>
62
+ <arg name='oldPassword' index='1' declared_type='NSString*' type='@'/>
63
+ <arg name='newPassword' index='2' declared_type='NSString*' type='@'/>
64
+ <arg name='block' function_pointer='true' index='3' declared_type='void (^)(NSError *, BOOL)' type='@?'>
65
+ <arg declared_type='NSError*' type='@'/>
66
+ <arg declared_type='BOOL' type='B'/>
67
+ <retval declared_type='void' type='v'/>
68
+ </arg>
69
+ <retval declared_type='void' type='v'/>
70
+ </method>
71
+ <method selector='checkAuthStatusWithBlock:'>
72
+ <arg name='block' function_pointer='true' index='0' declared_type='void (^)(NSError *, FAUser *)' type='@?'>
73
+ <arg declared_type='NSError*' type='@'/>
74
+ <arg declared_type='FAUser*' type='@'/>
75
+ <retval declared_type='void' type='v'/>
76
+ </arg>
77
+ <retval declared_type='void' type='v'/>
78
+ </method>
79
+ <method selector='createFacebookUserWithToken:appId:withCompletionBlock:'>
80
+ <arg name='token' index='0' declared_type='NSString*' type='@'/>
81
+ <arg name='appId' index='1' declared_type='NSString*' type='@'/>
82
+ <arg name='block' function_pointer='true' index='2' declared_type='void (^)(NSError *, FAUser *)' type='@?'>
83
+ <arg declared_type='NSError*' type='@'/>
84
+ <arg declared_type='FAUser*' type='@'/>
85
+ <retval declared_type='void' type='v'/>
86
+ </arg>
87
+ <retval declared_type='void' type='v'/>
88
+ </method>
89
+ <method selector='createUserWithEmail:password:andCompletionBlock:'>
90
+ <arg name='email' index='0' declared_type='NSString*' type='@'/>
91
+ <arg name='password' index='1' declared_type='NSString*' type='@'/>
92
+ <arg name='block' function_pointer='true' index='2' declared_type='void (^)(NSError *, FAUser *)' type='@?'>
93
+ <arg declared_type='NSError*' type='@'/>
94
+ <arg declared_type='FAUser*' type='@'/>
95
+ <retval declared_type='void' type='v'/>
96
+ </arg>
97
+ <retval declared_type='void' type='v'/>
98
+ </method>
99
+ <method selector='initWithRef:'>
100
+ <arg name='ref' index='0' declared_type='id' type='@'/>
101
+ <retval declared_type='id' type='@'/>
102
+ </method>
103
+ <method selector='loginToFacebookAppWithId:permissions:audience:withCompletionBlock:'>
104
+ <arg name='appId' index='0' declared_type='NSString*' type='@'/>
105
+ <arg name='permissions' index='1' declared_type='NSArray*' type='@'/>
106
+ <arg name='audience' index='2' declared_type='NSString*' type='@'/>
107
+ <arg name='block' function_pointer='true' index='3' declared_type='void (^)(NSError *, FAUser *)' type='@?'>
108
+ <arg declared_type='NSError*' type='@'/>
109
+ <arg declared_type='FAUser*' type='@'/>
110
+ <retval declared_type='void' type='v'/>
111
+ </arg>
112
+ <retval declared_type='void' type='v'/>
113
+ </method>
114
+ <method selector='loginToTwitterAppWithId:multipleAccountsHandler:withCompletionBlock:'>
115
+ <arg name='appId' index='0' declared_type='NSString*' type='@'/>
116
+ <arg name='accountSelection' function_pointer='true' index='1' declared_type='int (^)(NSArray *)' type='@?'>
117
+ <arg declared_type='NSArray*' type='@'/>
118
+ <retval declared_type='int' type='i'/>
119
+ </arg>
120
+ <arg name='block' function_pointer='true' index='2' declared_type='void (^)(NSError *, FAUser *)' type='@?'>
121
+ <arg declared_type='NSError*' type='@'/>
122
+ <arg declared_type='FAUser*' type='@'/>
123
+ <retval declared_type='void' type='v'/>
124
+ </arg>
125
+ <retval declared_type='void' type='v'/>
126
+ </method>
127
+ <method selector='loginWithEmail:andPassword:withCompletionBlock:'>
128
+ <arg name='email' index='0' declared_type='NSString*' type='@'/>
129
+ <arg name='password' index='1' declared_type='NSString*' type='@'/>
130
+ <arg name='block' function_pointer='true' index='2' declared_type='void (^)(NSError *, FAUser *)' type='@?'>
131
+ <arg declared_type='NSError*' type='@'/>
132
+ <arg declared_type='FAUser*' type='@'/>
133
+ <retval declared_type='void' type='v'/>
134
+ </arg>
135
+ <retval declared_type='void' type='v'/>
136
+ </method>
137
+ <method selector='logout'>
138
+ <retval declared_type='void' type='v'/>
139
+ </method>
140
+ <method selector='removeUserWithEmail:password:andCompletionBlock:'>
141
+ <arg name='email' index='0' declared_type='NSString*' type='@'/>
142
+ <arg name='password' index='1' declared_type='NSString*' type='@'/>
143
+ <arg name='block' function_pointer='true' index='2' declared_type='void (^)(NSError *, BOOL)' type='@?'>
144
+ <arg declared_type='NSError*' type='@'/>
145
+ <arg declared_type='BOOL' type='B'/>
146
+ <retval declared_type='void' type='v'/>
147
+ </arg>
148
+ <retval declared_type='void' type='v'/>
149
+ </method>
150
+ <method class_method='true' selector='sdkVersion'>
151
+ <retval declared_type='NSString*' type='@'/>
152
+ </method>
153
+ </class>
154
+ </signatures>
@@ -26,8 +26,8 @@
26
26
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
27
  */
28
28
 
29
- #ifndef FirebaseAuthClient_FATypes_h
30
- #define FirebaseAuthClient_FATypes_h
29
+ #ifndef FirebaseSimpleLogin_FATypes_h
30
+ #define FirebaseSimpleLogin_FATypes_h
31
31
 
32
32
  typedef enum {
33
33
  FAErrorUserDoesNotExist = -1,
@@ -35,6 +35,8 @@ typedef enum {
35
35
  FAErrorAccessNotGranted = -3,
36
36
  FAErrorAccountNotFound = -4,
37
37
  FAErrorAuthenticationProviderNotEnabled = -5,
38
+ FAErrorInvalidEmail = -6,
39
+ FAErrorBadSystemToken = -7,
38
40
  FAErrorUnknown = -9999
39
41
  } FAError;
40
42
 
@@ -31,16 +31,16 @@
31
31
 
32
32
  #import "FAUser.h"
33
33
 
34
- @interface FirebaseAuthClient : NSObject
34
+ @interface FirebaseSimpleLogin : NSObject
35
35
 
36
- /** @name Initializing a FirebaseAuthClient instance */
36
+ /** @name Initializing a FirebaseSimpleLogin instance */
37
37
 
38
38
 
39
39
  /**
40
40
  * You must initialize the auth client with a Firebase reference. The auth client will use that reference to authenticate to the Firebase servers
41
41
  *
42
42
  * @param ref A valid Firebase reference
43
- * @return An initialized instance of FirebaseAuthClient
43
+ * @return An initialized instance of FirebaseSimpleLogin
44
44
  */
45
45
  - (id) initWithRef:(Firebase *)ref;
46
46
 
@@ -122,6 +122,7 @@
122
122
  */
123
123
  - (void) loginToFacebookAppWithId:(NSString *)appId permissions:(NSArray *)permissions audience:(NSString *)audience withCompletionBlock:(void (^)(NSError* error, FAUser* user))block;
124
124
 
125
+ - (void) createFacebookUserWithToken:(NSString *)token appId:(NSString *)appId withCompletionBlock:(void (^)(NSError* error, FAUser* user))block;
125
126
 
126
127
  /** @name Twitter authentication methdos */
127
128
 
@@ -142,7 +143,7 @@
142
143
  /** @name Global configuration and settings */
143
144
 
144
145
  /**
145
- * @return The FirebaseAuthClient SDK version
146
+ * @return The FirebaseSimpleLogin SDK version
146
147
  */
147
148
  + (NSString *) sdkVersion;
148
149
 
@@ -14,7 +14,7 @@ DESC
14
14
 
15
15
  gem.homepage = 'https://github.com/colinta/motion-firebase'
16
16
 
17
- gem.files = `git ls-files`.split($\)
17
+ gem.files = Dir.glob('lib/**/*') + ['README.md', 'motion-firebase.gemspec']
18
18
  gem.test_files = gem.files.grep(%r{^spec/})
19
19
 
20
20
  gem.require_paths = ['lib']