Xcode PCH檔案注意事項

2021-06-28 15:12:18 字數 818 閱讀 4719

1.在xcode6.1中 pch檔案需要手動新增

注意要關聯工程:在建立的時候選擇關聯工程、

右擊--new file --other --pch file

新建.pch檔案之後匯入需要的標頭檔案或者巨集定義可以加快編譯速度。

2.需要在building setting中設定prefix header的名稱:

$(srcroot)/工程名/pch檔名=====這個寫法可以使專案在不同的電腦上也不會報錯。

只是本機操作時可按如下操作:

1.make new file: ⌘cmd+n

2.ios/mac > other > pch file > projectname-prefix.pch.

3.project > build settings > search: "prefix header".

5.type in: projectname/projectname-prefix.pch

6.clean project: ⌘cmd+⇧shift+k

7.build project: ⌘cmd+b

如果找不到路徑,設定prefix 屬性為yes;

3.如果不能使用預編譯巨集,檢查在建立pch的時候是否勾選工程專案

json檔案注意事項

在寫入json檔案時,一般檔案內容將會出現是二進位制,文字不顯示,解決方法 在json轉換時.import json import codecs 使用這個模組開啟檔案解決大多數的編碼問題 self file codecs.open article.json w encoding utf 8 開啟檔案...

flex air 寫檔案注意事項

air中.儲存檔案我們般會像下面這樣操作 這樣就會生成乙個安裝目錄下的ini.xml檔案的file物件.可是值得注意的是.當這樣獲取file物件再進行操作時.會有安全問題 儲存 執行後會出現 securityerror filewriteresource at runtime securityman...

PHP上傳檔案注意事項

1 需配置 php.ini 1 file uploads on,通過http post方式上傳檔案 2 upload tmp dir 來配置上傳檔案的臨時目錄 3 upload max filesize 2m,上傳檔案的最大值,預設值2m 4 max file uploads 20,一次最多上傳多少...