Programmatically change linked contacts array in ABAddressBook, ABPersonCopyArrayOfAllLinkedPeople - iphone

Can one programmatically add/remove the contacts inside the CFArray returned by ABPersonCopyArrayOfAllLinkedPeople, thus, effectively, linking and un-linking different records of contacts from various sources to show as "unified" in the iOs phone book?

As far as I've been able to determine, there is no public API exposed for linking or unlinking contacts, at least in the iOS 6 SDK. However, it does appear that you can create links between contacts by calling the undocumented, private function bool ABPersonLinkPerson(ABRecordRef from, ABRecordRef to). That signature may not be exactly right--I haven't tested this too thoroughly.
Your app is of course unlikely to be approved if you make use of private APIs, but if you're trying to, say, make a fake address book for the sake of unit testing and you want some linked contacts in that, this could be useful.

Related

What's The Best Way To Collect A Lot Of Information From User?

I'm just learning Swift and IOS development. I have an issue, I'm creating an app that need's to get a lot of information about a product, from the user. There will be many fields the user needs to fill out about this product.
At first, I just added some labels and below each label a text field for the user to fill in information for each label. However, I found out that I quickly ran out of room for my labels and text fields.
So my question is What would be the best Object to use to collect all this information. Also, this information will be saved to Realm database, and each product will then be displayed on a table view when the app opens. Then when the user clicks the product it will show them all the stored information about that product. Also when they click the + in the navigation bar it will let them add a new product and all the information for it.
So that is how my app will function. Any help on the best way to collect and display this vast amount of information would be very helpful to me.
Thanks
I think the best way is to categorize the information and show the input fields of each category in a separate page.
It depends of which information you want. IOS development is not like Android, that you can call an Intent to access almost everything in device. but, with Custom URL, you can access address contacts, calls, messages. You can access the photo library, capture geolocation. Apple is much more restrictive then Google.

Get list Internet Access Point programmatically on iOS

How to get list Internet Access Point programmatically on iOS?
Are there any public or private API's to do this?
This info was applicable to iOS 7 and most likely not applicable to newer iOS versions.
I think it make sense to disassemble and look in two places:
a) CoreTelephony framework.
It has API's like:
CTServerConnectionGetAttachAPNSetttings
Also it has a key for some function kCTDeviceManagementAPNList. I am not sure where should it be passed, but it looks like it's used to retreive a list of APN's
b) ManagedConfiguration framework
You can set APN through using configuration profile. So, you probably can find in there API's which are used to store/retreive them.
As AlexWien correctly pointed out. Both of these things are private API's. I am not aware of public API's which can get APN's info.

Apple iOS6 Maps - Destination Address > Business name showing instead of lat/long

I have an app that bumps the user out to Apple's maps to get directions to a business location, and I'm passing lat/long. Pretty simple, the URL I'm using is the following:
http://maps.apple.com/maps?daddr=lat,long
This of course works fine, but the client doesn't like the lat/long showing when the user gets to the maps, since it doesn't look very 'user friendly'. They would prefer the business name (which we have available) to actually show there. I informed them that this wouldn't work if we just passed in the business name alone, since Apple's maps may not know about that particular business' location.
However, they wanted to know if it was possible to somehow have it still show the business name in the destination-address, alongside the lat/long. Something like the following: "(Business Name) lat,long", where the business name is ultimately ignored and lat/long used. I've played around with this a bit with no luck.
Looking at Apple's documentation, I don't see of an obvious way of accomplishing this. Is this even possible? No worries if not, but just wanted to get some feedback. Thanks!
If you're writing an app, you could use MKMapItem instead of using the link URL method. With one of these, you can add a bunch of extra information, such as the business name and phone number, as well as the latitude/longitude. Then, you can open one in the Maps app by calling openInMapsWithLaunchOptions: on it.

How do I create a development tool to create custom object instances for iphone os

I'm setting out to create an app where it will use 7-10 instances of a custom class, lets call them "books" each class will consist of a number of pages, a title, a int of how many pages a book contains and possibly some notes of the author associated with a specific page.
My question is what is the best way of creating these objects. it seems weak to just hard-code all the books together programatically, and if there are more added after the initial release I'd almost like to have the author be able to construct them with a simple desktop app.
So I guess what I'm looking for is a way to a create a small app to create instances of a custom class on a desktop, then bring those instances into the iphone app.
I only have an iphone dev license as far as I know. Obviously you don't have to be super specific but I'm looking for ways to accomplish this type of task. Maybe if there is a good way to go about hard coding them I would like to hear about that as well.
I guess an equivalent would be a game developer making like a level editor for his game so he doesn't have to create the boards programatically.
Provide your data in XML or JSON
format (or whatever flavour of file
format you prefer), this is to transfer data to/from application.
Parse your data file (xml/json) and store in permanent storage (file,sqlite,core data) on phone. This is the data that your application will regularly use from now on.
Offer user the option to get updates over network
If user selects to get updates, download updated xml/jason file over network, parse and update your permanent store
Use SQLite. You could easily create a sqlite database editor, or use some of the free ones out there. The iPhone can read a sqlite database natively, just include the library.

Calling cards iPhone application

I am newbie to iPhone development, I want to do a kind of POC which fulfill the following requirement.
It will be basically a calling card application where user will enter a toll free number followed by pin number. After entering a pin no. it will show the available contacts from the iPhone itself, user will select a desired destination number and call it.
I know this is a whole new native application, but can anyone guide me how I can start working on the same. I have collected a few information about what calling card is and how it works. I'm a bit confused about how can I get the information from calling cards service provider?. Do i need to call there API and how to do a code in the XCODE tool?
Please help me in this regard.
A quick google of calling card api's shows that most card companies have them, but they also don't publish them. Looks like you'll have to talk directly with them and get api specs. It may cost you? I'm guessing the actual API won't be very complicated... a couple of HTTP requests and a little bit of response parsing. You might want to look into asi-http-request for building the requests, and you can probably do most of the response parsing with NSStrings or NSXMLParser if they use XML.