• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Is Adobe planning on support writing ANE with Swift?

Participant ,
Jan 11, 2017 Jan 11, 2017

Copy link to clipboard

Copied

Dear Adobe,

AIR is an awesome cross platform solution, I have already published a multi platform product using AIR technology, my product website is https://verylab.com/

Nowadays the hardwares of mobile devices are fairly high spec, even the cheap price devices can handle AIR applications pretty well, it's safe to say that the performance issue of AIR on modern mobile devices is no longer the case, which is great!

The way I see it, the only thing that holds me back is not able to write ANE with Swift. I googled the internet and found the problem is: Swift is a dynamic framework, and AIR ANE only supports static frameworks, so we have to write ANE with Objective-C.

The language grammar between Swift and ActionScript has many commons, which is easy for ActionScript developers to learn and write Swift codes. It's a HUGE let down that AIR ANE does not support Swift : (

Is there any way or any workaround for AIR ANE to support Swift?

If there is a way, is Adobe planning on support it?

Regards,

Ge Zhou

2017-01-11

TOPICS
Air beta

Views

2.0K

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
community guidelines

correct answers 1 Correct answer

Engaged , Mar 05, 2017 Mar 05, 2017

Updated repo with latest code.

Now allows calls to FRE functions from Swift

The project contains a translation of FlashRuntimeExtensions to Swift. It is comprised of 2 parts.

  1. A static library which exposes methods to AIR and a thin ObjectiveC API layer to the Swift code.
  2. A dynamic Swift Framework which contains the main logic of the ANE.

To allow FRE functions to be called from within Swift, a protocol acting as a bridge back to Objective C was used.   

Example - Converting a FREObject into a String

v

...

Votes

Translate

Translate
Community Beginner ,
Jan 11, 2017 Jan 11, 2017

Copy link to clipboard

Copied

hope

Votes

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
community guidelines
Engaged ,
Jan 12, 2017 Jan 12, 2017

Copy link to clipboard

Copied

Yes. This would be great. I've written a couple for OSX (where it is supported) and Swift is a lot nicer to use

Votes

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
community guidelines
Contributor ,
Jan 13, 2017 Jan 13, 2017

Copy link to clipboard

Copied

I simple hate Objetive-C. Swift on the other hand it's nice and easy for a AS3 developer.

Votes

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
community guidelines
Participant ,
Feb 10, 2017 Feb 10, 2017

Copy link to clipboard

Copied

Yes, totally agreed!

Support writing ANE with Swift is a huge feature, we're sincerely hoping Adobe could take it into consideration.

Votes

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
community guidelines
New Here ,
Jan 16, 2017 Jan 16, 2017

Copy link to clipboard

Copied

hope

Votes

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
community guidelines
New Here ,
Feb 14, 2017 Feb 14, 2017

Copy link to clipboard

Copied

Yes. That's great!!

Votes

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
community guidelines
New Here ,
Feb 14, 2017 Feb 14, 2017

Copy link to clipboard

Copied

hope

Votes

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
community guidelines
Participant ,
Feb 20, 2017 Feb 20, 2017

Copy link to clipboard

Copied

has found a way to support Swift in ANE, below are the related links:

Re: Swift iOS ANE Framework​​

GitHub - tuarua/SwiftIOSANE: Example Air Native Extension written in Swift 3 for iOS 10​

Votes

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
community guidelines
Engaged ,
Feb 25, 2017 Feb 25, 2017

Copy link to clipboard

Copied

Updated GitHub with a tool written in AIR to package app, deploy and debug on device

Votes

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
community guidelines
Engaged ,
Mar 05, 2017 Mar 05, 2017

Copy link to clipboard

Copied

Updated repo with latest code.

Now allows calls to FRE functions from Swift

The project contains a translation of FlashRuntimeExtensions to Swift. It is comprised of 2 parts.

  1. A static library which exposes methods to AIR and a thin ObjectiveC API layer to the Swift code.
  2. A dynamic Swift Framework which contains the main logic of the ANE.

To allow FRE functions to be called from within Swift, a protocol acting as a bridge back to Objective C was used.   

Example - Converting a FREObject into a String

var swiftString: String = ""

var len: UInt32 = 0

let status: FREResult = FREGetObjectAsUTF8(object: object, length: &len, value: &swiftString)

var airString: FREObject? = nil

let status: FREResult = FRENewObjectFromUTF8(length: UInt32(string.utf8.count), value: ret, object: &freObject)

Example - Converting a FREObject into a String the easy way, using ANEHelper.swift

let swiftString: String = aneHelper.getString(object: object)

let airString: FREObject? = aneHelper.getFREObject(string: swiftString)

trace(value: swiftString)

GitHub - tuarua/SwiftIOSANE: Example Air Native Extension written in Swift 3 for iOS 10

Votes

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
community guidelines
Contributor ,
Mar 05, 2017 Mar 05, 2017

Copy link to clipboard

Copied

LATEST

You are doing what Adobe can't !

Keep up the good work.

Votes

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
community guidelines