Prebuilt Realm dataset composed of San Francisco restaurant scores for Realm Swift
####Data Model
Object
subclasses corresponding to the data model are included in the objects folder.
Data model structure:
ABFRestaurantObject
- businessId:
String
(primary key) - name:
String
- address:
String
- city:
String
- state:
String
- postalCode:
String
- latitude:
Double
- longitude:
Double
- phoneNumber:
String
- violations:
List<ABFViolationObject>()
- inspections:
List<ABFInspectionObject>()
- businessId:
ABFInspectionObject
- restaurant:
ABFRestaurantObject
- score:
Int
- date:
NSDate
- type:
ABFInspectionType
- restaurant:
ABFViolationObject
- restaurant:
ABFRestaurantObject
- date:
NSDate
- violationDescription:
String
- restaurant:
####Installation
RealmSwiftSFRestaurantData
is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod "RealmSwiftSFRestaurantData"
From your project:
let realm = Realm(path: ABFRestaurantScoresPath())
let restaurants = realm.objects(ABFRestaurantObject)
####Demo
An example project that uses RealmSwiftSFRestaurantData
is provided in the ABFRealmSearchViewController repo. To install follow the instructions provided.