JSONKIT : format specifies type 'unsigned long' but the argument has type 'nsuinteger' (aka 'unsigned int')


Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()

object->isa 替換為 object_getClass(object) 10處左右
keyObject->isa 替換為 object_getClass(keyObject) 一處
(id)keys[idx]->isa 替換為 object_getClass((id)keys[idx]) 一處

format specifies type 'unsigned long' but the argument has type 'nsuinteger' (aka 'unsigned int')

給變量增加(unsigned long)進行類型轉換

//// 原來的,但是警告:Using 'stringWithString:' with a literal is redundant
////[self appendUTF8Body:body dataString:[NSString stringWithString:@"Content-Type: image/png\r\nContent-Transfer-Encoding: binary\r\n\r\n"]];

             
//解決:
NSString *string = @"Content-Type: image/png\r\nContent-Transfer-Encoding: binary\r\n\r\n";
[self appendUTF8Body:body dataString:string];

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM