yahoo / squidb

SquiDB is a SQLite database library for Android and iOS
https://github.com/yahoo/squidb/wiki
Apache License 2.0
1.31k stars 132 forks source link

iOS model plugin #264

Closed sbosley closed 7 years ago

sbosley commented 7 years ago

Implement an IOSModelPlugin for adding some iOS/j2objc-specific features to generated models, analogous to the AndroidModelPlugin. All the plugin does for now is annotate the generated getters and setters with @ObjectiveCName so that the accessors will use more iOS-style names when translated.

This PR also adds a dependency in squidb core on j2objc-annotations, so that we can annotate methods like getRowId/setRowId with @ObjectiveCName as well. While I was slightly reluctant to add any dependencies to the main squidb module, I think it makes sense to do so with dependencies that are purely for annotations (and we'll be adding another for nullability annotations in a future enhancement too).