Skip to content

Full tvOS support#77

Merged
emdobrin merged 15 commits intoadobe:dev-v3.2.0from
addb:tvos
Jun 30, 2022
Merged

Full tvOS support#77
emdobrin merged 15 commits intoadobe:dev-v3.2.0from
addb:tvos

Conversation

@addb
Copy link
Copy Markdown
Collaborator

@addb addb commented Jun 22, 2022

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

AppleTv Sample App UI:
Simulator Screen Shot - Apple TV - 2022-06-22 at 14 28 26

ExtensionVersion and trackAction with context data:
image

Sample trackAction ping:
Screen Shot 2022-06-22 at 2 51 58 PM

Screen Shot 2022-06-22 at 2 52 12 PM

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 22, 2022

Codecov Report

Merging #77 (1816d81) into dev-v3.2.0 (588099b) will decrease coverage by 3.41%.
The diff coverage is n/a.

@@              Coverage Diff               @@
##           dev-v3.2.0      #77      +/-   ##
==============================================
- Coverage       90.23%   86.83%   -3.41%     
==============================================
  Files              14       14              
  Lines            1116     1116              
==============================================
- Hits             1007      969      -38     
- Misses            109      147      +38     

@addb addb requested review from cdhoffmann, emdobrin and praveek June 22, 2022 01:06
@addb addb mentioned this pull request Jun 22, 2022
10 tasks
Copy link
Copy Markdown
Contributor

@cdhoffmann cdhoffmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

#endif

@UIApplicationMain
@available(tvOSApplicationExtension, unavailable)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something that the app developer needs to declare in their App/SceneDelegate when using Analytics ext?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only in the tvOS target.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cdhoffmann do you mind sharing a quick summary of your findings on this and should we add a task to remind us to update the code once this issue is resolved?

@emdobrin emdobrin merged commit 1e649ae into adobe:dev-v3.2.0 Jun 30, 2022
@alexzchut
Copy link
Copy Markdown

alexzchut commented Jan 25, 2023

@cdhoffmann @praveek @emdobrin
Hi all,
This change of adding @available(tvOSApplicationExtension, unavailable) caused a regression on tvOS when building with Xcode 14.2 without any extension defined in app.

Errors are as follows (I see it same with Analytics and Signal):
'Analytics' is unavailable in application extensions for tvOS
'Signal' is unavailable in application extensions for tvOS

As a fix I can suggest adding @available(tvOS 14.0, *) after the extension limitation that you have added with this PR:
@available(tvOSApplicationExtension, unavailable)

as example: after this line
https://github.com/addb/aepsdk-analytics-ios/blob/1816d81156aa2dcb5f71ed1e2023040ba91a7bfc/AEPAnalytics/Sources/Analytics.swift#L24

I am adding this to our platform plugin using your SDK and it is resolving to compile the framework correctly, probably it is related to Xcode and could be resolved on their side on some point but for now it can help it to continue to work for tvOS.

@addb
Copy link
Copy Markdown
Collaborator Author

addb commented Jan 25, 2023

@cdhoffmann @praveek @emdobrin Hi all, This change of adding @available(tvOSApplicationExtension, unavailable) caused a regression on tvOS when building with Xcode 14.2 without any extension defined in app.

Errors are as follows (I see it same with Analytics and Signal): 'Analytics' is unavailable in application extensions for tvOS 'Signal' is unavailable in application extensions for tvOS

As a fix I can suggest adding @available(tvOS 14.0, *) after the extension limitation that you have added with this PR: @available(tvOSApplicationExtension, unavailable)

as example: after this line https://github.com/addb/aepsdk-analytics-ios/blob/1816d81156aa2dcb5f71ed1e2023040ba91a7bfc/AEPAnalytics/Sources/Analytics.swift#L24

I am adding this to our platform plugin using your SDK and it is resolving to compile the framework correctly, probably it is related to Xcode and could be resolved on their side on some point but for now it can help it to continue to work for tvOS.

Hi @alexzchut,

We are aware of this issue with the Xcode and we recommend using this workaround documented here. Please let us know if you this works for you.

Thanks,
Arjun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants