Highlighted

Adobe AIR SDK support for iOS @available expression

Community Beginner ,
Oct 01, 2020

Copy link to clipboard

Copied

Adobe AIR SDK still doesn't support @available 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 is no longer true, the latest build of the AIR SDK from Harman supports @available 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

TOPICS
Development

Views

84

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

Adobe AIR SDK support for iOS @available expression

Community Beginner ,
Oct 01, 2020

Copy link to clipboard

Copied

Adobe AIR SDK still doesn't support @available 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 is no longer true, the latest build of the AIR SDK from Harman supports @available 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

TOPICS
Development

Views

85

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
Oct 01, 2020 0
Engaged ,
Oct 04, 2020

Copy link to clipboard

Copied

This is no longer true, the latest build of the AIR SDK from Harman supports @available 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

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...
Oct 04, 2020 0
Community Beginner ,
Oct 04, 2020

Copy link to clipboard

Copied

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?

 

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...
Oct 04, 2020 0
Engaged ,
Oct 04, 2020

Copy link to clipboard

Copied

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

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...
Oct 04, 2020 1
Community Beginner ,
Oct 05, 2020

Copy link to clipboard

Copied

Does this still mean that apps which are planning to use version of ANE which uses native code with @available expression also need to use latest Adobe AIR SDK to be built (or otherwise they need to do that for a while famous step of copying the library)?

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...
Oct 05, 2020 0
Engaged ,
Oct 05, 2020

Copy link to clipboard

Copied

Yes that's correct, either use the latest SDK or copy the lib into the SDK.

 

You have been able to do this with for a while now but definitely easier to get your users to use the latest AIR SDK.

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

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...
Oct 05, 2020 0
Community Beginner ,
Oct 05, 2020

Copy link to clipboard

Copied

Oh, wow, it works with latest build. I was trying an older one and was still getting this error. Amazing, thanks!

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...
Oct 05, 2020 1