Question

I am writing a flex application that requires an ios native extension to use the dropbox core sdk. I have downloaded the framework, and added it to my project. The project builds successfully, and I can build an .ane file which i can then add into my flex application. However upon attempting to run the flex project, flashbuilder does not run, complaining that:

"Error occurred during packing the application:
ld: framework not found DropboxSDK
compilation failed while executing : ld64

I have found many similarly titled posts already, but none of their solutions work. Things I have done / ensured:

  1. DropboxSDK.framework is in the root of my project folder.
  2. DropboxSDK.framework has been dragged into the frameworks folder in xcode, with "copy items into destination folder", "create groups for any added folders" and "add to targets" all selected/ticked.
  3. Under Build Phases, Link Binary with Libraries I have got QuartzCore.framework, Foundation.framework, UIKit.framework, DropboxSDK.framework and Security.framework
  4. Under Build Settings, Framework Search Paths is set to the root of my project (where DropboxSDK.framework is placed).
  5. I have got #import <DropboxSDK/DropboxSDK.h> in my extension.h and in any files that reference dropbox functions.
  6. After building my xcode project, i place my libExtension.a in my flex ios/ build folder along with platformoptions.xml and library.swf.
  7. My iosplatformoptions.xml looks like this:

    <platform xmlns="http://ns.adobe.com/air/extension/3.7"> 
    <description>ExtensionName</description> 
    <copyright>2013</copyright> 
    <sdkVersion>5.0.0</sdkVersion> 
      <linkerOptions> 
        <option>-ios_version_min 5.0</option> 
        <option>-framework AddressBook</option> <!-- Used elsewhere in ane -->
        <option>-framework DropboxSDK</option>
        <option>-liconv</option> 
      </linkerOptions> 
    </platform>
    
  8. I've tried building the ane on both windows and mac.

I'm sure there must be an option or step that i've missed, but after several hours of searching I can't find it. I'm using xcode 5.0.2, flashbuilder 4.10 air 3.9. Any help appreciated!

Was it helpful?

Solution

Answering my own question to help others that may run into this problem.

After a lot of research I found that I needed to link adobe flashbuilder to the ios sdk.

Right-Click on your project in flashbuilder -> Properties -> Flex Build Packaging -> Apple iOS -> Native Extensions Tab. There is a text field for the location of the Apple iOS SDK. I found my sdk to at:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top