Send location information or vCard through SMS on iPhone

后端 未结 3 675
南旧
南旧 2021-01-16 07:20

I can send a location by embedding the person\'s location in a VCF through an email by including it as an attachment. I do not know how to do the same through SMS. Is it s

3条回答
  •  终归单人心
    2021-01-16 08:07

    You may paste the contents of the vcf file into the sms... This is how the old phones solve this problem. Deniz is right, there is no way to send MMS from the application, so, you should use the old way to send a vcf file.


    So the possibilities (I know only one possibility).
    Read the contents of file to a string with this method:

    - (id)initWithContentsOfFile:(NSString *)path usedEncoding:(NSStringEncoding *)enc error:(NSError **)error
    

    Then you can set the body of an MFMessageComposeViewController.
    I hop this is clear.

提交回复
热议问题