Saving contact to sim card programmatically in iOS7 - ios

Can we save contact to sim card programmatically in iOS7. i Google it a lot but didn't find any topic.

You cant do that . AddressBook Api is for accessing (read/write) the contacts which stored in iPhone . There is no way to access the sim contacts at least by using the public APIs.
ref :
http://iphonedevsdk.com/forum/iphone-sdk-development/47463-get-contacts-from-sim-card.html

No way to do this,in both code and in physical device.
https://discussions.apple.com/message/22396506#22396506

There isn't a way to do this, at least a normal way that won't get your app rejected. Why do you want to do this? Contact lists on newer devices are never saved on sim cards anymore generally, and instead transferred using web services (such as iCloud and Google).

Not possible. The closest you will get to that is using the Address book framework.
https://developer.apple.com/library/ios/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/Introduction.html#//apple_ref/doc/uid/TP40007744

Related

How to find my own contact on iOS programmatically? [duplicate]

Am I correct that with a address book permission we should be able to pretty reliably get a users phone number if they have given address book permissions via the new "My Card" contact that seems to be automatically added to your addressbook when you download IOS9?
I always wanted to do a find friends but i did not want to force users to type/verify their number....this seems to be a solid work around for ios9 users.
I am currently dealing with the same issue but unfortunately it seems that this is not possible according to Apple.
"Presuming that you’re working on iOS, there’s no programmatic way to identify the ‘me’ card. If you need to know, ask the user."
source: https://forums.developer.apple.com/thread/37564

Using Multipeer Connectivity Framework and saving the nearby devices founded

I am new to Swift and is currently developing an Multipeer Connectivity app for a course project. The app also has an online log-in feature that stores each user information in Firebase(the backend support).
Once the app gets wifi connection, I want to have a 'friends list' feature in my app and add other app users to this list from the nearby devices found. So far, the only way I could think of is to associate the peerID with an existing app user from Firebase. However, according to the documentation, peerID seems to be associated with the device itself so if two different users used the same device to sign in, this approach can't really work. Is there a better way to achieve my goal?
In my opinion, it depends on what do you want to go with your application as well as how you develop it regarding your business. One of possibility is that one user as a point of time is just registered one device. So you can provide a simple login screen that users will enter their name then map it with device id and save to Firebase. The username is considered as user id as well. So if they try to sign in from another device, you will check whether or not it existed in the system. if existed, ask them that wish to register this device or not, then update your map (user id and device id) from Firebase.
From your friend list, it is still a list of the username of your friends,in which you can add any nearby devices found.

Get IMEI and serial number from SIM on iOS programatically

I need to get the IMEI number and serial number of the SIM card in iOS, i have done this in android using the telephonymanager, but how can i achieve this on iOS?
I need this value because I save it in a data base using a web service, each time a client attemp to log in, so it doesnt matter if the client changes celphone or not, the account will be the same because the SIM card will be the same one.
I have been searching on the web, and found a way with this:
NetworkController.m
But it seems like this class has been removed from the web. Another possible way to achieve my goal is to use:
UIDevice-IOKitExtensions.m
But no documentation is given. Any ideas?
Does apple accepts an app using private framework?
Apple does not allow the use of private framework / api. Also, getting the users IMEI number will cause Apple to reject the app.

Getting contacts who own an iDevice

Is there a way through addressbookUi framework to get only the contacts who own an iDevice? The check for example is done in the messages app for iMessage. But is this available for developers? Or is there another way to check for this? Thank you in advance..
You could check, for each address book record, if there is a phone number of type "iPhone" (represented by the constant kABPersonPhoneIPhoneLabel). There's really no way of knowing for sure which of the contacts "owns an iDevice" anyway, but if there is an iPhone number for them in the address book record, then there's a good chance of them using an iPhone. Of course, it's another story altogether how that information got in your address book, and whether it is reliable.
No there isn't... The SMS app would be checking with apples servers to see if the phone number is registered with iMessage or not.
This is not a publicly accessible API.
I guess you could hash then send the users number to your own remote database and then compare contact numbers in another users address book against your database to see if they are users of your app... It's not really what you asked to do but it's the closest solution I could think up

iOS access phone settings programmatically

is it possible to access the phone settings of an iOS Device programmatically? I'm currently building an app and there I will provide contact possibillities, for example a direct link for calling (you just push it and then the specific contact number is called).
But I only want to show that possibility, if the user isn't calling with an unknown number.
You can access the contacts stored in the phone using the Address Book framework. If you're unfamiliar with the framework, I suggest you take a look at this quick start tutorial.
EDIT It seems you wish to read the state of the Show My Caller ID system setting, however you cannot programmatically access the system settings.
Use ABAddressBook for getting contact details in your project...
see this

Resources