I am using the Address Book frameworks in an iPhone app, and I would like to get the items Company Name. I can't find this info in the AddressBookUI_Framework.pdf, can someone shed some light on this.
Regards
AddressBook/AddressBook.h
AddressBookUI/AddressBookUI.h
I think you're looking for the kABPersonOrganizationProperty key.
As Ole mentioned you need to use kABPersonOrganizationProperty key. You can have a look at ABPerson reference and ABPerson.h header for other keys and more details.
Related
How to do geo fencing in iphone?
Is there any API available?
If any sample code available please share with me.
Take a look at the Location Awareness Programming Guide.
It contains all the info you need.
This may help you http://www.netmagazine.com/tutorials/get-started-geofencing-ios or you could get this book which also covers it in detail http://www.amazon.co.uk/Geolocation-iOS-Mobile-Positioning-Mapping/dp/1449308449
To resume :
- Add the good tag in your info plist (location, location-services, gps...)
- Use the startMonitoringForRegion on the CLLocationManager
Following examples should you give more idea on geofencing:
http://www.creativebloq.com/ipad/get-started-geofencing-ios-9122867
http://mobile.tutsplus.com/tutorials/iphone/geofencing-with-core-location/
for better understanding check out this link first: http://sxsw.usehipster.com/questions/where-are-the-best-breakfast-tacos-in-austin
as you can see there, some answers have a reference to a location which is show on the map on the right. A user can do that by adding the “#“ symbol before the location name.
I'd like to know how that works. Did the guys from usehipster.com developed that by themselve or is that maybe a framework I can use too?
cheers
Looks custom-made - i.e. not a framework. Shouldn't be too hard - just scan the entry for #\w+, plug that into Google Local Search (possibly specify the city), and plug the output into a Google Map. See e.g. this for an example of Google Local Search API: http://code.google.com/apis/ajax/playground/?exp=localsearch#the_hello_world_of_local_search
Hi i am developing an app for my QA department. I need to programically get how many phone numbers are there in the entire address book. No user input. Just click a button and then get how many phonenumbers are there in the ENTIRE addressbook.
I think what you are looking for is ABGroupCopyArrayOfAllMembers. See the AddressBook Programming Guide and the QuickContacts example for more info on using the AB framework.
from what I can tell from a quick look at ABMultiValue in AddressBook.sqlitedb, you might get it like this:
1 - sqlite to /var/mobile/Library/AddressBook/AddressBook.sqlitedb
2 - SELECT value FROM ABMultiValue => into some array
3 - count everything in there that matches /^[0-9 +]+$/
look around for some more help doing these steps
Edit: there's probably also some way to do it with this method:
How do you get a persons phone number from the address book?
Can I create an ABAddressBook which does not read data from my address book. i.e. it's empty to start with so that I can put in my own contacts fetched from the internet.
As you may know the function
ABAddressBookRef ab = ABAddressBookCreate();
gives me data from the built in addressbook. This is not what I want but if you know a solution to my problem please let me know.
I don't think it is possible to have an empty instance of ABAddressBook. The documentation is only about getting an ABAddressBook filled with the address book of the iPhone.
You could try making an array (or mutablearray) that you fill with the contacts and put the array inside a UITableView.
I've been working on a "private contacts" app which stores contacts off of the normal address book and I can confirm that this is indeed possible, if only through a little manipulation. Using the ABAddressBookRef variable, however, won't help you at all. What you need is a NSMutableArray of ABRecordRef's, which is how iOS stores its contacts.
You could try to zero out ABAddressBookRef with a memset/calloc and see if that gives you the desired result.
I am trying to programmatically discover the first and last names of the iPhone user. Is this possible at all? Calling this ...
getpwuid( getuid() )->pw_gecos == "Mobile User"
..alas. Iterating over the address book finds all address book records, but doesn't distinguish between the device owner and anyone else (that I can tell).
Given that the Mac desktop address book decorates the owners icon with a 'me' overlay in the bottom-left, I'm hoping that sort of information is available in the iPhone version.
Martin.
As noted in the other thread, there is NSFullUserName() - this call does come up in the iPhone documentation so it should work on the device. Simply parse out the first and last name from that.
See similar question - there is no public API for that.