Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (in)
Viewing all articles
Browse latest Browse all 20

iPhone Contacts listing crashs on iPhone

$
0
0

Okay,

Mobile SDK 1.5.1, Ti Dev 1.2.2, Mac OSX, building for iPhone 3GS 4.2.1.

Runs fine on sim, fine on android, crashes on iPhone.

Simple to recreate

var contactList = Ti.Contacts.getAllPeople();
 
(iterating.. using c as iterator, there is at least one contact with a phone number)
 
var contact = contactList[c];
 
var label;
for (label in contact.phone) {
 // do whatever             
}
That "for in" loop causes the iPhone to crash. It brings up a warning during compile and even if I do a protective if
if (contact.phone.hasOwnProperty(label)) { .... }
It doesn't help (it does remove the compile warning tho)

So seems to be some problem/bug here in Ti 1.5.1.......

Chris


Viewing all articles
Browse latest Browse all 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>