Skip to main content
uerceg
Known Participant
October 1, 2020
Answered

Adobe AIR SDK support for iOS @available expression

  • October 1, 2020
  • 1 reply
  • 1120 views

Adobe AIR SDK still doesn't support @11867269 expression in native iOS code. If one uses native library which uses this API, app can't be built:

 

Undefined symbols for architecture arm64:
"___isPlatformVersionAtLeast", referenced from:
+[Class methodWhichUsesAvailable] in Somewhere(Class.o)
ld: symbol(s) not found for architecture arm64
Compilation failed while executing : ld64

 

This is native iOS feature since such a long time ago and it's honestly sad that this is not supported with Adobe AIR SDK. Writing native extensions which we are porting to numerous non native mobile frameworks (including Adobe AIR) suffer because of this and are forced to use macros for checking current iOS version. Natively compilers are unaware of these macros and they flag usage of deprecated APIs all the time, even though we are using them properly. With usage of available expression, we would be able to remove those warnings, but if we use that expression natively, Adobe AIR ANE is useless, since apps using it don't even compile.

 

Are there any plans to support this? 

This topic has been closed for replies.
Correct answer marchbold

This is no longer true, the latest build of the AIR SDK from Harman supports @11867269 in native iOS code. 

 

You just have to make sure you link against the clang lib by adding the following option to your platform xml:

 

<option>-lclang_rt.ios</option>

  

Check out the discussion here: https://github.com/Gamua/Adobe-Runtime-Support/issues/113

1 reply

marchbold
marchboldCorrect answer
Inspiring
October 4, 2020

This is no longer true, the latest build of the AIR SDK from Harman supports @11867269 in native iOS code. 

 

You just have to make sure you link against the clang lib by adding the following option to your platform xml:

 

<option>-lclang_rt.ios</option>

  

Check out the discussion here: https://github.com/Gamua/Adobe-Runtime-Support/issues/113

air native extensions // https://airnativeextensions.com
uerceg
uercegAuthor
Known Participant
October 4, 2020

Hi @marchbold ,


Thanks for your reply. I will give this a try next week and update in here how did it go. Would this addition to platform.xml also need to become an additional integration step for an app which would be using ANE which contains native iOS library which uses @available?

 

marchbold
Inspiring
October 4, 2020

The platform xml is packaged with your ANE and developers using your ANE won't have to do anything specific for it now. With slightly older versions of the AIR SDK there was a step of copying the library into the AIR SDK however this is now included with the latest builds.

air native extensions // https://airnativeextensions.com