ios - Vcard does not import on android -


hi guys have been working on application in ios swift exports vcard can/should imported on iphone , android. iphone vcard works android vcard not import. used following code that. please have , let me know doing wrong.

func textbasedvcard()-> data?{  let imagestring = self.imagedata.base64encodedstring() var string = "begin:vcard\nversion:3.0\n" string += "n:\(self.name!);\nfn:\(self.name!)\norg:\(self.company!)\ntitle:\(self.title!)\ntel;type=work,voice:\(self.phone!)\nadr;type=work:;;\(self.address!)\nnote:\(self.notes!)\nitem1.url:\(self.web!)\nitem2.url:\(self.blog!)\nitem3.url:\(self.socialmedia1!)\nitem4.url:\(self.socialmedia2!)\nitem5.url:\(self.socialmedia3!)\nemail;type=pref,internet:\(self.email!)\nphoto;encoding=b;type=jpeg:\(imagestring)\nend:vcard" print(string) let utf8str = string.data(using: string.encoding.utf8) //utf8str?.base64encodedstringwithoptions(nsdata.base64encodingoptions(rawvalue: 0)) if let base64encoded = utf8str?.base64encodedstring(options: .init(rawvalue: 0)) {     return data(base64encoded: base64encoded)!  } return nil } 


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -