ios - I am getting hex value in string <0000000a>? How can i convert it into integer in objective-c? -


first have convert hex <> generates exception when trying convert integer

nsstring *steps =characteristic.value; int value2= [steps intvalue]; 

first have removce <>, convert hexadecimal string integer value.

nsstring *strval = [[nsstring alloc] initwithdata:characteristic.value encoding:nsutf8stringencoding]; int intvalue = strval.intvalue;


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -