2016-10-18 3 views
0

Frameworks screenshotMailCore/bibliothèque MailCore2 non chargée - Echec compatibilité IPv6 - Swift

Error notes screenshot

Mon application utilise SMTP via le cadre MailCore pour envoyer des informations à un compte gmail. Il a été rejeté en raison d'une incompatibilité avec IPv6. Dans les notes de crash d'Apple, il indique "Impossible de charger la bibliothèque MailCore". Github déclare que le framework MailCore2 est déjà compatible avec IPv6, donc je ne suis pas sûr du problème.

J'ai resoumis après avoir ajouté MailCore.framework dans la section "Embedded Binaries" mais je ne suis pas sûr que cela va résoudre ce problème.

J'ai joint des captures d'écran pour aider à clarifier. Merci pour toute aide!

code:

 let smtpSession = MCOSMTPSession() 
     smtpSession.hostname = "smtp.gmail.com" 
     smtpSession.username = "sampleUsername" 
     smtpSession.password = "samplePassword" 
     smtpSession.port = 465 
     smtpSession.authType = MCOAuthType.saslPlain 
     smtpSession.connectionType = MCOConnectionType.TLS 
     smtpSession.connectionLogger = {(connectionID, type, data) in 
      if data != nil { 
       if let string = NSString(data: data!, encoding: String.Encoding.utf8.rawValue){ 
        NSLog("Connectionlogger: \(string)") 
+1

Cela n'a rien à voir avec IPv6. Cela semble être une erreur de construction où une bibliothèque/cadre n'a pas été inclus correctement. –

Répondre

0

Cela devrait fonctionner. J'ai aussi créé une vidéo pour aider quelqu'un d'autre à l'avenir: https://www.youtube.com/watch?v=NkpLqNN8xtU

let smtpSession = MCOSMTPSession() 
     smtpSession.hostname = "smtp.gmail.com" 
     smtpSession.username = "[email protected]" 
     smtpSession.password = "fakepassword1234" 
     smtpSession.port = 465 
     smtpSession.authType = MCOAuthType.saslPlain 
     smtpSession.connectionType = MCOConnectionType.TLS 
     smtpSession.connectionLogger = {(connectionID, type, data) in 
      if data != nil { 
       if let string = NSString(data: data!, encoding: String.Encoding.utf8.rawValue){ 
        NSLog("Connectionlogger: \(string)") 
       } 
      } 
     }