標籤:
錯誤提示:fatal error: file ‘/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIWebView.h‘ has been modified since the precompiled header ‘/Users/Rain/Library/Developer/Xcode/DerivedData/ModuleCache/VAU3ZWN6T3KV/UIKit-2M4VYLEDI34V0.pcm‘ was built
note: please rebuild precompiled header ‘/Users/Rain/Library/Developer/Xcode/DerivedData/ModuleCache/VAU3ZWN6T3KV/UIKit-2M4VYLEDI34V0.pcm‘
1 error generated.
解決辦法:刪除以上標記的’/Users/imac/Library/Developer/Xcode/DerivedData/ModuleCache/1M29HZNHW3I5B/UIKit-2M4VYLEDI34V0.pcm檔案。
刪除之後好有可能出現fatal error: could not build module ‘UIKit’錯誤提示, 辦法是刪除/Users/imac/Library/Developer/Xcode/DerivedData/ModuleCache檔案夾,重新編譯、運行方可。
注意:imac下的Library(資產庫)一般都隱藏啦,進入終端,輸入chflags nohidden ~/Library/就可以了。
錯誤提示:Failed to instantiate the default view controller for UIMainStoryboardFile ‘Main‘ - perhaps the designated entry point is not set?
原因分析:在StoryBoard中沒有一個view controller設定了Initial Scene。
解決方案:在Storyboard中,選擇一個view conroller作為story board的第一啟動介面。如果導航控制器是初始介面,那應該把導航控制器設為初始啟動介面,而不是登入介面。
錯誤提示:target specifies product type ‘com.Apple.product-type.bundle.ui-testing‘, but there‘s no such product type for the ‘iPhonesimulator‘ platform!
解決方案:http://www.07net01.com/2015/09/930192.html
錯誤提示:ld: library not found for -lPods-AFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)
解決方案:下載的開源APP使用了使用了CocoaPods,要使用workspace開啟,而不是直接開啟xcodeproj檔案。
錯誤提示:diff: /../Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run ‘pod install‘ or update your CocoaPods installation.
解決辦法:1.安裝CocoaPods;2.用pod install命令匯入項目依賴架構;3.開啟xcworkspace檔案(不要用xcproj檔案開啟)
安裝依賴架構需要定位到項目所在目錄“cd /Users/Rain/Documents/開源/開源APP/GreatReader-master”再執行“pod install”命令(這個命令會運行項目裡包含的Podfile檔案)
錯誤提示:Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`
解決辦法:sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer,後面的地址可以開啟Xcode顯示包內容,找到那個檔案夾拖到終端裡。
iOS開發錯誤記錄檔