Warning because you are better off using @ "" to initialize the string. For instance:
NSString *s1 = @"s1"; NSString *s3 = [[NSString alloc] initWithString:@"s1"];
we can print their address:
2017-02-08 11:38:46.997201 Test[7484:2245410] s1:0x10009c088 s1 2017-02-08 11:38:46.997290 Test[7484:2245410] s3:0x10009c088 s1
we may find that they indicate the same address. So, the apple recommends using "@" "instead of" initWithString ".
source share