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

feat: visionOS support #3058

Merged
merged 35 commits into from
Jun 29, 2023
Merged

feat: visionOS support #3058

merged 35 commits into from
Jun 29, 2023

Conversation

atierian
Copy link
Member

@atierian atierian commented Jun 27, 2023

Description

Adds preview support for visionOS.

Important Note: As with macOS, visionOS appears to require apps add the Keychain Sharing entitlement and a keychain group for keychain access.

Changes

  • Adds #if os(xrOS) checks to:
    • DeviceInfo returns .zero for screenBounds because UIScreen isn't available
    • DevMenu. Also UIScreen related. I'd imagine we can get this working because it's only used in a single spot. Disabling it on visionOS for now.
  • Background URLSessions are not available when running pure visionOS. Storage session of os(xrOS) is now foreground.
  • useragent version is visionos-preview

Known Issues

  • Some CoreML APIs have different behavior on visionOS. This only affects you if you're using the CoreMLPredictionsPlugin standalone or explicitly setting .offline only for requests through the AWSPredictionsPlugin.

  • UI tests appear to work on visionOS with some limitations. This affects our PushNotifications integration tests because they're set up as UI test cases. Problematic test cases were manually tested to verify expected behavior.

There is no UI for simulating Apple Vision Pro’s immersion crown. (109429267)
Workaround: Use XCTest’s XCUIDevice. rotateDigitalCrown(delta:) method. [source]

UI testing isn’t available to apps you build using the visionOS SDK. You can still use it to test compatible iPad and iPhone apps that you build using the iOS SDK but run in visionOS. [source]

CI/CD

  • Unit tests are set up to run for visionOS (in addition with the other platforms).
  • Integration tests are currently run locally until we set up access for Xcode 15 beta 2 with GitHub Actions.

Integration Test Results

Analytics

analytics_pinpoint_integration_tests

API

api_functional_integration_tests api_graphql_lambda_integration_tests api_rest_iam_integration_tests

Auth

auth_integration_tests

DataStore

datastore_auth_cognito_integration_tests datastore_auth_iam_integration_tests datastore_cpk_integration_tests datastore_lazyload_inegration_tests datastore_transformerv2_integration_tests

Geo

geo_integration_tests

Predictions

predictions_integration_tests

PushNotifications

push_notifications_ui_integration_tests

Storage

storage_integration_tests

General Checklist

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • All integration tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
  • If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@atierian atierian changed the title Visionos staging feat: visionos support Jun 27, 2023
@atierian atierian changed the title feat: visionos support feat: visionOS support Jun 27, 2023
atierian added 24 commits June 28, 2023 11:50
@atierian atierian marked this pull request as ready for review June 29, 2023 14:26
@atierian atierian requested a review from a team as a code owner June 29, 2023 14:26
Copy link
Contributor

@royjit royjit left a comment

Choose a reason for hiding this comment

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

LGTM, minor question added.

@@ -16,7 +16,7 @@ import Amplify
public class AmplifyAWSServiceConfiguration {

/// - Tag: AmplifyAWSServiceConfiguration.amplifyVersion
public static let amplifyVersion = "2.12.0"
public static let amplifyVersion = "visionos-preview"
Copy link
Contributor

Choose a reason for hiding this comment

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

no need of a number? something like visionos-preview-0.0.1, will be useful in keeping track of bug fixes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call. Addressed in e5e51ed.

@atierian atierian merged commit bd26a7e into visionos-preview Jun 29, 2023
@atierian atierian deleted the visionos-staging branch June 29, 2023 21:15
atierian added a commit that referenced this pull request Oct 23, 2023
atierian added a commit that referenced this pull request Nov 8, 2023
atierian added a commit that referenced this pull request Nov 9, 2023
harsh62 pushed a commit that referenced this pull request Feb 14, 2024
thisisabhash pushed a commit that referenced this pull request Feb 14, 2024
thisisabhash pushed a commit that referenced this pull request Feb 15, 2024
thisisabhash pushed a commit that referenced this pull request Feb 15, 2024
sebaland pushed a commit that referenced this pull request Feb 21, 2024
sebaland pushed a commit that referenced this pull request Feb 22, 2024
sebaland pushed a commit that referenced this pull request Feb 23, 2024
sebaland pushed a commit that referenced this pull request Feb 26, 2024
sebaland pushed a commit that referenced this pull request May 1, 2024
harsh62 pushed a commit that referenced this pull request Oct 17, 2024
harsh62 added a commit that referenced this pull request Oct 21, 2024
* feat: visionOS support (#3058)

* fix readme typo and make instructions clearer (#3070)

* fix: update xrOS --> visionOS in os directive checks

* chore(build): fix integration tests

* fix: Fixing Analytics, Storage and Predictions integration tests

* fix: Fixing Push Notification tests. Also reverting some scheme changes.

* chore: Updating README

* chore: update ReadMe me to remove visionos-preview branch

* chore: add visionOS to build and unit test jobs (#3900)

* Update Amplify/Core/Configuration/Internal/Amplify+Reset.swift

Co-authored-by: Sebastian Villena <[email protected]>

* worked on review comments

* fixed unit tests

* remove the platform checks

---------

Co-authored-by: Ian Saultz <[email protected]>
Co-authored-by: Abhash Kumar Singh <[email protected]>
Co-authored-by: Sebastian Villena <[email protected]>
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.

2 participants