Hello,

I’m using the PlatformServices2.0, I was testing the “ContactsService.wgz” example that comes with the library, because I will need to access the contacts list on the phone. In the simulator everything works fine, but when I deploy the application in the phone (Nokia C7-00), it crashes.

It crashes inside the library in the “__sp_contact_iterator_get_next()” function in the following line:
_3d4.close();
You get the following error:
getContactsCallBack: TypeError: Result of expression‘_3d4.close‘ [undefined] is not a function.

The issue is that for some reason, the close function is always undefined for every contact of the list. Here’s a manual debug of the _3d4 object (corresponding to an entry in the contacts list).
(string) id: -some random stuff-
(Object) SyncClass
(string) Label: Synchronisation
(string) Value: private
(undefined) close: null: undefined
(object) LastName
(string) Label: Last Name
(string) Value: A
(undefined) close: null: undefined
(object) First Name
(string) Label: FirstName
(string) Value: Mr
(undefined) close: null: undefined
(object) LandPhoneGen
(string) Label: Telephone
(string) Value: 558999658
(undefined) close: null: undefined
(object) MobilePhoneGen
(string) Label: Mobile
(string) Value: 558999659
(undefined) close: null: undefined
(object) EmailGen
(string) Label: Mail
(string) Value: gaasda@akf.com
(undefined) close: null: undefined
(undefined) close: null: undefined
When I debug in the simulator the last close becomes:
(function) close: function() {}

I solved the problem by changing the “__sp_contact_iterator_get_next()” code and adding :
if(_3d4 && typeof(_3d4.close) === "function"){
_3d4.close(); }
Has anybody encountered this problem? Do you know if there is a more elegant solution?
Any suggestions are welcome.
Thanks in advance!