how do i create a contact in iphone SDK? - iphone

I want to duplicate the functionality you see when you tap and hold a phone # in an email. You see a menu pop up and 2 of the options are "Create new contact" & "Add to existing contact". After selecting a contact, you then have a contact with the phone number displayed and can further edit the contact in the contact edit page. Try tapping and holding a phone # to see what I'm getting at.
Anyway, I'm not sure how to do this. I can create a contact via the SDK, but not sure how to display the contact edit screen pre-populated with the phone number.
thanks

I'd start with the section of the Address Book Programming Guide on the view controllers furnished by the system. Beyond that, perhaps you could post the code you're having trouble with?

Related

Open mail application and insert content with image after user click on button

I have an question.
I am trying to implement solution on Magento 2 headless where customer is able to click on "Email" button - then email app is open and specific content is automatically inserted. Customer should only put specific email to it.
If there is any possibillity to implement this?
This is connected with sharing content via friends.
I read that there is no possibillity for that - only text can be put there.
What about images? Is there really no way to do it?

Concrete5 store won't allow me to input credit card details

I am setting up a site in Concrete5. I have installed the Community Marketplace and the Square integration. From there I added a product which allows people to buy a level of membership, giving them access to certain pages.
When I go through to test it, I am permitted to put in my address and phone number, but when i comes to inputting the credit card details I don't get any input boxes, just the form labels which change the mouse pointer to a finger icon. Clicking the labels does nothing.
Does anyone know why it would be doing this?

is there an API call that gives you an iPhone user's "My Info" contact DB record?

So in the latest iOS (not sure about prior) there is a "My Info" setting that let's the user pick a ContactDB record on his device that is "his".
Is there an API call to get this value? I can query the user's entire ContactDB, but figuring out which contact DB is his isn't trivial.
There’s no public API that I know of to retrieve the user’s “me” card. Your best option is probably to present an ABPeoplePickerNavigationController asking the user to select it.
Also, I believe Bump had a setup step that asked for your contact info, and the moment you gave it your phone number (or email?) it looked up the contact card with the matching info and autofilled the rest of the form. A bit of a workaround, but it did the trick.

iPhone: How to disable editing when MFMessageComposeViewController shows up

Is it possible to prevent editing when MFMessageComposeViewController shows up?
'Cause I want the body of SMS can't be changed by user and I think it's still legal.
Please help!
No the user has final say when using the MFMessageComposeView.
Your app is also prohibited from changing the content/recipient/body of the email when the
view slides up.
If you could do this it would be easy to paste in a different recipient, sniff the content provided by the user etc. etc. (especially in the Message App, you could swap the phone number and do terrible things.).
I guess this is the logic behind, you get to pre-populate the message, but the user decides from there on and until "Cancel" or "Send".
You should probably build a web service where you have control over the data
when it hits the server and make an interface for that on the phone.

How do I get a user's email address (with permission) on iPhone?

Typing on iPhone is tedious; I'd like to prompt my users for their email address without requiring them to actually type it.
Ideally they'd receive a dialog saying: "This app would like to use your email address. Don't Allow / Allow"
If the user tapped "Allow," it would auto-fill their email address (the one they have configured in Mail.app) in a text field.
Is this possible?
Nope. But you can load up the contact picker interface and ask the user to select themselves from it-- that's much more friendly than making them type it in.
More info here:
http://developer.apple.com/iphone/library/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/200-QuickStart/QuickStart.html
Yes it is possible, have a look at ABGetMe for iOS. Note that you would have to write the allow/don’t allow dialog yourself. Also, make sure to read and understand the Limitations section of the README.