Convert NSInlineData to Nstring in ios -



Convert NSInlineData to Nstring in ios -

i trying substring parent string. parent string mac address of device available in dictionary. when seek convert it si giving me error below "[_nsinlinedata substringfromindex:]: unrecognized selector sent instance".

i want remove of chars parent string (here mac address "<0001ui3 234563>" ) , "ui3 234563".

// nsdictionary. advertisementdata = { kcbadvdataisconnectable = 1; kcbadvdatalocalname = "test123"; kcbadvdatamanufacturerdata = <00029r21 6y051rt2>; kcbadvdataserviceuuids = ( fff0 ); kcbadvdatatxpowerlevel = 0; } // want 9r216y051rt kcbadvdatamanufacturerdata; nsstring *str2; str2=[advertisementdata objectforkey:@"kcbadvdatamanufacturerdata"]; nsstring *str3; str3=[str2 substringfromindex:5]; // here not required 12 character string str2 string. nsinlinedata error nsstring method.

thanks,

sounds have nsdata object, , you're trying utilize nsstring method access it. can convert nsdata object using callinitwithdata: encoding: apply substringfromindex phone call new nsstring.

ios

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -