I am trying to attach a .vcf file to the MFMessageComposeViewController as a share contact feature in my app.
I referred this link and it is said that there is no possibility to send a contact info through message composer. I also tried setting the encoded string to the message body as suggested in this link, which also didn't work. I don't know how it is implemented in the default message app as in the below image.
Can anyone suggest me how to implement this share contact option as in the default Contacts app of the iPhone? Any timely help is much more appreciated.
Adding attachment feature is added in iOS7 with the MFMessageComposeViewController class.
The method – addAttachmentData:typeIdentifier:filename: gives the answer where typeIdentifier can be set as kUTTypeVCard.
Related
I'm working on an IM application using XMPPFramework. When I want to add a friend, I send a presence stanza, and the friend would be automatically added to XMPPRoster before&whether the other side accepts or rejects. I don't know why. Does any one know? Thanks in advance.
The stanza is like this:
<presence to='juliet#example.com' type='subscribe'/>
After reading the source code and other material. I found that the roster here does not exactly mean what it is in Wechat (a Chinese IM app) or MSN. So those who in your roster does not need to be your friends but the ones who you want to subscribe.
In an iOS app written with Xamarin, I would like to send a mail and retrieve the sent mail - with any modifications and attachements done to it by the user.
I have implemented the funtion with the MFMailComposeViewController and in the Finished-handler I get the MFComposeResultEventArgs, but I can't see if/where I can get a hold of the actual mail message.
In the back of my mind I think I've heard that one must override the MFMailComposeViewController to accomplish this, but I can't google/bing this.
Is there anyone out there who knows how to do this?
Put simple: You don't. Apple in keeping this information from you by purpose, they are taking the user's privacy quite serious.
If you need to keep track of this kind of information, do not use email but instead maybe a form to send data to your server.
Is there any process to set the image on Apple watch notification.?
I have tried adding in the image assets but did not find any clue.
I've noticed that there really is a possibility to embed additional image in notification payload which is displayed by Watch (but not iPhone/iPad).
Somehow Pushover guys managed to do this.
But I don't know how they did it.
If I would get to know this I will post in answer edit.
Maybe you could ask them? (and post your conclusions here)
In order to display an image from a payload (via a URL, I assume) in a notification, you'll need to create a subclass of WKUserNotificationInterfaceController, which Apple provides as a way to display dynamic notifications.
Although originally written for Swift 1.2, the tutorial at this link can show you how this can be done:
http://www.brianjcoleman.com/tutorial-building-a-apple-watch-notification/
I'm trying to work around the iPhone not having an API in order to send an MMS. I do not want to send a text message from inside the app, I am looking to have it be able to send a text message with an image attached to a certain contact.
I am not very familiar with native iPhone apps so I was going to build the app using PhoneGap and create custom plugins for sending the text message.
The user would find an image/video or something they would want to view on the app, click send to a contact and then normal text message app on the iPhone would pop up with the image already inserted to the body of the message.
Would I be able to write my own plugin for PhoneGap in order to do this operation? If so, what are some good resources to go about learning how to do this?
Thanks, I know this is more of a cry for help on how to do this but after a bunch of research, I can't quite find what I'm exactly looking for.
I have no idea about PhoneGap tbh but I guess where you will fail is this:
Apple did not want you to put photos in the sms app. How do you think you are going to go around this? The only thing I can think of is uploading the image you want to attach to some service like Dropbox and then paste a download link into the sms app.
do anybody know about how to read a SMS in iOS with Xamarin iOS ? and then I want to pass a string from that SMS to the application via link. For example when user click the link in the SMS it will pass a string value to the application and in the application a method is waiting to trigger that.
It's impossible to read incoming or storing SMS's due to iOS security restriction.
Although you can't directly intercept SMS messages, you can create a custom URL scheme so that if a user clicks a link in your message it will launch your app.
If Jason's answer of using a link to the app, there is an alternative. In my case a web service is sending down a code (two stage auth). When I know its going to be coming, I prompt the user to looks for it, and when it comes long press the message bubble, and copy the whole message to the pasteboard.
When the user switches back to my app, I've set a flag to look at the pasteboard, I see the message, extract out the code, and if it "works" the user can continue without further interruption.
Not as elegant as Jason's answer, but if you cannot control the sms content, its an option.
It is possible from iOS 12
textField.textContentType = .oneTimeCode
Please check this doc