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
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.
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
...Copy link to clipboard
Copied
hope
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
Copy link to clipboard
Copied
I simple hate Objetive-C. Swift on the other hand it's nice and easy for a AS3 developer.
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.
Copy link to clipboard
Copied
hope
Copy link to clipboard
Copied
Yes. That's great!!
Copy link to clipboard
Copied
hope
Copy link to clipboard
Copied
el111 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​
Copy link to clipboard
Copied
Updated GitHub with a tool written in AIR to package app, deploy and debug on device
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.
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
Copy link to clipboard
Copied
You are doing what Adobe can't !
Keep up the good work.