Skip to main content
Participating Frequently
January 5, 2018
Answered

AIR 28 - Saving game progress in tvOS (Apple TV)

  • January 5, 2018
  • 2 replies
  • 1272 views

Hello,

I'm porting a iOS game to the tvOS platform.

I want to save the game progress as I do in mobile devices, but if I'm not wrong, the way to do this in tvOS is using iCloud service because it's not posible to write a state file in the device.

For doing it I'm using an ANE. Exactly I'm using a comercial one, from Distriqt (https://airnativeextensions.com/ ).

I convert the iOS ANE to tvOS ane as the documentation tells: https://fpdownload.macromedia.com//pub/labs/flashruntimes/shared/pvt/air28_appletv_releasenotes.pdf

Doing this I have the ANE working for tvOS, at least If I publish for device testing.

It's strange because the app works perfectly with iCloud support in my Apple TV when I publish for testing. But when I publish for distribution I get the next error message:

"Error creating files.

Id:in
C:\\Users\Edu\\AppData\\Local\\Temp\\f7dda99-c7af-47da-a062-7ec6d93b72a1/CoreNativeExtension.framework/CoreNativeExtension(DTObjectIdentifier.o), building for tvOS, but linking in object file built for iOS, for architecture arm64
Compilation failed while executing: Id64"

Is there anything I can do to publish the IPA for distribution? The ANE works in the device when I publish it for testing.

Or, there are another solution for doing this?

Any suggestion will be wellcome.

Thanks in advance, and I hope somebody could help me with this

Have a happy new year!

3dU

This topic has been closed for replies.
Correct answer krgupta

Hello,

The error thrown by ld indicates that you are using iOS files when packaging ANE for tvOS.

Please make sure that when creating .a or framework files for tvOS which are required for ANE packaging, you need to create a tvOS library project in Xcode.

Hope this helps.

Thanks,

Krati

Adobe AIR Engineering

2 replies

galaneduAuthor
Participating Frequently
January 8, 2018

Hello Krati,

Thanks a lot for your quick response.

I'm not have too much knoledge for developing my own ANE with Xcode, but I'll try it. What do you recommend to me, use ObjectiveC or Swift? Any tutorial or template?

If any of the readers could help me in any way, with some advice or whatever, it will be really appreciated.

Thanks again,

3dU

Legend
January 10, 2018

This is the best book for learning how to create ANEs using Objective C

Easy Native Extensions for iOS eBooks - Easy Native Extensions

Swift based ANEs are now possible with AIR28+

However, out-of-the-box it still means writing quite alot of ObjectiveC to communicate between the AIR and native sides.

Good news - I wrote a framework called FreSwift which minimises the amount of ObjectiveC needed and allows calling FlashRuntimeExtensions methods directly from Swift.

Bad News - It is available for OSX and IOS but not tvOS as I don't an AppleTV device to be able to support it.

GitHub - tuarua/Swift-IOS-ANE: FlashRuntimeExtensions.swift. Example Air Native Extension written in Swift 4 for iOS 9

galaneduAuthor
Participating Frequently
January 11, 2018

Hello "el111" ,


Thanks a lot for your suggestions! They're very interesting for me!

I'm starting to try with Objective C, although I prefer Swift as programming language.

If I'm not lucky with Objective C ANE implementation, maybe I will try with your framework FreSwift.

Thanks again,

3dU

krguptaCommunity ManagerCorrect answer
Community Manager
January 5, 2018

Hello,

The error thrown by ld indicates that you are using iOS files when packaging ANE for tvOS.

Please make sure that when creating .a or framework files for tvOS which are required for ANE packaging, you need to create a tvOS library project in Xcode.

Hope this helps.

Thanks,

Krati

Adobe AIR Engineering