Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QBCOCustomObject reads an array of integers as a string #7

Closed
DrMoriarty opened this issue Sep 18, 2013 · 4 comments
Closed

QBCOCustomObject reads an array of integers as a string #7

DrMoriarty opened this issue Sep 18, 2013 · 4 comments

Comments

@DrMoriarty
Copy link

I have a custom object with several simple fields and one array of integers.
The value of the array is [0,290427,100500]
I read a CO by [QBCustomObjects objectsWithClassName: extendedRequest: delegate:]
When I get the result the custom object's field contains a string with value @"100500" instead of the array.

As far as I noticed I can save the array without any errors and it's values I can see in web interface.

2013-09-18 15 05 07
2013-09-18 15 05 33

@DrMoriarty
Copy link
Author

Thanks, this solution was not obvious.
Now I receive the array of strings instead of the array of integers. Could you help me with second part of problem?
2013-09-18 16 01 06
2013-09-18 16 01 58

@soulfly
Copy link
Contributor

soulfly commented Sep 19, 2013

iOS SDK pareses all fields to NSString to be more flexible
is variant with caste to int will work for you?

like [str intValue]

@DrMoriarty
Copy link
Author

Yes, I'm checking the class of values and cast them if they are strings. It works pretty well, thank you.
Could you describe this feature in official documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants