Referring to Ethereum source code to implement RLP coding in ObjC
The RLP rule is based on the source code of Ethereum.
import "RLP-iOS.h"
NSData *data = [DataUtil longToData:987654321123456789];
//NSData *data = [DataUtil intToData:123];
//NSData *data = [DataUtil stringToData:@"Hello World"];
NSData *element = [RLPUtil encodeElement:data];
NSData *list = [RLPUtil encodeList:@[element]];