objective c - How to solve this error 'BIO_new' is deprecated in cocoa? -
i new macintosh development. have nsdata+connection.m file. file have more deprecated function bio_new
, bio_write
, bio_get_mem_data
etc. functions encounter deprecated errors.
- (nsstring *)base64encoding { bio * mem = bio_new(bio_s_mem()); bio * b64 = bio_new(bio_f_base64()); bio_set_flags(b64, bio_flags_base64_no_nl); mem = bio_push(b64, mem); bio_write(mem, [self bytes], [self length]); bio_flush(mem); char * base64pointer; long base64length = bio_get_mem_data(mem, &base64pointer); nsstring * base64string = [nsstring stringwithcstring:base64pointer length:base64length]; bio_free_all(mem); return base64string; }
please me.
what apple has deprecated using their openssl headers , their openssl dynamic library. reason openssl's interface changes in incompatible ways across minor revisions, it's hard keep date bugfixes , security updates without breaking client code.
what can (and have done in past) grab openssl yourself, use functions version , bundle application.
Comments
Post a Comment