Highlighted

ANE with iOS dynamic .framework

New Here ,
Nov 10, 2016

Copy link to clipboard

Copied

I'm building an ANE for NokiaHere maps for iOS. What they offer in their SDK is NMAKit.framework library which is a dynamic library. I wrote my own xCode project which implements all the stuff needed for ANE, I've built it as a static library (libHereMapsANEiOS.a). I integrated it with ANE project and I've successfully built the required .ane file. So far so good

I've made a test AIR mobile app in Intelli J, I use Flex SDK 4.6, and when I try to build .ipa and run it on the device I get the following error:

AIRScreenshot.png

I have xCode 8.0 installed.

I suspect this has something to do with the fact that NMAKit.framework is a dynamic framework since I had similar issues when I was developing ANE for MapBox. I was successful to use it in an app when I switched to static .framework library, but unfortunately HereMaps don't have one available on their SDK download pages. I read somewhere that AIR does not support dynamic 3rd party libraries in their adt tool? Is that true, if so, are there any workarounds for this.

Thanks.

TOPICS
Development

Views

1.9K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

ANE with iOS dynamic .framework

New Here ,
Nov 10, 2016

Copy link to clipboard

Copied

I'm building an ANE for NokiaHere maps for iOS. What they offer in their SDK is NMAKit.framework library which is a dynamic library. I wrote my own xCode project which implements all the stuff needed for ANE, I've built it as a static library (libHereMapsANEiOS.a). I integrated it with ANE project and I've successfully built the required .ane file. So far so good

I've made a test AIR mobile app in Intelli J, I use Flex SDK 4.6, and when I try to build .ipa and run it on the device I get the following error:

AIRScreenshot.png

I have xCode 8.0 installed.

I suspect this has something to do with the fact that NMAKit.framework is a dynamic framework since I had similar issues when I was developing ANE for MapBox. I was successful to use it in an app when I switched to static .framework library, but unfortunately HereMaps don't have one available on their SDK download pages. I read somewhere that AIR does not support dynamic 3rd party libraries in their adt tool? Is that true, if so, are there any workarounds for this.

Thanks.

TOPICS
Development

Views

1.9K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 10, 2016 0
Explorer ,
Nov 11, 2016

Copy link to clipboard

Copied

I had the same issue with other 3rd party framework. Though in my case the sources for the framework were available so I simply rebuilt the framework to use a static linking.

I don't remember trying the following myself as I needed iOS 7 support but did you try setting the min iOS version for the app to 8.0 in your app descriptor? It would force your app to work on iOS 8+ only but maybe that's good enough for you.

<iPhone>

     <InfoAdditions>

          <![CDATA[

               <key>MinimumOSVersion</key>

               <string>8.0</string>

          ]]>

     </InfoAdditions>

     ...

</iPhone>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 11, 2016 0
New Here ,
Nov 11, 2016

Copy link to clipboard

Copied

Wow, seems to fix my issue. This is great news, thanks. iOS 8 is more than enough for my case.

I wish there was little more documentation about this kind of stuff from Adobe, their latest adt/mobile app packaging documentation is from 2011.

Thanks again.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 11, 2016 0
New Here ,
Nov 14, 2016

Copy link to clipboard

Copied

The additional issue I got now is when I start the app it crashes instantly with following message:

Exception Type:  EXC_CRASH (SIGABRT)

Exception Codes: 0x0000000000000000, 0x0000000000000000

Exception Note:  EXC_CORPSE_NOTIFY

Termination Description: DYLD, Library not loaded: @rpath/NMAKit.framework/NMAKit | Referenced from: /var/containers/Bundle/Application/A61D97D6-C35B-4D0F-87B8-884C05558BF6/HellWorld.app/HellWorld | Reason: image not found

Triggered by Thread:  0

Any idea why this happens? I tried most of the scenarios regarding this issue you can find on SO without any luck.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 14, 2016 0
Explorer ,
Nov 15, 2016

Copy link to clipboard

Copied

Could you show me your platform.xml for the iOS library of the ANE?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 15, 2016 0
New Here ,
Jul 10, 2018

Copy link to clipboard

Copied

I have the same issue with air30

Termination Description: DYLD, Library not loaded: @rpath/TwitterCore.framework/TwitterCore | Referenced from: /var/containers/Bundle/Application/85C61A67-FFA0-4393-94D8-4BF9E9570403/cnlz.app/cnlz | Reason: image not found

Triggered by Thread:  0

Have you solved it now?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2018 0
New Here ,
Nov 15, 2016

Copy link to clipboard

Copied

<platform xmlns="http://ns.adobe.com/air/extension/23.0">

    <sdkVersion>8.1</sdkVersion>

    <linkerOptions>

        <option>-ios_version_min 8.1</option>

        <option>-w</option>

        <option>-rpath @executable_path/Frameworks</option>

        <option>-framework NMAKit</option>

    </linkerOptions>

    <packagedDependencies>

        <packagedDependency>ios/Frameworks/NMAKit.framework</packagedDependency>

    </packagedDependencies>

</platform>

With this configuration I managed to get the NMAKit to appear in Frameworks folder of .ipa file, but unfortunately the NMAKit.framework is unsigned so I must sign it manually every time which is really slow for development. It seems that .adt doesn't do codesign when building the .ipa the same as xCode does.

This is really frustrating, how come there is no way to see what adt does in the background when building ipa, which command it calls etc?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 15, 2016 0
Explorer ,
Nov 15, 2016

Copy link to clipboard

Copied

Did you try it without the linker option <option>-framework NMAKit</option> ?

If that does not work, try to remove the packagedDependency element, link it using -weak_framework and put the NMAKit.framework to AIR_SDK/lib/aot/stub directory.

<platform xmlns="http://ns.adobe.com/air/extension/23.0">

    <sdkVersion>8.1</sdkVersion>

    <linkerOptions>

        <option>-ios_version_min 8.1</option>

        <option>-w</option>

        <option>-rpath @executable_path/Frameworks</option>

        <option>-weak_framework NMAKit</option>

    </linkerOptions>

</platform>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 15, 2016 0
New Here ,
Nov 15, 2016

Copy link to clipboard

Copied

No this doesn't work, I still get verification error:
Screen Shot 2016-11-15 at 16.16.32.png

This is probably because the ipa signing fails when dynamic libraries are involved. Why weak linking should have fixed this I don't know.
One concrete question though: Do Air Native Extensions support packaging of 3rd party iOS dynamic libraries? No one seems to give clear answer on this. According to documentation it does not: (this link: Adobe Flash Platform * Building the native library Relevant part:

Screen Shot 2016-11-15 at 16.21.01.png

But then again it could be outdated.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 15, 2016 0
Explorer ,
Nov 15, 2016

Copy link to clipboard

Copied

That's unfortunate. I'm not really sure about the support of dynamic frameworks in AIR.

Check the Xcode device log (Xcode > Window > Devices or CMD + Shift + 2) - select the connected device on the left and expand the log window at the bottom. There should be further explanation why the application verification failed, maybe that will provide some useful information.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 15, 2016 0
Explorer ,
Apr 14, 2018

Copy link to clipboard

Copied

with thje latest air sdk 29 there is still problem when signing thirdy pary dynamnic frameworks. we get "Bundle idetifier not specified" error during packaging ipa with Frameworks/NMAKit.framework provided by here maps. With Xcode project ipa packaged with no problem. Guess still adobe adt ipa packaging code signing has some issues.

We have successfully create android ane using here premium android sdk but stuck on ipa packaging.

Did you found any solution ?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 14, 2018 0