Prebuilt Realm dataset composed of San Francisco restaurant scores
####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>
- businessId:
ABFInspectionObject
- restaurant:
ABFRestaurantObject
- score:
NSInteger
- date:
NSDate
- type:
ABFInspectionType
- restaurant:
ABFViolationObject
- restaurant:
ABFRestaurantObject
- date:
NSDate
- violationDescription:
NSString
- restaurant:
####Installation
RealmSFRestaurantData
is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod "RealmSFRestaurantData"
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.