Copy link to clipboard
Copied
ANE on the iOS side - if I include the condition in my XCode functions:
if (@available(iOS 11.0, *))
{
}
I am able to build the ANE, however, my project won't run - it fails with:
Undefined symbols for architecture arm64:
"___isOSVersionAtLeast", referenced from:
.......and list of the functions that include the conditional statement......
Undefined symbols for architecture armv7:
"___isOSVersionAtLeast", referenced from:
.......and list of the functions that include the conditional statement......
If I comment out the condition everything works as expected.
I can't figure out what I need to include either when building the static library in XCode or when building the ANE..?
Any help much appreciated.
Copy link to clipboard
Copied
Not marking this as answered because we should be able to use the new feature available in XCode 9: if (@available(iOS 11.0, *)) which of course also suppresses any potential warnings.
This is the workaround - add in your header:
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
Then in your files that you need to check for version:
#import "UIKit/UIKit.h"
In the methods:
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"11.0"))
{
..........
Copy link to clipboard
Copied
We've run into this issue too and it's a pain because this is starting to appear in 3rd party library code. Have you made a bug report? if so I'll vote on it.
Copy link to clipboard
Copied
I didn't submit a bug report actually - you're right of course I should have done so back in September.
Just fyi, not currently in a position to do so - so if you happen to file one b4 I'm able - I'll of course vote on yours.
Copy link to clipboard
Copied
Tracker <= this bug on the tracker
Copy link to clipboard
Copied
Just an FYI for anyone attempting to get around this, we've added a few additions to the distriqt Core ANE that implements the required functionality to get the @available flag working.
Simply by including the Core ANE in your application you should be able to use any ANE that uses the @available flag.
It's available here: GitHub - distriqt/ANE-Core: ANE providing a centralised notification / delegation system
Copy link to clipboard
Copied
To do this without using a custom DEFINE ( or to use closed source Frameworks which use @available such as latest Firebase )
1. Copy this file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.1.0/lib/darwin/libclang_rt.ios.a
to
[AIRSDK_PATH]/lib/aot/lib/libclang_rt.ios.a
2. Add this to your linkerOptions in platform.xml
<linkerOptions>
<option>-lclang_rt.ios</option>
</linkerOptions>
= Happy Days
Hopefully Adobe can add libclang_rt.ios.a to AIR SDK dist ?
*Credit to Eugene Petrenko @JetBrains
Copy link to clipboard
Copied
Hi,
Thank You for reporting the issue!
Since the @available API has been made available since iOS 11, make sure that you are packaging the ANE for iOS version 11. You can do so by setting linkerOptions and sdkVersion in your platform.xml for packaging ANE. Below is a sample platform.xml for doing so:
<platform xmlns="http://ns.adobe.com/air/extension/30.0">
<sdkVersion>11.0.0</sdkVersion>
<linkerOptions>
<option>-ios_version_min 11.0</option>
</linkerOptions>
</platform>
Copy link to clipboard
Copied
Hi, That's not quite correct. @available was introduced with Xcode 9 but it still works on older versions of iOS.
Copy link to clipboard
Copied
Hi Michael,
Please give it try by setting the iOS Deployment Target set as 11.0 in the Xcode and share your feedback.
Copy link to clipboard
Copied
Sorry but that's not really a solution as the @available flag can be used in a third party framework and setting the deployment target that high will reduce the number of devices we can support with native extensions.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
This bug has been logged already for months, 17 votes woohoo
https://tracker.adobe.com/#/view/AIR-4198557
Copy link to clipboard
Copied
Any news? It is still not possible to compile the latest Facebook SDK (for example Distriqt ANE) with Air 32.0.0.103 on Windows because of the bug logged in the issue tracker.