Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add visionOS client type #2670

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Add visionOS client type #2670

wants to merge 7 commits into from

Conversation

wyAbhishek
Copy link
Contributor

Description

Teams iOS client runs on VisionOS. Teams iOS client supports web apps built on Teams JS SDK on VisionOS. This PR adds visionOS as a new HostClientType in the Teams JS SDK. This change will enable app developers to find out if app is running on visionOS and write conditional code (if required).

Main changes in the PR:

  1. Add visionOS as new case for HostClientType
  2. Change all logic which is written for HostClientType.iPadOS. All the logic should apply for HostClientType.visionOS also.

Unit Tests added:

Unit tests are required for all changes. If no unit tests were added as part of this change, please explain why they aren't necessary.

Updated existing tests which included iPadOS. Added visionOS also in list of client type in such tests. Ideally all these tests should pass for visionOS also.

End-to-end tests added:

No

Additional Requirements

Change file added:

Ensure the change file meets the formatting requirements.

Yes

Copy link
Contributor

github-actions bot commented Jan 8, 2025

This pull request contains changes to the runtime.ts file. If you, as the author of this PR, have made changes to the Runtime interface please review RUNTIME.md to determine if a new runtime version is required. Please reply to this comment stating what changes, if any, were made to the runtime object and whether a new runtime version was required.

@wyAbhishek wyAbhishek marked this pull request as ready for review January 8, 2025 05:45
@wyAbhishek wyAbhishek requested a review from a team as a code owner January 8, 2025 05:46
@AE-MS AE-MS requested a review from maglims January 8, 2025 23:47
@maglims
Copy link
Contributor

maglims commented Jan 21, 2025

@wyAbhishek , as talked offline, while we are working on official support(i.e, passing platform type from host to app through hub sdk), another way that developers can do is to check visionOS identifier in the user agent, if they want to get unblocked faster before we complete the chain of support. I am signing off on this PR for now. Tagging @TrevorJoelHarris FYI,

@wyAbhishek
Copy link
Contributor Author

@wyAbhishek , as talked offline, while we are working on official support(i.e, passing platform type from host to app through hub sdk), another way that developers can do is to check visionOS identifier in the user agent, if they want to get unblocked faster before we complete the chain of support. I am signing off on this PR for now. Tagging @TrevorJoelHarris FYI,

This is not very straightforward as checking user agent. In our test, user agent of iPad and visionOS is similar.
Many people have been using this trick to identify visionOS: https://dev.to/ku6ryo/detecting-visionos-by-javascript-1ei5

@wyAbhishek wyAbhishek enabled auto-merge (squash) January 31, 2025 04:14
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.

3 participants