Highlighted

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

Community Beginner ,
Jan 04, 2018

Copy link to clipboard

Copied

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

Correct answer by krati | Adobe Employee

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

TOPICS
Air beta

Views

756

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

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

Community Beginner ,
Jan 04, 2018

Copy link to clipboard

Copied

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

Correct answer by krati | Adobe Employee

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

TOPICS
Air beta

Views

757

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
Jan 04, 2018 0
Adobe Employee ,
Jan 04, 2018

Copy link to clipboard

Copied

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

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...
Jan 04, 2018 0
Community Beginner ,
Jan 08, 2018

Copy link to clipboard

Copied

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

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...
Jan 08, 2018 0
Engaged ,
Jan 10, 2018

Copy link to clipboard

Copied

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...

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...
Jan 10, 2018 1
Community Beginner ,
Jan 11, 2018

Copy link to clipboard

Copied

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

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...
Jan 11, 2018 0
Adobe Community Professional ,
Jan 11, 2018

Copy link to clipboard

Copied

For what it's worth, I have done Adobe AIR applications to Apple TV. The only difference is that when making the profile you have to specify Apple TV. any other profile will fail. In the XML the device type needs to be 3.

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...
Jan 11, 2018 1
Community Beginner ,
Jan 12, 2018

Copy link to clipboard

Copied

Thanks Collin,

I have it in mind!

It's relly interesting for me to meet experienced Adobe AIR developers in Apple TV, like you

Maybe you may help me with another issue I have with tvOS (time ago I asked about it but nobody answered me):

I want to get the menu button of Siri controller works like Apple tells in the human interface guidelines. Basicly going back in the navigation hierarchy but in main screen if you click it the app exits and go to Apple's main screen.

I can avoid the app exits every time you click menu button using "preventDefault()" in the key event handler. In the main screen of the app I must to allow the menu button exits, and I don't prevent the default behavior in this case.

Until here no problem, but doing it like I said, if you return to the app, the "peventDefault()" doesn't take effect anymore, exiting always in all the screens of the app

Have you solved it in some way? What would be the correct manner to achieve this?

As always, any advice will be wellcome!

Cheers,

3dU

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...
Jan 12, 2018 0
Adobe Community Professional ,
Jan 12, 2018

Copy link to clipboard

Copied

I haven't tested this, but usually remote buttons end up seeming like keyboard presses. You could create a keyboard listener to see what key the Home button appears to be.

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...
Jan 12, 2018 0
galanedu LATEST
Community Beginner ,
Jan 16, 2018

Copy link to clipboard

Copied

Thanks Colin,

I will post the answer again. Maybe I'll be more lucky

Cheers,

3dU

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...
Jan 16, 2018 0