Xcode使用中的一些問題

 一、警告: Multiple build commands for output file /xxx

xcode中 有時候會報一個警告:
[WARN]Warning: Multiple build commands for output file /xxx

要解決這個問題很簡單:
1.選擇你的工程
2.選擇target
3.點擊 Build Phases
4.展開Copy Bundle Resources
5.刪除裏面的剛纔提示警告的文件,一般爲紅色的名字的文件

二、No value was provided for the parameter ‘appIdName’ when provisioning

Xcode 自動提交certificate requests的時候,需要尋找一個“Wildcard” 的app Id,如果你丟了這個(一般是自動創建的),那麼xcode的自動請求就會失敗。解決起來也很簡單。

1) “Revoke” any existing certificates you might have from within the developer portal(把所有的certificates都Revoke一下)

2) Create a new “App Id”; title it “Wildcard”; and enter only ” * ” (without any spaces or quotes) as the suffix.(創建一個名爲Wildcard的app id,suffix敲入*。關鍵步驟)

3) Try the automated certificate request from within Xcode again, and it should now work(在xcode上再來一次)。

三、如何關閉Xcode批量替換時的snapshot?

File->Project Settings, and then click on the ‘Snapshots’ tab: you want to uncheck the “Create snapshot of project before mass-editing operations” box.

四、inhouse賬號和adhoc賬號簽名重名會非常麻煩。

如果遇到這個問題建議inhouse包和adhoc的包在不同的機器上打。

五、警告:No previous prototype for function “xxx”。

1.方法上加修飾符static

2.或者Project-Info -> TARGETS ->Build Settings -> LLVM GCC4.2 – Warnings組 -> Missing Function Prototypes Yes->No

六、警告:Declaration of ‘struct sockaddr_in’ will not be visible outside of this function

Reachability.h中最前面添加頭文件:#import <netinet/in.h>

 

七 警告:Instance method '-renderInContext:' not found

解決辦法:

#import <QuartzCore/QuartzCore.h>

已經用到的標爲紅色

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章