Jim
unread,Apr 19, 2011, 1:52:21 PM4/19/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ObjectiveResource
Hi all -
I'm new to working with XML and Rails, so forgive me if this is a
simple question.
In my app, I pass the iPhone's UDID as a string to Rails. Rails does a
query and finds the user that matches the UDID and sends it back to
the iPhone, which creates a User object based on the response.
This works great, except when I have a new user. It seemed easiest to
have Rails create a new user and pass it back to the iPhone, then just
test the user's name field for nil to see if it was a new user.
However, the XML that Rails returns has the name field as <name
nil="true"></name> which does not evaluate as nil in Objective C. Is
there a way I can test for that attribute, or have Rails not pass it?
Or perhaps have Obj C replace all XML fields with the nil="true"
attribute to nil?
Thanks!