Differences in data model between StackMob & iOS

9 views
Skip to first unread message

Pedro Plowman

unread,
Apr 25, 2013, 9:09:08 PM4/25/13
to StackMob, StackMob
G'day all

Posting this to the Google group as well as support because I think others could face the same issue.

The Core Data bases StackMob SDK for iOS demands a lot of agreement between data models on StackMob & iOS which is mostly great.
I have 2 use cases, neither of which I think particularly exceptional, that demands fields on iOS that are not on StackMob.

The first is for sorting...
When I did my first prototype app a member of a band called cloudstreet (all lowercase) asked why they were at the end of the alphabetical list of bands. The reason is Apple's sorting methods being fully canonical putting lowercase letters after al uppercase letters. Another mis-sort in my data occurs with bands having names starting with "The" like a hypothetical band The Fruitbats who would be better sorted in F rather than T. My solution is to convert names to lowercase, strip prefix words like "the", & then store them in a field sort_name. Then I do my sorting on that field instead of the real name.

The 2nd is for images...
I have 2 instances in my app where my StackMob data includes images in different sizes for the various iOS screen sizes. Rather than having users get all versions of the image I read the string values (the S3 URLs) of the fields containing the images & get the one image that matches the user's device screen. Storing that requires a field that I don't have on StackMob.

In my use cases all the data involved is read-only from the iOS user's perspective.

Does the StackMob iOS SDK permit data model differences such as I've described?
Do I have to do anything special to make these data model differences work?

It occurs to me that I might have been able to find answers to this if the StackMob iOS SDK docs were searchable. Because of this I've filed a feature request for a docset to be included in the Cocoapod...
http://support.stackmob.com/entries/23632608-Docs-in-iOS-CocoaPod

Cheers, Pedro Plowman

myFestivalsApp.com - Where your iPhone becomes your ultimate festival guide.
http://myfestivalsapp.com/calendar
http://itunes.apple.com/au/app/myfestivals-app/id477712036?mt=8
http://twitter.com/myFestivalsApp
http://www.facebook.com/myfestivalsapp

Reply all
Reply to author
Forward
0 new messages