處理Xcode 警告,處理xcode警告
除了代碼中我們手動加入的
#Waring 標示 所產生的警告,我們都應該重視。下面是一些警告的處理。
1,方法到期,或 使用新的api 替換方案
multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:
使用替代方案:
multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error:
http://cocoadocs.org/docsets/AFNetworking/2.1.0/Classes/AFHTTPRequestSerializer.html
2,storyboard 不支援的配置 警告
storyboard: warning: Unsupported Configuration: Plain Style unsupported in a Navigation Item
原因是你導覽列上的按鈕使用了不支援的 style see
修改 Plain 為Done fix waring .
http://stackoverflow.com/questions/10945859/plain-style-unsupported-in-a-navigation-item-warning-with-my-customized-bar-bu
3,
1)storyboard: warning: Unsupported Configuration: Scene is unreachable due to lack of entry points and does not have an identifier for runtime access via -instantiateViewControllerWithIdentifier:.
大意是為了在程式中動態訪問Scene,需要給其設定一個Storyboard ID,所以給出了警告,解決方案:設定一個Storyboard ID即可. (基本上sb鐘的所有VC都需要加,才可消除警告,這雷根據自己需求。但也可檢查出 sb裡面無用的VC,可以幹掉)。
http://blog.csdn.net/freedom2028/article/details/8589375
2)storyboard: warning: Unsupported Configuration: Prototype table cells must have reuse identifiers
必須給sb 裡德cell 添加重用標示。(這裡看需求。)
3)storyboard: warning: Unsupported Configuration: Segues initiated directly from view controllers must have an identifier for use with -[UIViewController performSegueWithIdentifier:sender:]
大意:segues 沒有設定標識,雖然有連線。這種一般都可以廢棄。
或 重新添加標示 結合代碼。。
http://stackoverflow.com/questions/24087250/segue-identifier-error
4) storyboard Frame for "Table View" will be different at run time.
不全的 約束導致。謹慎修改。可能是代碼中需要。
http://stackoverflow.com/questions/18739572/xcode-5-layout-errors-misplaced-view-frame-for-label-will-be-different-at-runt
5) storyboard: warning: Ambiguous Layout: Size and vertical position are ambiguous for "Add Address View".
同上 ,默林兩顆的 約束,解放方案同上。
4,storyboard: warning: Ambiguous Layout: Horizontal position is ambiguous for "Scroll View".
自動約束 位置不明確。
補全。
5,Images.xcassets
1), Images.xcassets/: warning: Missing Content: The file "credit_card_light.png" for the image set "credit_card_light" does not exist.
credit_card_light.png 不存在。
but, 明明存在。
show finder 。
文本編輯,Contents.json .對比其他正常的。
刪掉上面的
"filename" : "credit_card_light.png"
fix done.
2), Images.xcassets: An iPhone Retina (4-inch) launch image for iOS 7.0 and later is required.
暫沒有處理,解放方案 參考
http://stackoverflow.com/questions/19732975/adding-ios-7-version-of-iphone-4-inch-launch-image-to-project-breaks-launch-imag
6,Apple Mach-O Linker Warning
1)、Directory not found for option “ –L path”
嘗試項目(目標) - > 構建設定 - > search path
and clear it。
http://stackoverflow.com/questions/16644982/apple-mach-o-linker-warning-directory-not-found
2)、Apple Mach-O linker Warning: lgnoring file …
http://stackoverflow.com/questions/10535678/apple-mach-o-linker-warning
3), dsymutil warning (armv7) …… .o unable to open object file
DWARF with dSYM file
設定為 DWARF
fix done. 這種辦法會再 發布是報錯。**********************
原文轉寄至:http://www.cnblogs.com/tangbinblog/p/3945518.html