RealmSFRestaurantData 0.3

RealmSFRestaurantData 0.3

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Oct 2015

Maintained by Adam Fish.



  • By
  • Adam Fish

Prebuilt Realm dataset composed of San Francisco restaurant scores

Data Source

Data Model

RLMObject subclasses corresponding to the data model are included in the objects folder.

Data model structure:

  • ABFRestaurantObject
    • businessId: NSString (primary key)
    • name: NSString
    • address: NSString
    • city: NSString
    • state: NSString
    • postalCode: NSString
    • latitude: CLLocationDegrees
    • longitude: CLLocationDegrees
    • phoneNumber: NSString
    • violations: RLMArray<ABFViolationObject>
    • inspections: RLMArray<ABFInspectionObject>
  • ABFInspectionObject
    • restaurant: ABFRestaurantObject
    • score: NSInteger
    • date: NSDate
    • type: ABFInspectionType
  • ABFViolationObject
    • restaurant: ABFRestaurantObject
    • date: NSDate
    • violationDescription: NSString

Installation

From your project:

#import <RealmSFRestaurantData/SFRestaurantScores.h>
...
RLMRealm *restaurantRealm = [RLMRealm realmWithPath:ABFRestaurantScoresPath()];

RLMResults *restaurants = [ABFRestaurantObject allObjectsInRealm:restaurantRealm];

Demo

An example project that uses RealmSFRestaurantData is provided in the ABFRealmSearchViewController repo. To install follow the instructions provided.