How to get a profile in the iOS SDK
Hi,
I'm trying to make an iOS app which will post items to a Podio app. I've got that all working fine without too much trouble but one of the fields is 'employee' which I want to reference to other users or contacts, though I can't see how to achieve this.
-
Official comment
Hi Chris,
I assume the "employee" field is an relationship/app reference field to an Employee app? If so, to set the employee relationship, just fetch the PKTItem object that you want to reference from the Employee app and set it as the value of the "employee" field, like:
PKTItem *myEmployeeItem = ...;
PKTItem *itemToCreate[@"employee"] = myEmployeeItem;
You can now save the "itemToCreate" item. Does that solve your problem?
For more info on how to use the relationship field and other field types in PodioKit, check the "Relationship field" section at http://podio.github.io/podio-objc/fields.
Comment actions -
The current beta version doesn't support that, but it might be pretty easy to add it. What would be your preferred way of looking up profiles from the API, i.e. which API call in the "Contacts" area (https://developers.podio.com/doc/contacts) would you use to find search for contacts? This is fairly application specific, so I am just trying to get an understanding of the use case.
Please sign in to leave a comment.
Comments
9 comments