问题
How is it possible to get a base64 string from an NSData
instance?
回答1:
please try to search before posting questions I already post a answer for this here - Verifying a Receipt with the App Store - try this function there.
回答2:
(if you targeting on IOS 7 ...) There is an easy way using provided API: https://stackoverflow.com/a/19088341/2481444
I also tested the accepted code. They both generate the same result.
It also has decoding function. @S.J
回答3:
NSString* base64String = [nsdata base64Encoding];
来源:https://stackoverflow.com/questions/6006823/creating-a-base-64-string-from-nsdata