Native Extension Tip // ld: framework not found …

Continuing our series of help tips with using ANE's a very common error you'll come across is the one shown below, a linker error:

ld: framework not found ...
Compilation failed while executing : ld64

The error is simply telling you that the native extension uses some functionality of the phone that is not found in the default SDK that AIR uses to compile against.

To resolve this issue you must add in the iOS SDK path into the build packaging options of the iOS platform. Firstly you'll need to acquire the iOS SDK by going to the Apple developer site and downloading xcode.

Then in FlashBuilder you can specify the path in the Apple iOS build packaging options, as below.

If you are using adt to compile (which you'll need to use if you are using Windows) you'll need to specify the platformsdk argument:

adt -package -target ipa-app-store -provisioning-profile ./myProfile.mobileprovision -storetype pkcs12 -keystore ./Certificates.p12 -storepass XXX myApp.ipa myApp-app.xml Main.swf -extdir ext/ -platformsdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/

Published by


One thought on “Native Extension Tip // ld: framework not found …”

  1. I just got that error but was able to solve it without linking to iOS sdk. Originally the app was using AIR SDK version 13 the same than the ANE but my client had only version 4.0 installed so I recompiled the ANE modifying name space on the “extension.xml” and “ios-platformoptions.xml”. Then when trying to run the app,(I did keep version 13 for it), the error raised. Compiling the ANE back to version 13 and the error is gone.

Leave a Reply

Your email address will not be published. Required fields are marked *