2012-08-16 67 views
1

我目前正試圖將.ane添加到我的iOS應用程序中。 .ane由第三方提供,我沒有它的來源。AIR:第三方iOS本機擴展的鏈接器錯誤

我已將相應的.swc鏈接到我的項目(external linkage as recommended by both Adobe and the 3rd party)中,併成功構建了.swf。使用adt構建.ipa進行部署時,我的問題就開始了。下面是我正在使用的模擬adt命令。你可以假設所有的東西都被正確地填寫了,因爲我詳盡地檢查了它們,並且構建運行了很長一段時間。有可能是上帝,我很想念雖然有些甜掘金...

adt -package -target ipa-ad-hoc -provisioning-profile <the-file> -storetype <the-store-type> -storepass <the-password> -keystore <the-certificate> ./../myapp.ipa MyApp-app.xml MyApp.swf -extdir <path-to-ane-files> 

一切遊行沿着相當不錯,直到我收到以下錯誤,我們來個急剎車:

ld: library not found for -lsqlite3 

這告訴我的是,第三方.ane是either by specifying through a -platformoptions xml file或其他,試圖鏈接到sqlite3庫,並在adt過程中的基礎Xcode項目將建立,該庫無法找到。

我的設置如下:
的Mac OSX獅子
的Adobe Flash Builder 4.5中瓦特/ PHP
的Xcode 4.4.1 的Flex 4.6.0(AIR 3.3)SDK

現在,sqlite3的是坐在/ usr/lib,所以我知道它在那裏,真的可以是任何庫。由於這是一個命令行AIR實用程序,因此我無法訪問底層的Xcode項目(據我所知)to just tell it where the library is,所以我現在很困惑並且沒有想法。

我也許應該注意到,我沒有遇到任何其他(本地或其他)擴展的這個問題,但這很可能是因爲它們幾乎沒有任何依賴關係。

謝謝!

回答

1

好吧,所以這最終成爲我的設置問題,我想。 By pointing the adt command to the version of the iOS SDK I was using explicitly,問題已解決。這是我認爲發生的事情:

  • 我幾天前下載了Flex 4.6.0AIR3.3並安裝了它。 Adobe說,它附帶了一個iOS版本(但我找不到它),所以我假設它使用/Developer/Platforms/iPhoneIS.platform中的每個Snow Leopard和Xcode 3的版本。

  • I然後升級到Lion,然後我可以升級到Xcode 4,以便我可以構建iOS 5的東西。 Xcode 4現在從App Store安裝,因此我首先fully remove Xcode,然後從App Store重新安裝它。

  • Xcode 4將SDKS放入其應用程序包中,而不是放回/ Developer/Platforms中。可能「從地下拉出地毯」Adobe?

反正它的解決,只是要認識到,其SDK也「水漲船高」 ......哦,意識到sqlite3.a沒有什麼連接器一直在尋找,而是libsqlte3.dylib。

這裏是modfied ADT命令,請注意-platformsdk開關的存在:

adt -package -target ipa-ad-hoc -provisioning-profile <the-file> -storetype <the-store-type> -storepass <the-password> -keystore <the-certificate> ./../myapp.ipa MyApp-app.xml -plaformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/<version> MyApp.swf -extdir <path-to-ane-files> 

:)