ios - cannot invoke initializer for Unmanaged<AnyObject>? with no arguments in swift -
what want convert rsa
sec
key base64
encoded string swift. initialized
variable below,
var publickeybits = unmanaged<anyobject>?()
then gives
cannot invoke initializer unmanaged? no arguments in swift
i want covert publickey
below
var publickeybits = unmanaged<anyobject>?() secitemcopymatching(queryattrs, &publickeybits) let opaquebits = publickeybits?.toopaque() let publickeydata = unmanaged<nsdata>.fromopaque(opaquebits).takeunretainedvalue() let publickeybase64 = publickeydata.base64encodeddata(nsdatabase64encodingoptions.encoding64characterlinelength)
error. idea of this.
you need check initialization of unmanaged class, there might initialization parameters.
var publickeybits = unmanaged<anyobject>("mykey")
wiki
Comments
Post a Comment