ios - Cannot implement Swift SSLCreateContext -


i new ios development, , trying implement ssl connection custom port.

i found code answer best/easiest implementation of secure connection on socket https://stackoverflow.com/a/30733961/2306428

however, getting these errors:

use of unresolved identifier 'ksslclientside' use of unresolved identifier 'ksslstreamtype' use of unresolved identifier 'ksslsessionoptionbreakonclientauth'

i have checked , running swift version 2.1.1, using ios 9.2 sdk , xcode 7.2. have tried adding import security has no effect.

what reason these constants not being found?

the line being tested here: https://github.com/ksred/bank-ios/blob/master/bank/tcpclient.swift#l209

please use identifiers declared in swift:

if let sslcontext = sslcreatecontext(kcfallocatordefault, sslprotocolside.clientside, sslconnectiontype.streamtype) {     sslsetiofuncs(sslcontext, sslreadcallback, sslwritecallback)     sslsetconnection(sslcontext, &socketfd)     sslsetsessionoption(sslcontext, sslsessionoption.breakonclientauth, true)     sslhandshake(sslcontext) } 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -