[AC-402] Titanium.Contacts.showContacts Error
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Invalid |
Resolution Date | 2015-11-21T18:53:08.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | ios9, sdk-5.0.0, selectedproperty, showcontacts |
Reporter | Fab |
Assignee | Sharif AbuDarda |
Created | 2015-09-29T18:26:33.000+0000 |
Updated | 2015-11-25T09:00:17.000+0000 |
Description
*App crash when selecting phone number from contacts*
_var imageContacts = Ti.UI.createImageView({
left: dynamicSize(260),
image: '/images/contacts.png',
width: dynamicSize(30),
});
viewRecipient.add(imageContacts);
imageContacts.addEventListener('click',function(e){
Titanium.Contacts.showContacts({
selectedProperty: function(e){
Ti.API.info("Selected phone #: " + e.value);
Ti.API.info("Type of phone #: "+ e.label);
},
fields: ['phone']
});
});_
*With following Error: *
[ERROR] : The application has crashed with an uncaught exception 'CNPropertyNotFetchedException'.
[ERROR] : Reason:
[ERROR] : A property was not requested when contact was fetched.
[ERROR] : Stack trace:
[ERROR] :
[ERROR] : 0 CoreFoundation 0x000000011084df4d __exceptionPreprocess + 141
[ERROR] : 1 libobjc.A.dylib 0x0000000110220deb objc_exception_throw + 48
[ERROR] : 2 CoreFoundation 0x000000011084de9d +[NSException raise:format:] + 205
[ERROR] : 3 Contacts 0x000000010bb0c205 -[CNContact emailAddresses] + 160
[ERROR] : 4 * 0x000000010af783a8 -[TiContactsPerson getiOS9ContactProperties:] + 568
[ERROR] : 5 * 0x000000010af780a2 -[TiContactsPerson _initWithPageContext:contactId:module:] + 162
[ERROR] : 6 * 0x000000010afd5c94 -[ContactsModule contactPicker:didSelectContactProperty:] + 196
[ERROR] : 7 ContactsUI 0x000000010bc182d2 -[CNContactPickerViewController pickerDidSelectContact:property:] + 297
[ERROR] : 8 ContactsUI 0x000000010bc99f4a -[CNContactPickerHostViewController pickerDidSelectContact:property:] + 95
[ERROR] : 9 ContactsUI 0x000000010bc9a6e2 __71-[CNContactPickerExtensionHostContext pickerDidSelectContact:property:]_block_invoke + 66
[ERROR] : 10 libdispatch.dylib 0x0000000111181df5 _dispatch_call_block_and_release + 12
[ERROR] : 11 libdispatch.dylib 0x000000011119d4a7 _dispatch_client_callout + 8
[ERROR] : 12 libdispatch.dylib 0x0000000111187fc9 _dispatch_main_queue_callback_4CF + 714
[ERROR] : 13 CoreFoundation 0x00000001107ae3e9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
[ERROR] : 14 CoreFoundation 0x000000011076f939 __CFRunLoopRun + 2073
[ERROR] : 15 CoreFoundation 0x000000011076ee98 CFRunLoopRunSpecific + 488
[ERROR] : 16 GraphicsServices 0x0000000112424ad2 GSEventRunModal + 161
[ERROR] : 17 UIKit 0x000000010ce4e676 UIApplicationMain + 171
[ERROR] : 18 * 0x000000010ae86416 main + 310
[ERROR] : 19 libdyld.dylib 0x00000001111cc92d start + 1
[ERROR] :
[ERROR] : 2015-09-29 20:14:03.886 *[66957:3428295] *** Terminating app due to uncaught exception 'CNPropertyNotFetchedException', reason: 'A property was not requested when contact was fetched.'
[ERROR] : *** First throw call stack:
[ERROR] : (
[ERROR] : 0 CoreFoundation 0x000000011084df65 __exceptionPreprocess + 165
[ERROR] : 1 libobjc.A.dylib 0x0000000110220deb objc_exception_throw + 48
[ERROR] : 2 CoreFoundation 0x000000011084de9d +[NSException raise:format:] + 205
[ERROR] : 3 Contacts 0x000000010bb0c205 -[CNContact emailAddresses] + 160
[ERROR] : 4 * 0x000000010af783a8 -[TiContactsPerson getiOS9ContactProperties:] + 568
[ERROR] : 5 * 0x000000010af780a2 -[TiContactsPerson _initWithPageContext:contactId:module:] + 162
[ERROR] : 6 * 0x000000010afd5c94 -[ContactsModule contactPicker:didSelectContactProperty:] + 196
[ERROR] : 7 ContactsUI 0x000000010bc182d2 -[CNContactPickerViewController pickerDidSelectContact:property:] + 297
[ERROR] : 8 ContactsUI 0x000000010bc99f4a -[CNContactPickerHostViewController pickerDidSelectContact:property:] + 95
[ERROR] : 9 ContactsUI 0x000000010bc9a6e2 __71-[CNContactPickerExtensionHostContext pickerDidSelectContact:property:]_block_invoke + 66
[ERROR] : 10 libdispatch.dylib 0x0000000111181df5 _dispatch_call_block_and_release + 12
[ERROR] : 11 libdispatch.dylib 0x000000011119d4a7 _dispatch_client_callout + 8
[ERROR] : 12 libdispatch.dylib 0x0000000111187fc9 _dispatch_main_queue_callback_4CF + 714
[ERROR] : 13 CoreFoundation 0x00000001107ae3e9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
[ERROR] : 14 CoreFoundation 0x000000011076f939 __CFRunLoopRun + 2073
[ERROR] : 15 CoreFoundation 0x000000011076ee98 CFRunLoopRunSpecific + 488
[ERROR] : 16 GraphicsServices 0x0000000112424ad2 GSEventRunModal + 161
[ERROR] : 17 UIKit 0x000000010ce4e676 UIApplicationMain + 171
[ERROR] : 18 * 0x000000010ae86416 main + 310
[ERROR] : 19 libdyld.dylib 0x00000001111cc92d start + 1
[ERROR] : )
[ERROR] : libc++abi.dylib: terminating with uncaught exception of type NSException
Attachments
File | Date | Size |
---|---|---|
screenshot-1.png | 2015-11-16T08:53:02.000+0000 | 303519 |
Hello Amimul Hossain, i tested the exact same Code from you within a new project and got the same error. I tested it in iphone6-Simulator [INFO] : Finished building the application in 37s 277ms [INFO] : Launching iOS Simulator [INFO] : Application started [INFO] : test/1.0 (5.1.0.abe048b) [INFO] : You clicked the button [ERROR] : The application has crashed with an uncaught exception 'CNPropertyNotFetchedException'. [ERROR] : Reason: [ERROR] : A property was not requested when contact was fetched. [ERROR] : Stack trace: [ERROR] : [ERROR] : 0 CoreFoundation 0x0000000113e0ff4d __exceptionPreprocess + 141 [ERROR] : 1 libobjc.A.dylib 0x00000001137e2deb objc_exception_throw + 48 [ERROR] : 2 CoreFoundation 0x0000000113e0fe9d +[NSException raise:format:] + 205 [ERROR] : 3 Contacts 0x000000010efd6205 -[CNContact emailAddresses] + 160 [ERROR] : 4 test 0x000000010e611368 -[TiContactsPerson getiOS9ContactProperties:] + 568 [ERROR] : 5 test 0x000000010e611062 -[TiContactsPerson _initWithPageContext:contactId:module:] + 162 [ERROR] : 6 test 0x000000010e66ddf4 -[ContactsModule contactPicker:didSelectContactProperty:] + 196 [ERROR] : 7 ContactsUI 0x000000010f0e22d2 -[CNContactPickerViewController pickerDidSelectContact:property:] + 297 [ERROR] : 8 ContactsUI 0x000000010f163f4a -[CNContactPickerHostViewController pickerDidSelectContact:property:] + 95 [ERROR] : 9 ContactsUI 0x000000010f1646e2 __71-[CNContactPickerExtensionHostContext pickerDidSelectContact:property:]_block_invoke + 66 [ERROR] : 10 libdispatch.dylib 0x0000000114a0adf5 _dispatch_call_block_and_release + 12 [ERROR] : 11 libdispatch.dylib 0x0000000114a264a7 _dispatch_client_callout + 8 [ERROR] : 12 libdispatch.dylib 0x0000000114a10fc9 _dispatch_main_queue_callback_4CF + 714 [ERROR] : 13 CoreFoundation 0x0000000113d703e9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 [ERROR] : 14 CoreFoundation 0x0000000113d31939 __CFRunLoopRun + 2073 [ERROR] : 15 CoreFoundation 0x0000000113d30e98 CFRunLoopRunSpecific + 488 [ERROR] : 16 GraphicsServices 0x0000000115141ad2 GSEventRunModal + 161 [ERROR] : 17 UIKit 0x00000001103d8676 UIApplicationMain + 171 [ERROR] : 18 test 0x000000010e51fef6 main + 310 [ERROR] : 19 libdyld.dylib 0x0000000114a5592d start + 1 [ERROR] : 20 ??? 0x0000000000000001 0x0 + 1 [ERROR] : [ERROR] : 2015-10-02 13:51:58.872 test[13025:844123] *** Terminating app due to uncaught exception 'CNPropertyNotFetchedException', reason: 'A property was not requested when contact was fetched.' [ERROR] : *** First throw call stack: [ERROR] : ( [ERROR] : 0 CoreFoundation 0x0000000113e0ff65 __exceptionPreprocess + 165 [ERROR] : 1 libobjc.A.dylib 0x00000001137e2deb objc_exception_throw + 48 [ERROR] : 2 CoreFoundation 0x0000000113e0fe9d +[NSException raise:format:] + 205 [ERROR] : 3 Contacts 0x000000010efd6205 -[CNContact emailAddresses] + 160 [ERROR] : 4 test 0x000000010e611368 -[TiContactsPerson getiOS9ContactProperties:] + 568 [ERROR] : 5 test 0x000000010e611062 -[TiContactsPerson _initWithPageContext:contactId:module:] + 162 [ERROR] : 6 test 0x000000010e66ddf4 -[ContactsModule contactPicker:didSelectContactProperty:] + 196 [ERROR] : 7 ContactsUI 0x000000010f0e22d2 -[CNContactPickerViewController pickerDidSelectContact:property:] + 297 [ERROR] : 8 ContactsUI 0x000000010f163f4a -[CNContactPickerHostViewController pickerDidSelectContact:property:] + 95 [ERROR] : 9 ContactsUI 0x000000010f1646e2 __71-[CNContactPickerExtensionHostContext pickerDidSelectContact:property:]_block_invoke + 66 [ERROR] : 10 libdispatch.dylib 0x0000000114a0adf5 _dispatch_call_block_and_release + 12 [ERROR] : 11 libdispatch.dylib 0x0000000114a264a7 _dispatch_client_callout + 8 [ERROR] : 12 libdispatch.dylib 0x0000000114a10fc9 _dispatch_main_queue_callback_4CF + 714 [ERROR] : 13 CoreFoundation 0x0000000113d703e9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 [ERROR] : 14 CoreFoundation 0x0000000113d31939 __CFRunLoopRun + 2073 [ERROR] : 15 CoreFoundation 0x0000000113d30e98 CFRunLoopRunSpecific + 488 [ERROR] : 16 GraphicsServices 0x0000000115141ad2 GSEventRunModal + 161 [ERROR] : 17 UIKit 0x00000001103d8676 UIApplicationMain + 171 [ERROR] : 18 test 0x000000010e51fef6 main + 310 [ERROR] : 19 libdyld.dylib 0x0000000114a5592d start + 1 [ERROR] : 20 ??? 0x0000000000000001 0x0 + 1 [ERROR] : ) [ERROR] : libc++abi.dylib: terminating with uncaught exception of type NSException I also tested it it with SDK 5.0.0GA and SDK 5.1.0.v20150929021233 And also with several Simulators and a real iPhone6-device with the same error. Any suggestions? Fab
This is working as expected in iPhone6s Plus simulator (9.1) and iPad (8.4) device. I have tested with SDK 5.0.2.GA, 5.1.0.v20151023172822. I have attached a screenshot of the output in iPhone6s Plus simulator (9.1). My Appcelerator studio build is 4.3.3.201510212245. Thanks.