[titanium]更新到xcode4.3.1(IOS 5.1)後的錯誤

LINEで送る
[`evernote` not found]

ipad3已經發表了!siri小姐都已經會說日文了!想說既然之前有碰到ios5跟ios4很微妙的bug,不如就來更新一下SDK當做慶祝吧!!!

更新xcode一點也不難,到Apple Developer中下載安裝就好了!
只是再打開titanium,重新用SDK5.1想要發佈時,卻是下面的error!!!!

Traceback (most recent call last):
File “/Library/Application Support/Titanium/mobilesdk/osx/1.8.1/iphone/builder.py”, line 1537, in main(sys.argv)
File “/Library/Application Support/Titanium/mobilesdk/osx/1.8.1/iphone/builder.py”, line 702, in main iphone_version = check_iphone_sdk(iphone_version)
File “/Library/Application Support/Titanium/mobilesdk/osx/1.8.1/iphone/builder.py”, line 66, in check_iphone_sdk return sorted(found,version_sort)[0] IndexError: list index out of range


查了很多資料,好像是目前titanium只支援到Xcode 4.2?????
總之得先想辦法把sdk變回4.3再說。(我覺得自己好給洨@@)
但是重新安裝一次Xcode 4.2也沒有用。好不容易在Xcode中發現可以下載舊版的sdk的地方:

再度回到titanium中,發現可愛的sdk 4.3也回家了!只是問題依然沒有解決。於是乎又再度回到google大海中,但是卻依然沒有找到有用的那根針….
就在正要絕望之際,在titanium的設定中發現一行提示!!然後我打開Terminal,依照提示輸入:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

終於可以順利發佈到iphone上了!!!
以結果來推斷,就是xcode的路徑改變了,所以找不到它!

很歡喜的想再來看一下在模擬器上的樣子,卻遇到另一個問題!模擬器起動不了!!這下也是遭一個大糕!!!

Library not loaded: @rpath/DevToolsFoundation.framework/Versions/A/DevToolsFoundation
Referenced from: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient
Reason: image not found

總不可能在debug的時候都發佈到iphone上吧!?光等它跑完的時間我都可以去環遊世界了!依照剛剛的經驗,應該也是路徑跑掉的問題。只是要設到哪邊是對的???我又跳入海中了……

最後依照這篇「一針見血」的方式:

sudo ln -s /Applications/Xcode.app/Contents/Developer/ /Developer
 
sudo ln -s /Applications/Xcode.app/Contents/OtherFrameworks/DevToolsCore.framework /Developer/Library/PrivateFrameworks/
sudo ln -s /Applications/Xcode.app/Contents/OtherFrameworks/DevToolsCParsing.framework /Developer/Library/PrivateFrameworks/
sudo ln -s /Applications/Xcode.app/Contents/OtherFrameworks/DevToolsFoundation.framework /Developer/Library/PrivateFrameworks/
sudo ln -s /Applications/Xcode.app/Contents/OtherFrameworks/DevToolsInterface.framework /Developer/Library/PrivateFrameworks/
sudo ln -s /Applications/Xcode.app/Contents/OtherFrameworks/DevToolsKit.framework /Developer/Library/PrivateFrameworks/
sudo ln -s /Applications/Xcode.app/Contents/OtherFrameworks/DevToolsRemoteClient.framework /Developer/Library/PrivateFrameworks/
sudo ln -s /Applications/Xcode.app/Contents/OtherFrameworks/DevToolsSupport.framework /Developer/Library/PrivateFrameworks/

才順利啟動…..

這整件事情燒掉了將近要7個小時….還好最後是可以在ios5的模擬器中測試app了。而且隨機附贈ios5.0跟ios4.3的模擬器,也算是有收獲啦!只是這種路徑跑掉的問題不是應該在安裝的時候就幫我們設好嗎?總之,希望這篇文章可以幫助到其他正在苦海之中沈淪的夥伴們嚕…..

6 則迴響於《[titanium]更新到xcode4.3.1(IOS 5.1)後的錯誤

  1. 聽說現在Xcode 4.2的不能上傳Store了,是這樣子的嗎? 如果是那Titanium+xcode 4.3還是沒解…

    • Xcode 4.2的不能上傳Store了嗎?我不知道耶~我的已經換成4.3了@@
      如果不行的話,可適用Application Loader試試看阿!

      不過Titanium+xcode 4.3是可以跑的…..

  2. 你好,我按照你的方法尝试了,但是依然是无法识别ios的sdk。sdk的目录所在地在什么地方啊。谢谢

    • 如過你想知道sdk在哪的話
      應該是在
      /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/

      不過,這應該是安裝完xCode後會自動指定好。所以我不太懂,無法識別ios的sdk是什麼意思?

回應已關閉。