swift - iOS Deprecated dataWithContentsOfMappedFile replacement -
this line of code:
let pkcs12data = nsdata.datawithcontentsofmappedfile(path!) is showing warning in xcode 7:
'datawithcontentsofmappedfile' deprecated in ios 8.0: use +datawithcontentsofurl:options:error: , nsdatareadingmappedifsafe or nsdatareadingmappedalways instead. but when try of suggested, can't find methods responding suggested. idea?
thanks...
should used init method:
let pkcs12data = nsdata(contentsofurl: url, options: options, error: &error) if using swift 2.x should wrap try-statement.
Comments
Post a Comment