You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+18-11
Original file line number
Diff line number
Diff line change
@@ -3,13 +3,15 @@ ParseModel-iOS
3
3
4
4
Hassel-free data models for the Parse iOS SDK.
5
5
6
+
The `ParseModel` class automatically maps the properties of your subclass to entries in an underlying `PFObject` and handles any neccesary conversions (e.g. if yuor property is an `int` it is converted to an `NSNumber` for storage).
7
+
6
8
## Why ParseModel?
7
9
8
10
[Parse](https://parse.com/) is a cloud backend as-a-service (or BaaS) that allows developers to quickly get their apps up and running with little or no backend setup.
9
11
10
12
More often than not, we developers like to work with out own classes and not use the out-of-the-box data models that come with many of these services. Regardless of our approach there comes a time when we need to map the properties of our objects to the backend object. Sometimes we accomplish this by overriding the getters and setters of our properties like this:
@@ -31,11 +33,11 @@ More often than not, we developers like to work with out own classes and not use
31
33
}
32
34
33
35
@end
34
-
```
36
+
```
35
37
36
38
The benefits to this approach is that we can define an Objective-C `protocol` to house these properties and have our model objects conform to this protocol:
A `PFUser` flavored object is also available called `ParseModelUser`.
107
+
102
108
## Installing
103
109
104
-
I've created a [CocoaPods](http://cocoapods.org/) podspec here but some of the dependencies seem to be acting up at the moment. Seems like an small outage on Github's side. When I'm able to test I'll push the podspec to the specs repo. For now, just copy the files in the **ParseModel** folder into your project.
110
+
I've created a [CocoaPods](http://cocoapods.org/) podspec. I'm currently submitting it to the official specs repo so if you are reading this just point your podfile here.
105
111
106
112
## Limitations
107
113
108
114
ParseModel currently works with all types that `PFObject`[supports](https://parse.com/docs/ios_guide#objects-types/iOS). This means don't try using a UIImage and expect it to work! If you need to store UIImage data (or something that is unsupported) you have a few alternatives:
109
115
110
116
1. Don't declare the `property` as `dynamic` and write your own code to handle that particular `property`.
111
-
2. Use `PFFile`.
117
+
2. Use `PFFile`'s for images.
118
+
3.`PFGeoPoint`'s are not yet supported. (Would be easy to add…)
112
119
3. Fork this repo and add support for serializing your object type to JSON :)
0 commit comments