Guest User

Untitled

a guest
Oct 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. Realm.open({
  2. sync: {
  3. url: `realm://${URL}/tickers`,
  4. user: user,
  5. partial: true
  6. },
  7. schema: [TickerSchema],
  8. })
  9.  
  10. realm.subscribeToObjects('Ticker', 'price > ' + price)
  11.  
  12. OBJECTIVE-C
  13. - (void)subscribeToObjects:(nonnull Class)type
  14. where:(nonnull NSString *)query
  15. callback:(nonnull RLMPartialSyncFetchCallback)callback;
  16. SWIFT
  17. func subscribe(toObjects type: AnyClass, where query: String, callback: @escaping RLMPartialSyncFetchCallback)
  18.  
  19. JAVA
  20. void subscribeToObjects(Class<E> clazz, String query, Realm.PartialSyncCallback<E> callback)
Add Comment
Please, Sign In to add comment