Question

I am currently trying to incorporate an .ane into my iOS application. The .ane is provided by a 3rd party and I do not have source for it.

I have linked the accompanying .swc into my project (external linkage as recommended by both Adobe and the 3rd party) and built the .swf successfully. My problem begins when using adt to build an .ipa for deployment. Below is the mocked up adt command I am using. You can assume that all <>'d things are filled out correctly as I have exhaustively checked them all, and the build runs for quite a while. There may be some sweet nuggets of goodness I'm missing though...

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>

Everything marches along pretty well until I receive the following error, and we come to a screeching halt:

ld: library not found for -lsqlite3

What this tells me is that the 3rd party .ane is, either by specifying through a -platformoptions xml file or otherwise, trying to link against the sqlite3 library, and at the point in the adt process that the underlying Xcode project is to be built, that library can't be found.

My setup is as follows:
Mac OSX Lion
Adobe Flash Builder 4.5 w/PHP
Xcode 4.4.1 Flex 4.6.0 (AIR 3.3) SDK

Now, sqlite3 is sitting in /usr/lib so I know it's there, and really it could be any library. Since this is a command line AIR utility I don't have access to the underlying Xcode project (as far as I know) to just tell it where the library is, so I'm kind of stuck and out of ideas for the moment.

I should probably also note that I am not experiencing this issue with any other (home grown or otherwise) extensions, but that is most likely because they have few if any dependencies.

Thanks!

Was it helpful?

Solution

Okay so this ended up being an issue with my set up I think. By pointing the adt command to the version of the iOS SDK I was using explicitly, the issue has been resolved. This is what I think happened:

  • I downloaded Flex 4.6.0AIR3.3 a few days ago and installed it. Adobe says it comes with a version of the iOS baked in (but I can't find it) so I assume it uses the ones in /Developer/Platforms/iPhoneIS.platform per Snow Leopard and Xcode 3.

  • I then upgrade to Lion so I can then upgrade to Xcode 4 so that I can then build iOS 5 stuff. Xcode 4 is installed from the App Store now so I first fully remove Xcode and then re-install it from App Store.

  • Xcode 4 puts the SDKS in its Application bundle rather than back in /Developer/Platforms. Potentially "pulling the rug out from under" Adobe?

Anyway it's settled, just had to realize that the SDKs were "gone"...oh and realize that sqlite3.a was not what the linker was looking for but rather libsqlte3.dylib.

Here is the modfied adt command, note the presence of the -platformsdk switch:

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>

:)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top