3

I'm having trouble building an ANE for use with an iOS app. I've been able to create a basic ANE that logs a string. However, it's when I try to package frameworks (specifically the Firebase core frameworks) with it that I'm running into trouble.

I have successfully built the iOS static library (.a file), making sure that the frameworks are linked. And successfully compiled the ActionScript side of the extension (both the iOS and default implementations).

What's frustrating is that I've even managed to successfully package a .ane file. However when I include it in the build for my app in Adobe Animate/Flash, I get a seemingly useless error message when publishing the ipa:

"Adobe Animate Invalid Input"

It seems as though there's something wrong with the way I'm packaging the frameworks, as removing them from the ane causes the app to publish without issue.

The iOS platform.xml file I'm using has the content:

<?xml version="1.0" encoding="utf-8" ?>
<platform xmlns="http://ns.adobe.com/air/extension/3.5">
    <sdkVersion>9.3.0</sdkVersion>
    <linkerOptions>
        <option>-ios_version_min 7.0</option>
        <option>-rpath @executable_path/Frameworks</option>
    </linkerOptions>
    <packagedDependencies>
        <packagedDependency>Frameworks/FirebaseAnalytics.framework</packagedDependency>
        <packagedDependency>Frameworks/FirebaseInstanceID.framework</packagedDependency>
        <packagedDependency>Frameworks/GoogleInterchangeUtilities.framework</packagedDependency>
        <packagedDependency>Frameworks/GoogleSymbolUtilities.framework</packagedDependency>
        <packagedDependency>Frameworks/GoogleUtilities.framework</packagedDependency>
    </packagedDependencies>
</platform>

My folder structure for packaging the ane is:

- extension.xml
- platform.xml
- Extension.swc
+ default
  - library.swf
+ ios
  - library.swf
  - libExtension.a
+ Frameworks
  - FirebaseAnalytics.framework
  - FirebaseInstanceID.framework
  - GoogleInterchangeUtilities.framework
  - GoogleSymbolUtilities.framework
  - GoogleUtilities.framework

And the command I'm using to create the ane is (new lines added for readability):

$ adt -package -target ane Extension.ane extension.xml -swc Extension.swc 
  -platform iPhone-ARM -platformoptions platform.xml 
  Frameworks/FirebaseAnalytics.framework 
  Frameworks/FirebaseInstanceID.framework 
  Frameworks/GoogleInterchangeUtilities.framework 
  Frameworks/GoogleSymbolUtilities.framework 
  Frameworks/GoogleUtilities.framework 
  -C ios/ . -platform default -C default/ .

Can anyone see anything I'm doing wrong here? Adobe's tutorials and documentation is pretty poor on packaging third party dependencies and I've haven't been able to find any clear examples on how to do this.

I've tried using Flex sdk versions 4.6.0 (comes with Flash Builder 4.7) and 4.15.0 (downloaded directly from the Apache site). Using Air sdk version 22.0.0.153.

2 Answers2

1

You need to change the way you are looking at embedding .framework files on iOS. Instead of trying to embed them inside your .ane file using platform dependencies, you can copy them inside the "yourAirSDK\lib\aot\stub" folder. The good thing about this alternative solution is that your .ane file size won't get too large.

We have already built the Firebase ANE and if you wish, you can find more guidlines here on our wiki https://github.com/myflashlab/Firebase-ANE/wiki/A.3.-Add-the-SDK feel free to get inspired by the information you may find on the wiki pages.

Hadi tavakoli
  • 1,267
  • 2
  • 16
  • 30
0

download admob.ane from https://github.com/monumentichb/Firebase-Admob-ANE then add it to flex project. call function with as3. not need oc at all.